Intelligent customer service implementation method and device, equipment and storage medium
By extracting semantic keywords and calculating the average semantic similarity, and generating reply texts based on business database information, the problem that intelligent customer service cannot adapt to diverse questioning scenarios is solved, and the accuracy and user experience of intelligent customer service are improved.
Patent Information
- Application Number
- CN202411023736.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-07-29
AI Technical Summary
The existing smart customer service is unable to adapt to the diverse question-asking scenarios of different users, resulting in poor answering of questions and poor user experience.
By obtaining the pending problems submitted by the client, using the first language model to extract the semantic keyword collection, and calculate the average semantic similarity with the candidate business tag, determine the target business tag, query the problem association information from the business database, and generate prompts based on this information Word text, enter a second language model for accurate replies.
It improves the reply ability of intelligent customer service, accurately recognizes user intentions, adapts to the diverse question-asking scenarios of different users, and optimizes the user experience.
Smart Images

Figure CN119047573A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a method, apparatus, device and storage medium for implementing intelligent customer service. Background Art
[0002] With the continuous development of artificial intelligence technology, intelligent customer service has begun to be widely used in more and more industries, providing customers with interactive question-and-answer services. Relevant industries include e-commerce, finance, education, medical care, and games. For example, in the e-commerce field, intelligent customer service can provide customers with product consultation, order inquiry, after-sales service and other support; in the game field, intelligent customer service can provide gameplay introduction, operation instructions, abnormal query and other support. Based on the fact that intelligent customer service can automatically answer users' questions, it replaces the work of manual customer service and saves labor costs.
[0003] However, in the related art, intelligent customer service only responds based on the question description provided by the user and uses pre-defined standard answers. The problem-solving effect is poor and cannot adapt to the diverse questioning scenarios of different users, resulting in a poor user experience and needs to be improved. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device and storage medium for realizing intelligent customer service, which solves the problem that the answering effect is poor, the problem that the problem cannot be adapted to the diverse questioning scenarios of different users, resulting in poor user experience, and accurately determines the relevant business field of the problem to be processed, reasonably expands the background information of the problem to be processed, and is conducive to helping the language model to more accurately identify the user's intention and give accurate replies, thereby improving the reply ability of the intelligent customer service, adapting to the diverse questioning scenarios of different users, and optimizing the user experience.
[0005] In a first aspect, an embodiment of the present application provides a method for implementing intelligent customer service, the method comprising:
[0006] Obtaining a pending question and a user identifier submitted by a client, inputting the pending question into a set first language model, and obtaining a semantic keyword set;
[0007] Calculate the average semantic similarity between the semantic keyword set and multiple candidate business tags respectively, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed;
[0008] According to the target business tag, the semantic keyword set and the user identifier, query and obtain question-related information from a set business database;
[0009] A prompt word text is generated based on the question association information, the question to be processed and a set prompt word template, and the prompt word text is input into a set second language model to obtain target answer information.
[0010] In a second aspect, the embodiment of the present application further provides an intelligent customer service implementation device, including:
[0011] An acquisition module configured to acquire pending issues and user identifiers submitted by a client;
[0012] A keyword generation module, configured to input the problem to be processed into a set first language model to obtain a semantic keyword set;
[0013] A tag determination module is configured to calculate the average semantic similarity between the semantic keyword set and a plurality of set candidate business tags, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed;
[0014] An information determination module is configured to query and obtain question-related information from a set business database according to the target business tag, the semantic keyword set and the user identifier;
[0015] The answer determination module is configured to generate a prompt word text based on the question association information, the question to be processed and a set prompt word template, and input the prompt word text into a set second language model to obtain target answer information.
[0016] In a third aspect, an embodiment of the present application further provides an intelligent customer service implementation device, the device comprising:
[0017] one or more processors;
[0018] a storage device configured to store one or more programs,
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent customer service implementation method described in the embodiment of the present application.
[0020] In a fourth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are configured to execute the intelligent customer service implementation method described in the embodiment of the present application.
[0021] In the embodiment of the present application, by obtaining the pending problem submitted by the client and the user identification, the pending problem is input into the set first language model to obtain a semantic keyword set; the semantic keyword set is respectively calculated with the set multiple candidate business tags for average semantic similarity, and the candidate business tag with the highest average semantic similarity is determined as the target business tag corresponding to the pending problem; according to the target business tag, the semantic keyword set and the user identification, the problem association information is queried from the set business database; based on the problem association information, the pending problem and the set prompt word template, a prompt word text is generated, and the prompt word text is input into the set second language model to obtain the target answer information. In the above scheme, by inputting the pending problem into the set first language model to obtain the semantic keyword set, the key information of the pending problem can be effectively captured and the user's question needs can be accurately identified; by matching the corresponding target business tag for the pending problem based on the average semantic similarity and querying to obtain the problem association information, the relevant business field of the pending problem can be accurately determined, and the background information of the pending problem can be reasonably expanded, which is conducive to helping the language model to more accurately identify the user's intention and give an accurate answer, improve the answering ability of the intelligent customer service, adapt to the diverse questioning scenarios of different users, and optimize the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a method for implementing intelligent customer service provided in an embodiment of the present application;
[0023] Figure 2 A flowchart of a method for implementing intelligent customer service including a process for calculating average semantic similarity provided in an embodiment of the present application;
[0024] Figure 3 A flowchart of a method for implementing intelligent customer service including a process for generating candidate service tags provided in an embodiment of the present application;
[0025] Figure 4 A flowchart of an intelligent customer service implementation method including a process of determining problem-related information of a problem to be processed provided in an embodiment of the present application;
[0026] Figure 5 A flowchart of an intelligent customer service implementation method including a process of extracting question-related information provided in an embodiment of the present application;
[0027] Figure 6 A flowchart of an intelligent customer service implementation method including a process of generating a prompt word text provided in an embodiment of the present application;
[0028] Figure 7 A structural block diagram of an intelligent customer service implementation device provided in an embodiment of the present application;
[0029] Figure 8 A schematic diagram of the structure of an intelligent customer service implementation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, rather than to limit the embodiments of the present application. It should also be noted that, for ease of description, only parts related to the embodiments of the present application are shown in the accompanying drawings, rather than all structures.
[0031] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0032] The intelligent customer service implementation method provided in the embodiment of the present application is used to identify the pending problem according to the pending problem provided by the user, determine the relevant business tags, and then supplement the corresponding problem-related information, and finally generate more accurate reply information through the set language model. Related industry fields include e-commerce, finance, education, medical care, and games. Taking games as an example, the intelligent customer can provide background support for intelligent replies for gameplay introductions, operating instructions, abnormal queries, etc. The several application scenarios listed above are only exemplary and explanatory. In actual applications, the intelligent customer service implementation method can also be used in intelligent customer service in other scenarios, and the embodiment of the present application does not limit this. The present application aims to provide an intelligent customer service implementation method, device, equipment, and storage medium to solve the problem that the problem-solving effect is poor and cannot adapt to the diverse questioning scenarios of different users, resulting in poor user experience.
[0033] In the intelligent customer service implementation method provided in the embodiment of the present application, the executor of each step can be a computer device, which refers to any electronic device with data calculation, processing and storage capabilities, such as mobile phones, PCs (Personal Computers), tablet computers and other terminal devices, and can also be servers and other devices, which are not limited in the embodiment of the present application.
[0034] Figure 1The flowchart of an intelligent customer service implementation method provided in the embodiment of the present application can be implemented by using a backend server as the execution subject. Figure 1 As shown, the intelligent customer service implementation method specifically includes the following steps:
[0035] Step S101: Obtain the pending question submitted by the client and the user identifier, input the pending question into a set first language model, and obtain a semantic keyword set.
[0036] Among them, the user can send a question request to the background server through the interactive interface of the client, and the question request may include a pending question and a user identifier, and the background server may temporarily store the question request in the message queue. The background server can take out the question requests that need to be processed from the message queue in order according to the priority order or the chronological order, and obtain the pending question and the user identifier therein. The pending question may be a problem description text submitted by the user through the interactive interface of the client. Taking the game field as an example, the relevant scenarios of the pending question may be account login abnormalities, recharge failure to arrive, theft of game items, etc. For example, the user asks "I recharged but didn't get the item. I recharged a gift package of X amount at T time, but didn't get the item. Please check. Y game items have not entered the game account!!!". The first language model can be a pre-trained BERT (Bidirectional Encoder Representations from Transformers), GPT (Generative Pre-trained Transformer), etc. Taking the field of games as an example, the user problem description information and keyword annotation information of the collected historical records can be used as a training data set to train the first language model, calculate the loss function value of the preset loss function, and iterate and update the network parameters of the first language model through the back propagation algorithm and the related optimization algorithm until the loss converges, so that the first language model has the ability to identify the problem to be processed and output a set of semantic keywords. The set of semantic keywords can be keyword information in the problem to be processed that can be used to identify the business field to which it belongs. For example, the problem to be processed: "I recharged but didn't get the thing, I recharged a gift package of X amount in T time, but didn't get the thing, please check it", the semantic keyword set obtained after inputting into the first language model can include "recharge", "amount", "gift package" and "T time".
[0037] Step S102: Calculate average semantic similarities between the semantic keyword set and multiple candidate business tags respectively, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed.
[0038] Among them, the candidate business tags can be pre-generated by the developer according to the business categories involved in the current application scenario. For example, taking the game field as an example, the candidate business tags can be "login" corresponding to the login business setting, "payment" corresponding to the payment business setting, and "update" corresponding to the update business setting. The average semantic similarity can be used to measure the average similarity between each candidate business tag and all semantic keywords in the semantic keyword set. For example, the semantic keyword set includes "recharge", "amount", "gift package" and "T time", and accordingly, the average semantic similarity calculated with "payment" is the highest. In one embodiment, each candidate business tag can be calculated one by one with the semantic keywords in the semantic keyword set to obtain multiple semantic similarities, and the multiple semantic similarities are averaged to obtain the average semantic similarity, thereby obtaining the average semantic similarity between each candidate business tag and the semantic keyword set. In one embodiment, the multiple semantic similarities calculated between each candidate business tag and the semantic keywords in the semantic keyword set can be filtered for extreme values, and the corresponding average language similarity can be calculated based on the remaining semantic similarities. In one embodiment, the semantic keywords and candidate business tags can be converted into corresponding word vectors using a CBOW (Continuous Bag of Words) model, a Skip-gram model, or the like, and the similarity between the word vectors corresponding to the semantic keywords and the candidate business tags can be determined by calculating cosine similarity or Euler distance, etc., thereby calculating the average of multiple similarities corresponding to each candidate business tag and the semantic keyword set to obtain the average semantic similarity.
[0039] Step S103: query and obtain question-related information from a set business database according to the target business tag, the semantic keyword set and the user identifier.
[0040] Among them, the business database can store user behavior information corresponding to different business tags related to different users. Taking the game field as an example, for payment services, user order logs and error record logs can be stored to record the entire process of order operations performed by users on the platform or application, including but not limited to the time, status, operator and other important information of each link such as order creation, modification, payment, delivery, receipt, refund, etc. For login services, user login logs and error record logs can be stored to record the user's login activities on the system or platform, including but not limited to login time, login location, login method, login results and possible reasons for failure, such as wrong password, account locked, etc. Of course, the business database can also have other business settings and information recording methods, which are not limited in this application. In one embodiment, the target business tag and user identifier can be used as an index search to obtain a related user information file, and the behavior information record matching the semantic keywords in the semantic keyword set can be extracted from the user information file as problem-related information. For example, the target business tag is "payment", the semantic keyword set includes "recharge", "amount", "gift package" and "T time", and the user ID is "A1". Accordingly, based on "payment" and "A1", the relevant user order log and error record log can be searched, and the relevant first behavior information record can be extracted from the user order log based on the semantic keyword set: {user: A1, payment channel: WeChat, payment amount: x yuan, payment result: paid, payment time: T time, shipped product: Z gift package, shipping result: not shipped}, and the relevant second behavior information record can be extracted from the error record log: {user: A1, shipped product: Z gift package, shipping result: not shipped, error reason: shipping interface call timeout}, the first behavior information record and the second behavior information record can be used as the problem-related information of the problem to be processed. In one embodiment, the target business tag and the semantic keyword set can be used as an index to search the entire library content to obtain at least one behavior information record, and the target behavior information record corresponding to the user ID can be filtered out from the at least one behavior information record as the problem-related information.
[0041] Step S104: Generate prompt word text based on the question association information, the question to be processed and the set prompt word template, and input the prompt word text into the set second language model to obtain target answer information.
[0042] Among them, the second language model can be a pre-trained BERT model, a GPT model, etc. Developers can collect different user questions in historical records and the corresponding diversified manual reply words as training data sets, train the second language model, calculate the loss function value of the preset loss function, and iteratively update the network parameters of the second language model through the back propagation algorithm and the relevant optimization algorithm until the loss converges, so that the second language model has the ability to output humanized reply information. The prompt word template can be a structured prompt word pre-built by the developer to guide the second language model to generate text content that meets the requirements, wherein the prompt word template can be provided with a placeholder representing the key information that needs to be filled in. In one embodiment, the problem-related information and the pending problem can be filled in the preset placeholder position in the prompt word template respectively to obtain the prompt word text. In one embodiment, the problem-related information can be split into multiple key information, and the associated text position of each key information in the pending problem is determined according to the semantic similarity, and the key information is added to the corresponding associated text position to obtain the expanded pending problem, and finally, the expanded pending problem is filled in the preset placeholder position in the prompt word template to obtain the prompt word text.
[0043] In the above, by obtaining the pending problem and user identification submitted by the client, the pending problem is input into the set first language model to obtain a semantic keyword set; the semantic keyword set is respectively calculated with the set multiple candidate business tags for average semantic similarity, and the candidate business tag with the highest average semantic similarity is determined as the target business tag corresponding to the pending problem; according to the target business tag, the semantic keyword set and the user identification, the problem association information is queried from the set business database; based on the problem association information, the pending problem and the set prompt word template, a prompt word text is generated, and the prompt word text is input into the set second language model to obtain the target answer information. In the above scheme, by inputting the pending problem into the set first language model to obtain the semantic keyword set, the key information of the pending problem can be effectively captured and the user's question needs can be accurately identified; by matching the corresponding target business tag for the pending problem based on the average semantic similarity and querying to obtain the problem association information, the relevant business field of the pending problem can be accurately determined, and the background information of the pending problem can be reasonably expanded, which is conducive to helping the language model to more accurately identify the user's intention and give an accurate answer, improve the answering ability of the intelligent customer service, adapt to the diverse questioning scenarios of different users, and optimize the user experience.
[0044] Figure 2 The flowchart of a method for implementing intelligent customer service including the process of calculating average semantic similarity provided in the embodiment of the present application is as follows. Figure 2 As shown, the intelligent customer service implementation method specifically includes the following steps:
[0045] Step S201: Obtain the pending question submitted by the client and the user identifier, input the pending question into a set first language model, and obtain a semantic keyword set.
[0046] Step S202: searching a set vocabulary library for a first vocabulary description corresponding to each semantic keyword in the semantic keyword set and a second vocabulary description corresponding to each of the set candidate service tags.
[0047] Among them, the vocabulary library can be a record of multiple words related to the target business field and the vocabulary description corresponding to each word. The vocabulary description is used to provide related information such as the interpretation and context background of the word, which is conducive to the subsequent more accurate calculation of the semantic similarity between semantic keywords and candidate business tags.
[0048] Step S203: convert the first vocabulary description and the second vocabulary description into corresponding first text vectors and second text vectors respectively.
[0049] Among them, the first vocabulary description and the second vocabulary description can be converted into text vector representation through a CBOW model, a Skip-gram model, or a GloVe (Global Vectors for Word Representation) model, etc., which is not limited in this application.
[0050] Step S204: perform similarity calculations on the multiple first text vectors corresponding to the semantic keyword set and the second text vector corresponding to each candidate business tag, and average the obtained similarity results to obtain an average semantic similarity corresponding to each candidate business tag.
[0051] Among them, the similarity between vectors can be determined by calculating the cosine value of the angle between the first text vector and the second text vector, the Euclidean distance or the Pearson correlation coefficient, which is not limited in this application. The second text vector corresponding to each candidate business tag and the multiple first text vectors corresponding to the semantic keyword set can be calculated to obtain multiple similarities respectively, and the average semantic similarity between each candidate business tag and the semantic keyword set can be obtained by averaging the obtained multiple similarities, which is used to characterize the similarity between each candidate business tag and the problem to be processed.
[0052] Step S205: Determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed.
[0053] Step S206: query and obtain question-related information from a set business database according to the target business tag, the semantic keyword set and the user identifier.
[0054] Step S207: Generate prompt word text based on the question association information, the question to be processed and the set prompt word template, and input the prompt word text into the set second language model to obtain target answer information.
[0055] As mentioned above, by querying the first vocabulary description and the second vocabulary description corresponding to the semantic keywords and the candidate business tags respectively, a more comprehensive text description information can be effectively provided, and similarity calculation is performed based on the vector representation of the first vocabulary description and the second vocabulary description, so that the average semantic similarity between the semantic keyword set and the candidate business tags can be more accurately calculated.
[0056] Figure 3 A flowchart of an intelligent customer service implementation method including a process of generating candidate service tags is provided in an embodiment of the present application. Figure 3 As shown, the intelligent customer service implementation method specifically includes the following steps:
[0057] Step S301: Obtain the pending question submitted by the client and the user identifier, input the pending question into a set first language model, and obtain a semantic keyword set.
[0058] Step S302: Acquire multiple historical conversations within a preset time range, and extract a first preset number of keywords with the highest occurrence frequency from the multiple historical conversations.
[0059] Among them, the preset time range can be used to determine the reference range of valid historical conversation data, and the historical conversation can be the recorded question and answer information between the user and the intelligent customer service or the manual customer service. In one embodiment, the extracted keywords can be nouns, verbs, etc. that are the main components of the sentence identified by grammatical rules. In one embodiment, the extracted keywords can be searching for words recorded in a set key vocabulary library from the historical conversation. By counting the frequency of occurrence of each keyword that has appeared in the historical conversation, the keywords are arranged in ascending or descending order according to the frequency of occurrence, and the first preset number of keywords with the highest frequency of occurrence are filtered.
[0060] Step S303: Calculate semantic similarity between the keyword and a plurality of preset service tags respectively, and add the keyword to a keyword set associated with the preset service tag with the highest semantic similarity.
[0061] In one embodiment, the keywords and preset business tags can be converted into corresponding vectors respectively by using a CBOW model or a Skip-gram model, and the similarity between the keywords and the preset business tags can be determined by calculating the angle cosine value, Euler distance or Pearson correlation coefficient of the vectors. By adding the keywords to the keyword set associated with the preset business tag with the highest semantic similarity, it is helpful to count the number of keywords associated with each preset business tag that appear in the historical conversation.
[0062] Step S304: Filter out a second preset number of candidate business tags with the largest number of associated keywords from the plurality of preset business tags.
[0063] The number of keywords in the keyword set corresponding to each preset service tag may be counted, and the keywords may be arranged in ascending or descending order according to the number of associated keywords, and a second preset number of candidate service tags having the largest number of associated keywords may be screened out.
[0064] Step S305: Calculate the average semantic similarity between the semantic keyword set and the multiple candidate business tags respectively, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed.
[0065] Step S306: query and obtain question-related information from a set business database according to the target business tag, the semantic keyword set and the user identifier.
[0066] Step S307: Generate prompt word text based on the question association information, the question to be processed and the set prompt word template, and input the prompt word text into the set second language model to obtain target answer information.
[0067] As described above, by extracting keywords based on historical conversations, we can effectively capture the key information of questions that users frequently ask. By counting the number of keywords associated with each preset business tag for tag screening, we can effectively filter out preset business tags that users basically do not pay attention to or have low relevance, which is conducive to improving the efficiency of subsequent matching of target business tags for questions to be processed.
[0068] Figure 4 A flowchart of an intelligent customer service implementation method including a process of determining problem-related information of a problem to be processed is provided in an embodiment of the present application. Figure 4 As shown, the intelligent customer service implementation method specifically includes the following steps:
[0069] Step S401: obtaining a pending question submitted by a client and a user identifier, inputting the pending question into a set first language model, and obtaining a semantic keyword set;
[0070] Step S402: Calculate the average semantic similarity between the semantic keyword set and the multiple candidate business tags respectively, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed;
[0071] Step S403: Query the set association information table according to the target service tag to obtain the target file identifier and the target storage path.
[0072] Among them, the association information table can be a pre-generated target file identifier and target storage path that record the target log file corresponding to each business tag. The number of the target file identifier and the target storage path can be one or more, which are used to point to one or more target log files that match the business tag. It can be a log file including multiple users, or a log file that records different types of information for the same user. The target log file can be an independent record of the historical behavior information of the same user. Each user can have a corresponding log file with different types of information. For example, taking the login service as an example, each user can have a corresponding user login log and error record log.
[0073] In one embodiment, the association information table may be generated in advance, and the specific process is as follows:
[0074] A plurality of set candidate business tags are obtained, a storage path of a log file associated with each candidate business tag is queried from a set business database, and a correlation information table is constructed based on each candidate business tag, a file identifier of the associated log file, and a storage path.
[0075] Step S404: query and obtain at least one target log file from a set business database according to the target file identifier and the target storage path.
[0076] The target file identifier and the target storage path may be used as index information to query the business database to obtain at least one target log file pointed to.
[0077] Step S405: extracting question-related information matching the user identifier and the semantic keyword set from at least one target log file.
[0078] The log file corresponding to the current user can be screened out from at least one target log file based on the user identifier, and the behavior information record containing the semantic keyword set can be extracted from the screened log file as the problem-related information according to the semantic keyword set.
[0079] Step S406: Generate prompt word text based on the question association information, the question to be processed and the set prompt word template, and input the prompt word text into the set second language model to obtain target answer information.
[0080] As described above, by presetting the associated information table recording the file identifiers and storage paths corresponding to the log files, it can be used to quickly locate and obtain the required target log files, thereby improving the query efficiency of the target log files.
[0081] Figure 5 The flowchart of a method for implementing intelligent customer service including the process of extracting problem-related information provided by the embodiment of the present application is as follows. Figure 5 As shown, the intelligent customer service implementation method specifically includes the following steps:
[0082] Step S501: obtaining a pending question submitted by a client and a user identifier, inputting the pending question into a set first language model, and obtaining a semantic keyword set;
[0083] Step S502: Calculate the average semantic similarity between the semantic keyword set and the multiple candidate business tags respectively, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed;
[0084] Step S503: Query the set association information table according to the target service tag to obtain the target file identifier and the target storage path.
[0085] Step S504: query and obtain at least one target log file from a set business database according to the target file identifier and the target storage path.
[0086] Step S505: extracting an associated log file corresponding to the user identifier from at least one target log file.
[0087] Among them, the associated log file may be one or more, and may record the behavior information of the target user corresponding to the user identifier. Taking the payment business as an example, the associated log file may include the user order log and the error record log. Taking the update business as an example, the associated log file may include the user update log and the error record log.
[0088] Step S506: retrieve the associated log file based on the semantic keyword set to obtain at least one target record item.
[0089] Among them, the target record items containing the semantic keywords in the semantic keyword set can be retrieved from the associated log file to supplement the context information of the problem to be processed. For example, the semantic keyword set includes "recharge", "amount", "gift package" and "T time", then the relevant behavior information records can be extracted from the user order log: {user: A1, payment channel: WeChat, payment amount: x yuan, payment result: paid, payment time: T time, shipped goods: Z gift package, shipping result: not shipped}.
[0090] Step S507: Integrate at least one target record item to obtain problem-related information.
[0091] In one embodiment, if there are multiple target record items, the multiple target record items may be concatenated to obtain the problem-related information. In one embodiment, if there are multiple target record items, duplicate information in the multiple target record items may be removed and concatenated to obtain the problem-related information.
[0092] Step S508: Generate prompt word text based on the question association information, the question to be processed and the set prompt word template, and input the prompt word text into the set second language model to obtain target answer information.
[0093] As described above, by searching and extracting problem-related information from related log files based on a set of semantic keywords, accurate context information can be provided for the problem to be processed, the information background of the problem to be processed can be effectively expanded, and the answer effect of the subsequent generation of reply information can be improved.
[0094] Figure 6 The flowchart of a method for implementing intelligent customer service including the process of generating prompt word text is provided in an embodiment of the present application. Figure 6 As shown, the intelligent customer service implementation method specifically includes the following steps:
[0095] Step S601: Obtain the pending question submitted by the client and the user identifier, input the pending question into the set first language model, and obtain a semantic keyword set.
[0096] Step S602: Calculate average semantic similarities between the semantic keyword set and multiple candidate business tags respectively, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed.
[0097] Step S603: query and obtain question-related information from a set business database according to the target business tag, the semantic keyword set and the user identifier.
[0098] Step S604: Integrate the problem-related information and the problem to be processed to obtain problem description information.
[0099] Among them, the integration processing can be to deduplicate and merge the problem-related information with the relevant information in the pending problem. For example, the pending problem is: "I recharged but didn't get the goods. I recharged a gift package of X amount within T time, but didn't get the goods. Please check. Y game items have not entered the game account!!!", the first line of information records: {User: A1, payment channel: WeChat, payment amount: x yuan, payment result: paid, payment time: T time, shipped product: Z gift package, shipping result: not shipped}, the second line of information records: {User: A1, shipped product: Z gift package, shipping result: not shipped, error reason: shipping interface call timeout}, the problem description information obtained by the integration processing can be: {User: A1, payment channel: WeChat, payment amount: x yuan, payment result: paid, payment time: T time, shipped product: Z gift package, shipping result: not shipped, error reason: shipping interface call timeout}.
[0100] Step S605: Query reference answer information matching the question description information from the set answer database.
[0101] The answer database may store standardized reference answer information for multiple user questions, providing basic reference data for the second language model to generate reply information.
[0102] Step S606: Fill the reference answer information and question description information into the set prompt word template to generate prompt word text.
[0103] Step S607: input the prompt word text into the set second language model to obtain target response information.
[0104] As mentioned above, by filling the reference answer information and the question description information into the set prompt word template to generate the prompt word text, the generated reference answer information can be effectively utilized to provide a reliable reference direction for the second language model to generate reply information, thereby improving the accuracy of the target reply information and effectively solving the user's problem.
[0105] Figure 7 This is a structural block diagram of an intelligent customer service implementation device provided in an embodiment of the present application. The device is configured to execute the intelligent customer service implementation method provided in the above embodiment and has the corresponding functional modules and beneficial effects of the execution method. Figure 7 As shown, the device specifically includes:
[0106] The acquisition module 101 is configured to acquire the pending question and the user identification submitted by the client;
[0107] The keyword generation module 102 is configured to input the problem to be processed into a set first language model to obtain a semantic keyword set;
[0108] The tag determination module 103 is configured to calculate the average semantic similarity between the semantic keyword set and the plurality of candidate business tags respectively, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed;
[0109] The information determination module 104 is configured to query and obtain the problem-related information from a set business database according to the target business tag, the semantic keyword set and the user identifier;
[0110] The answer determination module 105 is configured to generate prompt word text based on the question association information, the question to be processed and the set prompt word template, and input the prompt word text into the set second language model to obtain the target answer information.
[0111] In the above, by obtaining the pending problem and user identification submitted by the client, the pending problem is input into the set first language model to obtain a semantic keyword set; the semantic keyword set is respectively calculated with the set multiple candidate business tags for average semantic similarity, and the candidate business tag with the highest average semantic similarity is determined as the target business tag corresponding to the pending problem; according to the target business tag, the semantic keyword set and the user identification, the problem association information is queried from the set business database; based on the problem association information, the pending problem and the set prompt word template, a prompt word text is generated, and the prompt word text is input into the set second language model to obtain the target answer information. In the above scheme, by inputting the pending problem into the set first language model to obtain the semantic keyword set, the key information of the pending problem can be effectively captured and the user's question needs can be accurately identified; by matching the corresponding target business tag for the pending problem based on the average semantic similarity and querying to obtain the problem association information, the relevant business field of the pending problem can be accurately determined, and the background information of the pending problem can be reasonably expanded, which is conducive to helping the language model to more accurately identify the user's intention and give an accurate answer, improve the answering ability of the intelligent customer service, adapt to the diverse questioning scenarios of different users, and optimize the user experience.
[0112] In a possible embodiment, the tag determination module 103 is further configured to:
[0113] Querying a first vocabulary description corresponding to each semantic keyword in the semantic keyword set and second vocabulary descriptions corresponding to the plurality of candidate service tags from a set vocabulary library;
[0114] Convert the first vocabulary description and the second vocabulary description into a corresponding first text vector and a second text vector respectively;
[0115] Similarities are calculated between the multiple first text vectors corresponding to the semantic keyword set and the second text vector corresponding to each candidate business tag, and the obtained similarity results are averaged to obtain the average semantic similarity corresponding to each candidate business tag.
[0116] In a possible embodiment, it further includes a label generation module configured to:
[0117] Acquire multiple historical conversations within a preset time range, and extract a first preset number of keywords with the highest occurrence frequency from the multiple historical conversations;
[0118] Calculate semantic similarity between the keyword and multiple preset business tags respectively, and add the keyword to a keyword set associated with the preset business tag with the highest semantic similarity;
[0119] A second preset number of candidate business tags with the largest number of associated keywords are screened out from the plurality of preset business tags.
[0120] In a possible embodiment, the information determination module 104 is further configured to:
[0121] According to the target business tag, the target file identifier and the target storage path are obtained from the set association information table;
[0122] According to the target file identifier and the target storage path, at least one target log file is obtained from a set business database;
[0123] Question-related information matching the user identifier and the semantic keyword set is extracted from at least one target log file.
[0124] In a possible embodiment, the information determination module 104 is further configured to:
[0125] extracting an associated log file corresponding to the user identifier from at least one target log file;
[0126] Retrieving the associated log file based on the semantic keyword set to obtain at least one target record item;
[0127] At least one target record item is integrated and processed to obtain problem-related information.
[0128] In a possible embodiment, it further includes an information table generating module configured to:
[0129] Get multiple candidate business tags that are set;
[0130] Querying the storage path of the log file associated with each candidate business tag from the set business database;
[0131] A correlation information table is constructed based on each candidate service tag, the file identifier of the associated log file, and the storage path.
[0132] In a possible embodiment, the reply determination module 105 is further configured to:
[0133] Integrate the problem-related information and the problems to be processed to obtain the problem description information;
[0134] Query reference answer information matching the question description information from a set answer database;
[0135] Fill the reference answer information and question description information into the set prompt word template to generate the prompt word text.
[0136] Figure 8A schematic diagram of the structure of an intelligent customer service implementation device provided in an embodiment of the present application, such as Figure 8 As shown, the device includes a processor 201, a memory 202, an input device 203 and an output device 204; the number of processors 201 in the device can be one or more. Figure 8 A processor 201 is taken as an example; the processor 201, memory 202, input device 203 and output device 204 in the device can be connected by a bus or other means. Figure 8 The example of connecting through a bus is taken. The memory 202, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the intelligent customer service implementation method in the embodiment of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 202, that is, implements the above-mentioned intelligent customer service implementation method. The input device 203 can be configured to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 204 may include a display device such as a display screen.
[0137] The intelligent customer service implementation device provided above can be used to execute the intelligent customer service implementation method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0138] An embodiment of the present application also provides a non-volatile storage medium containing computer executable instructions, which, when executed by a computer processor, is configured to execute an intelligent customer service implementation method described in the above embodiment, which includes: obtaining a pending question submitted by a client and a user identifier, inputting the pending question into a set first language model to obtain a semantic keyword set; calculating the average semantic similarity between the semantic keyword set and a plurality of set candidate business tags, and determining the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the pending question; querying from a set business database to obtain question association information according to the target business tag, the semantic keyword set and the user identifier; generating a prompt word text based on the question association information, the pending question and a set prompt word template, and inputting the prompt word text into a set second language model to obtain target reply information.
[0139] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media, optical storage; registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., embodied as a computer program) that can be executed by one or more processors.
[0140] Of course, the storage medium containing computer-executable instructions provided in the embodiment of the present application, whose computer-executable instructions are not limited to the above-mentioned intelligent customer service implementation method, can also execute related operations in the intelligent customer service implementation method provided in any embodiment of the present application.
[0141] It should be noted that the numbering of each step in this scheme is only used to describe the overall design framework of this scheme, and does not represent the necessary order relationship between the steps. On the basis that the overall implementation process conforms to the overall design framework of this scheme, it belongs to the protection scope of this scheme, and the order of precedence in the form of text when describing is not an exclusive limitation on the specific implementation process of this scheme. It should be understood by those skilled in the art that the embodiments of the present application can be provided as methods, systems, or computer program products. In a typical configuration, a computing device includes one or more processors (CPU), an input / output interface, a network interface, and a memory. The memory may include non-permanent memory in a computer-readable medium, a random access memory (RAM) and / or a non-volatile memory in the form of a read-only memory (ROM) or a flash memory (fl ash RAM). The memory is an example of a computer-readable medium.
[0142] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0143] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for implementing intelligent customer service, characterized in that: include: Obtaining a pending question and a user identifier submitted by a client, inputting the pending question into a set first language model, and obtaining a semantic keyword set; Calculate the average semantic similarity between the semantic keyword set and multiple candidate business tags respectively, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed; According to the target business tag, the semantic keyword set and the user identifier, query and obtain question-related information from a set business database; A prompt word text is generated based on the question association information, the question to be processed and a set prompt word template, and the prompt word text is input into a set second language model to obtain target answer information.
2. The intelligent customer service implementation method according to claim 1, characterized in that: The calculating the average semantic similarity between the semantic keyword set and a plurality of set candidate service tags respectively includes: Querying a first vocabulary description corresponding to each semantic keyword in the semantic keyword set and second vocabulary descriptions corresponding to each of the plurality of candidate service tags from a set vocabulary library; Convert the first vocabulary description and the second vocabulary description into a corresponding first text vector and a second text vector respectively; Similarities are calculated between the multiple first text vectors corresponding to the semantic keyword set and the second text vector corresponding to each candidate business tag, and the obtained similarity results are averaged to obtain an average semantic similarity corresponding to each candidate business tag.
3. The intelligent customer service implementation method according to claim 1, characterized in that: Before calculating the average semantic similarity between the semantic keyword set and the plurality of candidate service tags respectively, the method further includes: Acquire multiple historical conversations within a preset time range, and extract a first preset number of keywords with the highest occurrence frequency from the multiple historical conversations; Calculating semantic similarities between the keyword and a plurality of preset service tags respectively, and adding the keyword to a keyword set associated with the preset service tag having the highest semantic similarity; A second preset number of candidate business tags with the largest number of associated keywords are screened out from the plurality of preset business tags.
4. The intelligent customer service implementation method according to claim 1, characterized in that: The querying and obtaining the problem-related information from a set business database according to the target business tag, the semantic keyword set and the user identifier includes: According to the target service tag, query the set association information table to obtain the target file identifier and the target storage path; According to the target file identifier and the target storage path, query and obtain at least one target log file from a set business database; Question-related information matching the user identifier and the semantic keyword set is extracted from the at least one target log file.
5. The intelligent customer service implementation method according to claim 4, characterized in that: The extracting the question-related information matching the user identifier and the semantic keyword set from the at least one target log file includes: Extracting an associated log file corresponding to the user identifier from the at least one target log file; Retrieving the associated log file based on the semantic keyword set to obtain at least one target record item; The at least one target record item is integrated to obtain problem-related information.
6. The method for implementing intelligent customer service according to claim 4, characterized in that: Before obtaining the target file identifier and the target storage path from the set association information table according to the target service tag, the method further includes: Get multiple candidate business tags that are set; Querying a storage path of a log file associated with each candidate service tag from a set service database; A correlation information table is constructed based on each of the candidate service tags, the file identifier of the associated log file, and the storage path.
7. The method for implementing intelligent customer service according to any one of claims 1 to 6, characterized in that: The generating of prompt word text based on the question association information, the question to be processed and the set prompt word template includes: Integrate the problem-related information and the problem to be processed to obtain problem description information; Querying a set answer database for reference answer information that matches the question description information; Fill the reference answer information and the question description information into the set prompt word template to generate a prompt word text.
8. An intelligent customer service implementation device, characterized in that: include: An acquisition module configured to acquire pending issues and user identifiers submitted by a client; A keyword generation module, configured to input the problem to be processed into a set first language model to obtain a semantic keyword set; A tag determination module is configured to calculate the average semantic similarity between the semantic keyword set and a plurality of set candidate business tags, and determine the candidate business tag with the highest average semantic similarity as the target business tag corresponding to the problem to be processed; An information determination module is configured to query and obtain question-related information from a set business database according to the target business tag, the semantic keyword set and the user identifier; The answer determination module is configured to generate a prompt word text based on the question association information, the question to be processed and a set prompt word template, and input the prompt word text into a set second language model to obtain target answer information.
9. An intelligent customer service implementation device, the device comprising: one or more processors; A storage device is configured to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent customer service implementation method described in any one of claims 1 to 7.
10. A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the intelligent customer service implementation method described in any one of claims 1 to 7 when executed by a computer processor.
Citation Information
Patent Citations
Intelligent customer service method and system, electronic equipment and readable storage medium
CN116226355A
Question and answer method and device, equipment, medium and product
CN117216210A
Intelligent customer service question answering method and system based on large language model
CN117648420A
Intelligent voice session reply prompting method based on knowledge base
CN118349648A
Information retrieval method and device, electronic equipment and storage medium
CN118394916A
Cited By
Multi-label generation matching RAG intelligent question-answering method, device and equipment and medium
CN119739838A
Multi-label generation matching rag intelligent question and answer method, device, equipment and medium
CN119739838B
Intelligent data query method and device, equipment, medium and product
CN119807207A
Intelligent class case recommendation method and system
CN120216678A
