Customer service question and answer data processing method, device, system and electronic equipment

By using unsupervised learning models and text preprocessing techniques, the problem of low efficiency in question-and-answer data processing in the power customer service system was solved, achieving efficient question-and-answer data processing and answer output.

CN114691846BActive Publication Date: 2026-01-27国家电网有限公司客户服务中心 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210181479.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2026-01-27
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

The data processing efficiency of customer service questions and answers in the power customer service system is low, the workload of human customer service is large and the service quality is unstable, and the existing intelligent customer service system requires a large amount of labeled data for training, which leads to low efficiency.

Method used

This paper proposes an unsupervised learning model for customer service question-and-answer data processing. Through text preprocessing and similarity calculation, the BERT model is used for unsupervised learning to construct a question-and-answer database and directly output the reference question text with the highest similarity as the answer.

Benefits of technology

It improved the efficiency of customer service Q&A data processing, reduced the investment of manpower and material resources, and achieved efficient Q&A data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691846B_ABST
    Figure CN114691846B_ABST
Patent Text Reader

Abstract

The application discloses a customer service question and answer data processing method and device and electronic equipment. The method comprises the following steps: obtaining a question text input by a user; obtaining a preprocessed question text by preprocessing the question text; inputting the preprocessed question text into a trained customer service question and answer data processing model to obtain the similarity between the preprocessed question text and each reference question text in a question and answer database, wherein the customer service question and answer data processing model is an unsupervised learning model, and the question and answer database comprises a question and answer data set trained by the customer service question and answer data processing model; taking the reference question text with the highest similarity to the preprocessed question text in the question and answer database as a target question text, and outputting an answer corresponding to the target question text. The application solves the technical problem of low processing efficiency of customer service question and answer data in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power technology, and more specifically, to a method, apparatus, and electronic device for processing customer service question and answer data. Background Technology

[0002] With the rapid development of China's science and technology and economy, the number of users in the power system has grown rapidly, and the continuous introduction of new services has directly led to a surge in inquiries related to power customer service. Typically, human customer service representatives frequently handle repetitive, simple questions, and their work is also affected by the surrounding environment and their own subjective emotions. These factors contribute to an excessive workload and inconsistent service quality for human customer service representatives. Furthermore, intelligent customer service systems in the power system, particularly those based on supervised learning, often require large amounts of labeled data for training. However, data labeling demands significant human and material resources and is time-consuming, resulting in low efficiency in processing customer service question-and-answer data. Summary of the Invention

[0003] This application provides a method, apparatus, and electronic device for processing customer service question and answer data, so as to at least solve the technical problem of low processing efficiency of customer service question and answer data in related technologies.

[0004] According to one aspect of the embodiments of this application, a method for processing customer service question and answer data is provided, comprising: acquiring question text input by a user; preprocessing the question text to obtain preprocessed question text; inputting the preprocessed question text into a trained customer service question and answer data processing model to obtain the similarity between the preprocessed question text and each reference question text in a question and answer database, wherein the customer service question and answer data processing model is an unsupervised learning model, and the question and answer database includes a question and answer dataset trained by the customer service question and answer data processing model; taking the reference question text in the question and answer database that has the highest similarity to the preprocessed question text as the target question text, and outputting the answer corresponding to the target question text.

[0005] According to another aspect of the embodiments of this application, a customer service question and answer data processing apparatus is also provided, comprising: a first acquisition unit, configured to acquire question text input by a user; a preprocessing unit, configured to preprocess the question text to obtain preprocessed question text; a second acquisition unit, configured to input the preprocessed question text into a trained customer service question and answer data processing model, and acquire the similarity between the preprocessed question text and each reference question text in a question and answer database, wherein the customer service question and answer data processing model is an unsupervised learning model, and the question and answer database includes a question and answer dataset trained by the customer service question and answer data processing model; and an output unit, configured to take the reference question text in the question and answer database that has the highest similarity to the preprocessed question text as the target question text, and output the answer corresponding to the target question text.

[0006] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described customer service question and answer data processing method when running.

[0007] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described customer service question and answer data processing method through the computer program.

[0008] In this embodiment, the process involves: acquiring user-inputted question text; preprocessing the question text to obtain preprocessed question text; inputting the preprocessed question text into a pre-trained customer service question-and-answer data processing model to obtain the similarity between the preprocessed question text and each reference question text in the question-and-answer database. The customer service question-and-answer data processing model is an unsupervised learning model, and the question-and-answer database includes a question-and-answer dataset trained by the model. The reference question text in the question-and-answer database with the highest similarity to the preprocessed question text is used as the target question text, and the answer corresponding to the target question text is output. Since the customer service question-and-answer data processing model is an unsupervised learning model, it does not require a large amount of labeled data for training. Therefore, it not only improves the processing efficiency of customer service question-and-answer data but also reduces manpower and material resources, solving the technical problem of low processing efficiency of customer service question-and-answer data in related technologies. Attached Figure Description

[0009] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0010] Figure 1This is a schematic diagram of an application environment for an optional customer service question and answer data processing method according to an embodiment of the present invention;

[0011] Figure 2 This is a schematic diagram of an application environment for another optional customer service question and answer data processing method according to an embodiment of the present invention;

[0012] Figure 3 This is a flowchart illustrating an optional customer service question and answer data processing method according to an embodiment of the present invention;

[0013] Figure 4 This is a schematic diagram of the structure of a customer service question and answer data processing system according to an embodiment of the present invention;

[0014] Figure 5 This is a schematic diagram of a customer service question and answer data processing model according to an embodiment of the present invention;

[0015] Figure 6 This is a schematic diagram of the structure of an optional customer service question and answer data processing device according to an embodiment of the present invention;

[0016] Figure 7 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0017] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0019] According to one aspect of the present invention, a method for processing customer service question and answer data is provided. Optionally, as an optional implementation, the above-described method for processing customer service question and answer data may be applied to, but is not limited to, [examples of other methods]. Figure 1 The hardware environment shown includes: a terminal device 102 for human-computer interaction, a network 104, and a server 106. User 108 can interact with terminal device 102, which runs a client application for processing customer service question-and-answer data. Terminal device 102 includes a human-computer interaction screen 1022, a processor 1024, and a memory 1026. The human-computer interaction screen 1022 is used to present the interface of customer service question-and-answer data processing results; the processor 1024 is used to acquire the question text input by the user. The memory 108 is used to store the question text input by the user, and after text preprocessing, obtains a preprocessed question text and the answer corresponding to the target question text.

[0020] Furthermore, server 106 includes a database 1062 and a processing engine 1064. Database 1062 stores user-inputted question text. After text preprocessing, the question text is used to obtain preprocessed question text and the answer corresponding to the target question text. Processing engine 1064 is used to acquire the user-inputted question text; preprocess the question text to obtain preprocessed question text; input the preprocessed question text into a pre-trained customer service question-and-answer data processing model to obtain the similarity between the preprocessed question text and each reference question text in the question-and-answer database. The customer service question-and-answer data processing model is an unsupervised learning model, and the question-and-answer database includes a question-and-answer dataset trained by the customer service question-and-answer data processing model; the reference question text in the question-and-answer database with the highest similarity to the preprocessed question text is used as the target question text, and the answer corresponding to the target question text is output.

[0021] As another optional implementation, the customer service Q&A data processing method described above in this application can be applied to... Figure 2 In the middle. For example Figure 2 As shown, user 202 and user device 204 can interact. User device 204 includes a memory 206 and a processor 208. In this embodiment, user device 204 can, but is not limited to, refer to and execute the operations performed by terminal device 102 to obtain the answer corresponding to the target question text.

[0022] Optionally, the terminal device 102 and user device 204 may be, but are not limited to, mobile phones, tablets, laptops, PCs, etc., and the network 104 may be, but is not limited to, wireless networks or wired networks. The wireless network includes Wi-Fi and other networks that enable wireless communication. The wired network may include, but is not limited to, wide area networks (WANs), metropolitan area networks (MANs), and local area networks (LANs). The server 106 may be, but is not limited to, any hardware device capable of computation. The server may be a single server, a server cluster consisting of multiple servers, or a cloud server. The above is merely an example, and no limitations are imposed in this embodiment.

[0023] Optionally, in one or more embodiments, such as Figure 3 As shown, the processing methods for the above customer service Q&A data include:

[0024] S302, Obtain the question text input by the user.

[0025] In embodiments of the present invention, including but not limited to a customer service question and answer data processing system, the system receives voice or text input from users, processes the voice or text input as question text, and outputs the answer corresponding to the question text.

[0026] S304, the problem text is preprocessed to obtain the preprocessed problem text.

[0027] Specifically, remove markers, stop words, and other irrelevant content from the question text; number each character in the remaining content, with identical characters having the same number; and pad all questions to the same length. max Furthermore, the completed parts are marked: if they are characters from the original sentence, they are marked as 1; if they are parts to be completed, they are marked as 0. The length of this marking vector is the same as the length of the question, which is l. max This yields the preprocessed problem text.

[0028] S306, input the preprocessed question text into the trained customer service question and answer data processing model, and obtain the similarity between the preprocessed question text and each reference question text in the question and answer database. The customer service question and answer data processing model is an unsupervised learning model, and the question and answer database includes a question and answer dataset trained by the customer service question and answer data processing model.

[0029] In this embodiment of the invention, the similarity is compared between the preprocessed question text and each question text in the question-and-answer dataset of the question-and-answer database; the question-and-answer dataset is a dataset trained by the customer service question-and-answer data processing model; for example, the question-and-answer dataset includes multiple key-value pairs such as "question-answer-answer".

[0030] S308, take the reference question text with the highest similarity to the preprocessed question text in the question-and-answer database as the target question text, and output the answer corresponding to the target question text.

[0031] In this embodiment of the invention, the answer in the question-and-answer database of the question text with the highest similarity to the preprocessed question text corresponding to the user's input question text is selected as the answer to the user's question, and then the answer is output; if there is no similar question, a prompt message is output that the user's database does not contain the question.

[0032] In this embodiment, the process involves: acquiring user-inputted question text; preprocessing the question text to obtain preprocessed question text; inputting the preprocessed question text into a pre-trained customer service question-and-answer data processing model to obtain the similarity between the preprocessed question text and each reference question text in the question-and-answer database. The customer service question-and-answer data processing model is an unsupervised learning model, and the question-and-answer database includes a question-and-answer dataset trained by the model. The reference question text in the question-and-answer database with the highest similarity to the preprocessed question text is used as the target question text, and the answer corresponding to the target question text is output. Since the customer service question-and-answer data processing model is an unsupervised learning model, it does not require a large amount of labeled data for training. Therefore, it not only improves the processing efficiency of customer service question-and-answer data but also reduces manpower and material resources, solving the technical problem of low processing efficiency of customer service question-and-answer data in related technologies.

[0033] In one or more embodiments, the customer service Q&A data processing model is obtained through the following steps:

[0034] Construct a question-and-answer database; preprocess the test question text set in the question-and-answer database to obtain the target training set for the customer service question-and-answer model.

[0035] Each question text in the target training set is sequentially input into the pre-trained language representation model to obtain the embedding vector set corresponding to each question text, wherein the embedding vector set includes the embedding vector of each character in the question text.

[0036] Here, the pre-trained language representation model includes the BERT model, which is an unsupervised pre-trained model for Natural Language Processing (NLP).

[0037] The embedding vector set is transformed linearly to obtain the target embedding vector set; wherein the dimension of each vector in the target embedding vector set is smaller than the dimension of each vector in the embedding vector set. Here, by transforming the embedding vectors linearly, a dimensionality-reduced embedding vector corresponding to the question text can be obtained.

[0038] Based on the target embedding vector set, the similarity between the test question texts in the test question text set and each verification question text in the verification question text set is determined; wherein, the question-answering database also includes the verification question text set.

[0039] In this embodiment of the invention, the target embedding vector set is the dimensionality-reduced embedding vector. Here, by taking the dimensionality-reduced vector corresponding to the question text in the target training set and the similarity between it and the verification question text in the question-answering database, the answer corresponding to the question text similar to the question text in the target training set can be obtained.

[0040] In one or more embodiments, the step of preprocessing the question text set in the question-and-answer database to obtain the target training set for the customer service question-and-answer model includes:

[0041] For each question text in the question text set, perform the following operations:

[0042] Delete the first type of characters from the current question text to obtain the intermediate question text;

[0043] The intermediate question text is padded with zeros to obtain the question text of the target length; wherein, the target training set includes the question text of the target length.

[0044] Specifically, remove markers, stop words, and other irrelevant content from the question text; number each character in the remaining content, with identical characters having the same number; and pad all questions to the same length. max Furthermore, the completed parts are marked: if they are characters from the original sentence, they are marked as 1; if they are parts to be completed, they are marked as 0. The length of this marking vector is the same as the length of the question, which is l. max This yields the preprocessed problem text.

[0045] In one or more embodiments, the embedding vector set corresponding to each question text is represented by the following formula:

[0046]

[0047] Among them, sent i w represents the set of embedding vectors for the i-th question text. k Let l represent the embedding vector of the k-th character. maxR represents the target length, R represents the vector space, and D represents the dimension of the vector.

[0048] The embedding vector of each character in the embedding vector set is transformed as follows to make the mean of the embedding vector of each character zero, wherein the covariance matrix of the embedding vector of each character is an identity matrix:

[0049]

[0050] in, This is the embedding vector of the k-th character after linear transformation;

[0051] μ is the bias parameter of the linear transformation, w i Let W represent the embedding vector of the i-th character, W be the weight matrix of the linear transformation, and D' represent the dimension of the vector after dimensionality reduction.

[0052] In one or more embodiments, the weight matrix W of the linear transformation is obtained through the following steps:

[0053] The character vector w is determined by the following formula. k Covariance matrix:

[0054] Where T represents the transpose of the current matrix;

[0055] Transform the covariance matrix Σ to make W T ΣW=I, where I represents the identity matrix;

[0056] Further, we obtain the formula: Σ=(W T ) -1 W -1 =(W -1 ) T W -1 ;

[0057] Singular value decomposition is performed on the matrix Σ using the following formula:

[0058] Σ=UΛU T ;

[0059] Where U is an orthogonal matrix and Λ is a diagonal matrix;

[0060] Based on formula The weight matrix W is determined by inverting the matrix using the following formula:

[0061]

[0062] In one or more embodiments, the above-mentioned customer service Q&A data processing method further includes:

[0063] The similarity between two question texts can be calculated using the following formula:

[0064]

[0065] Where, sim ij Send the question text i and the question text sent j The similarity between them, sent i 'for sent i The vector set obtained after the linear transformation, sent j 'for sent j The vector set obtained after the linear transformation.

[0066] In one or more embodiments, the above-mentioned customer service Q&A data processing method further includes:

[0067] The question text in the question-and-answer database is classified using the following classifier formula:

[0068]

[0069] Wherein, out is the classification value of the current question text in the question-and-answer database. When out is 1, it means that the current question text is similar to the question text entered by the user. When out is 0, it means that the current question text is not similar to the question text entered by the user. margin is a preset threshold.

[0070] In one or more embodiments, a customer service question and answer data processing system that runs the above-described customer service question and answer data processing method is also provided, such as... Figure 4 As shown, it includes the following modules:

[0071] The intelligent customer service Q&A database module for the power industry: This module can retrieve historical Q&A dialogues from power industry human customer service representatives, delete meaningless "question-answer" pairs, and ultimately retain a number of data entries. Each data entry contains two parts: "question" and "answer". This intelligent customer service Q&A database can be updated in real time based on new questions raised by users and human responses, thereby enriching the number of questions in the database.

[0072] Text preprocessing module: This module can remove markers, stop words, and other irrelevant content from the question text, number each character in the retained content (identical characters have the same number), and pad all questions to the same length. max Furthermore, the completed parts are marked: if they are characters from the original sentence, they are marked as 1; if they are parts to be completed, they are marked as 0. The length of this marking vector is the same as the length of the question, which is l. maxSixty percent of the data in the intelligent customer service Q&A database was selected as the training set, and the remaining 40% was used as the validation set. The training set was used to train the model for the intelligent customer service Q&A modeling module, and the validation set was used to verify the model's matching performance.

[0073] like Figure 5 As shown, the customer service Q&A data processing system also includes a power intelligent customer service Q&A modeling module and a power intelligent customer service Q&A module.

[0074] In the intelligent customer service Q&A modeling module for the power industry, the training set is input into the BERT model to obtain the embedding vector of each character. Then, the i-th sentence can be represented as:

[0075]

[0076] Among them, sent i w represents the set of embedding vectors for the i-th question text. k Let l represent the embedding vector of the k-th character. max R represents the target length, R represents the vector space, and D represents the dimension of the vector.

[0077] The embedding vector of each character in the embedding vector set is transformed as follows to make the mean of the embedding vector of each character zero, wherein the covariance matrix of the embedding vector of each character is an identity matrix:

[0078]

[0079] in, This is the embedding vector of the k-th character after linear transformation;

[0080] μ is the bias parameter of the linear transformation, w i Let W represent the embedding vector of the i-th character, W be the weight matrix of the linear transformation, and D' represent the dimension of the vector after dimensionality reduction.

[0081] The character vector w is determined according to the following formula. k Covariance matrix:

[0082]

[0083] in, After transformation, the diagonal elements of the matrix represent the variances of the two variables, while the other elements represent the covariances of a and b. m represents the number of samples in the matrix.

[0084] character vector w k The covariance matrix is ​​as follows:

[0085] Where T represents the transpose of the current matrix;

[0086] Transform the covariance matrix Σ to make W T ΣW=I, where I represents the identity matrix;

[0087] Further, we obtain the formula: Σ=(W T ) -1 W -1 =(W -1 ) T W -1 ;

[0088] Singular value decomposition is performed on the matrix Σ using the following formula:

[0089] Σ=UΛU T ;

[0090] Where U is an orthogonal matrix and Λ is a diagonal matrix;

[0091] Based on formula The weight matrix W is determined by inverting the matrix using the following formula:

[0092]

[0093] Word vector after linear transformation The dimension compared to the w before transformation k "The dimension decreases from D to D", and the dimension of the sentence vector also changes to

[0094] After a linear transformation, the new vector of the problem text can be represented as follows:

[0095] The similarity between two question texts can be calculated using the following formula:

[0096]

[0097] Where, sim ij Send the question text i and the question text sent j The similarity between them, sent i 'for sent i The vector set obtained after the linear transformation, sent j 'for sent j The vector set obtained after the linear transformation.

[0098] The intelligent customer service Q&A module for the power industry: This module can use the pre-processed sentences of user questions as sent... i The sentences in the database are used as sent in sequence. jThe two question texts are input into the model established by the intelligent customer service question-and-answer modeling module to obtain the similarity between the user-input question text and each question text in the question-and-answer database.

[0099] By setting a threshold margin, the final classifier can be represented as:

[0100]

[0101] The threshold is a hyperparameter of the model, where 0 indicates that the two sentences are not similar, and 1 indicates that the two sentences are similar.

[0102] If multiple sentences result in 1, the answer to the user's question is selected from the responses in the database for the sentence with the highest similarity. If no output results in 1, the user is informed that the question is not included in the database.

[0103] The customer service Q&A data processing system also includes a user question acquisition module. In this module, users input the questions they need to consult through the interactive interface. The backend acquires the questions, performs text preprocessing on the questions, and inputs them into the power intelligent customer service Q&A module.

[0104] The customer service Q&A data processing system also includes an intelligent power customer service answer output module. This module can output the answers obtained from the intelligent power customer service Q&A module to the user. The user can evaluate the answer based on it to determine whether it is the answer they need.

[0105] The embodiments of the present invention have the following technical effects:

[0106] I. The database in this embodiment of the invention can be updated online in real time according to new questions raised by users, which can realize real-time model updates and thus effectively improve the robustness of the model;

[0107] Second, the embodiments of the present invention can effectively eliminate the dimensional redundancy of the word vectors output by the BERT model, and improve the inference speed of the model while ensuring accuracy.

[0108] Third, the embodiments of the present invention can calculate the domain-based linear transformation matrix weights and biases based on new domain text, and have good transferability.

[0109] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0110] According to another aspect of the embodiments of this application, a customer service question and answer data processing apparatus for implementing the above-described customer service question and answer data processing method is also provided. For example... Figure 6 As shown, the device includes:

[0111] The first acquisition unit 602 is used to acquire the question text input by the user.

[0112] In embodiments of the present invention, including but not limited to a customer service question and answer data processing system, the system receives voice or text input from users, processes the voice or text input as question text, and outputs the answer corresponding to the question text.

[0113] The preprocessing unit 604 is used to obtain preprocessed problem text by preprocessing the problem text.

[0114] Specifically, remove markers, stop words, and other irrelevant content from the question text; number each character in the remaining content, with identical characters having the same number; and pad all questions to the same length. max Furthermore, the completed parts are marked: if they are characters from the original sentence, they are marked as 1; if they are parts to be completed, they are marked as 0. The length of this marking vector is the same as the length of the question, which is l. max This yields the preprocessed problem text.

[0115] The second acquisition unit 606 is used to input the preprocessed question text into the trained customer service question and answer data processing model, and to obtain the similarity between the preprocessed question text and each reference question text in the question and answer database. The customer service question and answer data processing model is an unsupervised learning model, and the question and answer database includes a question and answer dataset trained by the customer service question and answer data processing model.

[0116] In this embodiment of the invention, the similarity is compared between the preprocessed question text and each question text in the question-and-answer dataset of the question-and-answer database; the question-and-answer dataset is a dataset trained by the customer service question-and-answer data processing model; for example, the question-and-answer dataset includes multiple key-value pairs such as "question-answer-answer".

[0117] The output unit 608 is used to take the reference question text with the highest similarity to the preprocessed question text in the question-and-answer database as the target question text and output the answer corresponding to the target question text.

[0118] In this embodiment of the invention, the answer in the question-and-answer database of the question text with the highest similarity to the preprocessed question text corresponding to the user's input question text is selected as the answer to the user's question, and then the answer is output; if there is no similar question, a prompt message is output that the user's database does not contain the question.

[0119] In this embodiment, the process involves: acquiring user-inputted question text; preprocessing the question text to obtain preprocessed question text; inputting the preprocessed question text into a pre-trained customer service question-and-answer data processing model to obtain the similarity between the preprocessed question text and each reference question text in the question-and-answer database. The customer service question-and-answer data processing model is an unsupervised learning model, and the question-and-answer database includes a question-and-answer dataset trained by the model. The reference question text in the question-and-answer database with the highest similarity to the preprocessed question text is used as the target question text, and the answer corresponding to the target question text is output. Since the customer service question-and-answer data processing model is an unsupervised learning model, it does not require a large amount of labeled data for training. Therefore, it not only improves the processing efficiency of customer service question-and-answer data but also reduces manpower and material resources, solving the technical problem of low processing efficiency of customer service question-and-answer data in related technologies.

[0120] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described customer service question and answer data processing method is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses the electronic device as a server as an example for illustration. Figure 7 As shown, the electronic device includes a memory 702 and a processor 704. The memory 702 stores a computer program, and the processor 704 is configured to execute the steps in any of the above method embodiments via the computer program.

[0121] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0122] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0123] S1, Obtain the question text input by the user;

[0124] S2, the problem text is preprocessed to obtain the preprocessed problem text;

[0125] S3, input the preprocessed question text into the trained customer service question and answer data processing model, and obtain the similarity between the preprocessed question text and each reference question text in the question and answer database. The customer service question and answer data processing model is an unsupervised learning model, and the question and answer database includes a question and answer dataset trained by the customer service question and answer data processing model.

[0126] S4, take the reference question text with the highest similarity to the preprocessed question text in the question-and-answer database as the target question text, and output the answer corresponding to the target question text.

[0127] Alternatively, as those skilled in the art will understand, Figure 7 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 7 This does not limit the structure of the aforementioned electronic devices or electronic equipment. For example, electronic devices or electronic equipment may also include components that are more... Figure 7 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 7 The different configurations shown.

[0128] The memory 702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the customer service question-and-answer data processing method and apparatus in this embodiment. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, thereby realizing the aforementioned customer service question-and-answer data processing method. The memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include memory remotely located relative to the processor 704, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 702 may be used, but is not limited to, to store the pixel-level motion vectors of the first CU. As an example, such as Figure 7 As shown, the memory 702 may include, but is not limited to, the first acquisition unit 602, preprocessing unit 604, second acquisition unit 606, and output unit 608 of the customer service question and answer data processing device. Furthermore, it may include, but is not limited to, other module units of the customer service question and answer data processing device, which will not be described in detail in this example.

[0129] Optionally, the transmission device 706 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 706 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 706 is a radio frequency (RF) module, used for wireless communication with the Internet.

[0130] In addition, the aforementioned electronic device also includes: a display 708 for displaying the answer corresponding to the target question text; and a connection bus 710 for connecting the various module components in the aforementioned electronic device.

[0131] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0132] In one or more embodiments, this application also provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned customer service question-and-answer data processing method. The computer program is configured to execute the steps of any of the above method embodiments when running.

[0133] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store a computer program for performing the following steps:

[0134] S1, Obtain the question text input by the user;

[0135] S2, the problem text is preprocessed to obtain the preprocessed problem text;

[0136] S3, input the preprocessed question text into the trained customer service question and answer data processing model, and obtain the similarity between the preprocessed question text and each reference question text in the question and answer database. The customer service question and answer data processing model is an unsupervised learning model, and the question and answer database includes a question and answer dataset trained by the customer service question and answer data processing model.

[0137] S4, take the reference question text with the highest similarity to the preprocessed question text in the question-and-answer database as the target question text, and output the answer corresponding to the target question text.

[0138] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. This program can be stored in a computer-readable storage medium, which may include: a flash drive, read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0139] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0140] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0141] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0142] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0143] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0144] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for processing customer service question and answer data, characterized in that, include: Get the question text entered by the user; The question text is preprocessed to obtain the preprocessed question text; The preprocessed question text is input into the trained customer service question and answer data processing model to obtain the similarity between the preprocessed question text and each reference question text in the question and answer database. The customer service question and answer data processing model is an unsupervised learning model, and the question and answer database includes a question and answer dataset trained by the customer service question and answer data processing model. The reference question text with the highest similarity to the preprocessed question text in the question-and-answer database is used as the target question text, and the answer corresponding to the target question text is output. The customer service Q&A data processing model is obtained through the following steps: Build a question-and-answer database; The test question text set in the question-and-answer database is preprocessed to obtain the target training set for the customer service question-and-answer model. Each question text in the target training set is sequentially input into a pre-trained language representation model to obtain an embedding vector set corresponding to each question text, wherein the embedding vector set includes the embedding vector of each character of the question text; The embedding vector set is transformed linearly to obtain the target embedding vector set; wherein the dimension of each vector in the target embedding vector set is smaller than the dimension of each vector in the embedding vector set; the linear transformation is used to convert the embedding vectors into the target embedding vector set, the mean of the embedding vector of each character in the target embedding vector set is zero, and the covariance matrix of the embedding vector of each character is an identity matrix; Based on the target embedding vector set, the similarity between the test question texts in the test question text set and each verification question text in the verification question text set is determined; wherein, the question-answering database includes the verification question text set.

2. The method according to claim 1, characterized in that, The step of preprocessing the question text set in the question-and-answer database to obtain the target training set for the customer service question-and-answer model includes: For each question text in the question text set, perform the following operations: Delete the first type of characters from the current question text to obtain the intermediate question text; The intermediate question text is padded with zeros to obtain the question text of the target length; wherein, the target training set includes the question text of the target length.

3. The method according to claim 2, characterized in that, The embedding vector set corresponding to each question text is represented by the following formula: ; in, This represents the set of embedding vectors for the i-th question text. This represents the embedding vector of the k-th character. Indicates the target length. This represents a vector space, where D represents the dimension of the vector. The embedding vector of each character in the embedding vector set is transformed as follows to make the mean of the embedding vector of each character zero, wherein the covariance matrix of the embedding vector of each character is an identity matrix: in, This is the embedding vector of the k-th character after linear transformation; , These are the bias parameters for the linear transformation. This represents the embedding vector of the i-th character. The weight matrix is ​​the linear transformation matrix. This represents the dimension of the vector after dimensionality reduction.

4. The method according to claim 3, characterized in that, The weight matrix of the linear transformation To obtain it, follow these steps: The character vector is determined using the following formula. Covariance matrix: Where T represents the transpose of the current matrix; The covariance matrix Perform transformation to make ,in, Represents the identity matrix; Further, we obtain the formula: ; The matrix is ​​obtained by the following formula. Perform singular value decomposition: ; in, U It is an orthogonal matrix. It is a diagonal matrix; Based on formula The weight matrix is ​​determined by inverting the matrix using the following formula. : 。 5. The method according to claim 4, characterized in that, The method further includes: The similarity between two question texts can be calculated using the following formula: ; in, For the question text and question text Similarity between them for The vector set obtained after the linear transformation for The vector set obtained after the linear transformation.

6. The method according to claim 5, characterized in that, include: The question text in the question-and-answer database is classified using the following classifier formula: Wherein, out is the classification value of the current question text in the question-and-answer database. When out is 1, it means that the current question text is similar to the question text entered by the user; when out is 0, it means that the current question text is not similar to the question text entered by the user. This is a preset threshold.

7. A device for processing customer service question and answer data, characterized in that, include: The first acquisition unit is used to acquire the question text input by the user; The preprocessing unit is used to preprocess the problem text to obtain preprocessed problem text; The second acquisition unit is used to input the preprocessed question text into the trained customer service question and answer data processing model, and to obtain the similarity between the preprocessed question text and each reference question text in the question and answer database. The customer service question and answer data processing model is an unsupervised learning model, and the question and answer database includes a question and answer dataset trained by the customer service question and answer data processing model. The output unit is used to take the reference question text with the highest similarity to the preprocessed question text in the question-answer database as the target question text and output the answer corresponding to the target question text; The customer service Q&A data processing model is obtained through the following steps: Build a question-and-answer database; The test question text set in the question-and-answer database is preprocessed to obtain the target training set for the customer service question-and-answer model. Each question text in the target training set is sequentially input into a pre-trained language representation model to obtain an embedding vector set corresponding to each question text, wherein the embedding vector set includes the embedding vector of each character of the question text; The embedding vector set is transformed linearly to obtain the target embedding vector set; wherein the dimension of each vector in the target embedding vector set is smaller than the dimension of each vector in the embedding vector set; the linear transformation is used to convert the embedding vectors into the target embedding vector set, the mean of the embedding vector of each character in the target embedding vector set is zero, and the covariance matrix of the embedding vector of each character is an identity matrix; Based on the target embedding vector set, the similarity between the test question texts in the test question text set and each verification question text in the verification question text set is determined; wherein, the question-answering database includes the verification question text set.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method according to any one of claims 1 to 6.

9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Conversation reply method and device, server and storage medium

    CN111611355A

  • Knowledge base generation method and device, storage medium and electronic equipment

    CN113868415A