Client service text classification method, training method, device and equipment

By filtering the target dialogue text in preset communication information and determining the weight based on the dialogue sequence and word count, the problem of poor text classification caused by long preset communication information is solved, the text classification efficiency and accuracy of customer service is improved, and the customer has been improved. Experience.

CN119166815APending Publication Date: 2024-12-20PING AN INT FINANCIAL LEASING CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411260004.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In customer service, long preset communication information leads to poor convenience and accuracy of text classification, resulting in a large amount of manual viewing required for customer service inquiries, affecting customer experience.

Method used

By obtaining preset communication information for customer service, determining the weight of the conversation text based on the conversation sequence and word count, filtering out the target conversation text, and inputting the text classification model to improve the convenience and accuracy of text classification results.

Benefits of technology

The number of text words input in the text classification model is reduced, the convenience and accuracy of determining text classification results of preset communication information is improved, and the consultation experience of customer service is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166815A_ABST
    Figure CN119166815A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of text classification, and provides a text classification method, training method, device and equipment for customer service conversation, and the method comprises the steps: obtaining preset communication information corresponding to customer service; the preset communication information comprises a plurality of preset dialogue texts; based on a first preset function, determining a first weight of the preset dialogue text according to the dialogue ordinal number of the preset dialogue text in the preset communication information; based on a second preset function, determining a second weight of the preset dialogue text according to the word number of the preset dialogue text; determining a target dialogue text from the plurality of preset dialogue texts according to the first weights and the second weights of the plurality of preset dialogue texts; and based on the text classification model, determining a text classification result corresponding to the preset communication information according to the target dialogue text, so as to improve the text classification convenience of the preset communication information and improve the text classification accuracy of the preset communication information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of text classification, and in particular to a text classification method, training method, device and equipment for customer service. Background Art

[0002] Customer service consultation service is an important step in providing customers with high-quality customer service. Customer service can receive a large number of customer calls or messages every day. The questions asked by customers can be different or related. For example, the same customer can make multiple calls or send multiple messages at different times. In the case that the questions asked by the customer are related, the customer service needs to check the preset communication information corresponding to the customer's last call or the last round of consultation messages. However, if the customer service manually checks the preset communication information, it will take a lot of manpower and energy, resulting in a poor customer service consultation experience.

[0003] In the related art, the preset communication information can be subjected to text classification processing with the help of an artificial intelligence model to determine the text classification result corresponding to the preset communication information. However, when the preset communication information has a large number of words, it is easy to cause poor convenience and poor accuracy in text classification of the preset communication information. Summary of the invention

[0004] The main purpose of this application is to provide a text method, training method, device and equipment for customer service, aiming to improve the convenience of text classification of preset communication information and improve the accuracy of text classification of preset communication information.

[0005] In a first aspect, the present application provides a text classification method for customer service, comprising:

[0006] Obtaining preset communication information corresponding to the customer service; the preset communication information includes a plurality of preset dialogue texts;

[0007] Based on a first preset function, determining a first weight of the preset dialogue text according to the dialogue sequence number of the preset dialogue text in the preset communication information;

[0008] Based on a second preset function, determining a second weight of the preset dialogue text according to the number of words in the preset dialogue text;

[0009] Determining a target dialogue text from the plurality of preset dialogue texts according to the first weights and the second weights of the plurality of preset dialogue texts;

[0010] Based on the text classification model, a text classification result corresponding to the preset communication information is determined according to the target dialogue text.

[0011] In a second aspect, the present application also provides a training method for a text classification model, the training method comprising:

[0012] Acquire a training sample set, wherein the training sample set includes preset communication information corresponding to a plurality of customer services and a text classification result label corresponding to each of the preset communication information; the preset communication information includes a plurality of preset dialogue texts;

[0013] Based on a first preset function, determining a first weight of the preset dialogue text according to the dialogue sequence number of the preset dialogue text in the preset communication information;

[0014] Based on a second preset function, determining a second weight of the preset dialogue text according to the number of words in the preset dialogue text;

[0015] Based on the text classification model, determining the text classification result corresponding to the preset communication information according to the target dialogue text;

[0016] Determining model optimization parameters of the text classification model according to the text classification result and the text classification result label;

[0017] According to the model optimization parameters, the model parameters of the text classification model are adjusted.

[0018] In a third aspect, the present application further provides a text classification device for customer service calls, the text classification device comprising:

[0019] An acquisition module, used to acquire preset communication information corresponding to the customer service; the preset communication information includes a plurality of preset dialogue texts;

[0020] A first weight determination module, configured to determine a first weight of the preset dialogue text according to a dialogue sequence number of the preset dialogue text in the preset communication information based on a first preset function;

[0021] A second weight determination module, configured to determine a second weight of the preset dialogue text according to the number of words in the preset dialogue text based on a second preset function;

[0022] A target dialogue determination module, configured to determine a target dialogue text from a plurality of the preset dialogue texts according to the first weight and the second weight of each of the plurality of the preset dialogue texts;

[0023] The text classification module is used to determine the text classification result corresponding to the preset communication information according to the target dialogue text based on the text classification model.

[0024] In a fourth aspect, the present application further provides a computer device, the computer device comprising a memory and a processor;

[0025] The memory is used to store computer programs;

[0026] The processor is used to execute the computer program and implement the above-mentioned text classification method for customer service when executing the computer program, or implement the above-mentioned training method for the text classification model.

[0027] In a fifth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the text classification method for customer service as described above are implemented, or the steps of the training method for the text classification model as described above are implemented.

[0028] The present application provides a text classification method, training method, device and equipment for customer service. The text classification method for customer service includes: obtaining preset communication information corresponding to the customer service; the preset communication information includes multiple preset dialogue texts; based on a first preset function, determining a first weight of the preset dialogue text according to the dialogue sequence number of the preset dialogue text in the preset communication information; based on a second preset function, determining a second weight of the preset dialogue text according to the number of words in the preset dialogue text; based on the first weight and second weight of each of the multiple preset dialogue texts, determining a target dialogue text from the multiple preset dialogue texts; based on a text classification model, determining a text classification result corresponding to the preset communication information according to the target dialogue text, so as to improve the convenience of text classification of the preset communication information and improve the accuracy of text classification of the preset communication information.

[0029] Based on the setting of the first preset function, the computer device can determine the first weight of the preset dialogue text in the preset communication information. Based on the setting of the second preset function, the computer device can determine the second weight of the preset dialogue text in the preset communication information. Accordingly, the computer device can combine the first weight and the second weight of the preset dialogue text to screen the target dialogue text from the multiple preset dialogue texts included in the preset communication information to reduce the number of text words input into the text classification model, thereby improving the convenience of the text classification model in determining the text classification result corresponding to the preset communication information, and improving the accuracy of the text classification model in determining the text classification result corresponding to the preset communication information. For example, it can be applied to the financial industry, such as insurance business. For the insurance business, the first preset function and the second preset function can be combined to determine the target dialogue text corresponding to the preset communication information. Accordingly, the text classification result corresponding to the preset communication information can be determined based on the text classification model and the target dialogue text. Based on this, the text classification result corresponding to each preset communication information of the same customer can be determined, so that the customer service can clarify the insurance needs of the customer, thereby providing better customer service to the customer. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 It is a flowchart of a text classification method for customer service provided in an embodiment of the present application;

[0032] Figure 2 is a schematic diagram of a first preset function involved in an embodiment of the present application;

[0033] Figure 3 is a schematic diagram of a second preset function involved in an embodiment of the present application;

[0034] Figure 4 It is a flowchart of a training method for a text classification model provided in an embodiment of the present application;

[0035] Figure 5 is a schematic block diagram of a text classification device for customer service provided in an embodiment of the present application;

[0036] Figure 6 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0038] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0039] The embodiments of the present application provide a method, device and equipment for text classification of customer service. The method for text classification of customer service can be applied to computer devices, which can be mobile phones, tablet computers, laptop computers, desktop computers and other devices. It can also be applied to a server, which can be a separate server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0040] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0041] See also Figure 1 , Figure 1 It is a flow chart of a text classification method for customer service provided in an embodiment of the present application. It should be noted that the text classification method for customer service provided in an embodiment of the present application can be used in a computer device, and of course can also be used in a server. For example, the server can obtain preset communication information corresponding to the customer service from the computer device, and process the multiple preset dialogue texts included in the preset communication information according to the text classification method for customer service to determine the text classification result corresponding to the preset communication information. Exemplarily, the server can, for example, send the text classification result corresponding to the preset communication information to the computer device; of course, it is not limited to this, and no limitation is made here.

[0042] In specific implementation, computer devices include but are not limited to: any one of mobile phones, tablet computers, laptop computers, and desktop computers; the server can be a single server or a server cluster, or a cloud server that provides cloud computing services.

[0043] like Figure 1 As shown, the text classification method for customer service includes steps S101 to S105.

[0044] Step S101: Obtain preset communication information corresponding to customer service; the preset communication information includes a plurality of preset dialogue texts.

[0045] For example, when a customer uses customer service and consults with customer service, the computer device can record the preset communication information between the customer and the customer service. For example, when a customer consults with customer service by phone, the computer device can record the customer service call, and accordingly, the computer device can convert the customer service call recording into text to form the preset communication information. For another example, when a customer consults with customer service by online chatting, the computer device can collect the chat records to form the preset communication information. Of course, the preset communication information is not limited to this and is not limited here.

[0046] In some embodiments, since the preset communication information is determined based on the communication information between the customer and the customer service, the data format of the preset communication information may be a dialogue format. For example, the preset communication information may include: [S: Hello, sir. C: Hello, I want to consult xxx], where S refers to the customer service and C refers to the customer. Based on this, the preset communication information may include multiple preset dialogue texts.

[0047] The multiple preset dialogue texts included in the preset communication information can be used to subsequently determine the text classification result corresponding to the preset communication information.

[0048] In some implementations, when there is preset interference text in the preset dialogue text in the preset communication information, the preset interference text is removed to obtain a processed preset dialogue text.

[0049] For example, in the process of communication between a customer and customer service, it is easy for modal particles, customer privacy information, and other information that is irrelevant to the subsequent text classification results corresponding to the preset communication information to appear. Privacy information includes, for example, the customer's telephone number, ID number, etc., which are not limited here. Based on this, the computer device can set modal particles, customer privacy information, and other information as preset interference text. In the case where there is preset interference text in the preset communication information, the preset interference text is likely to have an adverse effect on the accuracy of the subsequent text classification results corresponding to the preset communication information, and the computer device can remove the preset interference text in the preset communication information.

[0050] When the computer device obtains the preset communication information, the computer device can search whether there is preset interference information in the preset dialogue text in the preset communication information. If there is preset interference information in the preset dialogue text, the preset interference information is removed to obtain the processed preset dialogue text. For example, the computer device can search whether there is an interjection in the preset dialogue text by keyword matching, so that if the interjection is found, the interjection in the preset dialogue text is removed. For another example, the computer device can search whether there is at least one of a telephone number and an ID number in the preset dialogue text by regular matching, so that if the telephone number is found, the telephone number is removed, and if the ID number is found, the ID number is removed.

[0051] In this way, by removing the preset interference information in the preset dialogue text, the processed preset dialogue text is obtained, and the processed preset dialogue text can be used for the subsequent determination of the text classification result corresponding to the preset communication information. Accordingly, in the case where the processed preset dialogue text does not include the preset interference information, it can be avoided that the preset interference information has an adverse effect on the accuracy of the subsequent determination of the text classification result corresponding to the preset communication information, which is conducive to the subsequent improvement of the accuracy of the determination of the text classification result corresponding to the preset communication information.

[0052] Step S102: Based on a first preset function, a first weight of the preset dialogue text is determined according to the dialogue sequence number of the preset dialogue text in the preset communication information.

[0053] When the preset communication information is obtained, since the customer and the customer service generally state the purpose of communication, such as the questions that need to be consulted, in the initial stage of communication, provide solutions to the problems in the middle stage of communication, and provide the solutions to the problems in the final stage of communication, the preset dialogue texts at different positions in the preset communication information, such as preset dialogue texts with different dialogue ordinals, may have different effects on the convenience of text classification and the accuracy of text classification of the subsequent text classification results corresponding to the preset communication information.

[0054] Based on this, the computer device can determine the first weight of the preset dialogue text based on the first preset function and the dialogue sequence number of the preset dialogue text. The first weight can be used to evaluate the influence of the dialogue sequence number of the preset dialogue text on the text classification result corresponding to the preset communication information.

[0055] In some implementations, the conversation sequence number and the total number of conversations corresponding to the preset communication information are substituted into a first preset function to obtain a first weight of the preset conversation text.

[0056] For example, the first preset function can be expressed as function y1, and function y1 can be expressed as:

[0057]

[0058] Among them, x1 is used to indicate the dialogue sequence number of the preset dialogue text, x2 is used to indicate the total number of dialogues corresponding to the preset communication information, c1 is used to indicate the first constant, c2 is used to indicate the second constant, and the second constant c2 is greater than the first constant c1.

[0059] When the second constant c2 is greater than the first constant c1, the sum of the conversation sequence number and the first constant can be made smaller than the sum of the total number of conversations and the second constant, so that the ratio between the sum of the conversation sequence number and the first constant and the sum of the total number of conversations and the second constant is not 1, thereby making the first weight of the preset conversation text not 0. Similarly, the first weight of each preset conversation text in the preset communication information can be determined according to the conversation sequence number of the preset conversation text.

[0060] For example, the computer device may substitute the conversation sequence number of each preset conversation text and the total number of conversations corresponding to the preset communication information into the second preset function to obtain the first weight of each preset conversation text.

[0061] like Figure 2 As shown, for the first preset function, when the preset dialogue text is the first preset dialogue text of the preset communication information, that is, when the dialogue ordinal number is 1, the first weight of the preset dialogue text is higher. Correspondingly, when the preset dialogue text is the last preset dialogue text of the preset communication information, that is, when the dialogue ordinal number is equal to the total number of dialogues, the first weight of the preset dialogue text is also higher. When the preset dialogue text is in the middle position of the preset communication information, the first weight of the preset dialogue text will be lower. Based on this, the curve change trend of the first preset function can correspond to the situation where the customer and the customer service indicate the purpose of communication in the initial stage of communication, provide a solution to the problem in the middle stage of communication, and provide the solution result of the problem in the final stage of communication. Accordingly, based on the setting of the first preset function, the computer device can set a higher first weight for the preset dialogue text in the initial position and the end position in the preset communication information, and set a lower first weight for the preset dialogue text in the middle position in the preset communication information, and then the text classification result corresponding to the preset communication information can be determined based on the purpose of communication and the solution result of the problem.

[0062] In this way, the computer device determines a first weight of the preset dialogue text based on the first preset function and according to the dialogue sequence number of the preset dialogue text in the preset communication information. The first weight can be used by the computer device to subsequently select a target dialogue text from multiple preset dialogue texts included in the preset communication information, which is conducive to subsequently improving the convenience of determining the target dialogue text.

[0063] Step S103: Based on the second preset function and according to the number of words in the preset dialogue text, determine a second weight of the preset dialogue text.

[0064] When the preset communication information is obtained, since the preset communication information is determined based on the communication process between the customer and the customer service, the statement object of each preset dialogue text included in the preset communication information is different. For example, when the preset communication information includes: [S: Hello, sir. C: Hello, hello, I want to consult xxx], S is used to refer to the customer service, and C is used to refer to the customer, "Hello, sir." can be determined as dialogue text 1, and "Hello, hello, I want to consult xxx" can be determined as dialogue text 2. Among them, the statement object of dialogue text 1 is the customer service, and the statement object of dialogue text 2 is the customer.

[0065] For each preset dialogue text, the more words the statement subject uses when stating the same preset dialogue text, the more useless information included in the preset dialogue text will increase accordingly. Preset dialogue texts with different word counts may have different effects on the convenience and accuracy of text classification of the text classification results corresponding to the subsequent preset communication information.

[0066] Based on this, the computer device can determine the second weight of the preset dialogue text based on the second preset function and the number of words in the preset dialogue text. The second weight can be used to evaluate the influence of the number of words in the preset dialogue text on the text classification result corresponding to the preset communication information.

[0067] In some implementations, the word count difference between the word count and a preset word count threshold is determined; the minimum value between the word count difference and the preset word count threshold is substituted into a second preset function to obtain a second weight of the preset dialogue text.

[0068] For example, the second preset function can be expressed as function y2, and function y2 can be expressed as:

[0069]

[0070] Among them, x3 is used to indicate the number of words in the preset dialogue text, and c3 is used to indicate the preset word count threshold. The preset word count threshold can be pre-set or set by the user, which is not limited here. In an exemplary embodiment, the computer device can determine the text in the preset dialogue text that is more important to the semantic understanding of the preset dialogue text as the important information of the preset dialogue text. Correspondingly, the computer device can determine the preset word count threshold c3 according to the number of words corresponding to the important information in the preset dialogue text. For example, in the case where the words around the 50th word in the preset dialogue text are the important information of the preset dialogue text, the computer device can determine the preset word count threshold c3 as 50. Of course, the preset word count threshold is not limited to this, which is not limited here.

[0071] For example, the computer device may determine the word count difference between each preset dialogue text and a preset word count threshold. Accordingly, the computer device may substitute the minimum value between the word count difference between each preset dialogue text and the preset word count threshold into the second preset function to obtain the second weight of each preset dialogue text.

[0072] like Figure 3 As shown, for the second preset function, the second weight of the text in the preset dialogue text that is closer to the preset word count threshold is higher. Accordingly, after the number of words in the preset dialogue text exceeds the preset word count threshold, as the number of words in the preset dialogue text increases, the second weight of the corresponding text gradually decreases. After the number of words in the preset dialogue text exceeds twice the preset word count threshold, the second weight of the corresponding text is reduced to 0. Based on this, the curve change trend of the second preset function can correspond to the situation that the more words the statement object uses in stating the same preset dialogue text, the more useless information included in the preset dialogue text will increase accordingly. Accordingly, based on the setting of the second preset function, the computer device can set a higher second weight for the text in the preset dialogue text whose word count is close to the preset word count threshold, and set a lower second weight for the text in the preset dialogue text whose word count is far from the preset word count threshold, so that the text classification result corresponding to the preset communication information can be determined based on the important information in the preset dialogue text.

[0073] In this way, the computer device determines the second weight of the preset dialogue text based on the second preset function and the number of words in the preset dialogue text. The second weight can be used by the computer device to subsequently select the target dialogue text from the multiple preset dialogue texts included in the preset communication information, which is conducive to subsequently improving the convenience of determining the target dialogue text.

[0074] Step S104: determining a target dialogue text from the plurality of preset dialogue texts according to the first weights and the second weights of the plurality of preset dialogue texts.

[0075] As the number of words in the preset communication information increases, the possibility of poor convenience and accuracy in text classification of the preset communication information will increase. When the computer device determines the first weight and the second weight of each of the multiple preset dialogue texts, it can determine the target dialogue text from the multiple preset dialogue texts based on the first weight and the second weight to reduce the number of words in the subsequent determination of the text classification result corresponding to the preset communication information.

[0076] In some embodiments, a target weight of a preset dialogue text is determined based on a first weight and a second weight of the preset dialogue text; a target dialogue text is selected from multiple preset dialogue texts in descending order of the target weight; wherein the total number of words corresponding to all target dialogue texts is less than or equal to a preset word count threshold.

[0077] For example, the computer device may determine the product of the first weight and the second weight of the preset dialogue text as the target weight of the preset dialogue text. The plurality of preset dialogue texts included in the preset communication information may be represented as s i =[s1,s2,…,s n ], the target weights of multiple preset dialogue texts can be expressed as w i =[w1,w2,…,w n ] as an example, where i is used to indicate the dialogue sequence number of the preset dialogue text in the preset communication information. The computer device can select the target dialogue text from the plurality of preset dialogue texts in order of target weight from large to small. For example, in the preset dialogue text s n The target weight w n In the most extreme case, the computer device can determine the preset dialogue texts n Whether the word count is greater than the preset word count threshold. n If the number of words is less than or equal to the preset word count threshold, the computer device may store the preset dialogue text s n Determine as the target dialogue text. Accordingly, in the preset dialogue text s n When the number of words in the preset dialogue text s1 is less than or equal to the preset word count threshold, the computer device may continue to read the preset dialogue text s1 to the preset dialogue text s n-1 Select the preset dialogue text with the largest target weight, such as preset dialogue text s1, to determine the preset dialogue text s1 and the preset dialogue text s n Is the total number of words greater than the preset word count threshold? n If the total number of words in the preset dialogue text s1 is less than or equal to the preset word count threshold, the computer device can determine the preset dialogue text s1 as the target dialogue text. nIf the total number of words in the target dialogue text is greater than the preset word count threshold, the computer device may stop selecting the target dialogue text from the preset dialogue text. This process is repeated until all target dialogue texts are determined. The total number of words corresponding to all target dialogue texts is less than or equal to the preset word count threshold. The preset word count threshold may be pre-set or may be set by the user, which is not limited here.

[0078] In this way, when the target dialogue text is determined from the plurality of preset dialogue texts according to the first weight and the second weight of each of the plurality of preset dialogue texts, the preset dialogue texts included in the preset communication information can be screened to obtain the target dialogue text, so that the total number of words of all the target dialogue texts is less than the total number of words of the preset communication information. Accordingly, the target dialogue text can be used for the subsequent determination of the text classification information corresponding to the preset communication information. When the total number of words of all the target dialogue texts is less than the total number of words of the preset communication information, it is beneficial to improve the convenience of text classification of the preset communication information and improve the accuracy of text classification of the preset communication information.

[0079] Step S105: Based on the text classification model, determine the text classification result corresponding to the preset communication information according to the target dialogue text.

[0080] When the target dialogue text is obtained, the target dialogue text can be input into a text classification model so that the text classification model performs text classification processing on the target dialogue text to obtain a corresponding text classification result. Based on the fact that the target dialogue text is selected from the preset dialogue text included in the preset communication information, the computer device can determine the text classification result as the text classification result corresponding to the preset communication information. The text classification model can be trained according to a preset language model, and the preset language model includes, for example, a pre-trained language representation model, such as a BERT model (Bidirectional Encoder Representations from Transformers), etc., which is not limited here.

[0081] In some implementations, the target dialogue texts are concatenated according to the dialogue sequence number of each target dialogue text to obtain processed target dialogue texts.

[0082] For example, the processed target dialogue text is input into a text classification model to obtain a text classification result corresponding to the preset communication information.

[0083] In the case of selecting a target dialogue text from a plurality of preset dialogue texts included in the preset communication information, the number of target dialogue texts may include at least one. Since the target weight of the target dialogue text has no correlation with the dialogue ordinal number of the target dialogue text, the target dialogue text sorted according to the target weight is equivalent to a disordered text without corresponding language statement logic. Based on this, in the case of determining the target dialogue text, the target dialogue text can be spliced ​​according to the dialogue ordinal number of each target dialogue text to form an ordered text with corresponding language statement logic, thereby obtaining the processed target dialogue text.

[0084] When the processed target dialogue text is obtained, the computer device can input the processed target dialogue text into a text classification model, so that the text classification model performs text classification processing on the preset communication information based on the processed target dialogue text, thereby obtaining a corresponding text classification result.

[0085] For example, for insurance business, when the preset communication information between the customer service and the same customer is obtained, the computer device can determine the target dialogue text corresponding to each preset communication information. Accordingly, the computer device can input the target dialogue text corresponding to each preset communication information into the text classification model to determine the text classification results corresponding to each preset communication information. The text classification results can be used to indicate the insurance category consulted by the customer, the insurance demand category of the customer, the insurance claim category of the customer, etc., which are not limited here. The computer device can provide the text classification results corresponding to the preset communication information determined by the text classification model to the customer service, and the customer service can understand the customer's needs for customer service when viewing the text classification results, so as to better provide the customer with corresponding customer service.

[0086] In this way, when the computer device determines the text classification results corresponding to the preset communication information based on the target dialogue text based on the text classification model, the text classification results can be provided to the customer service for reference, which is conducive to improving the convenience and accuracy of text classification of the preset communication information, thereby helping to improve the customer's consulting experience for customer service.

[0087] The text classification method for customer service provided in the above embodiment obtains preset communication information corresponding to the customer service; the preset communication information includes multiple preset dialogue texts; based on a first preset function, a first weight of the preset dialogue text is determined according to the dialogue sequence number of the preset dialogue text in the preset communication information; based on a second preset function, a second weight of the preset dialogue text is determined according to the number of words in the preset dialogue text; based on the first weight and the second weight of each of the multiple preset dialogue texts, a target dialogue text is determined from the multiple preset dialogue texts; based on a text classification model, a text classification result corresponding to the preset communication information is determined according to the target dialogue text, so as to improve the convenience of text classification of the preset communication information and improve the accuracy of text classification of the preset communication information.

[0088] Based on the setting of the first preset function, the computer device can determine the first weight of the preset dialogue text in the preset communication information. Based on the setting of the second preset function, the computer device can determine the second weight of the preset dialogue text in the preset communication information. Accordingly, the computer device can combine the first weight and the second weight of the preset dialogue text to screen the target dialogue text from the multiple preset dialogue texts included in the preset communication information to reduce the number of text words input into the text classification model, thereby improving the convenience of the text classification model in determining the text classification result corresponding to the preset communication information, and improving the accuracy of the text classification model in determining the text classification result corresponding to the preset communication information. For example, it can be applied to the financial industry, such as insurance business. For the insurance business, the first preset function and the second preset function can be combined to determine the target dialogue text corresponding to the preset communication information. Accordingly, the text classification result corresponding to the preset communication information can be determined based on the text classification model and the target dialogue text. Based on this, the text classification result corresponding to each preset communication information of the same customer can be determined, so that the customer service can clarify the insurance needs of the customer, thereby providing better customer service to the customer.

[0089] See also Figure 4 , Figure 4It is a flow chart of a training method for a text classification model provided by an embodiment of the present application. It should be noted that the training method for a text classification model provided by an embodiment of the present application can be used for a computer device, and of course can also be used for a server. For example, the server can obtain a training sample set from a computer device, process the training sample set according to the training method of the text classification model, and obtain model optimization parameters for the text classification model. And according to the model optimization parameters, adjust the model parameters of the text classification model to obtain an optimized text classification model. Exemplarily, the server can, for example, send the optimized text classification model to a computer device, so that when the computer device obtains the preset communication information corresponding to the customer service, it can determine the text classification result corresponding to the preset communication information through the optimized text classification model; of course, it is not limited to this, and no limitation is made here.

[0090] In specific implementation, computer devices include but are not limited to: any one of mobile phones, tablet computers, laptop computers, and desktop computers; the server can be a single server or a server cluster, or a cloud server that provides cloud computing services.

[0091] like Figure 4 As shown, the training method of the text classification model includes steps S201 to S207.

[0092] Step S201: Acquire a training sample set, where the training sample set includes a plurality of preset communication information corresponding to customer service and a text classification result label corresponding to each preset communication information; the preset communication information includes a plurality of preset dialogue texts.

[0093] For example, when training a text classification model, a training sample set may be obtained. The training sample set may include multiple preset communication information. The multiple preset communication information may include different preset communication information for the same customer, or may include different preset communication information for different customers, without limitation. Each preset communication information in the training sample set may be provided with a corresponding text classification result label. The training sample set may be used for subsequent training of the text classification model.

[0094] In some implementations, when the preset communication information is obtained, the text classification result label corresponding to the preset communication information may be determined by a preset annotation method, which is not limited here.

[0095] In this way, when the preset communication information and the text classification label corresponding to the preset communication information are determined, the text classification model can be trained subsequently.

[0096] Step S202: Based on a first preset function, a first weight of the preset dialogue text is determined according to the dialogue sequence number of the preset dialogue text in the preset communication information.

[0097] For example, when the computer device is training the text classification model, it is necessary to screen the multiple preset dialogue texts included in the preset communication information to avoid the total number of words in the preset communication information being too many, thereby affecting the convenience of the text classification model for classifying the preset communication information and the accuracy of the text classification. Based on this, the computer device can determine the first weight of the preset dialogue text based on the first preset function and the dialogue sequence number of the preset dialogue text in the preset communication information.

[0098] The first weight of the preset dialogue text can be used by the computer device to select a target dialogue text from a plurality of preset dialogue texts included in the preset communication information for subsequent training of a text classification model.

[0099] In this way, when the first weight of the preset dialogue text is determined, the computer device can select the target dialogue text according to the first weight of the preset dialogue text for subsequent training of the text classification model, which is conducive to improving the training effect of the text classification model.

[0100] Step S203: Based on the second preset function and according to the number of words in the preset dialogue text, determine a second weight of the preset dialogue text.

[0101] For example, when the computer device is training the text classification model, it is necessary to screen the multiple preset dialogue texts included in the preset communication information to avoid the total number of words in the preset communication information being too many, thereby affecting the convenience and accuracy of the text classification model for classifying the preset communication information. Based on this, the computer device can determine the second weight of the preset dialogue text based on the second preset function and the number of words in the preset dialogue text.

[0102] The second weight of the preset dialogue text can be used by the computer device to select a target dialogue text from multiple preset dialogue texts included in the preset communication information in combination with the first weight of the preset dialogue text for subsequent training of the text classification model.

[0103] In this way, when determining the second weight of the preset dialogue text, the computer device can select the target dialogue text based on the first weight and the second weight of the preset dialogue text for subsequent training of the text classification model, which is conducive to improving the subsequent training effect of the text classification model.

[0104] Step S204: determining a target dialogue text from the plurality of preset dialogue texts according to the first weights and the second weights of the plurality of preset dialogue texts.

[0105] For example, when determining the first weight and the second weight of the preset dialogue text, the computer device can determine the target dialogue text from the plurality of preset dialogue texts. Accordingly, the target dialogue text can be used as a training basis for the text classification model to determine the text classification result corresponding to the preset communication information.

[0106] Step S205: Based on the text classification model, determine the text classification result corresponding to the preset communication information according to the target dialogue text.

[0107] For example, when training a text classification model, it is necessary to learn how to determine the text classification result corresponding to the preset communication information. Based on this, the computer device can input the target conversation text into the text classification model to determine the text classification result corresponding to the preset communication information based on the text classification model and the target conversation text.

[0108] In this way, when the text classification result corresponding to the preset communication information is determined, the text classification model can optimize the model parameters of the text classification model by comprehensively considering the text classification result corresponding to the preset communication information to improve the training effect of the text classification model.

[0109] Step S206: Determine the model optimization parameters of the text classification model according to the text classification result and the text classification result label.

[0110] For example, the text classification result determined by the text classification model is equivalent to the predicted result of the text classification model for the text classification result corresponding to the preset communication information. The text classification label corresponding to the preset communication information is equivalent to the actual result of the text classification model for the text classification result corresponding to the preset communication information. According to the text classification result and the text classification result label, the loss value between the actual result and the predicted result of the text classification model when determining the text classification result corresponding to the preset communication information can be determined.

[0111] The text classification model can determine the model optimization parameters of the text classification model according to the loss value. The model optimization parameters can be used to subsequently adjust the model parameters of the text classification model so that the text classification model can more accurately move the predicted results of the text classification results corresponding to the preset communication information to the direction of the actual results, thereby achieving the purpose of training.

[0112] Step S207: adjusting the model parameters of the text classification model according to the model optimization parameters.

[0113] For example, the text classification model can adjust the model parameters of the text classification model according to the model optimization parameters. For example, when the text classification model includes at least one sub-model, the text classification model can adjust the model parameters of at least one sub-model according to the model optimization parameters, which is not limited here.

[0114] By adjusting the model parameters of the text classification model, the text classification model can more accurately bring the predicted results of the text classification results corresponding to the preset communication information closer to the actual results, so as to achieve the purpose of training, which is conducive to improving the accuracy of the text classification model in determining the text classification results corresponding to the preset communication information.

[0115] The training method of the text classification model provided in the above embodiment is to obtain a training sample set, the training sample set includes multiple preset communication information corresponding to customer service and text classification result labels corresponding to each preset communication information; based on a first preset function, according to the dialogue sequence number of the preset dialogue text in the preset communication information, determine the first weight of the preset dialogue text; based on a second preset function, according to the number of words in the preset dialogue text, determine the second weight of the preset dialogue text; according to the first weight and the second weight of each of the multiple preset dialogue texts, determine the target dialogue text from the multiple preset dialogue texts; based on the text classification model, according to the target dialogue text, determine the text classification result corresponding to the preset communication information; according to the text classification result and the text classification result label, determine the model optimization parameters of the text classification model; according to the model optimization parameters, adjust the model parameters of the text classification model to improve the accuracy of the text classification model in determining the text classification result corresponding to the preset communication information, thereby improving the training effect of the text classification model. The text classification model can be subsequently applied to businesses related to customer service, such as insurance business, which is conducive to improving the convenience of text classification of preset communication information and improving the accuracy of text classification of preset communication information. For example, when processing related insurance business, if it is necessary to perform text classification processing on the preset communication information, the preset communication information can be processed accordingly through the text classification model to obtain the text classification results corresponding to the preset communication information, so as to improve the convenience of text classification of the preset communication information and improve the accuracy of text classification of the preset communication information. Accordingly, in the process of determining the text classification results corresponding to the preset communication information, it is not necessary to consume a lot of manpower and time, which is conducive to improving the processing efficiency of the insurance business.

[0116] See also Figure 5 , Figure 5 This is a schematic block diagram of a text classification device for customer service provided in an embodiment of the present application. The text classification device can be configured in a server or electronic device to execute the aforementioned text classification method for customer service.

[0117] like Figure 5 As shown, the text classification device includes: an acquisition module 110 , a first weight determination module 120 , a second weight determination module 130 , a target dialogue determination module 140 and a text classification module 150 .

[0118] The acquisition module 110 is used to acquire preset communication information corresponding to the customer service; the preset communication information includes a plurality of preset dialogue texts.

[0119] The first weight determination module 120 is used to determine a first weight of the preset dialogue text according to the dialogue sequence number of the preset dialogue text in the preset communication information based on a first preset function.

[0120] The second weight determination module 130 is used to determine a second weight of the preset dialogue text based on a second preset function and according to the number of words in the preset dialogue text.

[0121] The target dialogue determination module 140 is used to determine a target dialogue text from a plurality of the preset dialogue texts according to the first weight and the second weight of each of the plurality of the preset dialogue texts.

[0122] The text classification module 150 is used to determine the text classification result corresponding to the preset communication information according to the target dialogue text based on the text classification model.

[0123] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0124] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0125] Exemplarily, the above method and apparatus may be implemented in the form of a computer program, which may be run on a computer device.

[0126] See also Figure 6 , Figure 6 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server or an electronic device.

[0127] like Figure 6 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.

[0128] The storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, can cause the processor to execute any text classification method for customer service, or cause the processor to execute any training method for a text classification model.

[0129] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0130] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any text classification method for customer service, or execute any text classification model training method.

[0131] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0132] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0133] In one embodiment, the processor is used to execute a computer program and implement the following steps when executing the computer program:

[0134] Obtaining preset communication information corresponding to the customer service; the preset communication information includes a plurality of preset dialogue texts;

[0135] Based on a first preset function, determining a first weight of the preset dialogue text according to the dialogue sequence number of the preset dialogue text in the preset communication information;

[0136] Based on a second preset function, determining a second weight of the preset dialogue text according to the number of words in the preset dialogue text;

[0137] Determining a target dialogue text from the plurality of preset dialogue texts according to the first weights and the second weights of the plurality of preset dialogue texts;

[0138] Based on the text classification model, a text classification result corresponding to the preset communication information is determined according to the target dialogue text.

[0139] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and brevity of description, the specific working process of the text classification describing customer service above can refer to the corresponding process in the aforementioned customer service text classification method embodiment, and will not be repeated here.

[0140] In another embodiment, the processor is used to execute a computer program and implement the following steps when executing the computer program:

[0141] Acquire a training sample set, wherein the training sample set includes a plurality of preset communication information corresponding to the customer service and a text classification result label corresponding to each of the preset communication information; the preset communication information includes a plurality of preset dialogue texts;

[0142] Based on a first preset function, determining a first weight of the preset dialogue text according to the dialogue sequence number of the preset dialogue text in the preset communication information;

[0143] Based on a second preset function, determining a second weight of the preset dialogue text according to the number of words in the preset dialogue text;

[0144] Determining a target dialogue text from the plurality of preset dialogue texts according to the first weights and the second weights of the plurality of preset dialogue texts;

[0145] Based on the text classification model, determining the text classification result corresponding to the preset communication information according to the target dialogue text;

[0146] Determining model optimization parameters of the text classification model according to the text classification result and the text classification result label;

[0147] According to the model optimization parameters, the model parameters of the text classification model are adjusted.

[0148] It should be noted that technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working process of the training of the text classification model described above can refer to the corresponding process in the aforementioned text classification model training method embodiment, and will not be repeated here.

[0149] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The method implemented when the computer program is executed by a processor can refer to the various embodiments of the text classification method for customer service of the present application, or refer to the various embodiments of the training method for the text classification model of the present application.

[0150] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0151] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0152] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0153] The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A text classification method for customer service, characterized in that: include: Obtain preset communication information corresponding to customer service; The preset communication information includes a plurality of preset dialogue texts; Based on a first preset function, determining a first weight of the preset dialogue text according to the dialogue sequence number of the preset dialogue text in the preset communication information; Based on a second preset function, determining a second weight of the preset dialogue text according to the number of words in the preset dialogue text; Determining a target dialogue text from the plurality of preset dialogue texts according to the first weights and the second weights of the plurality of preset dialogue texts; Based on the text classification model, a text classification result corresponding to the preset communication information is determined according to the target dialogue text.

2. The text classification method according to claim 1, characterized in that: The determining, based on the first preset function and according to the dialogue sequence number of the preset dialogue text in the preset communication information, a first weight of the preset dialogue text includes: The conversation sequence number and the total number of conversations corresponding to the preset communication information are substituted into the first preset function to obtain a first weight of the preset conversation text.

3. The text classification method according to claim 1, characterized in that: The determining, based on the second preset function and according to the number of words in the preset dialogue text, a second weight of the preset dialogue text comprises: Determine the word count difference between the word count and a preset word count threshold; The minimum value between the word count difference and the preset word count threshold is substituted into a second preset function to obtain a second weight of the preset dialogue text.

4. The text classification method according to any one of claims 1 to 3, characterized in that: The step of determining the target dialogue text from the plurality of preset dialogue texts according to the first weights and the second weights of the plurality of preset dialogue texts comprises: Determining a target weight of the preset dialogue text according to the first weight and the second weight of the preset dialogue text; A target dialogue text is selected from the plurality of preset dialogue texts in descending order of target weights; wherein the total number of words corresponding to all the target dialogue texts is less than or equal to a preset word count threshold.

5. The text classification method according to claim 4, characterized in that: After selecting the target dialogue text from the plurality of preset dialogue texts in order of target weights from large to small, the method further includes: According to the respective dialogue ordinal numbers of each of the target dialogue texts, the target dialogue texts are concatenated to obtain processed target dialogue texts; The method of determining the text classification result corresponding to the preset communication information based on the target dialogue text based on the text classification model includes: The processed target dialogue text is input into a text classification model to obtain a text classification result corresponding to the preset communication information.

6. A text classification method according to any one of claims 1 to 3, characterized in that: After obtaining the preset communication information, the method further includes: When there is preset interference text in the preset dialogue text in the preset communication information, the preset interference text is removed to obtain a processed preset dialogue text.

7. A training method for a text classification model, characterized in that: The training method comprises: Acquire a training sample set, wherein the training sample set includes a plurality of preset communication information corresponding to the customer service and a text classification result label corresponding to each of the preset communication information; the preset communication information includes a plurality of preset dialogue texts; Based on a first preset function, determining a first weight of the preset dialogue text according to the dialogue sequence number of the preset dialogue text in the preset communication information; Based on a second preset function, determining a second weight of the preset dialogue text according to the number of words in the preset dialogue text; Determining a target dialogue text from the plurality of preset dialogue texts according to the first weights and the second weights of the plurality of preset dialogue texts; Based on the text classification model, determining the text classification result corresponding to the preset communication information according to the target dialogue text; Determining model optimization parameters of the text classification model according to the text classification result and the text classification result label; According to the model optimization parameters, the model parameters of the text classification model are adjusted.

8. A text classification device for customer service, characterized in that: The text classification device comprises: An acquisition module, used to acquire preset communication information corresponding to the customer service; the preset communication information includes a plurality of preset dialogue texts; A first weight determination module, configured to determine a first weight of the preset dialogue text according to a dialogue sequence number of the preset dialogue text in the preset communication information based on a first preset function; A second weight determination module, configured to determine a second weight of the preset dialogue text according to the number of words in the preset dialogue text based on a second preset function; A target dialogue determination module, configured to determine a target dialogue text from a plurality of the preset dialogue texts according to the first weight and the second weight of each of the plurality of the preset dialogue texts; The text classification module is used to determine the text classification result corresponding to the preset communication information according to the target dialogue text based on the text classification model.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the text classification method for customer service as described in any one of claims 1 to 6, or implement the training method for the text classification model as described in claim 7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the text classification method for customer service as described in any one of claims 1 to 6 are implemented, or the training method of the text classification model as described in claim 7 is implemented.

Citation Information

Patent Citations

  • Text recognition method based on position information and related device

    CN113590832A

  • Multi-intention classification model training method and device, electronic equipment and storage medium

    CN115186094A

  • Dialogue data processing method and device, electronic equipment and readable storage medium

    CN117473066A

  • Text classification method and device, electronic equipment and storage medium

    CN117493553A

  • Customer service dialogue text root cause analysis method and device

    CN118035391A