Training and classification methods, systems, equipment, and media for conversational text classification models
By using the time information of the pre-training corpus to determine the sample length in the training of the conversation text classification model and reducing noise interference, the redundancy problem in model training is solved, the accuracy and robustness of the model are improved, and the efficiency of customer service response is improved.
Patent Information
- Application Number
- CN202210124235.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-10
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-02-10
AI Technical Summary
In the existing technology, there is noise interference in the training process of the conversation text classification model, which leads to insufficient model robustness and accuracy. This is mainly due to the redundancy of the training text and the differences in customer service operating habits.
By obtaining pre-training corpus, using the time information when the preset instruction is triggered to determine the sample length, appropriately cutting or expanding the corpus, constructing training samples, reducing noise interference, and improving model robustness.
It improves the training accuracy and robustness of the conversation text classification model, reduces noise interference during model training, and improves customer service response efficiency.
Smart Images

Figure CN114444612B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of dialogue text classification, and in particular to a training and classification method, system, device, and medium for a dialogue text classification model. Background Art
[0002] In the existing technology, when answering a customer's call, customer service usually needs to understand the customer's call intention, such as complaining about hotel hygiene or sound insulation, or canceling a hotel room order, and click on the corresponding customer demand category in the enterprise system, such as by clicking on "Create Event" and other instructions to trigger it. The system then displays the corresponding response script and other information to the customer service to help the customer service improve the efficiency of answering calls.
[0003] However, the entire process described above requires customer service to manually trigger commands in order to display the corresponding sales pitch. This can cause delays, adversely affecting response efficiency. Therefore, this application utilizes a conversational text classification model to directly classify the text generated by converting call audio, determine the corresponding customer demand category, and then display the corresponding sales pitch. However, in the prior art, the training text used to train the above-mentioned conversational text classification model contains varying degrees of redundancy, which is not conducive to ensuring the robustness of the model.
[0004] Specifically, the training text is constructed from historical customer service response data. The timing of triggering the request classification command varies from person to person, and different customer service staff often have different operating habits: some customers click the button immediately after the conversation can determine the request type, while others prefer to click after the conversation ends. Therefore, the conversation text content used to train the model often contains varying degrees of redundancy, which constitutes noise interference to the model's judgment. However, if the current sentence and the preceding text are directly intercepted based on the message ID containing the key information corresponding to the request as a sample, this sample construction method will affect the model training effect and cannot guarantee accuracy. Summary of the Invention
[0005] In response to the problems in the prior art, the purpose of the present invention is to provide a method, system, device, and medium for training and classifying a conversation text classification model to solve the problem of noise interference in the training of the conversation text classification model in the prior art.
[0006] To achieve the above object, the present invention provides a method for training a conversation text classification model, the method comprising the following steps:
[0007] S110, obtaining pre-training corpus;
[0008] S120, obtaining time information when a preset instruction is triggered based on the pre-trained corpus;
[0009] S130, determining a sample length corresponding to each piece of the pre-training corpus based on the time information;
[0010] S140, extracting training subsamples from each of the pre-training corpus according to the sample length and the time information; and
[0011] S150: Construct a training sample based on the training sub-sample, and train a preset text classification model based on the training sample.
[0012] Optionally, step S150 includes:
[0013] Identifying entities in the training samples;
[0014] Determining an entity type corresponding to the entity, and replacing the entity in the training sample with the corresponding entity type;
[0015] Based on the replaced training samples, train the preset text classification model.
[0016] Optionally, step S120 includes:
[0017] Based on the pre-trained corpus, obtaining the process ratio information when the preset instruction is triggered; the process ratio information is the ratio of the order creation time to the phone call duration; the order creation time is the time taken from the phone call being connected to the triggering of the preset instruction;
[0018] Step S130 includes:
[0019] When the process ratio information is greater than or equal to a first preset threshold, the sample length is the length of the pre-training corpus;
[0020] When the process ratio information is less than a first preset threshold, the sample length is the message ID where the characteristic information is located.
[0021] Optionally, step S130 includes:
[0022] When the process ratio information is less than a first preset threshold and the order creation time is less than a second preset threshold, the sample length is the message ID where the characteristic information is located;
[0023] When the process ratio information is less than a first preset threshold and the order creation time is greater than or equal to a second preset threshold, the sample length is the sum of the message ID where the feature information is located and the first random number.
[0024] Optionally, step S130 includes:
[0025] Dividing the pre-training corpus that meets the preset conditions into a first part and a second part; the preset conditions are: the process ratio information is less than a first preset threshold and the order creation time is less than a second preset threshold;
[0026] The sample length corresponding to the pre-training corpus of the first part is the message ID where the feature information is located;
[0027] The sample length corresponding to the pre-training corpus of the second part is the sum of the message ID where the feature information is located and a second random number; the first random number is greater than the second random number.
[0028] Optionally, step S140 includes:
[0029] Performing VAD segmentation on each of the pre-training corpus to obtain multiple text segments contained in each of the pre-training corpus;
[0030] The corpus corresponding to the first N text segments in each of the pre-training corpus is used as a training subsample; N is equal to the sample length.
[0031] Optionally, step S140 includes:
[0032] Performing VAD segmentation on each of the pre-training corpus to obtain multiple text segments contained in each of the pre-training corpus;
[0033] Each of the pre-training corpus is cut off from the Mth text segment, and the first random number of text segments are randomly selected from the M+1th text segment to the last text segment, and the first M text segments and the first random number of text segments are used to construct a training subsample; M is equal to the message ID where the feature information is located.
[0034] Optionally, step S130 includes:
[0035] The pre-training corpus that meets the preset condition is equally divided into the first part and the second part.
[0036] The present invention also provides a method for classifying conversation text, which applies a preset text classification model to classify the text corresponding to the call audio, and the preset text classification model is trained using any of the training methods of the above-mentioned conversation text classification models.
[0037] The present invention also provides a training system for a conversation text classification model, for implementing the training method for the conversation text classification model, the system comprising:
[0038] Pre-training corpus acquisition module, obtains pre-training corpus;
[0039] A time information acquisition module, which acquires the time information when the preset instruction is triggered based on the pre-trained corpus;
[0040] A sample length determination module, which determines the sample length corresponding to each of the pre-training corpus according to the time information;
[0041] a training subsample extraction module, extracting training subsamples from each of the pre-training corpus according to the sample length and the time information; and
[0042] The training sample generation and training module constructs a training sample based on the training sub-sample, and trains a preset text classification model based on the training sample.
[0043] The present invention also provides a training device for a dialogue text classification model, comprising:
[0044] processor;
[0045] a memory storing an executable program of the processor;
[0046] The processor is configured to execute the steps of any one of the above-mentioned methods for training a conversation text classification model by executing the executable program.
[0047] The present invention also provides a computer-readable storage medium for storing a program, which, when executed by a processor, implements the steps of any of the above-mentioned training methods for a conversation text classification model.
[0048] Compared with the prior art, the present invention has the following advantages and outstanding effects:
[0049] The training and classification method, system, device, and medium of the dialogue text classification model provided by the present invention specifically consider the time information when the preset instruction in the pre-training corpus is triggered, and determine the sample length corresponding to each pre-training corpus based on the time information; in addition, for some corpora, more subsequent content is appropriately intercepted to simulate the sample noise redundancy environment caused by different instruction triggering timing online, which is beneficial to improving the robustness of the model after training. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Other features, objects and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0051] Figure 1 A schematic diagram of a training method for a conversation text classification model disclosed in one embodiment of the present invention;
[0052] Figure 2This is a schematic diagram of step S150 in a method for training a conversation text classification model disclosed in one embodiment of the present invention;
[0053] Figure 3 A schematic diagram of a method for training a conversation text classification model disclosed in another embodiment of the present invention;
[0054] Figure 4 A schematic diagram of a method for training a conversation text classification model disclosed in another embodiment of the present invention;
[0055] Figure 5 A schematic diagram of a method for training a conversation text classification model disclosed in another embodiment of the present invention;
[0056] Figure 6 A schematic diagram of the structure of a training system for a conversation text classification model disclosed in one embodiment of the present invention;
[0057] Figure 7 A schematic diagram of the structure of a training device for a conversation text classification model disclosed in one embodiment of the present invention;
[0058] Figure 8 A schematic diagram of the structure of a computer-readable storage medium disclosed in one embodiment of the present invention. DETAILED DESCRIPTION
[0059] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Identical reference numerals in the figures represent identical or similar structures, and thus a repeated description thereof will be omitted.
[0060] like Figure 1 As shown, an embodiment of the present invention discloses a method for training a conversation text classification model, the method comprising the following steps:
[0061] S110: Obtain pre-training corpus. Specifically, this involves obtaining all historical customer service call data. This historical call data represents phone calls between customer service and users. For example, a user might communicate with customer service regarding a specific issue (e.g., a complaint about hotel hygiene). This historical call data represents the call data after the customer service and user are connected, i.e., the ringing duration has been removed.
[0062] S120, based on the above-mentioned pre-trained corpus, obtain the time information when the preset instruction is triggered. Specifically, the preset instruction trigger can be the time when the key information appears, or it can be triggered when the customer service clicks the preset instruction; for example, it is triggered when the customer service manually clicks "Create Event" in the work system. The time information when the preset instruction is triggered can be obtained by manually marking the preset instruction trigger action in the pre-trained corpus, or it can be obtained by the system automatically identifying the preset instruction trigger action. The above-mentioned time information may include order creation time and / or process ratio information. The process ratio information is the ratio of order creation time to the length of the phone call. The order creation time is the time taken from the call being connected to the triggering of the preset instruction.
[0063] S130, based on the above time information, determine the sample length corresponding to each of the above pre-training corpus. In specific implementation, it can be based on the process ratio information and order creation time in the time information. When the process is relatively large, it means that the customer service has not triggered the preset instruction in time. For example, when the customer service clicks to create an order, the conversation is almost over. At this time, the complete telephone call is used for modeling. This can avoid the problem of directly intercepting the current sentence and the previous text as samples based on the message ID where the key information corresponding to the request is located, which affects the model training effect and the accuracy cannot be guaranteed. In this case, the sample length is equal to the total number of text segments of the pre-training corpus. The method for determining the text segment can refer to the VAD (Voice Activity Detection) segmentation implementation of the prior art.
[0064] If the process is relatively small and the order creation time is short, it indicates that the customer service representative triggered the preset instructions in a timely manner. In this case, it can be considered that there is no redundant information, or the redundant information is minimal. You can directly truncate the text segment containing the key information and use the first text segment in the pre-training corpus to build the model. This avoids using the entire pre-training corpus for modeling, which would result in multiple redundant messages in the training text, causing noise interference and affecting the model's robustness.
[0065] When a process is relatively small and order creation takes a long time, it indicates that customer service has not triggered the preset instructions in a timely manner, resulting in redundant information. In this case, if the entire pre-training corpus is used for modeling, the training text will contain a large amount of redundant information, which is not conducive to ensuring the robustness of model training. If only the text segment containing the key information and the preceding text are intercepted as samples, the model training effect will be affected and accuracy cannot be guaranteed. Therefore, after intercepting the text segment containing the key information, a random number of subsequent text segments are added, such as a three-sentence text segment after the text segment containing the key information. The length of the resulting training subsample is less than the text length of the pre-training corpus. In this case, the sample length is equal to the sum of the message ID containing the key information and the aforementioned random number. This ensures the accuracy and robustness of model training in this situation.
[0066] S140, extracting training subsamples from each of the pre-training corpus based on the sample length and the time information. In one embodiment of the present application, step S140 includes:
[0067] Perform VAD segmentation on each of the above pre-training corpus to obtain multiple text segments contained in each of the above pre-training corpus.
[0068] The corpus corresponding to the first N text segments in each of the above pre-training corpora is used as the training subsample. Where N is equal to the sample length. In other words, the text segment containing the key information and the above text are used as the training subsample. The extraction of training subsamples in this application is not limited to this.
[0069] And S150, constructing a training sample based on the training subsample, and training a preset text classification model based on the training sample. The specific training process can be implemented with reference to existing technologies and will not be described in detail in this application. The preset text classification model can be implemented using a text classification model in the existing technology, and this application does not limit this.
[0070] In another embodiment of the present application, another training method for a dialogue text classification model is disclosed. Figure 2 As shown in the above Figure 1 Based on the corresponding embodiment, step S150 includes:
[0071] S151: Construct a training sample based on the above training sub-samples.
[0072] S152: Identify entities in the training samples.
[0073] S153, determining the entity type corresponding to the above entity, and replacing the above entity in the above training sample with the corresponding entity type.
[0074] S154: Training a preset text classification model based on the replaced training samples.
[0075] In specific implementations, a training sample can be constructed using a collection of all training subsamples. In step S152, a NER (Named Entity Recognition) model can be used for entity recognition. After recognition, the specific entity value can be replaced with an abstract entity type. This can prevent different entity values belonging to the same entity type from adversely affecting the classification probability of the classification model during subsequent training, thereby improving the robustness of the model.
[0076] Because existing customer service phone call scenarios often include entities such as check-in date, check-out date, room type, and name, only the grammatical and syntactic features of these entities have an impact on model classification, but the specific values have no impact on model classification. Therefore, there is redundancy in the entity information. For example, if the two sentences "I checked in on March 22nd" and "I checked in on March 11th" are classified as the same event type if the criterion for classifying events is whether or not a check-in occurred, the two sentences are considered the same event type, and the two date entities "March 22nd" and "March 11th" have no impact on the classification of the category. However, when training a model, we often use the first sentence to train the model and the second sentence to test the model. Because the two samples have different literals, we cannot obtain exactly the same results. However, if the two date entities are replaced with the word "date" from the beginning, the interference of the date value can be eliminated, improving the robustness of the model.
[0077] In this embodiment, for example, for the entities: "I checked in on March 22" and "I checked in on March 11", both are processed as "I checked in on March 22". <checkindate>Check-in", and then use the classification model to classify.
[0078] In another embodiment of the present application, another training method for a dialogue text classification model is disclosed. Figure 3 As shown in the above Figure 1 On the basis of the corresponding embodiment, step S120 is replaced by step S121:
[0079] Based on the pre-trained corpus, obtain the progress ratio information when the preset command is triggered. The progress ratio information is the ratio of the order creation time to the phone call duration. The order creation time is the time from the call connection to the triggering of the preset command.
[0080] Step S130 is replaced by step S131:
[0081] When the process ratio information is greater than or equal to a first preset threshold, the sample length is the length of the pre-training corpus. When the process ratio information is less than the first preset threshold, the sample length is the message ID containing the feature information.
[0082] Specifically, when the process is relatively large, it means that the customer service has not triggered the preset instructions in time. For example, when the customer service clicks to create an order, the conversation is almost over. At this time, the complete phone call is used for modeling. This can avoid the problem of directly intercepting the current sentence and the previous text as samples based on the message ID where the key information corresponding to the request is located, which affects the model training effect and the accuracy cannot be guaranteed. When the process is relatively small, it is directly cut from the text segment where the key information is located, and the text segment where the key information is located and the previous text are used as samples for modeling. The above-mentioned key information is the feature information. The above-mentioned message ID is the ordinal number corresponding to the text segment where the key information is located after the pre-training corpus is segmented by VAD to form multiple text segments. Among them, the multiple text segment sequences formed after the above-mentioned VAD segmentation start counting from 1.
[0083] The above technical solution of this embodiment can avoid the problem of using the full text of telephone calls for modeling all pre-training corpus, or only intercepting the text fragments containing key information and the above text as samples, which cannot balance the robustness and accuracy of the training effect.
[0084] In a specific implementation, the first preset threshold may be set to 0.95, but the present application is not limited thereto.
[0085] In another embodiment of the present application, another training method for a dialogue text classification model is disclosed. Figure 4 As shown in the above Figure 3 On the basis of the corresponding embodiment, step S131 is replaced by step S132:
[0086] When the process ratio information is greater than or equal to a first preset threshold, the sample length is the length of the pre-training corpus.
[0087] When the process ratio information is less than a first preset threshold and the order creation time is less than a second preset threshold, the sample length is the message ID where the characteristic information is located.
[0088] When the process ratio information is less than a first preset threshold and the order creation time is greater than or equal to a second preset threshold, the sample length is the sum of the message ID where the feature information is located and the first random number.
[0089] Specifically, when the above-mentioned process ratio information is less than the first preset threshold and the above-mentioned order creation time is less than the second preset threshold, the text segment where the key information is located is directly cut off, and the text segment where the key information is located and the above text segment are used as samples for modeling. When the above-mentioned process ratio information is less than the first preset threshold and the above-mentioned order creation time is greater than or equal to the second preset threshold, after cutting off the text segment where the key information is located, a subsequent text segment of a first random number is expanded, and then the text segment where the key information is located and the above text segment, as well as the subsequent randomly expanded text segments, are used as samples for modeling. In this way, the sample noise redundancy environment caused by the different timing of instruction triggering online can be simulated, which is conducive to improving the robustness of the model after training.
[0090] In a specific implementation, the second preset threshold may be set to 75 seconds, but this application is not limited thereto.
[0091] In another embodiment of the present application, another method for training a dialogue text classification model is disclosed. Figure 4 Based on the corresponding embodiment, step S132 further includes:
[0092] The pre-training corpus that meets the preset conditions is divided into a first part and a second part. The preset conditions are: the process ratio information is less than a first preset threshold and the order creation time is less than a second preset threshold;
[0093] The sample length corresponding to the pre-training corpus in the first part is the message ID where the feature information is located.
[0094] The sample length corresponding to the pre-training corpus of the second part is the sum of the message ID where the feature information is located and the second random number. The first random number is greater than the second random number.
[0095] Specifically, for the second part of the pre-training corpus, after extracting the text fragment containing the key information, a subsequent text fragment with a second random number is added. This second part is then modeled using the text fragment containing the key information, the preceding text, and the subsequent randomly expanded text fragments as samples. The remaining parts are modeled using only the extracted text fragments. This not only avoids noise interference during model training, but also simulates the sample noise redundancy caused by inconsistent command triggering timing online, which helps improve the robustness of the model after training.
[0096] This application is exemplified below:
[0097] After statistical analysis of the pre-training corpus, it is found that the pre-training corpus can be divided into three categories, referring to Table 1 below:
[0098] Table 1 Statistical distribution of pre-training corpus
[0099] category Conversation volume Proportion Remark Process ratio 0.95 and above 5366 35.07% full text The process ratio is below 0.95 and the order creation time is below 75 seconds. 8570 56.01% Create in time The process ratio is below 0.95, and the order creation time is 75 seconds or more. 1365 8.92% Not created in time
[0100] Specifically, conversations with a progress ratio greater than 0.95 have already concluded by the time a deal is created. In other words, conversations with a progress ratio greater than 0.95 require modeling using the full conversation context. For conversations with a progress ratio less than 0.95, some calls may be extremely long. Even if the progress ratio is relatively short, if the deal creation time is long, this is considered to contain redundant information. Only when both the progress ratio and deal creation time are relatively low is it considered to contain no redundant information, or minimal redundant information. Statistics show that when the progress ratio is less than 0.95 and the deal creation time is less than 75 seconds, the deal is created promptly and has minimal redundant information. When the progress ratio is less than 0.95 and the deal creation time is greater than 75 seconds, the deal is created untimely and contains redundant information.
[0101] In the interception strategy determined in this embodiment, for the 35.07% of pre-training corpora with a process ratio greater than or equal to 0.95 in Table 1 above, the complete pre-training corpus is used for modeling. For the 56.01% of pre-training corpora with a process ratio less than 0.95 and a creation time less than 75s in Table 1 above, half of the corpus (i.e., 50% of the corpus) is modeled using the text segment where the key information is located and the preceding text, and the other half of the corpus (i.e., the remaining 50% of the corpus) is modeled using not only the text segment where the key information is located and the preceding text, but also a second random number of subsequent text segments is expanded from the subsequent text segments, such as randomly expanding 0-5 sentences, and then the second part uses the text segment where the key information is located and the preceding text, as well as the subsequent randomly expanded text segments as samples for modeling.
[0102] For the 8.92% of the pre-training corpus in Table 1 above with a process ratio less than 0.95 and an order creation time greater than or equal to 75s, not only the text segment containing the key information and the previous context are used, but also a first random number of subsequent text segments are expanded from the subsequent text segments, such as randomly expanding 6-15 sentences. Then, the second part uses the text segment containing the key information and the previous context, as well as the subsequent randomly expanded text segments, as samples for modeling.
[0103] In another embodiment of the present application, another training method for a dialogue text classification model is disclosed. Figure 5 As shown in the above Figure 1 On the basis of the corresponding embodiment, step S140 is replaced by step S141:
[0104] Perform VAD segmentation on each of the pre-training corpora to obtain multiple text segments contained in each of the pre-training corpora. Truncate each of the pre-training corpora starting at the Mth text segment, and randomly select the first random number of text segments from the M+1th text segment to the last text segment. Use the first M text segments and the first random number of text segments to construct a training subsample. M is equal to the message ID containing the feature information.
[0105] This embodiment does not adopt the conventional modeling method of using the text segment where the key information is located and the previous text, but randomly selects multiple text segments from the subsequent segments of the text segment where the key information is located, and uses them as samples for modeling. This can better simulate the online sample noise redundancy environment caused by different instruction triggering timing, which is conducive to improving the robustness of the model after training.
[0106] In another embodiment of the present application, another method for training a dialogue text classification model is disclosed. Figure 4 Based on the corresponding embodiment, step S130 includes:
[0107] The pre-training corpus that meets the above preset conditions is divided equally into the above first part and the above second part. The above preset conditions are: the above process ratio information is less than a first preset threshold and the above order creation time is less than a second preset threshold.
[0108] The sample length corresponding to the pre-training corpus in the first part is the message ID where the feature information is located.
[0109] The sample length corresponding to the pre-training corpus of the second part is the sum of the message ID where the feature information is located and the second random number. The first random number is greater than the second random number.
[0110] This helps ensure the robustness and accuracy of model training.
[0111] It should be noted that all the above embodiments disclosed in this application can be freely combined, and the technical solutions obtained after the combination are also within the protection scope of this application.
[0112] An embodiment of the present invention further discloses a method for classifying conversation text, which applies a preset text classification model to classify the text corresponding to the call audio. The preset text classification model is trained using the training method of the conversation text classification model disclosed in any of the above embodiments.
[0113] like Figure 6 As shown, an embodiment of the present invention further discloses a training system 6 for a conversation text classification model, the system comprising:
[0114] The pre-training corpus acquisition module 61 acquires pre-training corpus.
[0115] The time information acquisition module 62 acquires the time information when the preset instruction is triggered based on the pre-trained corpus.
[0116] The sample length determination module 63 determines the sample length corresponding to each of the pre-training corpus according to the time information.
[0117] The training subsample extraction module 64 extracts training subsamples from each of the pre-training corpus according to the sample length and the time information.
[0118] The training sample generation and training module 65 constructs a training sample based on the training sub-samples, and trains a preset text classification model based on the training sample.
[0119] It is understandable that the training system for the conversation text classification model of the present invention also includes other existing functional modules that support the operation of the training system for the conversation text classification model. Figure 6 The training system of the displayed conversation text classification model is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0120] The training system for the conversation text classification model in this embodiment is used to implement the above-mentioned method for training the conversation text classification model. Therefore, the specific implementation steps of the training system for the conversation text classification model can refer to the above-mentioned description of the method for training the conversation text classification model, and will not be repeated here.
[0121] An embodiment of the present invention also discloses a training device for a conversation text classification model, comprising a processor and a memory, wherein the memory stores an executable program of the processor; the processor is configured to execute the steps in the above-mentioned conversation text classification model training method by executing the executable program. Figure 7 This is a schematic diagram of the structure of the training device for the dialogue text classification model disclosed in the present invention. Figure 7 An electronic device 600 according to this embodiment of the present invention will be described. Figure 7 The electronic device 600 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0122] like Figure 7 As shown, electronic device 600 is implemented as a general-purpose computing device. Components of electronic device 600 may include, but are not limited to, at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), and a display unit 640.
[0123] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the training method of the dialogue text classification model in the above description. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .
[0124] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0125] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0126] Bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0127] The electronic device 600 can also communicate with one or more external devices 700 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 650. Furthermore, the electronic device 600 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 660. The network adapter 660 can communicate with other modules of the electronic device 600 via the bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 600, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0128] The present invention also discloses a computer-readable storage medium for storing a program that, when executed, implements the steps of the aforementioned method for training a conversational text classification model. In some possible implementations, various aspects of the present invention may also be implemented as a program product comprising program code. When the program product is executed on a terminal device, the program code causes the terminal device to execute the steps of the various exemplary embodiments of the present invention described in the aforementioned method for training a conversational text classification model.
[0129] As shown above, when the program of the computer-readable storage medium of this embodiment is executed, the time information when the preset instruction in the pre-training corpus is triggered is specifically considered, and the sample length corresponding to each pre-training corpus is determined based on the time information; in addition, for some corpora, more of the following content is appropriately intercepted in the future to simulate the sample noise redundancy environment caused by different instruction triggering timing online, which is conducive to improving the robustness of the model after training.
[0130] Figure 8 Schematic diagram of the structure of the computer readable storage medium of the present invention. Figure 8 , a program product 800 for implementing the above method according to an embodiment of the present invention is described. The program product 800 may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0131] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0132] Computer-readable storage media may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0133] The program code for performing the operations of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0134] The training and classification method, system, device, and medium of the dialogue text classification model provided by the embodiments of the present invention specifically consider the time information when the preset instruction in the pre-training corpus is triggered, and determine the sample length corresponding to each pre-training corpus based on the time information; in addition, for some corpora, more subsequent content is appropriately intercepted to simulate the sample noise redundancy environment caused by different instruction triggering timing online, and the method of simulating online noise distribution based on data enhancement method is beneficial to improving the robustness of the model after training.
[0135] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.< / checkindate>
Claims
1. A training method for a dialogue text classification model, characterized in that: The following steps are involved: S110, obtaining pre-training corpus; S120, based on the pre-trained corpus, obtaining time information when a preset instruction is triggered; the time information includes progress ratio information; the progress ratio information is the ratio of the order creation time to the phone call duration; the order creation time is the time elapsed from the phone call being connected to the triggering of the preset instruction; S130, determining a sample length corresponding to each piece of the pre-training corpus based on the time information; when the progress ratio information is greater than or equal to a first preset threshold, the sample length is the length of the pre-training corpus; when the progress ratio information is less than the first preset threshold, the sample length is the message ID containing the feature information; S140, extracting training subsamples from each piece of the pre-training corpus based on the sample length and the time information; and S150: Construct a training sample based on the training sub-sample, and train a preset text classification model based on the training sample.
2. The method for training a dialogue text classification model according to claim 1, wherein: Step S150 includes: Identifying entities in the training samples; Determining an entity type corresponding to the entity, and replacing the entity in the training sample with the corresponding entity type; Based on the replaced training samples, train the preset text classification model.
3. The method for training a conversation text classification model according to claim 1, wherein: Step S130 includes: When the process ratio information is less than a first preset threshold and the order creation time is less than a second preset threshold, the sample length is the message ID where the characteristic information is located; When the process ratio information is less than a first preset threshold and the order creation time is greater than or equal to a second preset threshold, the sample length is the sum of the message ID where the feature information is located and the first random number.
4. The method for training a conversation text classification model according to claim 3, wherein: Step S130 includes: Dividing the pre-training corpus that meets the preset conditions into a first part and a second part; the preset conditions are: the process ratio information is less than a first preset threshold and the order creation time is less than a second preset threshold; The sample length corresponding to the pre-training corpus of the first part is the message ID where the feature information is located; The sample length corresponding to the second part of the pre-training corpus is the sum of the message ID where the feature information is located and a second random number; the first random number is greater than the second random number.
5. The method for training a conversation text classification model according to claim 1, wherein: Step S140 includes: Performing VAD segmentation on each of the pre-training corpus to obtain multiple text segments contained in each of the pre-training corpus; The corpus corresponding to the first N text segments in each of the pre-training corpus is used as a training subsample; N is equal to the sample length.
6. The method for training a dialogue text classification model according to claim 3, wherein: Step S140 includes: Performing VAD segmentation on each of the pre-training corpus to obtain multiple text segments contained in each of the pre-training corpus; Each of the pre-training corpus is cut off from the Mth text segment, and the first random number of text segments are randomly selected from the M+1th text segment to the last text segment, and the first M text segments and the first random number of text segments are used to construct a training subsample; M is equal to the message ID where the feature information is located.
7. The method for training a dialogue text classification model according to claim 4, wherein: Step S130 includes: The pre-training corpus that meets the preset condition is equally divided into the first part and the second part.
8. A method for classifying conversation texts, characterized in that: A preset text classification model is applied to classify the text corresponding to the call audio, wherein the preset text classification model is trained using the training method of the conversation text classification model described in any one of claims 1-7.
9. A training system for a conversation text classification model, used to implement the training method for a conversation text classification model according to claim 1, characterized in that: The system comprises: Pre-training corpus acquisition module, obtains pre-training corpus; A time information acquisition module, based on the pre-trained corpus, acquires time information when a preset instruction is triggered; the time information includes progress ratio information; the progress ratio information is the ratio of the order creation time to the phone call duration; the order creation time is the time elapsed from the phone call being connected to the triggering of the preset instruction; a sample length determination module, which determines, based on the time information, a sample length corresponding to each piece of the pre-training corpus; when the progress ratio information is greater than or equal to a first preset threshold, the sample length is the length of the pre-training corpus; when the progress ratio information is less than the first preset threshold, the sample length is the message ID containing the feature information; a training subsample extraction module, extracting training subsamples from each of the pre-training corpus according to the sample length and the time information; and The training sample generation and training module constructs a training sample based on the training sub-sample, and trains a preset text classification model based on the training sample.
10. A training device for a conversation text classification model, characterized in that: include: processor; a memory storing an executable program of the processor; The processor is configured to execute the steps of the method for training a conversation text classification model according to any one of claims 1 to 7 by executing the executable program.
11. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the method for training a conversation text classification model described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Intelligent customer service work order classification method
CN112287639A
Text classification method and device based on deep learning, server and storage medium
CN112329836A