Intelligent response methods, devices, equipment, and media based on user expression preferences
By acquiring user expression preference data and combining it with preset question templates and question-answering models, personalized response content is generated, solving the problem of the lack of personality in the responses of intelligent customer service robots and achieving a higher level of personalized response.
Patent Information
- Application Number
- CN202311050432.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-08-18
AI Technical Summary
Existing intelligent customer service robots lack personalization in their responses, failing to generate different styles of replies for different users, resulting in a lack of personalization in inquiry responses.
By acquiring the input data of the target audience, extracting their expression preference data, and using preset question templates and pre-trained question-answering models to generate personalized response content, the response is generated in combination with the target audience's expression preferences.
It improves the personalization of intelligent customer service in responding to inquiries, and can generate more user-friendly responses based on the user's expression preferences.
Smart Images

Figure CN117033796B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of artificial intelligence and financial technology, and in particular to an intelligent response method, device, equipment and medium based on user expressed preferences. Background Technology
[0002] In the fields of finance, insurance, and e-commerce, intelligent customer service robots have been set up to meet customers' business consultation needs and provide 24-hour online service, thereby improving service efficiency and user experience.
[0003] Currently, intelligent customer service robots are mainly based on artificial intelligence and natural language processing technologies. While they can guarantee the accuracy of content and the naturalness of voice tone, they cannot generate different styles of responses for different users, lacking personalization. Therefore, how to improve the personalization of intelligent customer service in inquiry responses has become an urgent technical problem to be solved. Summary of the Invention
[0004] The main objective of this application is to propose an intelligent response method, apparatus, device, and medium based on user expression preferences, aiming to improve the personalization of intelligent customer service in consultation responses.
[0005] To achieve the above objectives, this application proposes an intelligent response method based on user-expressed preferences, the method comprising:
[0006] Obtain the input data of the target object;
[0007] Extract the expression preferences of the target object from the input data or a preset database to obtain target expression preference data;
[0008] Problem information is extracted from the input data to obtain preliminary problem data;
[0009] Based on a preset question template, the target expression preference data and the preliminary question data are encapsulated into questions to obtain target question data;
[0010] The target answer is obtained by generating an answer to the target question data using a pre-trained question-answering model.
[0011] Reply to the target object based on the target answer.
[0012] In some embodiments, the step of extracting the target object's expression preferences from the input data or a preset database to obtain target expression preference data includes:
[0013] The input data is subjected to expression preference detection to obtain expression preference detection data;
[0014] If the expression preference detection data indicates that the target object's expression preference exists in the input data, then the target object's expression preference is extracted from the input data to obtain the target expression preference data;
[0015] If the expression preference detection data indicates that the expression preference of the target object does not exist in the input data, then the expression preference of the target object is extracted from the preset database to obtain the target expression preference data.
[0016] In some embodiments, extracting the expression preferences of the target object from the input data to obtain the target expression preference data includes:
[0017] The input data is used to locate the preference data to obtain the preference data location information;
[0018] Based on the location information of the selection preference data, preference keywords are extracted from the input data to obtain the target expression preference data.
[0019] In some embodiments, performing expression preference detection on the input data to obtain expression preference detection data includes:
[0020] The input data is processed by text segmentation to obtain text fragment data;
[0021] The text fragment data is subjected to preference analysis processing to obtain preference analysis data;
[0022] The expression preference detection data is determined based on the preference analysis data and the preset preference confidence threshold.
[0023] In some embodiments, the step of extracting the expression preferences of the target object from the preset database to obtain the target expression preference data includes:
[0024] Extract the object attribute information of the target object from the preset database;
[0025] The target expression preference data is obtained by predicting the expression preferences of the object attribute information.
[0026] In some embodiments, the step of predicting the expression preferences of the object attribute information to obtain the target expression preference data includes:
[0027] The object attribute information is processed to extract fields, and the target field data is obtained.
[0028] The target field data is preprocessed to obtain the target object data;
[0029] The target object data is subjected to feature extraction processing to obtain the target object features;
[0030] User preference prediction is performed on the characteristics of the target object to obtain the target expression preference data.
[0031] In some embodiments, the step of encapsulating the target expression preference data and the preliminary question data based on a preset question template to obtain target question data includes:
[0032] The preliminary problem data is subjected to syntax detection to obtain detection results; wherein, the detection results include error status, and the error status is used to indicate that there are syntax errors in the preliminary problem data;
[0033] Based on the error status, the preliminary problem data is corrected to obtain corrected problem data;
[0034] The target expression preference data and the corrected question data are integrated and processed based on the preset question template to obtain the target question data.
[0035] To achieve the above objectives, a second aspect of this application proposes an intelligent response device based on user-expressed preferences, the device comprising:
[0036] The input data acquisition module is used to acquire input data from the target object;
[0037] The expression preference acquisition module is used to extract the expression preferences of the target object from the input data or a preset database to obtain target expression preference data;
[0038] The problem information extraction module is used to extract problem information from the input data to obtain preliminary problem data;
[0039] The question encapsulation module is used to encapsulate the target expression preference data and the preliminary question data based on a preset question template to obtain target question data;
[0040] The answer generation module is used to generate answers to the target question data using a pre-trained question-answering model, thereby obtaining the target answer;
[0041] The reply module is used to reply to the target object based on the target answer.
[0042] To achieve the above objectives, a third aspect of the present application provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described in the first aspect.
[0043] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0044] This application proposes an intelligent response method, apparatus, device, and medium based on user expression preferences. It acquires input data from the target user; extracts the target user's expression preferences from the input data or a pre-set database to obtain target expression preference data; extracts question information from the input data to obtain preliminary question data; encapsulates the target expression preference data and preliminary question data using a pre-set question template to obtain target question data; generates an answer to the target question data using a pre-trained question-and-answer model to obtain a target answer; and responds to the target user based on the target answer. This method can determine the target user's preferred response style by combining predicted expression preference data and generate response content based on that style, thus improving the personalization of intelligent customer service in consultation responses. Attached Figure Description
[0045] Figure 1 This is a flowchart of the intelligent response method based on user expression preferences provided in the embodiments of this application;
[0046] Figure 2 yes Figure 1 The flowchart of step S102 in the document;
[0047] Figure 3 yes Figure 2 The flowchart of step S201 in the text;
[0048] Figure 4 yes Figure 2 The flowchart of step S202 in the text;
[0049] Figure 5 yes Figure 2 The flowchart of step S203 in the process;
[0050] Figure 6 yes Figure 5 The flowchart of step S502 in the document;
[0051] Figure 7 yes Figure 1 The flowchart of step S104 in the process;
[0052] Figure 8 This is a schematic diagram of the structure of the intelligent response device based on user expression preferences provided in the embodiments of this application;
[0053] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0055] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0057] First, let's analyze some of the terms used in this application:
[0058] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.
[0059] Natural Language Processing (NLP): NLP uses computers to process, understand, and utilize human language (such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary field of computer science and linguistics, often referred to as computational linguistics. NLP includes syntactic analysis, semantic analysis, and discourse understanding. It is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, intent recognition, information extraction and filtering, text classification and clustering, sentiment analysis, and opinion mining. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computation.
[0060] Information extraction is a text processing technique that extracts factual information such as entities, relationships, and events from natural language text and outputs it as structured data. Information extraction is a technique for extracting specific information from text data. Text data is composed of specific units, such as sentences, paragraphs, and chapters. Text information is composed of smaller, specific units, such as characters, words, phrases, sentences, paragraphs, or combinations of these units. Extracting noun phrases, names of people, and place names from text data is an example of text information extraction. Of course, text information extraction techniques can extract information of various types.
[0061] Expression preference refers to an individual's or group's bias or liking towards a certain way of expression, emotion, viewpoint, value, or choice. It reflects the degree of preference or priority of an individual or group towards a specific thing, which can be liking, supporting, identifying with, or favoring something, or disliking, opposing, or rejecting something.
[0062] Text segmentation refers to the process of dividing a continuous text or string into several smaller parts or units. This segmentation can be based on different rules or algorithms, such as segmenting by character, word, or sentence. Text segmentation is widely used in natural language processing, text mining, and information retrieval, helping to make large blocks of text data easier to process and analyze, extracting useful information and features.
[0063] Intelligent customer service robots are increasingly being used in finance, insurance, e-commerce, and other fields. Utilizing artificial intelligence and natural language processing technologies, these robots can understand user questions and provide corresponding answers, thus meeting customers' business consultation needs. Compared to traditional human customer service, intelligent customer service robots offer 24 / 7 online service, providing assistance to users at any time, thereby improving service efficiency and user experience.
[0064] Currently, intelligent customer service robots are mainly based on Transformers models in artificial intelligence and natural language processing technologies, such as the BERT model and the ERNIE pre-trained model. These models perform well in terms of content accuracy and naturalness of speech tone, and can provide high-quality answers. However, these models lack personalization when generating responses and cannot generate different styles of responses for different users.
[0065] Therefore, how to improve the personalization of intelligent customer service responses has become an urgent technical problem to be solved.
[0066] Based on this, embodiments of this application provide a method, apparatus, device, and medium for intelligent responses based on user expression preferences, aiming to improve the personalization of intelligent customer service in consultation responses.
[0067] The intelligent reply method, apparatus, device, and medium based on user expression preferences provided in this application are specifically described through the following embodiments. First, the intelligent reply method based on user expression preferences in this application embodiment is described.
[0068] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0069] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0070] The intelligent reply method based on user expression preferences provided in this application relates to the fields of artificial intelligence and financial technology. This intelligent reply method based on user expression preferences can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the intelligent reply method based on user expression preferences, but is not limited to the above forms.
[0071] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0072] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0073] Figure 1 This is an optional flowchart of an intelligent response method based on user expression preferences provided in an embodiment of this application. Figure 1The method may include, but is not limited to, steps S101 to S106.
[0074] Step S101: Obtain input data for the target object;
[0075] Step S102: Extract the expression preferences of the target object from the input data or the preset database to obtain target expression preference data;
[0076] Step S103: Extract problem information from the input data to obtain preliminary problem data;
[0077] Step S104: Based on the preset question template, the target expression preference data and preliminary question data are encapsulated to obtain the target question data;
[0078] Step S105: Generate answers to the target question data using a pre-trained question-answering model to obtain the target answer;
[0079] Step S106: Reply to the target object based on the target answer.
[0080] Steps S101 to S106, as illustrated in this embodiment, involve: acquiring input data from the target object; extracting the target object's expression preferences from the input data or a preset database to obtain target expression preference data; extracting question information from the input data to obtain preliminary question data; encapsulating the target expression preference data and preliminary question data using a preset question template to obtain target question data; generating an answer to the target question data using a pre-trained question-answering model to obtain a target answer; and replying to the target object based on the target answer. This approach combines the target object's predicted expression preference data to determine the target object's preferred response style and generates reply content based on that style, thus improving the personalization of intelligent customer service in consultation responses.
[0081] In step S101 of some embodiments, the target object can input data in the form of text input, voice input, or other methods, such as image input. This application embodiment does not limit the input method.
[0082] Please see Figure 2 In some embodiments, step S102 may include, but is not limited to, steps S201 to S203:
[0083] Step S201: Perform expression preference detection on the input data to obtain expression preference detection data;
[0084] Step S202: If the expression preference detection data indicates that the target object's expression preference exists in the input data, then the target object's expression preference is extracted from the input data to obtain the target expression preference data;
[0085] Step S203: If the expression preference detection data indicates that the expression preference of the target object does not exist in the input data, then the expression preference of the target object is extracted from the preset database to obtain the target expression preference data.
[0086] Steps S201 to S203 as shown in the embodiments of this application detect the expression preferences of the input data to determine whether the input data contains the expression preferences of the target object, thereby determining where to obtain the expression preferences of the target object and obtaining target expression preference data. This facilitates the subsequent determination of the response expression method preferred by the target object based on the target expression preference data, and generates response content based on the response expression method, thereby improving the personalization of intelligent customer service in consultation responses.
[0087] It should be noted that the target expression preference can be a personality expression preference, such as meticulous, cheerful, or lively; or it can be a character type expression preference, such as Little Tuan Tuan, Doraemon, Nobita, or Gian. This application does not impose any limitations on these preferences in its embodiments.
[0088] Please see Figure 3 In some embodiments, step S201 may include, but is not limited to, steps S301 to S303:
[0089] Step S301: Perform text segmentation on the input data to obtain text fragment data;
[0090] Step S302: Perform preference analysis on the text fragment data to obtain preference analysis data;
[0091] Step S303: Determine the expression preference detection data based on the preference analysis data and the preset preference confidence threshold.
[0092] Steps S301 to S303 as shown in the embodiments of this application involve performing text segmentation processing on the input data to obtain text fragment data, then performing preference analysis processing on the text fragment data to obtain preference analysis data; finally, comparing the preference analysis data with a preset preference confidence threshold to determine the expression preference detection data, thereby determining whether there is an expression preference of the target object in the input data of the target object, which facilitates the subsequent determination of the method to obtain the expression preference of the target object.
[0093] It should be noted that the text segmentation process for the input data is performed by selecting the corresponding segmentation method according to the format of the text data. The segmentation methods include, but are not limited to, sentence segmentation, word segmentation, character segmentation, regular expression segmentation, and custom segmentation. In this embodiment, no restrictions are imposed on them.
[0094] In step S302 of some embodiments, a preset preference analysis model is used to perform preference analysis processing on the text fragment data to obtain preference analysis data, wherein the preference analysis data is numerical data used to characterize the probability of having expressed preferences.
[0095] It should be noted that the preference analysis model can be a machine learning-based classification model, such as a classification model based on algorithms such as logistic regression, support vector machine, decision tree, and random forest.
[0096] In step S303 of some embodiments, after judging the preference analysis data with a preset preference confidence threshold, expression preference detection data can be obtained. The expression preference detection data is used to characterize whether there is an expression preference of the target object in the input data.
[0097] Please see Figure 4 In some embodiments, step S202 may include, but is not limited to, steps S401 to S402:
[0098] Step S401: Locate the selection preference data in the input data to obtain the selection preference data location information;
[0099] Step S402: Based on the location information of the selection preference data, the input data is used to extract preference keywords to obtain the target expression preference data.
[0100] Steps S401 to S402, as illustrated in this embodiment, involve locating the input data to determine the position of the preference data, obtaining the location information of the selected preference data, and then extracting preference keywords based on the location information of the selected preference data to obtain the preference information input by the target object, thus obtaining the target expression preference data. This facilitates the subsequent determination of the response expression method preferred by the target object based on the target expression preference data, and the generation of response content based on this response expression method, thereby improving the personalization of intelligent customer service in consultation responses.
[0101] In step S401 of some embodiments, the input data is selected to locate the preference data, and the approximate location range of the expressed preference is obtained, which facilitates the subsequent extraction of the expressed preference.
[0102] In step S402 of some embodiments, by extracting preference keywords, the intelligent customer service system can better understand the user's expression preferences, thereby providing more accurate answers based on the expression preferences, and thus improving the personalization of intelligent customer service in consultation responses.
[0103] Please see Figure 5 In some embodiments, step S203 may also include, but is not limited to, steps S501 to S502:
[0104] Step S501: Extract the object attribute information of the target object from the preset database;
[0105] Step S502: Predict the expression preferences of the object attribute information to obtain target expression preference data.
[0106] Steps S501 to S502 as shown in the embodiments of this application predict the expression preferences of the target object by performing expression preference prediction on the object attribute information reserved in the preset database, and obtain the predicted expression preference data of the target object as the target expression preference data. This enables the target object to determine its preferred response expression method by combining the predicted expression preference data when the input of the target object does not contain an expression preference, and to generate response content based on the response expression method, thereby improving the personalization of intelligent customer service in consultation responses.
[0107] In step S501 of some embodiments, the object attribute information is the user information left by the target object during the registration and use process, which may include, but is limited to, user-related data such as age, gender, occupation, region, income, risk, interests, and content followed.
[0108] In one embodiment, the target audience's expression preferences can be predicted based on region, age, gender, occupation, interests, and content they are interested in, thus obtaining target expression preference data.
[0109] In step S502 of some embodiments, the object attribute information is used to predict the expression preference through a machine learning model to obtain target expression preference data. Specifically, the machine learning model can be a prediction model based on algorithms such as XGBoost, random forest, and decision tree, and is not limited to it in this embodiment.
[0110] Please see Figure 6 In some embodiments, step S502 may also include, but is not limited to, steps S601 to S604:
[0111] Step S601: Extract fields from object attribute information to obtain target field data;
[0112] Step S602: Perform data preprocessing on the target field data to obtain the target object data;
[0113] Step S603: Perform feature extraction processing on the target object data to obtain the target object features;
[0114] Step S604: Perform user preference prediction on the target object features to obtain target expression preference data.
[0115] Steps S601 to S604, as illustrated in this embodiment, involve sequentially extracting fields, preprocessing data, extracting features, and predicting user preferences from the object attribute information to obtain predicted expression preference data for the target object, which is then used as target expression preference data. This enables the prediction of user expression preferences based on object attribute information even when the target object's input does not contain expression preferences, thereby determining the target object's preferred response style and content based on the predicted expression preference results.
[0116] It should be noted that field extraction involves extracting corresponding fields from the extracted object attribute information according to the required prediction fields, such as age, region, occupation, and interests, for subsequent processing. Targeted field extraction allows for a better understanding of user needs and preferences, thereby improving prediction accuracy.
[0117] It should be noted that data preprocessing may include, but is not limited to, steps such as data filtering, data cleaning, and data transformation, and is not limited in this embodiment.
[0118] Specifically, data filtering can remove invalid data, such as duplicate data, missing data, and outlier data; data cleaning can remove noise, fill in missing values, and handle outliers; data transformation can convert text data into numerical data and perform normalization.
[0119] It should be noted that feature extraction processing may include steps such as feature construction, feature vectorization, and feature dimensionality reduction, and this embodiment does not impose any limitations on these steps.
[0120] Specifically, for feature construction, the bag-of-words model, TF-IDF vector, and N-gram model are selected to construct features according to task requirements.
[0121] Feature vectorization transforms text features into numerical vectors that can be processed by machine learning algorithms. Methods such as one-hot encoding, word embedding models (e.g., Word2Vec), and document embedding models (e.g., Doc2Vec) can be used for vectorization.
[0122] Feature dimensionality reduction: This involves reducing the dimensionality of high-dimensional feature vectors to decrease feature dimensions and computational complexity. Common dimensionality reduction methods include Principal Component Analysis (PCA) and Linear Discriminant Analysis (LDA).
[0123] In step S604 of some embodiments, a pre-trained user preference prediction model is used to predict the target object's features and obtain target expression preference data. Based on the user's features and the model prediction results, a preference score or tag for the target object can be generated for subsequent intelligent customer service inquiries and responses.
[0124] It should be noted that the user preference prediction model can be a machine learning model, such as logistic regression, decision tree, random forest, neural network, etc. Depending on the specific situation, a single model or an integration of multiple models can be used, and no restrictions are imposed on it in this embodiment.
[0125] In step S103 of some embodiments, the problem information is the business problem that the target object wants to consult with the intelligent customer service, or it can be other problems, such as life problems, mathematical problems, etc., and is not limited to them in the embodiments of this application.
[0126] Please see Figure 7 In some embodiments, step S104 may also include, but is not limited to, steps S701 to S703:
[0127] Step S701: Perform syntax detection on the preliminary problem data to obtain the detection results; wherein, the detection results include error status, which is used to indicate that there are syntax errors in the preliminary problem data;
[0128] Step S702: Based on the error status, perform error correction processing on the preliminary problem data to obtain corrected problem data;
[0129] Step S703: Based on the preset question template, integrate the target expression preference data and the corrected question data to obtain the target question data.
[0130] Steps S701 to S703 as shown in the embodiments of this application determine whether there are grammatical errors in the preliminary question data. If there are, the preliminary question data is corrected to obtain corrected question data. Finally, the corrected question data and the target expression preference data are integrated to obtain the target question data. When input into the question-and-answer model of the intelligent customer service, consultation answers that conform to the expression preferences of the target object can be obtained, thereby improving the personalization of intelligent customer service in consultation responses.
[0131] In one embodiment, a preliminary problem data dependency parsing or syntactic structure analysis tool performs syntactic analysis on the preprocessed data, which can help extract grammatical information such as subject-verb-object relationships and modification relationships in the sentence. Subsequently, based on preset grammatical rules or patterns, error detection is performed on the results of the syntactic analysis. For example, it can detect whether the sentence has subject-verb disagreement, lacks a subject or object, or uses parts of speech that do not conform to grammatical rules, thereby obtaining the detection results.
[0132] In some embodiments, the detection result further includes a correct state characterizing that the initial problem data does not contain syntax errors; after step S701, the method may also include, but is not limited to, the following steps:
[0133] Based on a preset question template, the target expression preference data and preliminary question data are integrated and processed to obtain the target question data.
[0134] It should be noted that integrating the target expression preference data and the corrected question data involves filling the target expression preference data and the corrected question data into the preset positions of the preset question template.
[0135] In addition, using preset question templates can guide the model to generate answers in a specific style and format, ensuring that the generated target answers have strong consistency in style and that the target answers are readable and easy to understand.
[0136] For example, if the target expression preference data is A, the corrected question data is B, and the preset question template is: Please answer ${userQuestion} in the tone of ${ansewerType}, after filling the target expression preference data and the corrected question data into the preset position of the preset question template, you will get: "Please answer B in the tone of A".
[0137] In step S105 of some embodiments, the pre-trained question-answering model can be a large language model, such as ChatGPT, Wenxin Yiyan, etc.
[0138] In one embodiment, intelligent responses based on user preferences include, but are not limited to, the following steps:
[0139] Step 1: Obtain the input data for the target object;
[0140] Step 2: Perform expression preference detection on the input data to obtain expression preference detection data;
[0141] If the expression preference detection data represents the expression preference of the target object in the input data, then the expression preference of the target object is extracted from the input data to obtain the target expression preference data;
[0142] If the expression preference detection data indicates that the expression preference of the target object does not exist in the input data, then the expression preference of the target object is extracted from the preset database to obtain the target expression preference data;
[0143] Step 3: Extract problem information from the input data to obtain preliminary problem data;
[0144] Step 4: Perform grammar checks on the initial problem data and obtain the results;
[0145] If the detection result indicates an error state representing a syntax error in the preliminary problem data, then the preliminary problem data is corrected based on the error state to obtain the corrected problem data; the target expression preference data and the corrected problem data are integrated based on the preset problem template to obtain the target problem data;
[0146] If the detection result indicates that the preliminary question data is in a correct state and there are no grammatical errors, then the target expression preference data and the preliminary question data are integrated and processed based on the preset question template to obtain the target question data;
[0147] Step 5: Generate answers to the target question data using a pre-trained question-answering model to obtain the target answer;
[0148] Step 6: Reply to the target audience based on the target answer;
[0149] It should be noted that regardless of whether the input data contains the target object's expression preferences, the default database stores the target object's expression preferences, and these expression preferences stored in the database are obtained through the following steps:
[0150] Extract object attribute information of the target object from the preset database;
[0151] The user preference prediction model is used to further predict the preferences of the object attribute information to obtain the predicted preference data.
[0152] The predicted expression preference data is stored in a preset database.
[0153] By using a pre-defined initial user preference prediction model to predict the expression preferences of object attribute information, the predicted expression preference data can be obtained, which may include, but is not limited to, the following steps:
[0154] Extract the target field data by performing field extraction on the object's attribute information;
[0155] Preprocess the target field data to obtain the target object data;
[0156] The target object data is processed to extract features, thereby obtaining the target object features;
[0157] User preference prediction is performed on the characteristics of the target object to obtain predicted preference data.
[0158] In one embodiment, if the expression preference detection data in step 2 represents the expression preference of the target object in the input data, then after step 6, the method further includes the following steps:
[0159] Extract the expression preferences of the target objects from the preset database to obtain predicted expression preference data;
[0160] The error between the target expression preference data and the predicted expression preference data is calculated to obtain the expression preference error;
[0161] If the expression preference error is greater than the preset error threshold, the parameters of the initial user preference prediction model are adjusted to obtain the target expression preference prediction model.
[0162] After parameter adjustment, the target expression preference prediction model is used to re-predict the expression preferences of all users in the preset database, thereby updating the predicted expression preference data in the preset database. This ensures that the intelligent customer service system can guarantee the effectiveness of consultation responses when encountering situations where there are no expression preferences in the input data, and ensures that the degree of personalization is not weakened.
[0163] In one embodiment, when a user enters "the difference between renewal policy refund and policy cancellation" on the intelligent customer service inquiry page, the system will simultaneously check whether the parameters carry expression preferences. If they do, the system will directly use the user's selected preference; otherwise, it will search for the user's expression preferences in the database. For example, if the user selects the expression preference "Xiao Tuantuan".
[0164] The target expression preference data is "Xiao Tuantuan", and the initial question data is "the difference between renewal policy refund and policy cancellation".
[0165] After performing a grammatical check on the initial question data and finding no grammatical errors, the target expression preference data and the initial question data are filled into the preset large language model input template "Please answer ${userQuestion} in the tone of ${ansewerType}", thus obtaining the target question data:
[0166] Please answer the question in Xiao Tuantuan's voice regarding the difference between a policy renewal refund and a policy cancellation.
[0167] The target question, "Please answer the question in Xiao Tuantuan's voice about the difference between a renewal policy refund and a policy cancellation," is input into the large language model ChatGPT to obtain the target answer, such as the following:
[0168] Oh dear, Little Tuantuan knows the answer to this question! Renewal policy refunds and policy surrenders are not the same! Okay, let's talk about renewal policy refunds first. A renewal policy refund means that before the insurance contract expires, the policyholder can choose not to renew and request a refund of the premiums already paid. In this case, the policy will end after the expiration date, but you will still have coverage until then! Policy surrender, on the other hand, means that the policyholder chooses to terminate the insurance contract during its term. The insurance company will refund the premiums already paid according to the surrender terms stipulated in the insurance contract. In this case, the policy will immediately become invalid, and the policyholder will have no coverage!
[0169] Therefore, a refund for a renewed policy and a policy surrender are different! One is ending the policy before its expiration date, and the other is ending the policy immediately. I hope everyone can understand this!
[0170] Finally, a response is sent to the user based on the target answer, completing the business inquiry response.
[0171] Please see Figure 8 This application also provides an intelligent reply device based on user expression preferences, which can implement the above-mentioned intelligent reply method based on user expression preferences. The device includes:
[0172] The input data acquisition module 801 is used to acquire input data of the target object;
[0173] The expression preference acquisition module 802 is used to extract the expression preferences of the target object from input data or a preset database to obtain target expression preference data;
[0174] Problem information extraction module 803 is used to extract problem information from input data to obtain preliminary problem data;
[0175] The question encapsulation module 804 is used to encapsulate the target expression preference data and preliminary question data based on a preset question template to obtain the target question data;
[0176] The answer generation module 805 is used to generate answers to target question data using a pre-trained question-answering model, thereby obtaining the target answer;
[0177] Response module 806 is used to reply to the target object based on the target answer.
[0178] In some embodiments, the expression preference acquisition module 802 further includes:
[0179] The expression preference detection submodule is used to perform expression preference detection on the input data and obtain expression preference detection data;
[0180] The first expression preference determination submodule is used to extract the expression preference of the target object from the input data if the expression preference detection data represents the expression preference of the target object in the input data, and obtain the target expression preference data.
[0181] The second expression preference determination submodule is used to extract the expression preference of the target object from the preset database if the expression preference detection data characterizes that the expression preference of the target object does not exist in the input data, and obtain the target expression preference data.
[0182] In some embodiments, the expression preference detection submodule further includes:
[0183] The text segmentation unit is used to perform text segmentation processing on the input data to obtain text fragment data;
[0184] The preference analysis unit is used to perform preference analysis on text fragment data to obtain preference analysis data.
[0185] The expression preference detection data determination unit is used to determine expression preference detection data based on preference analysis data and a preset preference confidence threshold.
[0186] In some embodiments, the first expression preference determination submodule further includes:
[0187] The selection preference data location unit is used to locate the selection preference data in the input data to obtain the selection preference data location information.
[0188] The preference keyword extraction unit is used to extract preference keywords from the input data based on the location information of the selected preference data to obtain the target expression preference data.
[0189] In some embodiments, the second expression preference determination submodule further includes:
[0190] The object attribute information extraction unit is used to extract the object attribute information of the target object from a preset database.
[0191] The expression preference prediction unit is used to predict the expression preferences of object attribute information to obtain target expression preference data.
[0192] In some embodiments, the expression preference prediction unit further includes:
[0193] The field extraction subunit is used to extract fields from object attribute information to obtain target field data;
[0194] The data preprocessing subunit is used to preprocess the target field data to obtain the target object data.
[0195] The feature extraction subunit is used to perform feature extraction processing on the target object data to obtain the target object features;
[0196] The user preference prediction subunit is used to predict user preferences based on the characteristics of the target object, thereby obtaining target expression preference data.
[0197] In some embodiments, the problem encapsulation module 804 further includes:
[0198] The syntax detection submodule is used to perform syntax detection on the initial problem data and obtain the detection results. The detection results include error status, which is used to indicate that there are syntax errors in the initial problem data.
[0199] The error correction submodule is used to correct the initial problem data based on the error status to obtain corrected problem data;
[0200] The integration submodule is used to integrate target expression preference data and corrected question data based on a preset question template to obtain target question data.
[0201] The specific implementation of this intelligent reply device based on user expression preferences is basically the same as the specific implementation of the intelligent reply method based on user expression preferences described above, and will not be repeated here.
[0202] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned intelligent response method based on user-expressed preferences. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0203] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0204] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0205] The memory 902 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 to execute the intelligent reply method based on user-expressed preferences in the embodiments of this application.
[0206] The input / output interface 903 is used to implement information input and output;
[0207] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0208] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);
[0209] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0210] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described intelligent response method based on user-expressed preferences.
[0211] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0212] The intelligent response method, apparatus, device, and medium based on user expression preferences provided in this application embodiment acquire input data of the target object; extract the target object's expression preferences from the input data or a preset database to obtain target expression preference data; extract question information from the input data to obtain preliminary question data; encapsulate the target expression preference data and preliminary question data into a question based on a preset question template to obtain target question data; generate an answer to the target question data using a pre-trained question-answering model to obtain a target answer; and reply to the target object based on the target answer. This method can determine the target object's preferred response expression method by combining the target object's predicted expression preference data, and generate reply content based on this response expression method, thereby improving the personalization of intelligent customer service in consultation responses.
[0213] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0214] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0215] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0216] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0217] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0218] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0219] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0220] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0221] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0222] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0223] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. An intelligent reply method based on user expressed preferences, characterized in that, The method comprises: acquiring input data of a target object; extracting expression preferences of the target object from the input data or a preset database to obtain target expression preference data; extracting question information from the input data to obtain preliminary question data; performing question packaging on the target expression preference data and the preliminary question data based on a preset question template to obtain target question data; generating an answer to the target question data through a pre-trained question and answer model to obtain a target answer; replying to the target object according to the target answer; wherein the extracting of the expression preferences of the target object from the input data or the preset database to obtain the target expression preference data comprises: performing expression preference detection on the input data to obtain expression preference detection data; if the expression preference detection data indicates that the input data contains expression preferences of the target object, extracting the expression preferences of the target object from the input data to obtain the target expression preference data, and further comprising: extracting expression preferences of the target object from the preset database to obtain predicted expression preference data; calculating an error between the target expression preference data and the predicted expression preference data to obtain an expression preference error; if the expression preference error is greater than a preset error threshold, adjusting parameters of an initial user preference prediction model to obtain a target expression preference prediction model; after the parameter adjustment, re-predicting expression preferences of all users in the preset database using the target expression preference prediction model, and further updating the predicted expression preference data in the preset database; if the expression preference detection data indicates that the input data does not contain expression preferences of the target object, extracting the expression preferences of the target object from the preset database to obtain the target expression preference data.
2. The method of claim 1, wherein, The extracting of the expression preferences of the target object from the input data to obtain the target expression preference data comprises: performing selection preference data positioning on the input data to obtain selection preference data position information; extracting preference keywords from the input data based on the selection preference data position information to obtain the target expression preference data.
3. The method of claim 1, wherein, The performing of the expression preference detection on the input data to obtain the expression preference detection data comprises: performing text segmentation processing on the input data to obtain text segment data; performing preference analysis processing on the text segment data to obtain preference analysis data; determining the expression preference detection data according to the preference analysis data and a preset preference confidence threshold.
4. The method of claim 1, wherein, The extracting of the expression preferences of the target object from the preset database to obtain the target expression preference data comprises: extracting object attribute information of the target object from the preset database; performing expression preference prediction on the object attribute information to obtain the target expression preference data.
5. The method of claim 4, wherein, The performing of the expression preference prediction on the object attribute information to obtain the target expression preference data comprises: performing field extraction on the object attribute information to obtain target field data; performing data preprocessing on the target field data to obtain target object data; The target object data is subjected to feature extraction processing to obtain target object features; The target object features are subjected to user preference prediction to obtain the target expression preference data.
6. The method according to any one of claims 1 to 5, characterized in that, The target expression preference data and the preliminary question data are subjected to question packaging based on a preset question template to obtain target question data, including: The preliminary question data is subjected to syntax detection to obtain a detection result; wherein the detection result includes an error state, and the error state is used to represent that the preliminary question data has a syntax error; The preliminary question data is subjected to error correction processing based on the error state to obtain corrected question data; The target expression preference data and the corrected question data are subjected to integration processing based on the preset question template to obtain the target question data.
7. An intelligent reply device based on user expressed preferences, characterized by, The device is used to implement the intelligent reply method based on user expression preference according to any one of claims 1 to 6, and the device includes: An input data acquisition module is configured to acquire input data of a target object; An expression preference acquisition module is configured to extract expression preference of the target object from the input data or a preset database to obtain target expression preference data; A question information extraction module is configured to extract question information from the input data to obtain preliminary question data; A question packaging module is configured to package the target expression preference data and the preliminary question data based on a preset question template to obtain target question data; An answer generation module is configured to generate an answer to the target question data through a pre-trained question and answer model to obtain a target answer; A reply module is configured to reply to the target object according to the target answer.
8. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the intelligent reply method based on user expression preference according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the intelligent reply method based on user expression preference according to any one of claims 1 to 6.
Citation Information
Patent Citations
Intelligent question and answer method and device, server and computer readable storage medium
CN112685550A
Interaction method and system for intelligent man-machine conversation and electronic equipment
CN112948534A