Artificial intelligence-based query processing method and device, computer equipment and medium
By using artificial intelligence query processing methods in the insurance question-and-answer system, combining keyword generation, knowledge segmentation and integration models, the sequence dependency problem is solved, nonlinear text slicing and efficient answer generation are realized, and answer accuracy is improved and User experience.
Patent Information
- Application Number
- CN202411259064.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-01-07
AI Technical Summary
The existing insurance question and answer system uses semantic-based text slicing method to have strong sequence dependence, making it difficult to deal with long-distance semantic associations across paragraphs or chapters, resulting in low answer accuracy.
Using the query processing method based on artificial intelligence, the original text is extracted, divided and integrated through the keyword generation model, the knowledge segmentation model and the knowledge integration model, and the nonlinear and multi-dimensional text slices are generated, and the target is large Language models perform inference processing to improve the accuracy of answers.
It breaks through the limitations of traditional sequential slices, improves the flexibility and accuracy of text processing, optimizes text analysis efficiency, enriches the depth of expression and understanding of text content, and improves the answer accuracy of the question and answer system and user query satisfaction.
Smart Images

Figure CN119271773A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence development technology and the field of financial technology, and in particular to artificial intelligence-based query processing methods, devices, computer equipment and storage media. Background Art
[0002] In the insurance field, with the rapid development of artificial intelligence technology, especially the widespread application of natural language processing (NLP) and question-answering systems (Q&A Systems), text slicing technology, as a key link, has played a vital role in improving the performance and accuracy of insurance question-answering systems. Text slicing aims to reasonably divide complex insurance documents or conversations into a series of smaller, easier-to-process text fragments so that the system can retrieve, understand and generate answers more efficiently.
[0003] At present, insurance question-and-answer systems in insurance companies usually use semantic-based segmentation methods to perform text slicing. The semantic-based segmentation method uses a pre-trained model (such as BERT) to evaluate the similarity between paragraphs to achieve more intelligent text slicing. Although such methods can improve the semantic integrity of slicing to a certain extent, they are still limited by their inherent sequence dependencies. Specifically, they usually need to be processed in the linear order of the text, and it is difficult to effectively handle long-distance semantic associations across paragraphs or chapters. This means that when faced with documents containing a large amount of unrelated text content but with important semantic connections between some paragraphs, the semantic-based segmentation method may also be unable to integrate these relevant information into the same slice, thereby affecting the question-and-answer system's comprehensive understanding and accurate answer to the question. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a query processing method, device, computer equipment and storage medium based on artificial intelligence, so as to solve the technical problems that the insurance question and answer system in the existing insurance companies adopts a semantic-based segmentation method to perform text slicing, which has strong sequence dependence and low accuracy of the answer of the question and answer system.
[0005] In order to solve the above technical problems, the embodiment of the present application provides a query processing method based on artificial intelligence, which adopts the following technical solution:
[0006] Get the query information entered by the user;
[0007] Acquire original text corresponding to the query information from a preset knowledge base;
[0008] Perform keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords;
[0009] Segment the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary;
[0010] Integrate the target keywords with the text sentence dictionary based on a preset knowledge integration model to obtain corresponding target text slices;
[0011] Performing reasoning processing on the query information and the target text slice based on a preset target large language model to obtain corresponding answer data;
[0012] A reply process is performed to the user based on the answer data.
[0013] Furthermore, the step of acquiring the original text corresponding to the query information from the preset knowledge base specifically includes:
[0014] Performing word segmentation processing on the query information to obtain corresponding word segments;
[0015] Performing an inverted index query on the knowledge base based on the word segmentation to obtain a correlation score between the word segmentation and each document contained in the knowledge base;
[0016] Sorting all the documents in descending order of the relevance scores to obtain a corresponding document sorting list;
[0017] Based on the relevance score, filter out a target number of designated documents from the ranked document list;
[0018] The original text corresponding to the query information is generated based on the designated document.
[0019] Furthermore, the step of performing keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords specifically includes:
[0020] Acquire first prompt data corresponding to the keyword generation model;
[0021] Call the pre-trained keyword generation model;
[0022] Put the original text and the first prompt data into the keyword generation model, and process the original text and the first prompt text through the keyword generation model to obtain a corresponding first model output;
[0023] The first model output is used as the target keyword.
[0024] Furthermore, the step of segmenting the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary specifically includes:
[0025] Acquire second prompt data corresponding to the knowledge segmentation model;
[0026] Call the pre-trained knowledge segmentation model;
[0027] Inputting the original text, the target keyword and the second prompt data into the knowledge segmentation model, and processing the original text, the target keyword and the second prompt data by the knowledge segmentation model to obtain a corresponding second model output;
[0028] The second model is output as the text sentence dictionary.
[0029] Furthermore, the step of integrating the target keywords with the text sentence dictionary based on a preset knowledge integration model to obtain corresponding target text slices specifically includes:
[0030] Acquire third prompt data corresponding to the knowledge integration model;
[0031] Call the pre-trained knowledge integration model;
[0032] Inputting the target keyword, the text sentence dictionary and the third prompt data into the knowledge integration model, and processing the target keyword, the text sentence dictionary and the third prompt data by the knowledge integration model to obtain a corresponding third model output;
[0033] The third model output is used as the target text slice.
[0034] Furthermore, the step of replying to the user based on the answer data specifically includes:
[0035] Obtaining preset redundancy processing strategies and grammar correction strategies;
[0036] Performing redundancy removal processing on the answer data based on the redundancy processing strategy to obtain corresponding first answer data;
[0037] Performing grammatical correction processing on the first answer data based on the grammatical correction strategy to obtain corresponding second answer data;
[0038] A reply process is performed on the user based on the second answer data.
[0039] Furthermore, before the step of performing keyword extraction processing on the original text based on the preset keyword generation model to obtain the corresponding target keywords, the method further includes:
[0040] Collect text data in the insurance field;
[0041] Performing annotation processing on the text data to obtain corresponding specified text data;
[0042] Based on a preset keyword generation data format, the specified text data is converted into a format to obtain corresponding sample data;
[0043] Call the pre-trained language model;
[0044] Using the sample data and a low-rank adaptation-based fine-tuning algorithm to train and fine-tune the pre-trained language model, to obtain a specified language model that meets preset construction conditions;
[0045] The specified language model is used as the keyword generation model.
[0046] In order to solve the above technical problems, the embodiment of the present application further provides a query processing device based on artificial intelligence, which adopts the following technical solution:
[0047] A first acquisition module, used to acquire query information input by a user;
[0048] A second acquisition module is used to acquire the original text corresponding to the query information from a preset knowledge base;
[0049] A generation module, used to perform keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords;
[0050] A segmentation module, used to segment the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary;
[0051] An integration module, used to integrate the target keywords and the text sentence dictionary based on a preset knowledge integration model to obtain corresponding target text slices;
[0052] An inference module, used for performing inference processing on the query information and the target text slice based on a preset target large language model to obtain corresponding answer data;
[0053] A reply module is used to reply to the user based on the answer data.
[0054] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0055] Get the query information entered by the user;
[0056] Acquire original text corresponding to the query information from a preset knowledge base;
[0057] Perform keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords;
[0058] Segment the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary;
[0059] Integrate the target keywords with the text sentence dictionary based on a preset knowledge integration model to obtain corresponding target text slices;
[0060] Performing reasoning processing on the query information and the target text slice based on a preset target large language model to obtain corresponding answer data;
[0061] A reply process is performed to the user based on the answer data.
[0062] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0063] Get the query information entered by the user;
[0064] Acquire original text corresponding to the query information from a preset knowledge base;
[0065] Perform keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords;
[0066] Segment the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary;
[0067] Integrate the target keywords with the text sentence dictionary based on a preset knowledge integration model to obtain corresponding target text slices;
[0068] Performing reasoning processing on the query information and the target text slice based on a preset target large language model to obtain corresponding answer data;
[0069] A reply process is performed to the user based on the answer data.
[0070] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0071] The present application first obtains the query information input by the user; and obtains the original text corresponding to the query information from a preset knowledge base; then performs keyword extraction processing on the original text based on a preset keyword generation model to obtain the corresponding target keyword; then performs segmentation processing on the original text and the target keyword based on a preset knowledge segmentation model to obtain the corresponding text sentence dictionary; subsequently, the target keyword and the text sentence dictionary are integrated based on a preset knowledge integration model to obtain the corresponding target text slice; further, the query information and the target text slice are inferred based on a preset target large language model to obtain the corresponding answer data; finally, the user is replied based on the answer data. After obtaining the original text corresponding to the query information input by the user from the knowledge base, the application breaks through the traditional sequential slicing limitations by combining the use of keyword generation model, knowledge segmentation model and knowledge integration model, and realizes nonlinear and multi-dimensional analysis of text content. Specifically, the key information in the text is accurately captured by using the keyword generation model, and then the text is deeply analyzed using the knowledge slicing model, and the information is divided into independent and independently understandable information units. Then, these independent information units are recombined using the knowledge integration model to form a coherent and logical text slice, thereby effectively solving the sequence dependency problem existing in the text slicing process, improving the flexibility and accuracy of text processing, optimizing the efficiency of text analysis, and greatly enriching the expression and understanding depth of text content. The corresponding answer data can be obtained by using the target large language model to perform reasoning processing on the query information and the target text slice, which can effectively improve the accuracy of the generated answer data. Then, the user is replied based on the answer data, which can ensure the user's browsing experience and improve the user's query satisfaction while improving the accuracy of the answer of the question and answer system. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0073] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0074] Figure 2 A flowchart of an embodiment of an artificial intelligence-based query processing method according to the present application;
[0075] Figure 3is a structural schematic diagram of an embodiment of an artificial intelligence-based query processing device according to the present application;
[0076] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0077] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0078] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0079] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0080] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0081] The user can use the terminal device 101 to interact with the server 103 through 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.
[0082] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing. In addition to the laptop computer 1011, the tablet computer 1012 or the 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, a desktop computer, etc.
[0083] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .
[0084] It should be noted that the artificial intelligence-based query processing method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based query processing device is generally arranged in the server / terminal device.
[0085] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0086] Continue to refer Figure 2 , showing a flow chart of an embodiment of an artificial intelligence-based query processing method according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The artificial intelligence-based query processing method provided in the embodiment of the present application can be applied to any scenario where query processing is required, and the artificial intelligence-based query processing method can be applied to products in these scenarios, for example, query processing in the financial insurance field. The artificial intelligence-based query processing method comprises the following steps:
[0087] Step S201, obtaining query information input by the user.
[0088] In this embodiment, the query processing method based on artificial intelligence is executed on the electronic device (eg Figure 1The server / terminal device shown in the figure) can obtain the image to be checked for duplicates through a wired connection or a wireless connection. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi Deband) connection, and other wireless connection methods currently known or to be developed in the future. The present application can be applied to the business scenario of the unified search function of a financial enterprise, or it can also be applied to the business scenario of question retrieval for related documents. The executor of the present application may specifically be an insurance question and answer system. The above-mentioned query information may specifically be the question text entered by the user.
[0089] Step S202: acquiring original text corresponding to the query information from a preset knowledge base.
[0090] In this embodiment, the above-mentioned knowledge base is a pre-built plug-in knowledge base corresponding to the target large language model, which is independent of the target large language model, and the target knowledge base stores a piece of data in units of one document. Among them, the specific implementation process of obtaining the original text corresponding to the query information from the preset knowledge base will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated on here.
[0091] Step S203: perform keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords.
[0092] In this embodiment, the above-mentioned specific implementation process of performing keyword extraction processing on the original text based on the preset keyword generation model to obtain the corresponding target keywords will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated in detail here.
[0093] Step S204: segment the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary.
[0094] In this embodiment, the above-mentioned specific implementation process of segmenting the original text and the target keywords based on the preset knowledge segmentation model to obtain the corresponding text sentence dictionary will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated in detail here.
[0095] Step S205 , integrating the target keyword and the text sentence dictionary based on a preset knowledge integration model to obtain corresponding target text slices.
[0096] In this embodiment, the above-mentioned specific implementation process of integrating the target keywords with the text sentence dictionary based on the preset knowledge integration model to obtain the corresponding target text slices will be further described in detail in the subsequent specific embodiments of this application and will not be elaborated here.
[0097] Step S206: perform inference processing on the query information and the target text slice based on a preset target large language model to obtain corresponding answer data.
[0098] In this embodiment, the selection of the above-mentioned target large language model is not specifically limited and can be determined according to actual business processing requirements, for example, GPT, ChatGPT, etc. can be selected. The query information and the target text slice can be spliced into a format that the above-mentioned target large language model can understand and input into the target large language model, and then the target large language model can be used to generate a coherent and accurate answer data based on the input information in a generative manner.
[0099] Step S207: reply to the user based on the answer data.
[0100] In this embodiment, the specific implementation process of replying to the user based on the answer data will be described in further detail in subsequent specific embodiments of the present application, and will not be elaborated on here.
[0101] The present application first obtains the query information input by the user; and obtains the original text corresponding to the query information from a preset knowledge base; then performs keyword extraction processing on the original text based on a preset keyword generation model to obtain the corresponding target keyword; then performs segmentation processing on the original text and the target keyword based on a preset knowledge segmentation model to obtain the corresponding text sentence dictionary; subsequently, the target keyword and the text sentence dictionary are integrated based on a preset knowledge integration model to obtain the corresponding target text slice; further, the query information and the target text slice are inferred based on a preset target large language model to obtain the corresponding answer data; finally, the user is replied based on the answer data. After obtaining the original text corresponding to the query information input by the user from the knowledge base, the application breaks through the traditional sequential slicing limitations by combining the use of keyword generation model, knowledge segmentation model and knowledge integration model, and realizes nonlinear and multi-dimensional analysis of text content. Specifically, the key information in the text is accurately captured by using the keyword generation model, and then the text is deeply analyzed using the knowledge slicing model, and the information is divided into independent and independently understandable information units. Then, these independent information units are recombined using the knowledge integration model to form a coherent and logical text slice, thereby effectively solving the sequence dependency problem existing in the text slicing process, improving the flexibility and accuracy of text processing, optimizing the efficiency of text analysis, and greatly enriching the expression and understanding depth of text content. The corresponding answer data can be obtained by using the target large language model to perform reasoning processing on the query information and the target text slice, which can effectively improve the accuracy of the generated answer data. Then, the user is replied based on the answer data, which can ensure the user's browsing experience and improve the user's query satisfaction while improving the accuracy of the answer of the question and answer system.
[0102] In some optional implementations, step S202 includes the following steps:
[0103] The query information is segmented to obtain corresponding segmented words.
[0104] In this embodiment, the above-mentioned word segmentation is the process of dividing the query information into independent words (word segments), and the document ID in which each word segment appears can be stored at the same time. The word segmentation processing of the query information can be implemented by regular expressions or natural language processing libraries.
[0105] An inverted index query is performed on the knowledge base based on the word segmentation to obtain a correlation score between the word segmentation and each document included in the knowledge base.
[0106] In this embodiment, the process of performing an inverted index query on the knowledge base based on the word segmentation includes: traversing each term in the query word segmentation. Searching for a list of document IDs corresponding to each term in the inverted index of the knowledge base. For each term, collecting its corresponding document ID, and calculating the relevance score of these documents with the query information. Among them, TF-IDF can be used to evaluate the importance of a term in a document. If a document appears in the document ID lists of multiple terms, their relevance scores are accumulated.
[0107] All the documents are sorted in descending order according to the relevance scores to obtain a corresponding document sorting list.
[0108] In this embodiment, the generation process of the above-mentioned document ranking list includes: sorting all documents in descending order according to the accumulated relevance scores, and obtaining a list containing (document ID, accumulated score), namely the above-mentioned document ranking list.
[0109] Based on the relevance score, a target number of designated documents are screened out from the ranked document list.
[0110] In this embodiment, there is no specific limitation on the numerical value of the above target number, which can be set according to actual business usage requirements, for example, it can be set to 10.
[0111] The original text corresponding to the query information is generated based on the designated document.
[0112] In this embodiment, the designated document can be directly used as the original text corresponding to the query information. Alternatively, the key content of the designated document can be extracted to obtain the corresponding key paragraph, and the key paragraph can be used as the original text, so that the data processing workload can be effectively reduced when the query information is subsequently replied, thereby improving the query processing efficiency.
[0113] The present application obtains the corresponding word segments by performing word segmentation processing on the query information; then performs an inverted index query on the knowledge base based on the word segments to obtain the correlation scores between the word segments and the various documents contained in the knowledge base; then sorts all the documents in descending order according to the correlation scores to obtain a corresponding document sorting list; subsequently, based on the correlation scores, a target number of specified documents are screened out from the document sorting list; finally, the original text corresponding to the query information is generated based on the specified documents. The present application uses a retrieval strategy based on an inverted index query and performs an inverted index query on the knowledge base using the query information input by the user, so as to quickly and accurately retrieve a sorting list of documents related to the query information in the knowledge base, and then a target number of specified documents can be screened out from the document sorting list to generate the original text corresponding to the query information, thereby improving the intelligence of obtaining the original text and ensuring the data accuracy of the obtained original text.
[0114] In some optional implementations of this embodiment, step S203 includes the following steps:
[0115] Acquire first prompt data corresponding to the keyword generation model.
[0116] In this embodiment, the first prompt data (prompts) for keyword generation is pre-designed, and the first prompt data can clearly instruct the model to focus on the key information in the text and extract representative words. For texts in the insurance field, the content of the above first prompt data may specifically include: "Please generate keywords for a given text, which contains multiple types of content. According to different types of content, extract keywords and output them separately."
[0117] Call the pre-trained keyword generation model.
[0118] In this embodiment, the training and construction process of the above keyword generation model will be described in further detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.
[0119] The original text and the first prompt data are added to the keyword generation model, and the original text and the first prompt text are processed by the keyword generation model to obtain a corresponding first model output.
[0120] In this embodiment, after the original text and the first prompt data are input into the keyword generation model, the keyword generation model can generate a series of keywords based on the input original text and the pre-designed first prompt data. These keywords represent the key information in the original text and are the basis for the subsequent text slicing and knowledge integration steps. Among them, the model output of the keyword generation model is a list containing multiple keywords. And these keywords are sorted according to importance or relevance for subsequent processing.
[0121] The first model output is used as the target keyword.
[0122] The present application obtains the first prompt data corresponding to the keyword generation model; then calls the pre-trained keyword generation model; then puts the original text and the first prompt data into the keyword generation model, processes the original text and the first prompt text through the keyword generation model, and obtains the corresponding first model output; and then uses the first model output as the target keyword. The present application obtains the first prompt data corresponding to the keyword generation model, and then processes the original text and the first prompt data based on the use of the keyword generation model, so as to accurately capture the key information in the original text and improve the accuracy of the generated target keywords.
[0123] In some optional implementations, step S204 includes the following steps:
[0124] Acquire second prompt data corresponding to the knowledge segmentation model.
[0125] In this embodiment, according to the text characteristics in the insurance field, especially the role and distribution of keywords in the text, the second prompt data for knowledge segmentation is pre-designed. The second prompt data can clearly express the segmentation intention. And it can instruct the model to segment according to keywords, and ensure that the segmented text units remain independent and understandable. Specifically, for texts in the insurance field, the content of the above second prompt data may specifically include: "Please segment the text based on keyword semantics according to the given text and keywords. Output the results in the form of a dictionary, where each keyword corresponds to k text sentences. The output format should be {'key_wor d':'xxx','text':[sentence 1, sentence 2...]}.".
[0126] Call the pre-trained knowledge segmentation model.
[0127] In this embodiment, the training and construction process of the above-mentioned knowledge segmentation model can refer to the training and construction process of the above-mentioned keyword generation model. The specific process will not be described in detail. It is only necessary to change the data format of the annotated data to <original text, key words, k text sentences centered on the key words>.
[0128] The original text, the target keyword and the second prompt data are input into the knowledge segmentation model, and the original text, the target keyword and the second prompt data are processed by the knowledge segmentation model to obtain a corresponding second model output.
[0129] In this embodiment, after the original text, target keywords and second prompt data are input into the knowledge segmentation model, the knowledge segmentation model can output a text sentence set centered on the target keyword based on the input original text, target keywords and pre-designed second prompt data. Specifically, the knowledge segmentation model will perform text segmentation based on keyword semantics based on the designed second prompt data, the original text and the target keywords. In this process, the knowledge segmentation model will analyze the keywords in each sentence, and try to segment the sentence into smaller independent units centered on the target keyword, and output them in the form of a dictionary, thereby obtaining a corresponding text sentence dictionary.
[0130] The second model is output as the text sentence dictionary.
[0131] The present application obtains the second prompt data corresponding to the knowledge segmentation model; then calls the pre-trained knowledge segmentation model; then inputs the original text, the target keyword and the second prompt data into the knowledge segmentation model, processes the original text, the target keyword and the second prompt data through the knowledge segmentation model, and obtains the corresponding second model output; subsequently, the second model output is used as the text sentence dictionary. The present application obtains the second prompt data corresponding to the knowledge segmentation model, and then processes the original text, the target keyword and the second prompt data based on the use of the knowledge segmentation model, so as to achieve in-depth analysis of the original text, and divide the original text into independent, independently understandable information units centered on the target keyword, effectively ensuring the accuracy of the generated text sentence dictionary.
[0132] In some optional implementations, step S205 includes the following steps:
[0133] Acquire third prompt data corresponding to the knowledge integration model.
[0134] In this embodiment, third prompt data with knowledge integration can be pre-designed according to the text characteristics and integration requirements in the insurance field. The third prompt data can clearly express the intention of integration, that is, it requires the model to recombine the input independent text fragments according to a certain logic or structure. Specifically, for texts in the insurance field, the content of the third prompt data may specifically include: "Please integrate the corresponding text based on the given text and keywords. Please note that the generation of content unrelated to the text is not allowed."
[0135] Call the pre-trained knowledge integration model.
[0136] In this embodiment, the training and construction process of the above-mentioned knowledge integration model can refer to the training and construction process of the above-mentioned keyword generation model. The specific process will not be described in detail. It is only necessary to change the data format of the annotated data to <original text, key words, k text sentences centered on the key words, and m text fragments centered on the key words>.
[0137] The target keywords, the text sentence dictionary and the third prompt data are input into the knowledge integration model, and the target keywords, the text sentence dictionary and the third prompt data are processed by the knowledge integration model to obtain a corresponding third model output.
[0138] In this embodiment, after the target keywords, text sentence dictionary and third prompt data are input into the knowledge integration model, the knowledge integration model can integrate the text fragments according to the input target keywords, text sentence dictionary and pre-designed third prompt data, and output multiple complete and logically fluent text fragments to obtain the above-mentioned target text slices. Specifically, the knowledge integration model will consider multiple factors to decide how to integrate text fragments, including semantic associations, logical order, and the importance of keywords between fragments. The knowledge integration model may try different combinations, select the optimal integration result through an internal evaluation mechanism, and then output the integrated text fragments. These text fragments are complete and logically fluent, can accurately convey the key information in the original text, and maintain a good reading experience.
[0139] The third model output is used as the target text slice.
[0140] The present application obtains the third prompt data corresponding to the knowledge integration model; then calls the pre-trained knowledge integration model; then inputs the target keyword, the text sentence dictionary and the third prompt data into the knowledge integration model, processes the target keyword, the text sentence dictionary and the third prompt data through the knowledge integration model to obtain the corresponding third model output; and subsequently uses the third model output as the target text slice. The present application processes the target keyword, the text sentence dictionary and the third prompt data based on the use of the knowledge integration model through the third prompt data corresponding to the knowledge integration model, so that the independent information units output by the knowledge segmentation model can be recombined to form a coherent and logical text slice, thereby effectively solving the problem of sequence dependency and improving the flexibility, efficiency and accuracy of text processing.
[0141] In some optional implementations of this embodiment, step S207 includes the following steps:
[0142] Get the preset redundancy handling strategy and grammar correction strategy.
[0143] In this embodiment, the strategy content of the above redundancy processing strategy includes: removing irrelevant content from the text, such as modal particles, stop words, etc., to complete the redundancy removal process. The strategy content of the above grammar correction strategy includes: correcting grammatical errors in the text to ensure the grammatical accuracy of the text.
[0144] The answer data is processed to remove redundancy based on the redundancy processing strategy to obtain corresponding first answer data.
[0145] In this embodiment, the answer data may be processed to remove redundancy according to the policy content of the above-mentioned redundancy processing policy, so as to obtain corresponding first answer data.
[0146] The first answer data is subjected to grammatical correction processing based on the grammatical correction strategy to obtain corresponding second answer data.
[0147] In this embodiment, the first answer data may be subjected to grammatical correction processing according to the policy content of the above-mentioned grammatical correction policy, thereby obtaining corresponding second answer data.
[0148] A reply process is performed on the user based on the second answer data.
[0149] The present application obtains a preset redundancy processing strategy and a grammar correction strategy; then removes redundancy from the answer data based on the redundancy processing strategy to obtain the corresponding first answer data; then performs grammar correction on the first answer data based on the grammar correction strategy to obtain the corresponding second answer data; and subsequently responds to the user based on the second answer data. After the present application performs inference processing on the query information and the target text slice based on a preset target large language model to obtain the corresponding answer data, it further removes redundancy and performs grammar correction on the answer data to obtain the corresponding second answer data, effectively ensuring the conciseness and accuracy of the second answer data. This is beneficial for the subsequent response processing to the user based on the second answer data, which can ensure the user's browsing experience and thereby improve the user's query satisfaction.
[0150] In some optional implementations of this embodiment, before step S203, the electronic device may further perform the following steps:
[0151] Collecting textual data in the insurance field.
[0152] In the present embodiment, the text data in the insurance field is text related to insurance. Text data in the insurance field can be collected from various channels (such as insurance companies, insurance industry associations and other authoritative organizations). These text data contain professional insurance terms and specific data structures in the insurance field. The model trained using the text data in the insurance field can more deeply understand and process the professional text in the insurance field, so as to more accurately identify and parse the key information in the insurance documents in practical applications. In addition, after obtaining the text data, the text data can be further cleaned to remove irrelevant information, such as pictures, tables, etc., and only the text content is retained. At the same time, the text is processed by word segmentation and stop word removal for subsequent training.
[0153] The text data is annotated to obtain corresponding specified text data.
[0154] In this embodiment, an experienced annotation team can be organized to annotate the text data based on actual annotation needs and using professional text annotation tools (such as Producty, Doccano, etc.), so as to obtain corresponding designated text data.
[0155] The specified text data is formatted based on a preset keyword generation data format to obtain corresponding sample data.
[0156] In this embodiment, the keyword generation data format may specifically include: <original text containing n key words, n key words>. The sample data is obtained by arranging the specified text data into the keyword generation data format.
[0157] Call the pre-trained language model.
[0158] In this embodiment, the pre-trained language model may adopt a model with strong language comprehension capabilities, specifically the qwen2-72b (Tongyi Qianwen) model.
[0159] The pre-trained language model is trained and fine-tuned using the sample data and a low-rank adaptation-based fine-tuning algorithm to obtain a specified language model that meets preset construction conditions.
[0160] In this embodiment, the above-mentioned fine-tuning algorithm based on low-rank adaptation is specifically the LORA algorithm. The LORA algorithm uses the data of the corresponding downstream task and adapts the downstream task only by training the newly added parameters. After the new parameters are trained, the new parameters and the old model parameters are merged by re-parameterization. Specifically, the process of generating a specified language model that meets the preset construction conditions includes: 1. Model loading. Use the appropriate library to load the qwen2-72b model. 2. LORA fine-tuning. Prepare the LORA layer: According to the LORA algorithm, initialize the low-rank matrix as a parameter. Modify the model architecture: Insert the LORA layer in the model to allow only these low-rank matrices to be updated during fine-tuning. Data preprocessing: Convert the sample data into a format acceptable to the model, such as converting it to token ids, and prepare the necessary input features. Training settings: Set parameters such as learning rate, batch size, and training rounds according to training requirements. Consider using a smaller learning rate to avoid destroying the knowledge of the pre-trained model. Training process: Train the model using sample data, monitor the loss function during training and the performance indicators on the validation set. 3. Model evaluation. Evaluation data set: prepare an independent, non-training data set to evaluate model performance. Evaluation indicators: calculate indicators such as accuracy, recall, and F1 score, which can fully reflect the performance of the model on the entity extraction task. Analyze errors: analyze the errors of the model on the evaluation data set and identify common error types and causes. 4. Adjustment and optimization. Adjust model structure or parameters: adjust the parameters of the LORA layer, training parameters, or model architecture based on the evaluation results and error analysis. Iterative training: repeat the process of training, evaluation, and optimization until the model performance reaches a satisfactory level, that is, it meets the construction conditions, thereby obtaining the above-specified language model.
[0161] The specified language model is used as the keyword generation model.
[0162] In this embodiment, after the keyword generation model is obtained, the keyword generation model is deployed to a production environment or a specific application, and the performance of the keyword generation model in the actual application is monitored, and further model optimization and adjustment are performed as needed.
[0163] This application collects text data in the insurance field; then annotates the text data to obtain the corresponding specified text data; then converts the format of the specified text data based on the preset keyword generation data format to obtain the corresponding sample data; subsequently calls the pre-trained language model, and uses the sample data and the fine-tuning algorithm based on low-rank adaptation to train and fine-tune the pre-trained language model to obtain the specified language model that meets the preset construction conditions; finally, the specified language model is used as the keyword generation model. This application obtains the corresponding sample data by annotating and format-converting the collected text data in the insurance field, and then uses the sample data and the fine-tuning algorithm based on low-rank adaptation to train and fine-tune the pre-trained language model, and uses the obtained specified language model that meets the preset construction conditions as the final keyword generation model, thereby completing the construction of the keyword generation model, effectively improving the construction efficiency of the keyword generation model, and ensuring the model effect of the obtained keyword generation model.
[0164] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0165] It should be emphasized that in order to further ensure the privacy and security of the above answer data, the above answer data can also be stored in a blockchain node.
[0166] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0167] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0168] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0169] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and 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-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0170] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on 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, and 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 in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0171] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a query processing device based on artificial intelligence, and the embodiment of the device is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0172] like Figure 3As shown, the query processing device 300 based on artificial intelligence described in this embodiment includes: a first acquisition module 301, a second acquisition module 302, a generation module 303, a segmentation module 304, an integration module 305, a reasoning module 306 and a reply module 307. Among them:
[0173] The first acquisition module 301 is used to acquire the query information input by the user;
[0174] A second acquisition module 302 is used to acquire the original text corresponding to the query information from a preset knowledge base;
[0175] A generation module 303 is used to perform keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords;
[0176] A segmentation module 304 is used to segment the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary;
[0177] An integration module 305 is used to integrate the target keyword and the text sentence dictionary based on a preset knowledge integration model to obtain a corresponding target text slice;
[0178] The reasoning module 306 is used to perform reasoning processing on the query information and the target text slice based on a preset target large language model to obtain corresponding answer data;
[0179] The reply module 307 is used to reply to the user based on the answer data.
[0180] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based query processing method in the aforementioned implementation mode, and are not described in detail here.
[0181] In some optional implementations of this embodiment, the second acquisition module 302 includes:
[0182] A word segmentation submodule, used to perform word segmentation processing on the query information to obtain corresponding word segments;
[0183] A query submodule, configured to perform an inverted index query on the knowledge base based on the word segmentation to obtain a correlation score between the word segmentation and each document contained in the knowledge base;
[0184] A sorting submodule, used to sort all the documents in descending order of the relevance scores to obtain a corresponding document sorting list;
[0185] A screening submodule, configured to screen out a target number of designated documents from the document ranking list based on the relevance score;
[0186] A generating submodule is used to generate the original text corresponding to the query information based on the designated document.
[0187] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based query processing method in the aforementioned implementation mode, and are not described in detail here.
[0188] In some optional implementations of this embodiment, the generating module 303 includes:
[0189] A first acquisition submodule, used to acquire first prompt data corresponding to the keyword generation model;
[0190] The first calling submodule is used to call the pre-trained keyword generation model;
[0191] A first processing submodule, used for adding the original text and the first prompt data to the keyword generation model, and processing the original text and the first prompt text by the keyword generation model to obtain a corresponding first model output;
[0192] The first determination submodule is used to output the first model as the target keyword.
[0193] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based query processing method in the aforementioned implementation mode, and are not described in detail here.
[0194] In some optional implementations of this embodiment, the segmentation module 304 includes:
[0195] A second acquisition submodule, used to acquire second prompt data corresponding to the knowledge segmentation model;
[0196] The second calling submodule is used to call the pre-trained knowledge segmentation model;
[0197] A second processing submodule, for inputting the original text, the target keyword and the second prompt data into the knowledge segmentation model, and processing the original text, the target keyword and the second prompt data through the knowledge segmentation model to obtain a corresponding second model output;
[0198] The second determining submodule is used to output the second model as the text sentence dictionary.
[0199] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based query processing method in the aforementioned implementation mode, and are not described in detail here.
[0200] In some optional implementations of this embodiment, the integration module 305 includes:
[0201] A third acquisition submodule is used to acquire third prompt data corresponding to the knowledge integration model;
[0202] The third calling submodule is used to call the pre-trained knowledge integration model;
[0203] A third processing submodule, for inputting the target keyword, the text sentence dictionary and the third prompt data into the knowledge integration model, and processing the target keyword, the text sentence dictionary and the third prompt data through the knowledge integration model to obtain a corresponding third model output;
[0204] The third determination submodule is used to output the third model as the target text slice.
[0205] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based query processing method in the aforementioned implementation mode, and are not described in detail here.
[0206] In some optional implementations of this embodiment, the reply module 307 includes:
[0207] The fourth acquisition submodule is used to acquire a preset redundancy processing strategy and a grammar correction strategy;
[0208] A fourth processing submodule, configured to perform redundancy removal processing on the answer data based on the redundancy processing strategy to obtain corresponding first answer data;
[0209] a fifth processing submodule, configured to perform grammatical correction processing on the first answer data based on the grammatical correction strategy to obtain corresponding second answer data;
[0210] The reply submodule is used to reply to the user based on the second answer data.
[0211] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based query processing method in the aforementioned implementation mode, and are not described in detail here.
[0212] In some optional implementations of this embodiment, the query processing device based on artificial intelligence further includes:
[0213] The collection module is used to collect text data in the insurance field;
[0214] A marking module, used for marking the text data to obtain corresponding specified text data;
[0215] A conversion module, used to convert the format of the specified text data based on a preset keyword generation data format to obtain corresponding sample data;
[0216] The calling module is used to call the pre-trained language model;
[0217] A construction module, used to train and fine-tune the pre-trained language model using the sample data and a fine-tuning algorithm based on low-rank adaptation to obtain a specified language model that meets preset construction conditions;
[0218] A determination module is used to use the specified language model as the keyword generation model.
[0219] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based query processing method in the aforementioned implementation mode, and are not described in detail here.
[0220] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0221] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art 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 processors (DSPs), embedded devices, etc.
[0222] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0223] 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 (for example, 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, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a 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 equipped on the computer device 4, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. 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 of the query processing method based on artificial intelligence, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0224] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. 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 query processing method.
[0225] 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.
[0226] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned artificial intelligence-based query processing method.
[0227] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0228] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they 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 of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A query processing method based on artificial intelligence, characterized in that: The steps include: Get the query information entered by the user; Acquire original text corresponding to the query information from a preset knowledge base; Perform keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords; Segment the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary; Integrate the target keywords with the text sentence dictionary based on a preset knowledge integration model to obtain corresponding target text slices; Performing reasoning processing on the query information and the target text slice based on a preset target large language model to obtain corresponding answer data; A reply process is performed to the user based on the answer data.
2. The query processing method based on artificial intelligence according to claim 1, characterized in that: The step of acquiring the original text corresponding to the query information from the preset knowledge base specifically includes: Performing word segmentation processing on the query information to obtain corresponding word segments; Performing an inverted index query on the knowledge base based on the word segmentation to obtain a correlation score between the word segmentation and each document contained in the knowledge base; Sorting all the documents in descending order of the relevance scores to obtain a corresponding document sorting list; Based on the relevance score, filter out a target number of designated documents from the ranked document list; The original text corresponding to the query information is generated based on the designated document.
3. The query processing method based on artificial intelligence according to claim 1, characterized in that: The step of performing keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords specifically includes: Acquire first prompt data corresponding to the keyword generation model; Call the pre-trained keyword generation model; Put the original text and the first prompt data into the keyword generation model, and process the original text and the first prompt text through the keyword generation model to obtain a corresponding first model output; The first model output is used as the target keyword.
4. The query processing method based on artificial intelligence according to claim 1, characterized in that: The step of segmenting the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary specifically includes: Acquire second prompt data corresponding to the knowledge segmentation model; Call the pre-trained knowledge segmentation model; Inputting the original text, the target keyword and the second prompt data into the knowledge segmentation model, and processing the original text, the target keyword and the second prompt data through the knowledge segmentation model to obtain a corresponding second model output; The second model is output as the text sentence dictionary.
5. The query processing method based on artificial intelligence according to claim 1, characterized in that: The step of integrating the target keyword and the text sentence dictionary based on a preset knowledge integration model to obtain corresponding target text slices specifically includes: Acquire third prompt data corresponding to the knowledge integration model; Call the pre-trained knowledge integration model; Inputting the target keyword, the text sentence dictionary and the third prompt data into the knowledge integration model, and processing the target keyword, the text sentence dictionary and the third prompt data by the knowledge integration model to obtain a corresponding third model output; The third model output is used as the target text slice.
6. The query processing method based on artificial intelligence according to claim 1, characterized in that: The step of replying to the user based on the answer data specifically includes: Obtaining preset redundancy processing strategies and grammar correction strategies; Performing redundancy removal processing on the answer data based on the redundancy processing strategy to obtain corresponding first answer data; Performing grammatical correction processing on the first answer data based on the grammatical correction strategy to obtain corresponding second answer data; A reply process is performed on the user based on the second answer data.
7. The query processing method based on artificial intelligence according to claim 1, characterized in that: Before the step of performing keyword extraction processing on the original text based on the preset keyword generation model to obtain corresponding target keywords, the method further includes: Collect text data in the insurance field; Performing annotation processing on the text data to obtain corresponding specified text data; Based on a preset keyword generation data format, the specified text data is formatted and converted to obtain corresponding sample data; Call the pre-trained language model; Using the sample data and a low-rank adaptation-based fine-tuning algorithm to train and fine-tune the pre-trained language model, to obtain a specified language model that meets preset construction conditions; The specified language model is used as the keyword generation model.
8. A query processing device based on artificial intelligence, characterized in that: include: A first acquisition module, used to acquire query information input by a user; A second acquisition module is used to acquire the original text corresponding to the query information from a preset knowledge base; A generation module, used to perform keyword extraction processing on the original text based on a preset keyword generation model to obtain corresponding target keywords; A segmentation module, used to segment the original text and the target keyword based on a preset knowledge segmentation model to obtain a corresponding text sentence dictionary; An integration module, used to integrate the target keywords and the text sentence dictionary based on a preset knowledge integration model to obtain corresponding target text slices; An inference module, used for performing inference processing on the query information and the target text slice based on a preset target large language model to obtain corresponding answer data; A reply module is used to reply to the user based on the answer data.
9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the query processing method based on artificial intelligence as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the artificial intelligence-based query processing method according to any one of claims 1 to 7 are implemented.