A conversation classification method, device, electronic device and storage medium
Through the text feature extraction and temporal feature analysis of dialogue records, combined with the two-way long short-term memory recurrent neural network, the problem of insufficient dialogue logic judgment in the existing technology is solved, the accurate restoration of the dialogue scene and the reliable determination of the responsible party are achieved, improving Service quality monitoring.
Patent Information
- Application Number
- CN201811492497.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-06
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing text classification technology cannot effectively apply dialogue logic to determine blame, resulting in insufficient accuracy and reliability in dialogue scene restoration and responsible party classification.
By obtaining the text features in the conversation record, and using a preset network model to extract temporal features, combined with a two-way long-short-term memory recurrent neural network, the logical relationship features between sentences are extracted, and finally the conversation is classified and the responsible party of the target event is determined. .
It improves the accuracy and reliability of dialogue classification, restores dialogue scenarios to the greatest extent, clarifies the responsible party for service order cancellation, and facilitates service quality monitoring.
Smart Images

Figure CN111291178B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a conversation classification method, device, electronic equipment and storage medium. Background Art
[0002] In order to facilitate management and analysis, text content will be classified. At present, there are many algorithms based on text classification in the industry, and they are relatively mature. Among them, most of the existing text classification technologies are based on text content themes and fields. For example, when classifying based on text content themes, texts with similar text content themes are classified into the same category. When classifying based on fields, text contents belonging to the same or similar fields are classified into the same category. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a dialogue classification method, device, electronic device and storage medium to effectively improve the problem that the existing text classification method cannot be applied to dialogue logic judgment.
[0004] The embodiment of the present invention is achieved as follows:
[0005] In a first aspect, an embodiment of the present invention provides a method for classifying conversations, comprising: obtaining conversation records of the other parties to a target event; performing text feature extraction on each sentence in the conversation record to obtain corresponding text features; performing time series feature extraction on the text features using a preset network model to obtain output features including time series features; and classifying the output features to obtain a classification result that characterizes the responsible party for the target event.
[0006] In an embodiment of the present application, text feature extraction is performed on each sentence in the conversation record. After obtaining the corresponding text feature, the temporal features between sentences are also taken into account. That is, the temporal features of the text features are extracted using a preset network model to obtain output features including the temporal features. The conversation is then classified based on the output features. This can restore the conversation scene to the greatest extent and improve the accuracy and reliability of the classification.
[0007] In combination with another possible implementation of the first aspect, a preset network model is used to extract temporal features from the text features, including: embedding each word in the text features and converting them into vector features; and extracting temporal features from the vector features using a preset network model. In the embodiment of the present application, when extracting temporal features from text features, the text features are first converted into vector features, and then higher-level features of the sentences are further extracted, thereby ensuring the reliability and feasibility of temporal feature extraction.
[0008] In combination with another possible implementation of the embodiment of the first aspect, a preset network model is used to extract time series features from the vector features, including: using a preset bidirectional long short-term memory recurrent neural network to extract time series features from the vector features. In the embodiment of the present application, the use of a bidirectional long short-term memory recurrent neural network to extract time series features from vector features can better extract the logical relationship features between sentences.
[0009] In combination with another possible implementation of the first aspect, text feature extraction is performed on each sentence in the conversation record, including: segmenting each sentence in the conversation record according to characters, and adding speaker identity information representing the current speaker before or after each segmented character; or, clustering each sentence in the conversation record using a clustering algorithm, and using the label obtained after clustering as the feature corresponding to the sentence; or, matching each sentence in the conversation record using pattern matching, and using the matched pattern category as the feature corresponding to the sentence. In the embodiment of the present application, any one of the above three feature extraction methods can be used to extract text features for each sentence in the conversation record, so that flexibility is good and there is more room for choice when extracting features.
[0010] In combination with another possible implementation of the first aspect, obtaining the conversation records of the other parties to the target event includes: obtaining the conversation records between the service provider and the service requester of the service order cancellation event. In the implementation of this application, the conversation records between the service provider and the service requester of the service order cancellation event are mainly targeted to facilitate the confirmation of the responsible party for the cancellation of the service order, facilitate the monitoring and management of the service provider, and improve the service quality.
[0011] In the second aspect, an embodiment of the present invention also provides a conversation classification device, including: an acquisition module, a text feature extraction module, a time series feature extraction module and a classification module; the acquisition module is used to acquire the conversation records of the other parties to the target event; the text feature extraction module is used to extract text features for each sentence in the conversation record to obtain corresponding text features; the time series feature extraction module is used to use a preset network model to extract time series features from the text features to obtain output features including time series features; the classification module is used to classify the output features to obtain a classification result that characterizes the responsible party for the target event.
[0012] In combination with a possible implementation manner of the second aspect embodiment, the temporal feature extraction module is also used to: embed each word in the text feature and convert it into a vector feature; and use a preset network model to extract temporal features from the vector feature.
[0013] In combination with another possible implementation of the second aspect, the time series feature extraction module is further used to use a preset bidirectional long short-term memory recurrent neural network to perform time series feature extraction on the vector features.
[0014] In combination with another possible implementation manner of the second aspect embodiment, the text feature extraction module is further used to segment each sentence in the conversation record according to characters, and add identity information of the speaker representing the current speaker before or after each character after segmentation; or, use a clustering algorithm to cluster each sentence in the conversation record, and use the label obtained after clustering as the feature corresponding to the sentence; or, use pattern matching to match each sentence in the conversation record, and use the matched pattern category as the feature corresponding to the sentence.
[0015] In combination with another possible implementation of the second aspect, the acquisition module is further used to obtain a conversation record between the service provider and the service requester of the service order cancellation event.
[0016] In the third aspect, an embodiment of the present invention further provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are connected; the memory is used to store programs; the processor is used to call the programs stored in the memory to execute the method provided by the embodiment of the first aspect and / or any possible implementation method in combination with the embodiment of the first aspect.
[0017] In a fourth aspect, an embodiment of the present invention further provides a storage medium, wherein the storage medium includes a computer program, and when the computer program is run by a computer, the method provided by the embodiment of the first aspect and / or any possible implementation method in combination with the embodiment of the first aspect is executed.
[0018] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. As shown in the accompanying drawings, the above and other purposes, features and advantages of the present invention will be clearer. The same reference numerals in all the drawings indicate the same parts. The drawings are not deliberately scaled to the actual size, and the focus is on illustrating the main purpose of the present invention.
[0020] Figure 1 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown.
[0021] Figure 2 A flow chart of a conversation classification method provided by an embodiment of the present invention is shown.
[0022] Figure 3 A schematic flow chart of step S103 provided in an embodiment of the present invention is shown.
[0023] Figure 4 A schematic diagram of the steps of a conversation classification method provided by an embodiment of the present invention is shown.
[0024] Figure 5 A module schematic diagram of a conversation classification provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0026] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0028] In the description of the present invention, it should be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0029] Furthermore, the term "and / or" in this application is merely a term used to describe the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone.
[0030] First embodiment
[0031] like Figure 1 As shown, Figure 1 The electronic device 100 provided by the embodiment of the present invention is shown in the structural block diagram. The electronic device 100 comprises: a conversation classification device 110, a memory 120, a storage controller 130 and a processor 140.
[0032] The memory 120, storage controller 130, and processor 140 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.
[0033] The conversation classification device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or fixed in the operating system (OS) of the electronic device 100. The processor 140 is used to execute the executable module stored in the memory 120, such as the software function module or computer program included in the conversation classification device 110.
[0034] The memory 120 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory 120 is used to store programs. After receiving the execution instruction, the processor 140 executes the program. The method executed by the electronic device 100 of the process definition disclosed in any embodiment of the present invention described below may be applied to the processor 140 or implemented by the processor 140. After receiving the execution instruction, the processor 140 calls the program stored in the memory 120 through the bus, and then the processor 140 can execute the process of the dialogue classification method.
[0035] The processor 140 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
[0036] in, Figure 1 The components and structures of the electronic device 100 shown are merely exemplary and non-limiting. The electronic device 100 may also have other components and structures as required.
[0037] In the embodiment of the present invention, the electronic device 100 may be, but is not limited to, a network server, a database server, a cloud server, etc.
[0038] See also Figure 2 , which is a method for classifying conversations applied to the electronic device 100 provided by an embodiment of the present invention, will be described below in conjunction with Figure 2 Describe the steps involved.
[0039] Step S101: Acquire the conversation records of the conversation parties regarding the target event.
[0040] When determining the responsible party for the target event, obtain the conversation records of all parties involved in the conversation for the target event. For example, when determining the responsible party for the cancellation of a service order, obtain the conversation record between the service provider and the service requester of the service order cancellation event, such as obtaining the conversation record between the driver and the passenger of the service order cancellation event, so as to analyze the IM (Instant Messaging) message and call recording of the service order cancellation, restore the communication scenario, and infer the responsible party for the cancellation of the service order, so as to carry out management and control. For example, after a problem occurs in a business, when determining the party at fault for the problem business, obtain the conversation record between the business processing party and the business requester, such as the conversation record between the merchant and the buyer. Among them, the conversation record can be a call recording, IM (Instant Messaging) message, etc.
[0041] Step S102: extracting text features from each sentence in the conversation record to obtain corresponding text features.
[0042] After obtaining the conversation records of the parties to the conversation for the target event, text features are extracted for each sentence in the conversation record to obtain corresponding text features. When extracting text features for each sentence in the conversation record, each sentence in the conversation record may be segmented according to characters, and the identity information of the speaker representing the current speaker is added before or after each segmented character; or, each sentence in the conversation record may be clustered using a clustering algorithm, and the label obtained after clustering is used as the feature corresponding to the sentence; or, each sentence in the conversation record may be matched using pattern matching, and the pattern category obtained by matching is used as the feature corresponding to the sentence.
[0043] Among them, the first feature extraction method is: each sentence in the conversation record is segmented according to characters, and the identity information of the speaker representing the current speaker is added before or after each character after segmentation. For example, when the dialogue "You cancel it" and "I don't cancel it" in the conversation record of the service provider and the service requester of the service order cancellation event is feature extracted, when the first feature extraction method is used to extract the above sentence, the feature of the sentence "You cancel it" is obtained as: p_you p_take p_cancel p_bar; the feature of the sentence "I don't cancel" is obtained as: r_I r_not r_take r_cancel. Among them, p and r represent the identity information of the speaker representing the current speaker, wherein p represents the service provider and r represents the service requester. Among them, it should be noted that the above only shows the situation of adding the identity information of the speaker representing the current speaker before each character after segmentation, and the situation of adding the identity information of the speaker representing the current speaker after each character after segmentation is similar to it and will not be described again.
[0044] The second feature extraction method is: clustering each sentence in the conversation record using a clustering algorithm, and using the label obtained after clustering as the feature corresponding to the sentence. For example, when extracting features from the conversation record of "You cancel it" and "I don't cancel it" between the service provider and the service requester in the service order cancellation event, when the second feature extraction method is used to extract features from the above sentences, the clustering algorithm is used to cluster the sentence "You cancel it", and the label obtained after clustering is used as the feature corresponding to the sentence, such as pd1; the clustering algorithm is used to cluster the sentence "I don't cancel it", and the label obtained after clustering is used as the feature corresponding to the sentence, such as rd1. Among them, the clustering algorithm uses the service provider's speech and the service requester's speech in the training data for clustering training in advance. Among them, there are many clustering algorithms, such as partition-based clustering algorithms (such as: k-means), hierarchical clustering algorithms (such as: BIRCH), density-based clustering algorithms (such as: DBSCAN), grid-based clustering algorithms (such as: STING), etc.
[0045] The third feature extraction method is: use pattern matching to match each sentence in the conversation record, and use the pattern category obtained by matching as the feature corresponding to the sentence. For example, when extracting features from the conversations "You cancel it" and "I don't cancel it" in the conversation record between the service provider and the service requester of the service order cancellation event, when the third feature extraction method is used to extract features from the above sentences, pattern matching is used to match the sentence "You cancel it", and the pattern category obtained after matching is used as the feature corresponding to the sentence, such as pp1; pattern matching is used to match the sentence "I don't cancel it", and the pattern category obtained after matching is used as the feature corresponding to the sentence, such as rp1.
[0046] It should be noted that different feature extraction methods will result in different text features for each sentence.
[0047] As an optional implementation, after obtaining the conversation records of the parties to the conversation regarding the target event, the conversation records may be preprocessed to remove noise data and redundant information, and then text feature extraction may be performed on the preprocessed data to obtain corresponding text features.
[0048] Step S103: Use a preset network model to extract temporal features from the text features to obtain output features containing temporal features.
[0049] After obtaining the text features of each sentence in the conversation record, a preset network model is used to extract the time series features of the text features to obtain output features containing time series features.
[0050] As an implementation method, you can refer to Figure 3 The flowchart shown illustrates the process of extracting temporal features from the text features using a preset network model.
[0051] Step S201: embed each word in the text feature and convert it into a vector feature.
[0052] After obtaining the text features of each sentence in the conversation record, each word in the text features is embedded and converted into a vector feature. For example, each word in the text features is embedded according to the word2vec, Fasttext, and GloVe tools, and each word is converted into a vector, so that the text features can be converted into vector features.
[0053] Among them, when the text features are converted into vector features, the text features of the above sentence "You cancel it" (such as p_you p_take p_cancel p_) are converted into vector features, and 4*128 vector features can be obtained. Similarly, the text features of the above sentence "I don't cancel" (such as r_I r_not r_take r_cancel) are converted into vector features, and 4*128 vector features can also be obtained. Since the text features of the above two sentences both include 4 words, when converted into vector features, 4*128 vector features are obtained. The text features of the above sentence "You cancel it" (such as pd1 or pp1) are converted into vector features, and 1*128 vector features can be obtained. Similarly, the text features of the above sentence "I don't cancel" (such as rd1 or rp1) are converted into vector features, and 1*128 vector features can also be obtained. It should be noted that pd1, pp1, rd1, and rp1 are all regarded as one word for example, but the actual situation may include multiple words. Therefore, the specific situation when performing word vector conversion should be determined according to the actual situation, and the above examples cannot be understood as limitations on this application.
[0054] Step S202: extracting time series features from the vector features using a preset network model.
[0055] After the text features are converted into vector features, the vector features are subjected to temporal feature extraction using a preset network model to obtain output features containing temporal features. That is to say, after the feature extraction at the sentence level is completed, that is, after the vector is obtained, the temporal features between sentences have not been considered. Therefore, the temporal features between sentences still need to be considered. At this time, the vector features can be subjected to temporal feature extraction to obtain output features containing temporal features. For example, by connecting the vector features to BI-LSTM (Bidirectional Long short-term memory, bidirectional long short-term memory recurrent neural network), output features containing temporal features can be obtained, because the BI-LSTM algorithm considers temporal features, has long-term dependency functions, and will learn the logical relationship features between sentences. After obtaining the output features containing temporal features, the output features are input into the fully connected layer for classification processing. Among them, BI-LSTM can also be replaced by RNN (recurrent neural network).
[0056] Step S104: classify the output features to obtain a classification result representing the responsible party of the target event.
[0057] After obtaining the output features, the output features are classified, and then the classification results of the responsible party of the target event can be obtained. For example, it is determined whether the responsible party for canceling the service order is the service provider or the service requester, that is, it is determined whether the responsible party for canceling the service order is the service provider or the service requester. Optionally, the output features can be input into the fully connected layer for classification processing to obtain the classification results of the responsible party of the target event. Among them, the fully connected layer uses the softmax function to predict the probability of the conversation text belonging to each category, and normalizes it to between 0 and 1. The category with the largest probability is the final classification of the conversation text, and then the classification results of the responsible party of the target event can be obtained.
[0058] In order to facilitate the understanding of the above process, we can combine Figure 4 The steps are described in the schematic diagram shown in FIG. Figure 4The sentence1 in the example can correspond to "you cancel it", and the sentence2 can correspond to "I don't cancel it" in the example. words corresponds to the first feature extraction method mentioned above, dbscan corresponds to the second feature extraction method mentioned above, and pattern corresponds to the third feature extraction method mentioned above. Word embedding corresponds to the word vector conversion mentioned above. When performing text feature extraction, one of the three feature extraction methods, words, dbscan, and pattern, is selected, and for each sentence in the same conversation record, the selected feature extraction method is the same, either the first feature extraction method, the second feature extraction method, or the third feature extraction method.
[0059] In summary, the conversation classification method provided in the embodiment of the present application performs text feature extraction on each sentence in the conversation record. After obtaining the corresponding text features, the temporal features between sentences are also taken into account. That is, the temporal features of the text features are extracted using a preset network model to obtain output features containing temporal features, and then the conversation is classified based on the output features. This can restore the conversation scene to the greatest extent and improve the accuracy and reliability of classification.
[0060] Second embodiment
[0061] The present application embodiment also provides a conversation classification device 110, such as Figure 5 The conversation classification device 110 comprises: an acquisition module 111 , a text feature extraction module 112 , a temporal feature extraction module 113 and a classification module 114 .
[0062] The acquisition module 111 is used to acquire the conversation records of the two parties to the target event. Optionally, the acquisition module 111 is also used to acquire the conversation records between the service provider and the service requester of the service order cancellation event.
[0063] The text feature extraction module 112 is used to extract text features from each sentence in the conversation record to obtain corresponding text features. Optionally, the text feature extraction module 112 is also used to segment each sentence in the conversation record according to characters, and add speaker identity information representing the current speaker before or after each segmented character; or, use a clustering algorithm to cluster each sentence in the conversation record, and use the label obtained after clustering as the feature corresponding to the sentence; or, use pattern matching to match each sentence in the conversation record, and use the matched pattern category as the feature corresponding to the sentence.
[0064] The temporal feature extraction module 113 is used to extract temporal features from the text features using a preset network model to obtain output features containing temporal features. Optionally, the temporal feature extraction module 113 is also used to: embed each word in the text features and convert them into vector features; and extract temporal features from the vector features using a preset network model. Optionally, the temporal feature extraction module 113 is also used to extract temporal features from the vector features using a preset bidirectional long short-term memory recurrent neural network.
[0065] The classification module 114 is used to classify the output features to obtain a classification result that characterizes the responsible party of the target event.
[0066] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0067] The dialogue classification device 110 provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0068] Third embodiment
[0069] The present application also provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a computer to perform the steps of the method described in the first embodiment. The specific implementation can be found in the method embodiment, which will not be described here.
[0070] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the program code on the storage medium is executed, the conversation classification method shown in the above embodiment can be executed.
[0071] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0072] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0073] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a laptop, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes. It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for classifying conversations, characterized in that: include: Acquire the conversation records of the two parties to the target event, wherein the conversation records of the two parties to the target event include the conversation records of the service provider and the service requester of the service order cancellation event; Extracting text features representing speaker identity information from each sentence in the conversation record to obtain corresponding text features representing speaker identity information, wherein the speaker identity information includes a service provider or a service requester; Use a preset network model to extract temporal features from the text features to obtain output features containing temporal features; Classifying the output features to obtain a classification result representing the responsible party of the target event; The text feature extraction for each sentence in the conversation record that represents the speaker's identity information includes: Segment each sentence in the conversation record according to characters, and add identity information of the speaker who is currently speaking before or after each segmented character; or Clustering each sentence in the conversation record using a clustering algorithm to determine the identity information of the speaker who said each sentence in the conversation record, and using the label representing the speaker identity information obtained after clustering as the feature corresponding to the sentence; or Each sentence in the conversation record is matched using pattern matching to determine the identity information of the speaker who said each sentence in the conversation record, and the pattern category representing the speaker identity information obtained by matching is used as the feature corresponding to the sentence.
2. The method according to claim 1, characterized in that Using a preset network model to extract temporal features from the text features includes: Embed each word in the text feature and convert it into a vector feature; A preset network model is used to extract time series features from the vector features.
3. The method according to claim 2, characterized in that Using a preset network model to extract time series features from the vector features includes: A preset bidirectional long short-term memory recurrent neural network is used to extract time series features from the vector features.
4. The method according to claim 1, characterized in that: Obtain the conversation records of the other parties regarding the target event, including: Get the conversation record between the service provider and the service requester of the service order cancellation event.
5. A conversation classification device, characterized in that: include: An acquisition module, used to acquire the conversation records of the other parties to the target event, wherein the conversation records of the other parties to the target event include the conversation records between the service provider and the service requester of the service order cancellation event; A text feature extraction module, configured to extract text features representing speaker identity information from each sentence in the conversation record to obtain corresponding text features representing speaker identity information, wherein the speaker identity information includes a service provider or a service requester; A temporal feature extraction module, used to extract temporal features from the text features using a preset network model to obtain output features containing temporal features; A classification module, used to classify the output features to obtain a classification result representing the responsible party of the target event; Among them, the text feature extraction module is also used to segment each sentence in the conversation record according to characters, and add speaker identity information representing the current speaker before or after each segmented character; or, use a clustering algorithm to cluster each sentence in the conversation record to determine the speaker identity information of each sentence in the conversation record, and use the label representing the speaker identity information obtained after clustering as the feature corresponding to the sentence; or, use pattern matching to match each sentence in the conversation record to determine the speaker identity information of each sentence in the conversation record, and use the pattern category representing the speaker identity information obtained by matching as the feature corresponding to the sentence.
6. The device according to claim 5, characterized in that The temporal feature extraction module is further used for: Embed each word in the text feature and convert it into a vector feature; A preset network model is used to extract time series features from the vector features.
7. The device according to claim 6, characterized in that The time series feature extraction module is also used to use a preset bidirectional long short-term memory recurrent neural network to extract time series features from the vector features.
8. The device according to claim 5, characterized in that The acquisition module is also used to acquire the conversation record between the service provider and the service requester of the service order cancellation event.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are connected; The memory is used to store programs; The processor is used to call the program stored in the memory to execute the method according to any one of claims 1 to 4.
10. A storage medium, characterized in that: The storage medium comprises a computer program, and the computer program, when executed by a computer, executes the method according to any one of claims 1 to 4.
