Intelligent customer service interaction method based on large language model
Through the intelligent customer service interaction method based on the large language model, using user input and historical information to generate problem triple information, the problem of insufficient capabilities of traditional intelligent question-answer systems in complex semantics and multiple rounds of conversations is solved, and more accurate intelligent question-and-answer responses are achieved.
Patent Information
- Application Number
- CN202510181943.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional intelligent question and answer systems have limited capabilities in dealing with complex semantics and multiple rounds of conversations, making it difficult to provide accurate responses.
Using an intelligent customer service interaction method based on a large language model, we use the problem information and background information entered by the user to determine whether there is a matching answer information. If it does not exist, use the question information entered by the user's history to extract keywords, generate question triple information, and input it into the intelligent question and answer model to get replies.
Improves the accuracy of smart Q&A reply and can handle complex semantics and multiple rounds of conversations more effectively.
Smart Images

Figure CN120104745A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent question-answering technology, and in particular to an intelligent customer service interaction method and system based on a large language model. Background Art
[0002] Intelligent question answering is an important subfield of natural language processing. Its core purpose is to develop computer programs that can understand users' natural language questions. The program can not only understand the user's intention, but also give accurate and concise natural language answers based on the user's intention. In recent years, the large language model technology has been continuously iteratively developed. With its powerful text understanding and generation capabilities, as well as logical induction and reasoning capabilities, the large language model has been widely used in text processing tasks such as text classification and intelligent dialogue.
[0003] Traditional question-answering methods mainly rely on rule bases, information retrieval technology and shallow machine learning models. Although they perform well in specific fields and have strong system interpretability, they have limited capabilities when dealing with complex semantics and multi-round conversations. Summary of the invention
[0004] The embodiments of the present application provide an intelligent customer service interaction method and system based on a large language model, which are used to improve the accuracy of intelligent question and answer responses.
[0005] An embodiment of the present invention provides an intelligent customer service interaction method based on a large language model, the method comprising:
[0006] Obtaining the question information currently input by the user and the background information associated with the question information;
[0007] Determine whether there is answer information corresponding to the question information according to the intelligent question-answer database corresponding to the background information; the intelligent question-answer database stores answer information corresponding to a plurality of standard question information corresponding to the background information;
[0008] If there is no answer information corresponding to the question information, obtaining the question information inputted by the user in the past;
[0009] Acquire target historical question information associated with the question information currently input by the user from the question information historically input by the user;
[0010] Extracting keywords from the question information currently input by the user and the target historical question information, and determining question triple information based on the extracted keywords, wherein the question triple information includes entities, relations, and attributes;
[0011] The question triplet information is input into an intelligent question-answering model to obtain answer information corresponding to the currently input question information. The intelligent question-answering model is trained based on sample question triplet information and corresponding answer information labels.
[0012] In an optional embodiment provided by the present invention, before determining whether there is answer information corresponding to the question information according to the intelligent question-answer database corresponding to the background information, the method further includes:
[0013] Extracting background keywords based on the background information, and determining keyword feature vectors corresponding to the background keywords;
[0014] By calculating the similarity between the keyword feature vector and the feature vector in the feature vector library,
[0015] The intelligent question and answer library corresponding to the background information is determined by using the intelligent question and answer library identifier corresponding to the feature vector with the highest similarity in the feature vector library.
[0016] In an optional embodiment provided by the present invention, determining whether there is answer information corresponding to the question information according to the intelligent question-answer database corresponding to the background information includes:
[0017] Extracting question keywords from the question information and converting the question keywords into a question knowledge graph;
[0018] Convert entities in the problem knowledge graph into standard entities;
[0019] Through the question knowledge graph, it is queried whether there is answer information corresponding to the question information in the intelligent question and answer library corresponding to the background information.
[0020] In an optional embodiment provided by the present invention, the step of acquiring target historical question information associated with the question information currently input by the user from the question information historically input by the user includes:
[0021] Question information in the question information historically input by the user that has a direct reference relationship and an indirect reference relationship with the question information currently input by the user within a predetermined time period is determined as target historical question information associated with the question information currently input by the user.
[0022] In an optional embodiment provided by the present invention, the step of acquiring target historical question information associated with the question information currently input by the user from the question information historically input by the user includes:
[0023] Taking the time of the question information currently input by the user as the time starting point, sequentially obtaining the question information within a predetermined time period before the question information previously input by the user in chronological order, and determining the question information closest to the time starting point as the current question information;
[0024] Determining, through semantic analysis, whether the acquired current question information is associated with the question information currently input by the user;
[0025] If there is an association relationship, the current question information is determined as the target historical question information associated with the question information currently input by the user, and the current question information is used as the question information currently input by the user, and the process jumps to determining the question information closest to the time starting point as the current question information to continue execution;
[0026] If there is no association, the current question information is used as the question information currently input by the user, and the process jumps to determining the question information closest to the time starting point as the current question information and continues to execute.
[0027] In an optional embodiment provided by the present invention, extracting keywords from the question information currently input by the user and the target historical question information, and determining question triple information based on the extracted keywords, includes:
[0028] Preprocessing the extracted keywords, wherein the preprocessing includes at least standardization, synonymization, disambiguation, and entity completion of the keywords;
[0029] Tagging the preprocessed keywords using a keyword library corresponding to the background information, wherein the keyword library stores tags corresponding to a plurality of keywords;
[0030] Question triple information is determined according to the keywords and their corresponding labels.
[0031] In an optional embodiment provided by the present invention, the step of inputting the question triplet information into the intelligent question answering model to obtain answer information corresponding to the currently input question information includes:
[0032] Inputting the question triple information into the intelligent question answering model, and obtaining question triple feature information corresponding to the question triple information through the feature extraction layer in the intelligent question answering model;
[0033] Using a fully connected network, the question triple feature information is converted into a vector space where the domain knowledge graph is located to obtain new question triple feature information of the question;
[0034] Calculate the semantic scores of the new question triplet feature vector and entities in the domain knowledge graph, and use the target entities whose semantic scores exceed a preset value as a set of candidate answers to the question information currently input by the user;
[0035] According to the relationship path corresponding to the candidate answer set and the question triplet feature information, answer information corresponding to the currently input question information is predicted.
[0036] In an optional embodiment provided by the present invention, predicting answer information corresponding to the currently input question information according to the relationship path corresponding to the candidate answer set and the question triple feature information includes:
[0037] From the relationship paths corresponding to the target entity in the domain knowledge graph, and removing duplicate relationship paths;
[0038] Converting the relationship path without duplication into a relationship path vector;
[0039] Answer information corresponding to the currently input question information is predicted through the relationship path vector and the question triplet feature information.
[0040] In an optional embodiment provided by the present invention, converting the relationship path with duplicates removed into a relationship path vector includes:
[0041] Calculate the weight coefficient of each relationship between the feature information of the question triple and the domain knowledge graph; and normalize the weight coefficient of each relationship;
[0042] The relationship path vector is obtained by weighted summing of the relationship path vector sequence according to the normalized weight coefficient; the relationship path vector sequence is a vector sequence composed of the vectors of all relationships in the domain knowledge graph.
[0043] An embodiment of the present invention provides an intelligent customer service interaction system based on a large language model, the system comprising:
[0044] An acquisition module, used to acquire the question information currently input by the user and background information associated with the question information;
[0045] A determination module, used to determine whether there is answer information corresponding to the question information according to the intelligent question and answer library corresponding to the background information; the intelligent question and answer library stores answer information corresponding to multiple standard question information corresponding to the background information;
[0046] The acquisition module is further configured to acquire the question information inputted by the user in the past if there is no answer information corresponding to the question information;
[0047] The acquisition module is further used to acquire, from the question information historically input by the user, target historical question information associated with the question information currently input by the user;
[0048] An extraction module, used to extract keywords from the question information currently input by the user and the target historical question information, and determine question triple information based on the extracted keywords, wherein the question triple information includes entities, relations, and attributes;
[0049] The prediction module is used to input the question triplet information into the intelligent question-answering model to obtain answer information corresponding to the currently input question information. The intelligent question-answering model is trained based on sample question triplet information and corresponding answer information labels.
[0050] The present invention provides an intelligent customer service interaction method and system based on a large language model. First, the question information currently input by the user and the background information associated with the question information are obtained. Then, according to the intelligent question and answer library corresponding to the background information, it is determined whether there is answer information corresponding to the question information, wherein the intelligent question and answer library stores answer information corresponding to multiple standard question information corresponding to the background information. If there is answer information corresponding to the question information, the question information input by the user in history is obtained. The target historical question information associated with the question information currently input by the user is obtained from the question information input by the user in history. Keywords are extracted from the question information currently input by the user and the target historical question information, and question triple information is determined based on the extracted keywords. The question triple information includes entities, relations, and attributes. Finally, the question triple information is input into the intelligent question and answer model to obtain the answer information corresponding to the question information currently input. The intelligent question and answer model is trained according to sample question triple information and corresponding answer information labels. Compared with the existing intelligent replies that rely on rule bases and information retrieval technologies, the present application generates question triple information based on current question information and historical question information, and then inputs the question triple information into the intelligent question and answer model to obtain the answer information corresponding to the current input question information, thereby improving the accuracy of intelligent question and answer replies through this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A flowchart of an intelligent customer service interaction method based on a large language model provided for this application;
[0052] Figure 2 A schematic diagram of the structure of an intelligent customer service interaction system based on a large language model provided for this application. DETAILED DESCRIPTION
[0053] In order to better understand the above-mentioned technical scheme, the technical scheme of the embodiments of the present application is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical scheme of the embodiments of the present application, rather than limitations on the technical scheme of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments may be combined with each other.
[0054] Specific as Figure 1 As shown, this embodiment provides an intelligent customer service interaction method based on a large language model, and the execution steps of the method are:
[0055] 101 , obtaining question information currently input by the user and background information associated with the question information.
[0056] It should be noted that the intelligent customer service interaction method provided in this embodiment can be applied in various service scenarios, such as intelligent robots placed in banks, intelligent robots placed in hospitals, intelligent replies on online shopping platforms, intelligent replies on telecommunications applications, etc. This embodiment does not make specific limitations on this.
[0057] Among them, the background information can be a link for a shopping product, through which the relevant information of the corresponding product can be obtained, that is, the relevant background of the question that the user needs to ask about the product. For example, when a user asks a question to the intelligent customer service through a product on a shopping platform, the link of the product will be automatically sent to the intelligent customer service, so that the intelligent customer can obtain the relevant background information through the link. Of course, users can also automatically upload some background information related to the question, and the uploaded background information can be text, voice, pictures, etc.
[0058] Furthermore, after obtaining the background information associated with the question information, this embodiment can label the background information to obtain the corresponding question and answer field. For example, the background information obtained from the shopping link for a certain piece of clothing can be labeled as clothing; the background information obtained from the shopping link for a certain fruit can be labeled as fresh food.
[0059] 102. Determine whether there is answer information corresponding to the question information according to the intelligent question-answer database corresponding to the background information.
[0060] Among them, the intelligent question and answer library stores answer information corresponding to multiple standard question information corresponding to the background information, and the intelligent temperature library stores answer information corresponding to the standard question information corresponding to each application field, and the application field is determined according to the label of the background information. Specifically, this embodiment can calculate the similarity between the question information currently input by the user and the standard question information of the corresponding application field in the intelligent question and answer library, and then obtain the standard question information with the highest similarity. If the similarity exceeds a preset value, such as exceeding 90%, the answer information corresponding to the standard question information with the highest similarity can be directly used as the answer information of the question information currently input by the user.
[0061] In an optional embodiment provided by the present application, before determining whether there is answer information corresponding to the question information according to the intelligent question and answer library corresponding to the background information, the method further includes: extracting background keywords based on the background information, and determining the keyword feature vector corresponding to the background keyword; calculating the similarity between the keyword feature vector and the feature vector in the feature vector library, wherein the feature vector library stores the intelligent question and answer library identifiers corresponding to multiple feature vectors, and determining the intelligent question and answer library corresponding to the background information through the intelligent question and answer library identifier corresponding to the feature vector with the highest similarity in the feature vector library. Among them, the intelligent question and answer library identifier can uniquely identify the corresponding intelligent question and answer library.
[0062] Specifically, determining whether there is answer information corresponding to the question information based on the intelligent question and answer library corresponding to the background information includes: extracting question keywords from the question information and converting the question keywords into a question knowledge graph; converting entities in the question knowledge graph into standard entities; and querying, through the question knowledge graph, whether there is answer information corresponding to the question information in the intelligent question and answer library corresponding to the background information.
[0063] Among them, converting entities into standard entities means converting entities into a unified format and expression to eliminate differences in entity spelling, format, language, etc. For example, "Yangzhou fried rice" and "Yangzhou fried rice" are the same entity, but due to different languages, the latter needs to be converted into the former to maintain entity consistency.
[0064] It should be noted that knowledge graph is a way of storing information that describes objective knowledge in the real world in a structured form. It can map abstract information into graphic elements, help users intuitively perceive and analyze data, and achieve effective construction and expression of knowledge, thereby expanding its application in various fields. Entity standardization means converting entities into a unified format and expression to eliminate differences in spelling, format, language, etc.
[0065] 103. If there is no answer information corresponding to the question information, obtain the question information inputted by the user in the past.
[0066] The question information historically input by the user refers to the question information and text information raised before the current question information.
[0067] 104 , obtaining target historical question information associated with the question information currently input by the user from the question information historically input by the user.
[0068] In an optional embodiment provided by the present application, the step of obtaining target historical question information associated with the question information currently input by the user from the question information historically input by the user includes: determining question information in the question information historically input by the user that has a direct reference relationship and an indirect reference relationship with the question information currently input by the user within a predetermined time period as target historical question information associated with the question information currently input by the user. The reference relationship can be determined based on the reference of the information reply in the chat record or the @ symbol.
[0069] In another optional embodiment provided by the present application, the step of acquiring target historical question information associated with the question information currently input by the user from the question information historically input by the user includes:
[0070] 1041, taking the time of the question information currently input by the user as the time starting point, sequentially obtaining question information within a predetermined time period before the question information previously input by the user in chronological order, and determining the question information closest to the time starting point as the current question information;
[0071] 1042, determining through semantic analysis whether the acquired current question information is associated with the question information currently input by the user;
[0072] 1043, if there is an association relationship, determining the current question information as the target historical question information associated with the question information currently input by the user, and taking the current question information as the question information currently input by the user, and jumping to determining the question information closest to the time starting point as the current question information to continue execution;
[0073] 1044, if there is no association relationship, the current question information is used as the question information currently input by the user, and the process jumps to determining the question information closest to the time starting point as the current question information and continues to execute.
[0074] For example, the following is a conversation between a group of users and an intelligent robot:
[0075] User: What dishes do you recommend today?
[0076] Intelligent robots: Kung Pao Chicken, Shredded Pork with Beijing Sauce, Pot-fried Pork...
[0077] User: How is Kung Pao Chicken made?
[0078] User: Are there any special offers?
[0079] Among them, "Are there any special offers?" is the question information currently input by the user, and the question information previously input by the user includes: "How is Kung Pao Chicken made?", "What dishes are recommended today?", among which "Are there any special offers?" and "How is Kung Pao Chicken made?" are related through semantic analysis, that is, the customer wants to know whether there are any special offers for Kung Pao Chicken, and then determines whether "What dishes are recommended today?" is related to "How is Kung Pao Chicken made?".
[0080] 105 , extracting keywords from the question information currently input by the user and the target historical question information, and determining question triplet information based on the extracted keywords.
[0081] Among them, the question triple information includes entities, relationships, and attributes; for example, "Yangzhou fried rice", "pairing", and "soft fried pork tenderloin" is a triple, indicating the pairing relationship between the two dishes; "Yangzhou fried rice", "includes", and "rice" is a triple, indicating the raw material relationship of this dish; "Yangzhou fried rice", "classification", and "rice type" is a triple, indicating the classification attribute of this dish.
[0082] In an optional embodiment provided by the present application, the step of extracting keywords from the question information currently input by the user and the target historical question information, and determining question triplet information based on the extracted keywords, includes: preprocessing the extracted keywords, the preprocessing at least including keyword standardization, synonymization, disambiguation and entity completion; labeling the preprocessed keywords through a keyword library corresponding to the background information, the keyword library storing labels corresponding to a plurality of keywords; and determining question triplet information based on the keywords and their corresponding labels.
[0083] Among them, synonymization is to merge keywords with the same or similar meanings into the same entity to eliminate the semantic redundancy of the entity. For example, "shoots" and "shoot slices" are both made from the raw material "shoots", and only differ in the slicing process, so they can be merged into "shoots" to keep the entity simple. Disambiguation is to distinguish entities with multiple meanings and eliminate the linguistic ambiguity of the entity. For example, "chicken soup" can refer to both a Huaiyang delicacy and a chicken soup for the soul, so it is necessary to distinguish them into "chicken soup <dish name>" and "chicken soup <soul>" based on the context and the information in the knowledge base to ensure the accuracy of the entity. Entity completion is to supplement missing entities to avoid incomplete entity information. For example, the ingredients of "Yangzhou fried rice" include "eggs", "ham", "shrimp", "green beans", etc. in addition to "rice", so it is necessary to add them to the entity list based on the information in the knowledge base to maintain the integrity of the entity information.
[0084] 106. Input the question triplet information into the intelligent question answering model to obtain answer information corresponding to the currently input question information.
[0085] The intelligent question answering model is trained based on sample question triple information and corresponding answer information labels. In one embodiment provided by itself, the question triple information is input into the intelligent question answering model to obtain answer information corresponding to the currently input question information, including:
[0086] 1061. Input the question triple information into the intelligent question answering model, and obtain question triple feature information corresponding to the question triple information through the feature extraction layer in the intelligent question answering model.
[0087] 1062. Use a fully connected network to convert the question triple feature information into the vector space where the domain knowledge graph is located to obtain new question triple feature information of the question.
[0088] The domain knowledge graph in this embodiment is essentially a structured semantic network, which is usually expressed in the form of <entity-attribute-attribute value> and <head entity-relationship-tail entity> triplets. Multi-hop questions are natural language questions involving entities and multiple relationships, and answers can only be obtained through knowledge reasoning.
[0089] In this embodiment, the domain knowledge graph is represented by G = {E, R, F}, E = {e 1 ,e 2 ,...e m} represents an entity set, R = {r 1 ,r 2 ,...r n} represents a set of relations, F = {(h,r,t)|h,t∈E,r∈R} is a set of triples, h is the subject entity, t is the tail entity, and r is the relation. The relation path is the relation sequence of the domain knowledge graph. Given a path (h,r 1 ,e 1 ,r 2 ,...e n-1 ,r n ,a), where h is the subject entity, r i (1≤i≤n) is a relationship, e i (1≤i≤n-1) is the intermediate entity, n is the number of hops, a is the tail entity (answer entity), and the relationship path corresponding to this path is
[0090] Multi-hop intelligent question answering can be formally described as: on the knowledge graph G, a set of answers to question q is given based on the subject entity h and the relationship path l. is the correct answer entity for question q. Given a multi-hop question q = {w 1 ,w 2 ,...w q}, where the subject entity h∈E, the answer entity set First, we preprocess the text of the question and add two position tags [CLS] and [SEP] at the beginning and end. Then we input the RoBERTa model to get the context representation of each word in the question. We take the average semantic vector of the second-to-last hidden layer as the new question triple feature information Q: Q = Mean (RoBERTa ([CLS], w 1 ,...w q ,[SEP]))
[0091] Then, the fully connected network is used to transform the vector representation Q of the problem into the vector space where the knowledge graph is located, and the new vector representation of the problem is obtained: q =W 2 (σ(W 1 Q+b 1 ))+b 2 ; W 1 and W 2 represents the trainable weight matrix, b 1 and b 2 represents the trainable bias term, and σ represents the activation function.
[0092] 1063, calculating the semantic scores of the new question triplet feature vector and the entities in the domain knowledge graph, and taking the target entities whose semantic scores exceed a preset value as a set of candidate answers to the question information currently input by the user.
[0093] In this embodiment, the credibility of the answer entity is evaluated based on the semantic information represented by the new question triplet feature vector and the feature information represented by the subject entity vector of the new question triplet feature vector entity, so as to quickly screen out semantically related target entities as candidate answers, regard the question as the semantic connection between the subject entity and the answer entity, and represent it based on the vector that has been obtained.
[0094] 1064. Predict answer information corresponding to the currently input question information based on the relationship path corresponding to the candidate answer set and the question triplet feature information.
[0095] Specifically, the method predicts answer information corresponding to the currently input question information based on the relationship path corresponding to the candidate answer set and the question triplet feature information, including: obtaining the relationship path corresponding to the target entity in the domain knowledge graph and eliminating duplicate relationship paths; converting the eliminated duplicate relationship paths into relationship path vectors; and predicting answer information corresponding to the currently input question information through the relationship path vectors and the question triplet feature information.
[0096] The step of converting the relationship path without duplication into a relationship path vector includes: calculating the weight coefficient of each relationship in the problem triple feature information and the domain knowledge graph; the calculation formula is:
[0097] Among them, e q is the vector representation of the problem, x i is the vector representation of the relationship, and t is the scaling factor. The weight coefficient of each relationship is normalized, and the formula is a i =softmax(a i ); The relationship path vector is obtained by weighted summing of the relationship path vector sequence according to the normalized weight coefficient, and the formula is: The vector sequence of the relationship path is a vector sequence composed of vectors of all relationships in the domain knowledge graph, and n is the number of relationships.
[0098] In order to find the optimal relationship path from the candidate relationship paths, this model uses a triple loss function, which uses an anchor point, a positive sample, and a negative sample to form a triple, where the anchor point and the positive sample category are the same, and the anchor point and the negative sample category are different. Through training, the positive sample and the anchor point are close in position in the vector space, and the negative sample and the anchor point are far away, minimizing the distance between samples of the same category and maximizing the distance between samples of different categories. In this embodiment, the intelligent question-answering model regards the question as an anchor point, and the relationship path from the subject entity to the correct answer is marked as a positive sample, and other relationship paths are marked as negative samples. The training is performed in the above manner, and the calculation formula is:
[0099]
[0100] Among them, N is the number of constructed triple samples, e q is the vector representation of the problem, p ia is the vector representation of the positive sample, is the vector representation of negative samples, represents the calculation of the Euclidean distance between two vectors. θ is used to ensure that the distance between samples of the same category learned by the model is smaller than the distance between samples of different categories. + is the hinge function, and its calculation formula is: hinge(x)=max(x,0). The optimal relationship path of the problem is obtained according to the above method, and then the optimal answer to the problem is generated in combination with the knowledge graph.
[0101] An embodiment of the present application provides an intelligent customer service interaction method based on a large language model. The method first obtains question information currently input by a user and background information associated with the question information, and then determines whether there is answer information corresponding to the question information based on an intelligent question and answer library corresponding to the background information, wherein the intelligent question and answer library stores answer information corresponding to multiple standard question information corresponding to the background information; if there is answer information corresponding to the question information, then obtain the question information previously input by the user; obtain target historical question information associated with the question information currently input by the user from the question information previously input by the user; extract keywords from the question information currently input by the user and the target historical question information, and determine question triple information based on the extracted keywords, wherein the question triple information includes entities, relationships, and attributes; finally, input the question triple information into an intelligent question and answer model to obtain answer information corresponding to the currently input question information, wherein the intelligent question and answer model is trained based on sample question triple information and corresponding answer information labels. Compared with the existing intelligent replies that rely on rule bases and information retrieval technologies, the present application generates question triple information based on current question information and historical question information, and then inputs the question triple information into the intelligent question and answer model to obtain the answer information corresponding to the current input question information, thereby improving the accuracy of intelligent question and answer replies through this application.
[0102] 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.
[0103] In one embodiment, an intelligent customer service interaction system based on a large language model is provided, and the intelligent customer service interaction system based on a large language model corresponds one-to-one to the intelligent customer service interaction method based on a large language model in the above embodiment. Figure 2As shown in the figure, the functional modules of the intelligent customer service interaction system based on the large language model are described in detail as follows:
[0104] An acquisition module 21 is used to acquire the question information currently input by the user and background information associated with the question information;
[0105] A determination module 22, configured to determine whether there is answer information corresponding to the question information according to the intelligent question-answer database corresponding to the background information; the intelligent question-answer database stores answer information corresponding to a plurality of standard question information corresponding to the background information;
[0106] The acquisition module 21 is further configured to acquire the question information inputted by the user in the past if there is no answer information corresponding to the question information;
[0107] The acquisition module 21 is further used to acquire target historical question information associated with the question information currently input by the user from the question information historically input by the user;
[0108] An extraction module 23, used to extract keywords from the question information currently input by the user and the target historical question information, and determine question triple information based on the extracted keywords, wherein the question triple information includes entities, relations, and attributes;
[0109] The prediction module 24 is used to input the question triplet information into the intelligent question-answering model to obtain answer information corresponding to the currently input question information. The intelligent question-answering model is trained based on sample question triplet information and corresponding answer information labels.
[0110] In an optional embodiment provided by the present invention, the determination module 22 is further configured to:
[0111] Extracting background keywords based on the background information, and determining keyword feature vectors corresponding to the background keywords;
[0112] By calculating the similarity between the keyword feature vector and the feature vector in the feature vector library,
[0113] The intelligent question and answer library corresponding to the background information is determined by using the intelligent question and answer library identifier corresponding to the feature vector with the highest similarity in the feature vector library.
[0114] In an optional embodiment provided by the present invention, the determination module 22 is specifically configured to:
[0115] Extracting question keywords from the question information and converting the question keywords into a question knowledge graph;
[0116] Convert entities in the problem knowledge graph into standard entities;
[0117] Through the question knowledge graph, it is queried whether there is answer information corresponding to the question information in the intelligent question and answer library corresponding to the background information.
[0118] In an optional embodiment provided by the present invention, the extraction module 23 is specifically used for:
[0119] Question information in the question information historically input by the user that has a direct reference relationship and an indirect reference relationship with the question information currently input by the user within a predetermined time period is determined as target historical question information associated with the question information currently input by the user.
[0120] In an optional embodiment provided by the present invention, the extraction module 23 is specifically used for:
[0121] Taking the time of the question information currently input by the user as the time starting point, sequentially obtaining the question information within a predetermined time period before the question information previously input by the user in chronological order, and determining the question information closest to the time starting point as the current question information;
[0122] Determining, through semantic analysis, whether the acquired current question information is associated with the question information currently input by the user;
[0123] If there is an association relationship, the current question information is determined as the target historical question information associated with the question information currently input by the user, and the current question information is used as the question information currently input by the user, and the process jumps to determining the question information closest to the time starting point as the current question information to continue execution;
[0124] If there is no association, the current question information is used as the question information currently input by the user, and the process jumps to determining the question information closest to the time starting point as the current question information and continues to execute.
[0125] In an optional embodiment provided by the present invention, the determination module 22 is specifically configured to:
[0126] Preprocessing the extracted keywords, wherein the preprocessing includes at least standardization, synonymization, disambiguation, and entity completion of the keywords;
[0127] Tagging the preprocessed keywords using a keyword library corresponding to the background information, wherein the keyword library stores tags corresponding to a plurality of keywords;
[0128] Question triple information is determined according to the keywords and their corresponding labels.
[0129] In an optional embodiment provided by the present invention, the prediction module 24 is specifically used for:
[0130] Inputting the question triple information into the intelligent question answering model, and obtaining question triple feature information corresponding to the question triple information through the feature extraction layer in the intelligent question answering model;
[0131] Using a fully connected network, the question triple feature information is converted into a vector space where the domain knowledge graph is located to obtain new question triple feature information of the question;
[0132] Calculate the semantic scores of the new question triplet feature vector and entities in the domain knowledge graph, and use the target entities whose semantic scores exceed a preset value as a set of candidate answers to the question information currently input by the user;
[0133] According to the relationship path corresponding to the candidate answer set and the question triplet feature information, answer information corresponding to the currently input question information is predicted.
[0134] In an optional embodiment provided by the present invention, the prediction module 24 is specifically used for:
[0135] From the relationship paths corresponding to the target entity in the domain knowledge graph, and removing duplicate relationship paths;
[0136] Converting the relationship path without duplication into a relationship path vector;
[0137] Answer information corresponding to the currently input question information is predicted through the relationship path vector and the question triplet feature information.
[0138] In an optional embodiment provided by the present invention, the prediction module 24 is specifically used for:
[0139] Calculate the weight coefficient of each relationship between the feature information of the question triple and the domain knowledge graph; and normalize the weight coefficient of each relationship;
[0140] The relationship path vector is obtained by weighted summing of the relationship path vector sequence according to the normalized weight coefficient; the relationship path vector sequence is a vector sequence composed of the vectors of all relationships in the domain knowledge graph.
[0141] For the specific limitations of the intelligent customer service interaction system based on a large language model, please refer to the limitations of the intelligent customer service interaction method based on a large language model above, which will not be repeated here. Each module in the above-mentioned device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0142] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0143] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. An intelligent customer service interaction method based on a large language model, characterized in that: The method comprises: Obtaining the question information currently input by the user and the background information associated with the question information; Determine whether there is answer information corresponding to the question information according to the intelligent question-answer database corresponding to the background information; the intelligent question-answer database stores answer information corresponding to a plurality of standard question information corresponding to the background information; If there is no answer information corresponding to the question information, obtaining the question information inputted by the user in the past; Acquire target historical question information associated with the question information currently input by the user from the question information historically input by the user; Extracting keywords from the question information currently input by the user and the target historical question information, and determining question triple information based on the extracted keywords, wherein the question triple information includes entities, relations, and attributes; The question triplet information is input into the intelligent question-answering model to obtain answer information corresponding to the currently input question information. The intelligent question-answering model is trained based on sample question triplet information and corresponding answer information labels.
2. The method according to claim 1, characterized in that Before determining whether there is answer information corresponding to the question information according to the intelligent question-answer database corresponding to the background information, the method further includes: Extracting background keywords based on the background information, and determining keyword feature vectors corresponding to the background keywords; By calculating the similarity between the keyword feature vector and the feature vector in the feature vector library, The intelligent question and answer library corresponding to the background information is determined by using the intelligent question and answer library identifier corresponding to the feature vector with the highest similarity in the feature vector library.
3. The method according to claim 2, characterized in that The determining whether there is answer information corresponding to the question information according to the intelligent question-answer database corresponding to the background information includes: Extracting question keywords from the question information and converting the question keywords into a question knowledge graph; Convert entities in the problem knowledge graph into standard entities; Through the question knowledge graph, it is queried whether there is answer information corresponding to the question information in the intelligent question and answer library corresponding to the background information.
4. The method according to claim 1, characterized in that: The step of acquiring target historical question information associated with the question information currently input by the user from the question information historically input by the user includes: Question information in the question information historically input by the user that has a direct reference relationship and an indirect reference relationship with the question information currently input by the user within a predetermined time period is determined as target historical question information associated with the question information currently input by the user.
5. The method according to claim 1, characterized in that The step of acquiring target historical question information associated with the question information currently input by the user from the question information historically input by the user includes: Taking the time of the question information currently input by the user as the time starting point, sequentially obtaining the question information within a predetermined time period before the question information previously input by the user in chronological order, and determining the question information closest to the time starting point as the current question information; Determining, through semantic analysis, whether the acquired current question information is associated with the question information currently input by the user; If there is an association relationship, the current question information is determined as the target historical question information associated with the question information currently input by the user, and the current question information is used as the question information currently input by the user, and the process jumps to determining the question information closest to the time starting point as the current question information to continue execution; If there is no association, the current question information is used as the question information currently input by the user, and the process jumps to determining the question information closest to the time starting point as the current question information and continues to execute.
6. The method according to claim 4 or 5, characterized in that: The step of extracting keywords from the question information currently input by the user and the target historical question information, and determining question triple information based on the extracted keywords, includes: Preprocessing the extracted keywords, wherein the preprocessing includes at least keyword standardization, synonymization, disambiguation, and entity completion; Tagging the preprocessed keywords using a keyword library corresponding to the background information, wherein the keyword library stores tags corresponding to a plurality of keywords; Question triple information is determined according to the keywords and their corresponding labels.
7. The method according to claim 4 or 5, characterized in that: The step of inputting the question triplet information into the intelligent question answering model to obtain answer information corresponding to the currently input question information includes: Inputting the question triple information into the intelligent question answering model, and obtaining question triple feature information corresponding to the question triple information through the feature extraction layer in the intelligent question answering model; Using a fully connected network, the question triple feature information is converted into a vector space where the domain knowledge graph is located to obtain new question triple feature information of the question; Calculate the semantic scores of the new question triplet feature vector and entities in the domain knowledge graph, and use the target entities whose semantic scores exceed a preset value as a set of candidate answers to the question information currently input by the user; According to the relationship path corresponding to the candidate answer set and the question triplet feature information, answer information corresponding to the currently input question information is predicted.
8. The method according to claim 7, characterized in that The predicting, based on the relationship path corresponding to the candidate answer set and the question triplet feature information, answer information corresponding to the currently input question information includes: The relationship paths corresponding to the target entities in the domain knowledge graph are obtained, and duplicate relationship paths are removed; Converting the relationship path without duplication into a relationship path vector; Answer information corresponding to the currently input question information is predicted through the relationship path vector and the question triplet feature information.
9. The method according to claim 8, characterized in that The step of converting the relationship path with duplicates removed into a relationship path vector comprises: Calculate the weight coefficient of each relationship between the feature information of the question triple and the domain knowledge graph; and normalize the weight coefficient of each relationship; The relationship path vector is obtained by weighted summing of the relationship path vector sequence according to the normalized weight coefficient; the relationship path vector sequence is a vector sequence composed of the vectors of all relationships in the domain knowledge graph.
10. An intelligent customer service interaction system based on a large language model, characterized in that: The system comprises: An acquisition module, used to acquire the question information currently input by the user and background information associated with the question information; A determination module, used to determine whether there is answer information corresponding to the question information according to the intelligent question and answer library corresponding to the background information; the intelligent question and answer library stores answer information corresponding to multiple standard question information corresponding to the background information; The acquisition module is further configured to acquire the question information inputted by the user in the past if there is no answer information corresponding to the question information; The acquisition module is further used to acquire, from the question information historically input by the user, target historical question information associated with the question information currently input by the user; An extraction module, used to extract keywords from the question information currently input by the user and the target historical question information, and determine question triple information based on the extracted keywords, wherein the question triple information includes entities, relations, and attributes; The prediction module is used to input the question triplet information into the intelligent question-answering model to obtain answer information corresponding to the currently input question information. The intelligent question-answering model is trained based on sample question triplet information and corresponding answer information labels.
Citation Information
Cited By
Data processing method, data processing device, electronic equipment and storage medium
CN120725154A
A data processing method, a data processing apparatus, an electronic device, and a storage medium
CN120725154B