Artificial intelligence-based query processing method and device, computer equipment and medium

Through the query processing method based on artificial intelligence, the problem of low accuracy in response to complex communication scenarios in the existing technology is solved, and efficient and accurate query text processing and reply generation is achieved, which is suitable for complex query scenarios of financial enterprises.

CN119293159APending Publication Date: 2025-01-10CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411295913.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Existing script-based task robots cannot accurately and effectively complete decision-making response processing for complex communication scenarios in financial enterprises, resulting in low accuracy of query text reply processing.

Method used

Using an artificial intelligence-based query processing method, by receiving the query text input by the user, information extraction and intent identification are performed, business intent is generated, target query processing strategies are selected according to the intent type, query processing is performed, and reply text is generated. For complex intent types, use the target mockup to generate SQL query statements and execute them through the service database to get the query results.

Benefits of technology

It improves the accuracy and efficiency of query text reply processing, can intelligently process complex queries, generate accurate reply text, and meet user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293159A_ABST
    Figure CN119293159A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence and financial science and technology, and relates to an artificial intelligence-based query processing method and device, computer equipment and a storage medium, and the method comprises the following steps: receiving a query text input by a user through a query page; performing information extraction on the query text to obtain key information; performing classification processing on the key information based on a preset intention recognition model, and generating a service intention corresponding to the key information; performing query processing on the key information based on a target query processing strategy corresponding to the intention type of the business intention to obtain a corresponding query result; based on the query result, judging whether the query text belongs to a preset non-common scene or not; if the query text does not belong to the non-common scene, generating a corresponding reply text based on the query result; and returning the reply text to the user. In addition, the invention also relates to a block chain technology, and the reply text can be stored in a block chain. By means of the method and device, the accuracy of reply processing of the query text is effectively improved.
Need to check novelty before this filing date? Find Prior Art

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] With the rapid development of artificial intelligence technology, intelligent question-answering systems for human-computer interactive dialogues have been widely used in the financial field. For example, they can be used in the financial insurance field to inquire about insurance costs, financial products, and so on.

[0003] At present, the intelligent question-answering systems used by financial enterprises, such as insurance enterprises, are usually question-answering systems that use script-based task-based robots. However, script-based task-based robots are often only suitable for handling simple task communication scenarios. For complex communication scenarios corresponding to more complex query texts input by users, script-based task-based robots are usually unable to accurately and effectively complete the decision-making response processing of complex communication scenarios, resulting in low accuracy in response processing for query texts. Summary of the invention

[0004] The purpose of the embodiments of the present application is to propose an artificial intelligence-based query processing method, apparatus, computer equipment and storage medium to solve the technical problem that the script-based task-type robot question-answering system used by existing insurance companies cannot accurately and effectively complete the decision-making response processing of complex communication scenarios, resulting in low accuracy in the response processing of query texts.

[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] Receiving a query text input by a user through a preset query page;

[0007] Extracting information from the query text to obtain corresponding key information;

[0008] Classify the key information based on a preset intention recognition model to generate a business intention corresponding to the key information;

[0009] Perform query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent to obtain a corresponding query result;

[0010] Based on the query result, determining whether the query text belongs to a preset uncommon scenario;

[0011] If the query text does not belong to the uncommon scenario, generating a corresponding reply text based on the query result;

[0012] The reply text is returned to the user.

[0013] Furthermore, the step of performing query processing on the key information based on the target query processing strategy corresponding to the intent type of the business intent to obtain the corresponding query result specifically includes:

[0014] If the intent type is simple, extracting corresponding keywords from the query text;

[0015] Based on the keyword, a matching process is performed on the slot words contained in a preset database to obtain a target slot word that matches the keyword;

[0016] Constructing corresponding query parameters based on the target slot word;

[0017] Sending a query request to a specified service based on a preset data service interface; wherein the query request carries the query parameter;

[0018] Receiving a first response result corresponding to the query request returned by the designated service;

[0019] The first response result is used as the query result.

[0020] Furthermore, the step of performing query processing on the key information based on the target query processing strategy corresponding to the intent type of the business intent to obtain the corresponding query result specifically includes:

[0021] If the intent type is complex, obtaining a target prompt word engineering template corresponding to the business intent;

[0022] Call the preset target large model;

[0023] Processing the query text and the target prompt word engineering template based on the target macro model to obtain a corresponding SQL query statement template;

[0024] Generate a corresponding SQL query statement based on the key information and the SQL query statement template;

[0025] Passing the SQL query statement to a preset service database, so that the service database executes the SQL query statement and obtains a corresponding second response result;

[0026] The second response result is used as the query result.

[0027] Furthermore, the step of generating a corresponding reply text based on the query result specifically includes:

[0028] Obtaining the data type of the query result;

[0029] Filtering a target response template corresponding to the data type from a preset response template library;

[0030] Fill the query result into the target reply template to obtain corresponding fill text;

[0031] Obtaining preference information of the user;

[0032] Adjusting the filled text based on the preference information to obtain corresponding adjusted text;

[0033] The adjusted text is used as the reply text.

[0034] Furthermore, the step of returning the reply text to the user specifically includes:

[0035] Get the preset target format;

[0036] Convert the reply text based on the target format to obtain a corresponding target reply text;

[0037] The target reply text is displayed in the query page.

[0038] Furthermore, after the step of displaying the target reply text in the query page, the method further includes:

[0039] Displaying preset satisfaction evaluation options and an opinion input box on the query page;

[0040] receiving satisfaction information corresponding to the satisfaction evaluation option input by the user in the query page; and,

[0041] Receiving feedback information corresponding to the opinion input box input by the user in the query page;

[0042] The satisfaction information and the feedback information are stored and processed.

[0043] Further, after the step of determining whether the query text belongs to a preset uncommon scenario based on the query result, the method further includes:

[0044] If the query text belongs to the uncommon scenario, a preset fallback response template library is called;

[0045] Filtering out a designated fallback response template corresponding to the business intent from the fallback response template library;

[0046] Fill the key information into the specified fallback reply template to obtain the corresponding specified reply text;

[0047] The specified reply text is returned to the user.

[0048] 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:

[0049] A receiving module, used to receive a query text input by a user through a preset query page;

[0050] An extraction module, used to extract information from the query text to obtain corresponding key information;

[0051] An identification module, used to classify the key information based on a preset intention identification model and generate a business intention corresponding to the key information;

[0052] A query module, used to perform query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent, to obtain a corresponding query result;

[0053] A judgment module, used for judging whether the query text belongs to a preset uncommon scenario based on the query result;

[0054] A generating module, configured to generate a corresponding reply text based on the query result if the query text does not belong to the uncommon scenario;

[0055] The first returning module is used to return the reply text to the user.

[0056] 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:

[0057] Receiving a query text input by a user through a preset query page;

[0058] Extracting information from the query text to obtain corresponding key information;

[0059] Classify the key information based on a preset intention recognition model to generate a business intention corresponding to the key information;

[0060] Perform query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent to obtain a corresponding query result;

[0061] Based on the query result, determining whether the query text belongs to a preset uncommon scenario;

[0062] If the query text does not belong to the uncommon scenario, generating a corresponding reply text based on the query result;

[0063] The reply text is returned to the user.

[0064] 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:

[0065] Receiving a query text input by a user through a preset query page;

[0066] Extracting information from the query text to obtain corresponding key information;

[0067] Classify the key information based on a preset intention recognition model to generate a business intention corresponding to the key information;

[0068] Perform query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent to obtain a corresponding query result;

[0069] Based on the query result, determining whether the query text belongs to a preset uncommon scenario;

[0070] If the query text does not belong to the uncommon scenario, generating a corresponding reply text based on the query result;

[0071] The reply text is returned to the user.

[0072] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0073] The present application first receives the query text input by the user through a preset query page; then extracts information from the query text to obtain the corresponding key information; then classifies the key information based on a preset intent recognition model to generate a business intent corresponding to the key information; subsequently, performs query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent to obtain a corresponding query result; further based on the query result, determines whether the query text belongs to a preset uncommon scenario; if the query text does not belong to the uncommon scenario, generates a corresponding reply text based on the query result; and finally returns the reply text to the user. When the present application receives the query text input by the user through the query page, it will intelligently and efficiently complete the processing of the query text based on the intent recognition model and the use of the target query processing strategy, and return an accurate reply text, effectively improving the accuracy of the reply processing of the query text. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] 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.

[0075] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0076] Figure 2 A flowchart of an embodiment of an artificial intelligence-based query processing method according to the present application;

[0077] Figure 3 is a structural schematic diagram of an embodiment of an artificial intelligence-based query processing device according to the present application;

[0078] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0079] 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.

[0080] 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.

[0081] 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.

[0082] like Figure 1As 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.

[0083] 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.

[0084] 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.

[0085] 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 .

[0086] 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.

[0087] 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.

[0088] 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:

[0089] Step S201, receiving a query text input by a user through a preset query page.

[0090] In this embodiment, the query processing method based on artificial intelligence is executed on the electronic device (e.g. Figure 1 The server / terminal device shown in the figure) can obtain the query text through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (Ultra Wi-Fi Band) connection, and other wireless connection methods currently known or to be developed in the future. The execution subject of the present application is specifically a query processing system, or it can be referred to as a system. The above-mentioned query page may be a pre-built web page or chat page for processing user query questions. The above-mentioned query information may be a query question entered by the user during the data query process with the query processing system. The query question can be a question in any format. Exemplarily, in the business scenario of insurance product consultation in the field of finance and insurance, the query questions may include questions for consulting insurance costs, claim terms confirmation information, and questions requesting recommendations for suitable financial products, etc.

[0091] Step S202: extract information from the query text to obtain corresponding key information.

[0092] In this embodiment, the query text can be extracted by using an NLP library, such as word segmentation and part-of-speech tagging, to extract key information from the query text. Among them, an NLP library (such as ji eba, spaCy, etc.) can be used to perform word segmentation on the query text input by the user, and the sentence can be split into words or phrases. Then, each participle is tagged with a part-of-speech tag to identify the part-of-speech such as noun, verb, adjective, etc., which is helpful for subsequent understanding and analysis.

[0093] Step S203: classify the key information based on a preset intention recognition model to generate a business intention corresponding to the key information.

[0094] In this embodiment, the key information may be input into an intent recognition model so as to perform intent recognition on the key information through the intent recognition model and classify the key information into corresponding business intents.

[0095] Specifically, the process of building an intent recognition model may include: collecting and annotating a large amount of user query text data to build a data set for intent classification. Use machine learning (such as logistic regression, support vector machine, random forest) or deep learning (such as convolutional neural network CNN, recurrent neural network RNN, Transformer, etc.) models to train on the annotated data set and learn to classify queries into predefined intent categories. Then evaluate the performance of the model through methods such as cross-validation to ensure that the model can accurately identify user intent, thereby obtaining a trained intent recognition model. The trained intent recognition model is subsequently deployed to the query processing system for real-time processing of user queries. When the user enters a query text, the system uses the deployed intent recognition model to classify the query text to identify the user's business intent.

[0096] Step S204: perform query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent to obtain a corresponding query result.

[0097] In this embodiment, the above-mentioned intent type includes simple or complex. The above-mentioned target query processing strategy corresponding to the intent type of the business intent performs query processing on the key information to obtain the corresponding query result. This application will further describe this in detail in subsequent specific embodiments, and will not be elaborated on here.

[0098] Step S205: Based on the query result, determine whether the query text belongs to a preset uncommon scenario.

[0099] In this embodiment, the above-mentioned uncommon scenario means that the query text input by the user belongs to a low-frequency problem. The query result corresponding to the query text can be quality evaluated based on the preset instruction evaluation rules, so as to identify whether the query text belongs to the preset uncommon scenario. Specifically, the above-mentioned instruction evaluation rules are pre-written rules for detecting the quality evaluation logic of query results, which may include checking whether the returned query result is empty, whether the query result contains an error code or message, whether the query result is related to the user's query intention, etc. And set thresholds for different evaluation indicators. For example, if the returned query result is empty, the amount of data of the returned query result is less than the preset quantity threshold, or the correlation score of the query result with the query intention is lower than the preset score threshold, it may be considered that the query result does not meet expectations.

[0100] The query results are evaluated by using the above-mentioned instruction evaluation rules. If there are any unexpected situations, that is, the returned query results are empty, the amount of data of the returned query results is less than the preset quantity threshold, and the relevance score of the query results to the query intent is lower than the preset score threshold, any one or more of the following situations, then it is determined that the query text belongs to an uncommon scenario; otherwise, it is determined that the query text does not belong to an uncommon scenario.

[0101] Step S206: if the query text does not belong to the uncommon scenario, a corresponding reply text is generated based on the query result.

[0102] In this embodiment, the specific implementation process of generating the corresponding reply text based on the query result will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.

[0103] Step S207: returning the reply text to the user.

[0104] In this embodiment, the specific implementation process of returning the reply text to the user will be described in further detail in subsequent specific embodiments of the present application and will not be elaborated on here.

[0105] The present application first receives the query text input by the user through a preset query page; then extracts information from the query text to obtain the corresponding key information; then classifies the key information based on a preset intent recognition model to generate a business intent corresponding to the key information; subsequently, performs query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent to obtain a corresponding query result; further based on the query result, determines whether the query text belongs to a preset uncommon scenario; if the query text does not belong to the uncommon scenario, generates a corresponding reply text based on the query result; and finally returns the reply text to the user. When the present application receives the query text input by the user through the query page, it will intelligently and efficiently complete the processing of the query text based on the intent recognition model and the use of the target query processing strategy, and return an accurate reply text, effectively improving the accuracy of the reply processing of the query text.

[0106] In some optional implementations, step S204 includes the following steps:

[0107] If the intent type is simple, corresponding keywords are extracted from the query text.

[0108] In this embodiment, the above-mentioned intent type includes simple or complex. The query text can be processed by using NLP technology to perform word segmentation, part-of-speech tagging, etc. to extract keywords in the query text.

[0109] Based on the keyword, a matching process is performed on the slot words contained in a preset database to obtain a target slot word that matches the keyword.

[0110] In this embodiment, the above database is a pre-built database with a series of slot words predefined, and these slot words represent the fields or dimensions that can be queried in the database. Specifically, the keywords extracted from the query text can be matched with the slot words in the database by using a matching algorithm, so as to obtain the target slot words matching the keywords. Among them, the above matching algorithm adopts string matching, or a semantic-based matching algorithm.

[0111] A corresponding query parameter is constructed based on the target slot word.

[0112] In this embodiment, the matched target slot words and possible other query parameters (such as time range, filtering conditions, etc.) may be assembled into query parameters.

[0113] Sending a query request to a designated service based on a preset data service interface; wherein the query request carries the query parameter.

[0114] In this embodiment, the designated service is specifically a Cubejs service. A query request carrying the query parameters can be sent to the designated service by using a data service interface. The data service interface can use an HTTP client, such as Axios, Requests, etc.

[0115] Receive a first response result corresponding to the query request returned by the designated service.

[0116] In this embodiment, the first response result is a response result returned by the designated service after processing the query request.

[0117] The first response result is used as the query result.

[0118] If the present application detects that the intent type is simple, the corresponding keywords are extracted from the query text; then the slot words contained in the preset database are matched based on the keywords to obtain the target slot words that match the keywords; then the corresponding query parameters are constructed based on the target slot words; and a query request is sent to a designated service based on a preset data service interface; wherein the query request carries the query parameters; and subsequently a first response result corresponding to the query request returned by the designated service is received, and the first response result is used as the query result. When the present application identifies that the intent type of the business intent is simple, it will intelligently call the query processing strategy corresponding to the simple intent type to perform query processing on the key information, specifically by extracting keywords from the query text, and matching the slot words contained in the preset database based on the keywords to obtain the target slot words matching the keywords, and then constructing the corresponding query parameters based on the target slot words, and then sending a query request carrying the query parameters to the designated service based on the preset data service interface, and subsequently using the first response result returned by the designated service as the final query result, which effectively improves the processing intelligence and processing adaptability of the query processing for key information, is conducive to improving the processing efficiency of the query processing for key information, and ensures the accuracy of the query results obtained.

[0119] In some optional implementations of this embodiment, step S204 includes the following steps:

[0120] If the intent type is complex, a target prompt word engineering template corresponding to the business intent is obtained.

[0121] In this embodiment, the above-mentioned intent types include simple or complex. According to business needs and user intent, a series of Prompt (prompt word engineering) templates are pre-defined and stored in the corresponding prompt word template library. These Prompt templates can be fixed text fragments or templates containing placeholders for subsequent filling of specific information. Specifically, according to the result of intent recognition, that is, the business intent, a Prompt template that matches the current business intent can be automatically selected or constructed from the template library to obtain the above-mentioned target prompt word engineering template. In addition, if the template contains placeholders, the key information extracted in the information extraction stage can be used to fill these placeholders to generate a more specific Prompt template, and used as the above-mentioned target prompt word engineering template.

[0122] Call the preset target large model.

[0123] In this embodiment, the target large model is a model generated by training the initial large model based on a pre-constructed sample data set. Specifically, the initial large model can be a model suitable for processing text and generating SQL statements, such as GPT-3 or GPT-J in the GPT series, or qwen-14B or qwen-72B-i nt4 in the qwen series, and so on.

[0124] Specifically, a sample data set containing user query text and corresponding SQL statements is prepared in advance. These data can come from open source databases such as WikiSQL, Spider, etc. Then, the prepared sample data set is used to train the initial large model so that it can understand natural language queries and generate SQL query statement templates, thereby obtaining a trained target large model.

[0125] The query text and the target prompt word engineering template are processed based on the target macro model to obtain a corresponding SQL query statement template.

[0126] In this embodiment, after the query text and the target prompt word engineering template are input into the target macro model, a corresponding SQL query statement template is generated based on the understanding and generation capability of the target macro model in combination with the target prompt word engineering.

[0127] Generate a corresponding SQL query statement based on the key information and the SQL query statement template.

[0128] In this embodiment, by using NLP technology or custom rules, key information in the user query is filled into corresponding positions (such as placeholders) in the SQL query statement template to generate a complete SQL query statement.

[0129] The SQL query statement is passed to a preset service database so that the SQL query statement is executed and processed by the service database to obtain a corresponding second response result.

[0130] In this embodiment, the service database may be an OLAP service, such as a Dor is database, etc. A database connection may be established with the service database, and the generated SQL query statement may be passed to the service database for execution, and a second response result returned by the service database after executing and processing the SQL query statement may be received.

[0131] The second response result is used as the query result.

[0132] If the present application detects that the intent type is complex, a target prompt word engineering template corresponding to the business intent is obtained; then a preset target big model is called, and the query text and the target prompt word engineering template are processed based on the target big model to obtain a corresponding SQL query statement template; then a corresponding SQL query statement is generated based on the key information and the SQL query statement template; subsequently, the SQL query statement is passed to a preset service database so that the SQL query statement is executed and processed by the service database and a corresponding second response result is obtained; finally, the second response result is used as the query result. When the present application identifies that the intent type of a business intent is complex, it will intelligently call the query processing strategy corresponding to the complex intent type to perform query processing on key information, specifically by obtaining the target prompt word engineering template corresponding to the business intent, and then calling the target big model to process the query text and the target prompt word engineering template to obtain an SQL query statement template, and then generate a corresponding SQL query statement based on the key information and the SQL query statement template, and subsequently pass the SQL query statement to a preset service database, so that the SQL query statement is executed and processed by the service database to obtain the final query result, which effectively improves the processing intelligence and processing adaptability of the query processing for key information and ensures the accuracy of the query results obtained.

[0133] In some optional implementations, step S206 includes the following steps:

[0134] Gets the data type of the query result.

[0135] In this embodiment, the query result may be subjected to type analysis to obtain a data type corresponding to the query result.

[0136] A target response template corresponding to the data type is selected from a preset response template library.

[0137] In this embodiment, the reply template library is a pre-built database storing multiple query data types and reply templates corresponding to each query data type. The target reply template can be obtained by first searching the reply template library for a specified query data type that matches the data type of the query result, and then searching the reply template library for a specified reply template corresponding to the specified query data type.

[0138] The query result is filled into the target reply template to obtain corresponding filling text.

[0139] In this embodiment, the above query results can be filled into the corresponding positions in the target reply template to obtain corresponding filling text.

[0140] Obtain the preference information of the user.

[0141] In this embodiment, the user's preference information can be queried based on the user's user information. The user information may refer to the user's name information, and the preference information may at least include the user's query history and preference settings.

[0142] The fill text is adjusted based on the preference information to obtain a corresponding adjusted text.

[0143] In this embodiment, the generated fill-in text can be personalized by using the preference information to obtain a response that better meets the user's needs, that is, the above-mentioned adjusted text.

[0144] The adjusted text is used as the reply text.

[0145] The present application obtains the data type of the query result; then selects the target reply template corresponding to the data type from the preset reply template library; then fills the query result into the target reply template to obtain the corresponding fill text; subsequently obtains the user's preference information, and adjusts the fill text based on the preference information to obtain the corresponding adjusted text; finally uses the adjusted text as the reply text. After obtaining the query result corresponding to the key information, the present application intelligently obtains the data type of the query result, and selects the target reply template corresponding to the data type from the preset reply template library, and then fills the query result into the target reply template to obtain the fill text, and then adjusts the fill text based on the user's preference information to obtain the final reply text that better meets the user's needs, thereby improving the accuracy and intelligence of the generated reply text and helping to improve the user experience.

[0146] In some optional implementations, the reply text can also be generated by natural language generation. Specifically, for complex query results that cannot be filled in using templates, a deeper semantic analysis is performed on the query results to understand the relationship and meaning between the data. Then, natural language generation technology (such as a deep learning model) is used to generate a coherent and natural reply text based on the analysis results.

[0147] In some optional implementations, step S207 includes the following steps:

[0148] Gets the preset target format.

[0149] In this embodiment, the target format may specifically be a format suitable for a user interface, such as HTML, Markdown, and the like.

[0150] The reply text is converted based on the target format to obtain a corresponding target reply text.

[0151] In this embodiment, the reply text is converted into a format suitable for the user interface, that is, the above-mentioned target format, so as to be displayed in a web page, mobile application or chat interface.

[0152] The target reply text is displayed in the query page.

[0153] In this embodiment, a reply display area may be preset in the query page, and the target reply text may be displayed in the reply display area to complete the display processing of the target reply text.

[0154] The present application obtains a preset target format; then converts the reply text based on the target format to obtain the corresponding target reply text; and then displays the target reply text in the query page. After generating the corresponding reply text based on the query result, the present application will also intelligently convert the reply text based on the preset target format to obtain the corresponding target reply text, and then display the target reply text in the query page, thereby ensuring the smooth display of the target reply text in the query page, improving the display intelligence and stability of the target reply text, and helping to improve the user experience.

[0155] In some optional implementations of this embodiment, after the step of displaying the target reply text in the query page, the electronic device may further perform the following steps:

[0156] The preset satisfaction evaluation options and opinion input box are displayed in the query page.

[0157] In this embodiment, after the user views the reply text, an interactive button or option may be further provided to allow the user to evaluate the satisfaction of the reply text, ask questions, or provide feedback. Specifically, after the reply text is displayed to the user, the system may display satisfaction evaluation options (such as very satisfied, satisfied, average, dissatisfied, and very dissatisfied) to allow the user to rate the reply text. In addition, the system may also provide a text-formatted opinion input box to allow the user to enter specific feedback or suggestions related to the reply text.

[0158] The satisfaction information corresponding to the satisfaction evaluation option input by the user in the query page is received.

[0159] In this embodiment, the user may input satisfaction information corresponding to the satisfaction evaluation option in the query page according to his or her actual situation.

[0160] Receive feedback information corresponding to the opinion input box input by the user in the query page.

[0161] In this embodiment, the user can input feedback opinion information corresponding to the opinion input box in the query page according to his or her actual situation.

[0162] The satisfaction information and the feedback information are stored and processed.

[0163] In this embodiment, the satisfaction information and the feedback information may be stored and processed using storage methods such as a local database, a cloud server, and a blockchain.

[0164] This application displays preset satisfaction evaluation options and opinion input boxes in the query page; then receives satisfaction information corresponding to the satisfaction evaluation options entered by the user in the query page; and receives feedback information corresponding to the opinion input box entered by the user in the query page; and subsequently stores and processes the satisfaction information and feedback information. After displaying and processing the target reply text in the query page, this application will also intelligently display preset satisfaction evaluation options and opinion input boxes in the query page, and then receives and stores the satisfaction information corresponding to the satisfaction evaluation options and feedback information entered by the user in the query page corresponding to the opinion input box, which effectively ensures the data security of the satisfaction information and feedback information, and facilitates the subsequent corresponding data analysis to achieve improvement and perfection of query processing.

[0165] In some optional implementations of this embodiment, after step S205, the electronic device may further perform the following steps:

[0166] If the query text belongs to the uncommon scenario, a preset fallback response template library is called.

[0167] In this embodiment, by performing a quality assessment on the query results corresponding to the query text, if the query results do not meet expectations, it is determined that the query scenario corresponding to the query text belongs to an uncommon scenario. Among them, the above-mentioned catch-all reply template library is a pre-built database that stores multiple catch-all reply templates, and these catch-all reply templates cover common question types and situations. Each template contains some placeholders or variables for subsequent filling in the keywords or related information of the user's query. In addition, when designing the catch-all answer template, it is ensured that the template can convey useful information without misleading the user, and the template should be concise and easy to understand.

[0168] A designated fallback response template corresponding to the business intent is selected from the fallback response template library.

[0169] In this embodiment, the most appropriate template can be selected from the catch-all answer template library as the designated catch-all reply template using a template matching algorithm according to the business intent corresponding to the query text and the context environment corresponding to the query text. If multiple templates match the user query, the most appropriate template can be selected according to a preset priority sorting rule.

[0170] Fill the key information into the specified fallback reply template to obtain the corresponding specified reply text.

[0171] In this embodiment, the key information extracted from the query text is filled into the placeholders or variables in the selected designated fallback answer template to generate the final reply text, i.e., the designated reply text. In addition, the generated reply text may be further processed as necessary, such as removing extra spaces, adjusting sentence structure, etc., to ensure the fluency and readability of the reply text.

[0172] The specified reply text is returned to the user.

[0173] In this embodiment, the processing method of returning the designated reply text to the user can refer to the above-mentioned processing process of returning the reply text to the user, and will not be described in detail here.

[0174] If the present application detects that the query text belongs to the uncommon scenario, the preset catch-all reply template library is called; then the designated catch-all reply template corresponding to the business intent is screened out from the catch-all reply template library; then the key information is filled into the designated catch-all reply template to obtain the corresponding designated reply text; and the designated reply text is subsequently returned to the user. When the present application detects that the query text belongs to the uncommon scenario, the fallback reply strategy is intelligently called to reply the query text, specifically by screening out the designated catch-all reply template corresponding to the business intent from the preset catch-all reply template library, then the key information is filled into the designated catch-all reply template to obtain the corresponding designated reply text, and then the designated reply text is returned to the user, so as to realize the process of quickly and intelligently completing the query reply processing, which is helpful to smoothly solve the user's problem when the query text entered by the user belongs to an uncommon scenario, improves the processing intelligence of the query reply processing, and is conducive to improving the user experience.

[0175] In some optional implementations, the low-frequency questions that trigger the fallback response strategy and their related information (such as user queries, fallback answers, query time, etc.) can be recorded, and the collected low-frequency questions can be analyzed regularly to identify the patterns and trends. Then, based on the analysis results, the content of the underlying database can be updated or expanded, including adding new slot words, optimizing data models, and increasing data sources, so as to improve the coverage and accuracy of subsequent queries.

[0176] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.

[0177] 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.

[0178] It should be emphasized that in order to further ensure the privacy and security of the above reply text, the above reply text can also be stored in a blockchain node.

[0179] 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.

[0180] 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.

[0181] 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.

[0182] 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).

[0183] 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.

[0184] 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.

[0185] like Figure 3 As shown, the artificial intelligence-based query processing device 300 described in this embodiment includes: a receiving module 301, an extraction module 302, a recognition module 303, a query module 304, a judgment module 305, a generation module 306 and a first return module 307. Among them:

[0186] The receiving module 301 is used to receive the query text input by the user through the preset query page;

[0187] An extraction module 302 is used to extract information from the query text to obtain corresponding key information;

[0188] The identification module 303 is used to classify the key information based on a preset intention recognition model and generate a business intention corresponding to the key information;

[0189] A query module 304, configured to perform query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent, to obtain a corresponding query result;

[0190] A judgment module 305, configured to judge whether the query text belongs to a preset uncommon scenario based on the query result;

[0191] A generating module 306, configured to generate a corresponding reply text based on the query result if the query text does not belong to the uncommon scenario;

[0192] The first returning module 307 is used to return the reply text to the user.

[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 query module 304 includes:

[0195] An extraction submodule, for extracting corresponding keywords from the query text if the intent type is simple;

[0196] A matching submodule, used for matching slot words contained in a preset database based on the keyword to obtain a target slot word matching the keyword;

[0197] A construction submodule, used to construct corresponding query parameters based on the target slot word;

[0198] A sending submodule, configured to send a query request to a specified service based on a preset data service interface; wherein the query request carries the query parameter;

[0199] A first receiving submodule, configured to receive a first response result corresponding to the query request returned by the designated service;

[0200] The first determining submodule is configured to use the first response result as the query result.

[0201] 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.

[0202] In some optional implementations of this embodiment, the query module 304 includes:

[0203] A first acquisition submodule is used to acquire a target prompt word engineering template corresponding to the business intent if the intent type is complex;

[0204] The calling submodule is used to call the preset target large model;

[0205] A processing submodule, used for processing the query text and the target prompt word engineering template based on the target macro model to obtain a corresponding SQL query statement template;

[0206] A generating submodule, used to generate a corresponding SQL query statement based on the key information and the SQL query statement template;

[0207] An execution submodule, used for transmitting the SQL query statement to a preset service database, so as to execute the SQL query statement through the service database and obtain a corresponding second response result;

[0208] The second determining submodule is configured to use the second response result as the query result.

[0209] 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.

[0210] In some optional implementations of this embodiment, the generating module 306 includes:

[0211] A second acquisition submodule is used to obtain the data type of the query result;

[0212] A screening submodule, used to screen out a target reply template corresponding to the data type from a preset reply template library;

[0213] A filling submodule, used to fill the query result into the target reply template to obtain corresponding filling text;

[0214] A third acquisition submodule is used to acquire the preference information of the user;

[0215] An adjustment submodule, configured to adjust the filling text based on the preference information to obtain a corresponding adjusted text;

[0216] The third determining submodule is used to use the adjusted text as the reply text.

[0217] 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.

[0218] In some optional implementations of this embodiment, the first returning module 307 includes:

[0219] The fourth acquisition submodule is used to acquire a preset target format;

[0220] A conversion submodule, used for converting the reply text based on the target format to obtain a corresponding target reply text;

[0221] The display submodule is used to display the target reply text in the query page.

[0222] 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.

[0223] In some optional implementations of this embodiment, the first returning module 307 further includes:

[0224] A display submodule, used to display preset satisfaction evaluation options and an opinion input box in the query page;

[0225] A second receiving submodule is configured to receive satisfaction information corresponding to the satisfaction evaluation option input by the user in the query page; and

[0226] A third receiving submodule is used to receive feedback information corresponding to the opinion input box input by the user in the query page;

[0227] The storage submodule is used to store and process the satisfaction information and the feedback information.

[0228] 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.

[0229] In some optional implementations of this embodiment, the query processing device based on artificial intelligence further includes:

[0230] A calling module, used for calling a preset fallback reply template library if the query text belongs to the uncommon scenario;

[0231] A screening module, used to screen out a designated fallback reply template corresponding to the business intent from the fallback reply template library;

[0232] A filling module, used to fill the key information into the specified fallback reply template to obtain a corresponding specified reply text;

[0233] The second returning module is used to return the specified reply text to the user.

[0234] 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.

[0235] 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.

[0236] 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.

[0237] 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.

[0238] 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.

[0239] 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.

[0240] 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.

[0241] 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.

[0242] 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.

[0243] 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: Receiving a query text input by a user through a preset query page; Extracting information from the query text to obtain corresponding key information; Classify the key information based on a preset intention recognition model to generate a business intention corresponding to the key information; Perform query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent to obtain a corresponding query result; Based on the query result, determining whether the query text belongs to a preset uncommon scenario; If the query text does not belong to the uncommon scenario, generating a corresponding reply text based on the query result; The reply text is returned to the user.

2. The query processing method based on artificial intelligence according to claim 1, characterized in that: The step of querying the key information based on the target query processing strategy corresponding to the intent type of the business intent to obtain the corresponding query result specifically includes: If the intent type is simple, extracting corresponding keywords from the query text; Based on the keyword, a matching process is performed on the slot words contained in a preset database to obtain a target slot word that matches the keyword; Constructing corresponding query parameters based on the target slot word; Sending a query request to a specified service based on a preset data service interface; wherein the query request carries the query parameter; Receiving a first response result corresponding to the query request returned by the designated service; The first response result is used as the query result.

3. The query processing method based on artificial intelligence according to claim 1, characterized in that: The step of querying the key information based on the target query processing strategy corresponding to the intent type of the business intent to obtain the corresponding query result specifically includes: If the intent type is complex, obtaining a target prompt word engineering template corresponding to the business intent; Call the preset target large model; Processing the query text and the target prompt word engineering template based on the target macro model to obtain a corresponding SQL query statement template; Generate a corresponding SQL query statement based on the key information and the SQL query statement template; Passing the SQL query statement to a preset service database, so that the service database executes the SQL query statement and obtains a corresponding second response result; The second response result is used as the query result.

4. The query processing method based on artificial intelligence according to claim 1, characterized in that: The step of generating a corresponding reply text based on the query result specifically includes: Obtain the data type of the query result; Filtering a target response template corresponding to the data type from a preset response template library; Fill the query result into the target reply template to obtain corresponding fill text; Obtaining preference information of the user; Adjusting the filled text based on the preference information to obtain corresponding adjusted text; The adjusted text is used as the reply text.

5. The query processing method based on artificial intelligence according to claim 1, characterized in that: The step of returning the reply text to the user specifically includes: Get the preset target format; Convert the reply text based on the target format to obtain a corresponding target reply text; The target reply text is displayed in the query page.

6. The query processing method based on artificial intelligence according to claim 5, characterized in that: After the step of displaying the target reply text in the query page, the method further includes: Displaying preset satisfaction evaluation options and an opinion input box on the query page; receiving satisfaction information corresponding to the satisfaction evaluation option input by the user in the query page; and, Receiving feedback information corresponding to the opinion input box input by the user in the query page; The satisfaction information and the feedback information are stored and processed.

7. The query processing method based on artificial intelligence according to claim 1, characterized in that: After the step of determining whether the query text belongs to a preset uncommon scenario based on the query result, the method further includes: If the query text belongs to the uncommon scenario, a preset fallback response template library is called; Filtering out a designated fallback response template corresponding to the business intent from the fallback response template library; Fill the key information into the specified fallback reply template to obtain the corresponding specified reply text; The specified reply text is returned to the user.

8. A query processing device based on artificial intelligence, characterized in that: include: A receiving module, used to receive a query text input by a user through a preset query page; An extraction module, used to extract information from the query text to obtain corresponding key information; An identification module, used to classify the key information based on a preset intention identification model and generate a business intention corresponding to the key information; A query module, used to perform query processing on the key information based on a target query processing strategy corresponding to the intent type of the business intent, to obtain a corresponding query result; A judgment module, used for judging whether the query text belongs to a preset uncommon scenario based on the query result; A generating module, configured to generate a corresponding reply text based on the query result if the query text does not belong to the uncommon scenario; The first returning module is used to return the reply text to the user.

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.

Citation Information

Cited By

  • Information processing method and device, computer equipment and storage medium

    CN120125352A