Conversation content processing method and device, storage medium and computer program product
Through intent identification and timing correlation analysis of dialogue data sets, a set of intent relationships is constructed, which solves the problem of low utilization rate of dialogue data in the existing technology, and realizes in-depth mining of dialogue content and higher utilization rate.
Patent Information
- Application Number
- CN202411334648.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is limited to the isolated analysis of a single dialogue statement when processing customer service dialogue data, resulting in low deep mining and utilization of dialogue data.
By obtaining the dialogue data set generated in the conversation, identifying the intentions of each dialogue statement, and conducting intent correlation analysis based on the occurrence timing of the dialogue statements, constructing a set of intent relationships, including intent jump relationships.
It has achieved in-depth exploration of dialogue content, improved the overall utilization rate of dialogue data resources, and enabled enterprises to better understand the overall structure of dialogue and changes in users' dynamic needs.
Smart Images

Figure CN119474292A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, storage medium and computer program product for processing conversation content. Background Art
[0002] In customer service scenarios, whether it is human customer service or intelligent conversational robots interacting with customers, a large amount of conversation data will be generated. How to mine useful information from these conversation data has become a hot topic and cutting-edge direction of current research.
[0003] When processing customer service conversation data, traditional methods are often limited to isolated analysis of single conversation sentences, which restricts the in-depth mining and utilization of conversation data and leads to low overall utilization of conversation data resources.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a conversation content processing method, device, storage medium and computer program product to solve the problem of low utilization rate of conversation data resources in existing solutions.
[0006] To achieve the above objectives, the present application proposes a method for processing conversation content, the method comprising:
[0007] Acquire a dialogue data set generated in the conversation, and identify the intentions corresponding to each dialogue sentence in the dialogue data set;
[0008] Based on the appearance sequence of each of the dialogue sentences in the conversation, an association analysis is performed on the intentions corresponding to each of the dialogue sentences to obtain a first intention relationship set, wherein the first intention relationship set includes at least one intention jump relationship, and the intention jump relationship records a first intention and a second intention having a jump relationship.
[0009] In one embodiment, the conversation includes multiple conversations, and the step of performing association analysis on the intents corresponding to the conversation sentences based on the appearance sequence of the conversation sentences in the conversation to obtain the first intent relationship set includes:
[0010] For any one of the multiple conversations, based on the appearance sequence of each of the conversation sentences in the conversation, correlation analysis is performed on the intents corresponding to each of the conversation sentences to obtain each intent pair contained in the conversation, wherein the intent pair includes a first intent and a second intent corresponding to two conversation sentences adjacent in the sequence;
[0011] Determine that a jump relationship exists between the first intent and the second intent in the intent pair, and construct a corresponding intent jump relationship based on the first intent and the second intent;
[0012] Based on each of the intent jump relationships included in the session, generating a second intent relationship set corresponding to the session;
[0013] The second intent relationship sets corresponding to the respective conversations are merged according to a preset merging rule to obtain the first intent relationship set.
[0014] In one embodiment, the step of merging the second intent relationship sets respectively corresponding to the sessions according to a preset merging rule to obtain the first intent relationship set includes:
[0015] The second intent relationship sets corresponding to the sessions are merged, and during the merging process, the same intent jump relationships are deduplicated to obtain the first intent relationship set.
[0016] In one embodiment, the step of merging the second intent relationship sets corresponding to the sessions, and removing duplicate intent jump relationships during the merging process to obtain the first intent relationship set includes:
[0017] Initialize the first intention relationship set;
[0018] Traversing each of the intent jump relations in each of the second intent relationship sets in turn, and if the currently traversed intent jump relation does not exist in the first intent relationship set, adding the currently traversed intent jump relation to the first intent relationship set;
[0019] In the process of traversal, the occurrence frequency of each of the intended jump relationships is accumulated;
[0020] After traversing all the intention jump relationships contained in the second intention relationship set, the jump frequency of each intention jump relationship is calculated based on the cumulative occurrence frequency of each intention jump relationship, and a first intention relationship set containing multiple intention jump relationships is generated, each of which carries corresponding jump frequency information.
[0021] In one embodiment, the step of identifying the intentions corresponding to the respective dialogue sentences in the dialogue data set includes:
[0022] Performing semantic clustering on each of the dialogue sentences in the dialogue data set to obtain each sentence cluster, each of the sentence clusters including at least one dialogue sentence;
[0023] Extracting a dialogue sentence from each of the sentence clusters as a representative sentence;
[0024] Inputting each of the representative sentences into an intention recognition model to obtain the intentions corresponding to each of the representative sentences;
[0025] For any of the sentence clusters, it is determined that the intentions respectively corresponding to the dialogue sentences in the sentence cluster are the intentions corresponding to the representative sentences in the sentence cluster.
[0026] In one embodiment, after the step of constructing a first intention relationship set based on the appearance sequence of each of the dialogue sentences in the conversation and the intentions corresponding to each of the dialogue sentences, the step further includes:
[0027] Based on the first intention relationship set, an intention relationship graph is generated and displayed, wherein the intention relationship graph uses intentions as nodes and jump relationships between intentions as edges.
[0028] In addition, to achieve the above-mentioned purpose, the present application also proposes a conversation content processing device, the conversation content processing device comprising:
[0029] An intention recognition module is used to obtain a dialogue data set generated in a conversation and recognize the intention of each dialogue sentence in the dialogue data set;
[0030] An intention relationship construction module is used to perform association analysis on the intentions corresponding to each of the dialogue sentences based on the sequence of appearance of each of the dialogue sentences in the conversation, and obtain a first intention relationship set, wherein the first intention relationship set includes at least one intention jump relationship, and the intention jump relationship records a first intention and a second intention that have a jump relationship.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a conversation content processing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the conversation content processing method described above.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the conversation content processing method described above are implemented.
[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the conversation content processing method described above are implemented.
[0034] One or more technical solutions proposed in this application have at least the following technical effects:
[0035] By acquiring a conversation data set generated in a conversation and identifying the intents corresponding to the conversation sentences in the conversation data set, a correlation analysis is then performed based on the appearance sequence of the conversation sentences in the conversation and the intents corresponding to the conversation sentences, so as to obtain a first intent relationship set, wherein the first intent relationship set includes at least one intent jump relationship, and the intent jump relationship records a first intent and a second intent having a jump relationship. The appearance sequence of the conversation sentences in the conversation can be used to analyze the logical relationship between different intents, which is beneficial for enterprises to better understand the overall structure of the conversation and the dynamic changes in users' needs, and realize in-depth mining of the conversation content. Compared with the traditional solution of analyzing conversation sentences in isolation, the present application can make more full use of conversation data resources, thereby improving the overall utilization rate of conversation data resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0038] Figure 1 A flowchart of a method for processing conversation content provided in one embodiment of the present application;
[0039] Figure 2 A schematic diagram of the intended relationship diagram involved in this application;
[0040] Figure 3 A schematic diagram of the module structure provided for the conversation content processing device of this application;
[0041] Figure 4 Schematic diagram of the device structure of the hardware operating environment involved in the conversation content processing method in the embodiment of the present application.
[0042] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0044] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the conversation content processing method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0045] It should be noted that, in the present application, “multiple times” means twice or more, and “plurality” means two or more.
[0046] The main solution of the embodiment of the present application is: to obtain a dialogue data set generated in a conversation, and to identify the intentions corresponding to each dialogue sentence in the dialogue data set; based on the appearance sequence of each dialogue sentence in the conversation, to perform association analysis on the intentions corresponding to each dialogue sentence, to obtain a first intention relationship set, the first intention relationship set including at least one intention jump relationship, the intention jump relationship record having a first intention and a second intention with a jump relationship.
[0047] Because the customer service scenarios of existing technologies are often limited to the isolated analysis of a single conversation sentence, this limits the in-depth mining and utilization of conversation data, resulting in low overall utilization of conversation data resources.
[0048] The present application provides a solution that utilizes the sequence of appearance of dialogue sentences in a conversation to analyze the logical relationship between different intentions, thereby achieving in-depth mining of the dialogue content. Compared with the traditional solution of analyzing dialogue sentences in isolation, the present application can make more full use of dialogue data resources, thereby improving the overall utilization rate of dialogue data resources.
[0049] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a conversation content processing device, etc. The following takes the conversation content processing device as an example to illustrate this embodiment and the following embodiments.
[0050] See also Figure 1 , Figure 1 1 is a flow chart of a method for processing conversation content provided in the first embodiment of the present application. In this embodiment, the method for processing conversation content includes steps S10 to S20:
[0051] Step S10, obtaining a dialogue data set generated in the conversation, and identifying the intentions corresponding to each dialogue sentence in the dialogue data set.
[0052] In this embodiment, a conversation refers to a round of question-and-answer interaction or multiple rounds of question-and-answer interaction between a customer service representative and a user around a specific task. The customer service representative can be a human customer service representative or an intelligent customer service representative robot. A conversation can generate multiple dialogue sentences, which can be a single sentence or a group of dialogue sentences.
[0053] Among them, intent refers to the intention of the conversation, which is used to indicate the purpose of the conversation. In this embodiment, the intent may include an intent action and an intent content. The intent action refers to the type of behavior expressed in the conversation sentence, and the intent content is a concretization or supplement to the intent action, which is used to further clarify the specific direction or demand of the conversation discourse. For example, if the conversation sentence is "I want to check the account balance", the corresponding intent action can be query, and the corresponding intent content is account balance, then the final intent can be "query-account balance".
[0054] In this embodiment, the conversation content processing device can collect multiple original conversation data generated by a target user in one conversation or multiple conversations within a preset historical time period. The original conversation data can come from online customer service conversation data or voice call data. If it is voice call data, the voice call data is converted into text conversation data, and the collected multiple original conversation data are cleaned and other operations are performed to obtain a conversation data set.
[0055] In this embodiment, the implementation scheme of the conversation content processing device identifying the intention of each conversation sentence in the conversation data set may include:
[0056] As an implementation method, the conversation content processing device can perform semantic recognition on each conversation sentence through a semantic recognition model, obtain the semantic vectors corresponding to each conversation sentence, and input the semantic vectors corresponding to each conversation sentence into the intention recognition model to obtain the intentions corresponding to each conversation sentence. Among them, the semantic recognition model can adopt a word embedding model such as Word2Vec, GloVe or BERT. The intention recognition model can be pre-trained or directly call a third-party model. It should be noted that this application does not specifically limit the implementation method of the intention recognition model. In this implementation method, each conversation sentence is processed separately and its intention is recognized, which can achieve higher accuracy.
[0057] As another implementation, the conversation content processing device can use a text clustering method to perform text clustering on all conversation sentences, and cluster semantically similar conversation sentences into one category to obtain each sentence cluster, and select a conversation sentence from each sentence cluster as the representative sentence corresponding to the corresponding sentence cluster, and identify the intention of the representative sentence corresponding to the corresponding sentence cluster, and set the intention corresponding to the conversation sentence in each sentence cluster as the intention of the representative sentence in the corresponding sentence cluster. In this implementation, by clustering similar conversation sentences, redundant processing can be effectively reduced, which is particularly suitable for processing large amounts of highly repetitive conversation content.
[0058] Step S20, based on the appearance sequence of each dialogue sentence in the conversation, the intentions corresponding to each dialogue sentence are associated with each other to obtain a first intention relationship set, the first intention relationship set includes at least one intention jump relationship, and the intention jump relationship records a first intention and a second intention that have a jump relationship.
[0059] Among them, the appearance sequence of the dialogue sentences in the conversation refers to the order of appearance of the corresponding dialogue sentences in the conversation. The dialogue content processing device can obtain the timestamp information of each dialogue sentence contained in the corresponding conversation, and determine the appearance sequence of each dialogue sentence in the conversation based on the timestamps corresponding to each dialogue sentence. For example, a conversation includes dialogue sentence A, dialogue sentence B and dialogue sentence C, and the appearance timestamp of dialogue sentence A in the conversation is 10:00:00, the appearance timestamp of dialogue sentence B in the conversation is 10:01:00, and the appearance timestamp of dialogue sentence C in the conversation is 10:02:00. Then, the corresponding appearance times of dialogue sentences A, B, and C in the conversation are first, second, and third, respectively.
[0060] Among them, the first intention relationship set includes multiple intention jump relationships, each intention jump relationship is used to indicate that there are two intentions with a direct jump relationship, including the first intention and the second intention, and the first intention occurs before the second intention, that is, the first intention refers to the starting intention in the intention jump relationship, and the second intention refers to the target intention in the intention jump relationship.
[0061] In this embodiment, the conversation content processing device can use the appearance time sequence of each conversation statement in the conversation as the appearance time sequence corresponding to each intention, and obtain the jump relationship (also called intention jump relationship) between the intentions based on the time sequence relationship between the intentions, and aggregate the intention jump relationships to obtain a first intention relationship set. For example, assuming that in a conversation, the appearance timestamp of conversation statement A in the conversation is 10:00:00, the appearance timestamp of conversation statement B in the conversation is 10:01:00, and the appearance timestamp of conversation statement C in the conversation is 10:02:00, then the time sequence relationship between intention a corresponding to conversation statement A, intention b corresponding to conversation statement B, and intention c corresponding to conversation statement C can be determined as follows: intention a occurs before intention b, and intention b occurs before intention c, thereby obtaining the intention jump relationship of intention a jumping to intention b, and the intention jump relationship of intention b jumping to intention c.
[0062] Furthermore, each intention jump relationship constructed can also carry the associated corresponding session identifier to indicate that the intention jump relationship is extracted from the corresponding session. For example, the intention jump relationship constructed can be expressed as (a→b) k, where a represents the identifier corresponding to the first intent, b represents the identifier corresponding to the second intent, and k represents the identifier of the corresponding session. Thus, the intent jump relationship (a→b) k It not only accurately depicts the intent jump relationship from intent a to intent b, but also clearly points out that this intent jump relationship occurs in the session with session identifier k. Since the same intent jump relationship may be extracted in different sessions, a certain intent jump relationship can be associated with multiple session identifiers. For example, assuming that the intent jump relationship appears in sessions with session identifiers k1 and k2, the intent jump relationship is expressed as (a→b) k1,k2 .
[0063] This embodiment uses the above scheme to obtain a conversation data set generated in a conversation, identify the intents corresponding to the conversation sentences in the conversation data set, and then perform association analysis based on the appearance sequence of each conversation sentence in the conversation and the intents corresponding to each conversation sentence to obtain a first intent relationship set. The first intent relationship set includes at least one intent jump relationship. The intent jump relationship records a first intent and a second intent having a jump relationship. The appearance sequence of the conversation sentences in the conversation can be used to analyze the logical relationship between different intents, which is beneficial for enterprises to better understand the overall structure of the conversation and the dynamic changes in users' needs, and realize in-depth mining of the conversation content. Compared with the traditional solution of analyzing conversation sentences in isolation, the present application can make more full use of conversation data resources, thereby improving the overall utilization rate of conversation data resources.
[0064] Considering that the amount of conversation data generated in a single session may not be sufficient to fully reflect the user's intention and conversation characteristics, in order to more comprehensively capture the changes in the user's intention during the conversation interaction process and provide more comprehensive data for subsequent intention analysis and relationship building, in one embodiment, the collected conversation data may include conversation data generated by multiple sessions. Accordingly, the above step S20 may include steps S201 to S204:
[0065] Step S201, for any conversation among the multiple conversations, based on the appearance sequence of each dialogue sentence in the conversation, an association analysis is performed on the intentions corresponding to each dialogue sentence, so as to obtain each intention pair contained in the conversation, wherein the intention pair includes a first intention and a second intention corresponding to two dialogue sentences adjacent in time sequence.
[0066] In this embodiment, the conversation content processing device can process the conversation sentences in each conversation respectively, and in the process of processing the corresponding conversation, obtain the first intention corresponding to the i-th conversation sentence in the conversation and the second intention corresponding to the i+1-th conversation sentence respectively. The first intention and the second intention constitute an intention pair. The intention pair indicates that in terms of time sequence, the intention corresponding to each process node of the conversation process jumps from the first intention to the second intention, where i is a positive integer.
[0067] Specifically, after identifying each intent, the dialogue processing device can assign a unique corresponding intent identifier to each intent, and generate each intent pair through the intent identifier. For example, assuming that the first intent corresponding to the i-th dialogue sentence extracted in a conversation and the second intent corresponding to the i+1-th dialogue sentence are "query weather" and "query weather" respectively, then "query weather" is assigned intent identifier a, and "answer weather" is assigned intent identifier b, and an intent pair (a, b) is generated.
[0068] Step S202: determine whether a jump relationship exists between the first intent and the second intent in the intent pair, and construct a corresponding intent jump relationship based on the first intent and the second intent.
[0069] After extracting each intention pair contained in the corresponding conversation, the conversation content processing device can construct each intention jump relationship corresponding to each intention pair, and the intention jump relationship indicates that the first intention jumps to the second intention.
[0070] Step S203: for any session, based on each intention jump relationship included in the session, generate a second intention relationship set corresponding to the session.
[0071] The conversation content processing device can initialize the second intention relationship set corresponding to each session respectively. The second intention relationship set does not contain any intention jump relationship during initialization, and adds all the intention jump relationships extracted from the corresponding session to the second intention relationship set corresponding to the corresponding session, and finally obtains the second intention relationship set containing multiple intention jump relationships.
[0072] Step S204: Merge the second intent relationship sets corresponding to the respective conversations according to a preset merging rule to obtain a first intent relationship set.
[0073] In this embodiment, the conversation content processing device may merge the second intent relationship sets corresponding to the respective conversations, and deduplicate the same intent jump relationships during the merging process to obtain the first intent relationship set.
[0074] Specifically, the above step S204 may include steps A11 to A13:
[0075] Step A11, initializing the first intention relationship set.
[0076] Specifically, the conversation content processing device can create an empty set or data structure (such as a list, hash table, etc.) and name it as the first intent relationship set, which is used to store the intent jump relationship found in the subsequent analysis process. The initialized first intent relationship set does not contain any intent jump relationship. For example, the initialized first intent relationship set can be an empty list L={}.
[0077] Step A12, traverse each intent jump relationship in each second intent relationship set in turn, and if the currently traversed intent jump relationship does not exist in the first intent relationship set, add the currently traversed intent jump relationship to the first intent relationship set.
[0078] Specifically, assuming that the acquired conversation dialogue data includes conversation data of conversation A and conversation B, and assuming that the intent jump relationships in the second intent relationship set extracted from conversation A include (a→b), (b→c) and (c→d), and the intent jump relationships in the second intent relationship set extracted from conversation B include (b→c), (c→e) and (e→f), then the conversation content processing device can first traverse each intent jump relationship in the second intent relationship set of conversation A, and successively detect whether the intent jump relationships (a→b), (b→c) and (c→d) exist in the first intent relationship set L. If it is detected that the intent jump relationships (a→b), (b→c) and (c→d) do not exist in the first intent relationship set L, the intent jump relationships (a→b), (b→c) and (c→d) are added to the first intent relationship set L. At this time, L={(a→b),(b→c),(c→d)}. After traversing the second intention relationship set of conversation A, the conversation content processing device begins to traverse each intention jump relationship in the second intention relationship set of conversation B. Specifically, the conversation content processing device first determines whether the intention jump relationship (b→c) exists in the first intention relationship set L. Since the current first intention relationship set L = {(a→b), (b→c), (c→d)} already contains the intention jump relationship (b→c), the intention jump relationship is skipped, and the next intention jump relationship (c→e) is continuously detected to be present in the first intention relationship set L, until the second intention relationship sets corresponding to all conversations are traversed. Therefore, through this implementation scheme, not only the correlation between multiple conversation sentences in a single conversation can be deeply mined, but also the correlation between multiple conversation sentences in multiple conversations can be deeply mined, thereby improving the utilization rate of conversation data mining. At the same time, it can also ensure that the same intention jump relationship is avoided from being added repeatedly, thereby ensuring the uniqueness of the first intention relationship set.
[0079] Step A13, after traversing all the intent jump relations included in all the second intent relationship sets, a first intent relationship set including multiple intent jump relations is generated.
[0080] When the conversation content processing device completes the traversal of all second intention relationship sets and the addition of intention jump relationships, it can obtain the first intention relationship set obtained after the correlation analysis of all conversation dialogue statements, so as to mine the intention change path between customer service and users during the conversation process, and improve the mining utilization rate of conversation data resources. At the same time, the obtained first intention relationship set enables the system to learn the user's conversation habits and patterns in different scenarios, further optimize its conversation logic and decision-making mechanism, and enable the intelligent dialogue system to respond to complex and changing conversation scenarios more flexibly and intelligently.
[0081] When constructing the first intent relationship set, this embodiment first initializes an empty first intent relationship set, and in the process of traversing the second intent relationship set, adds the intent jump relationship that does not yet exist in the first intent relationship set to the first intent relationship set, effectively avoiding the repeated addition of intent jump relationships, saving storage space, and ensuring the uniqueness of each intent jump relationship in the final generated first intent relationship set. Moreover, by gradually constructing the first intent relationship set in a traversal manner, new intent jump relationships can continue to be added to the first intent relationship set in subsequent stages, thereby being able to adapt to changing data requirements.
[0082] Furthermore, before the above step A13, it may also include: accumulating the frequency of occurrence of each intent jump relationship during the traversal process. Accordingly, the above step A13 may include: after traversing all the intent jump relationships included in all the second intent jump relationships set, calculating the jump frequency of each intent jump relationship based on the accumulated frequency of occurrence of each intent jump relationship, and generating a first intent relationship set containing multiple intent jump relationships. Among them, the intent jump relationship carries the corresponding jump frequency information.
[0083] Specifically, after traversing the intent jump relationship, the conversation content processing device can calculate the ratio of the cumulative occurrence frequency of the corresponding intent jump relationship to the total cumulative occurrence frequency of all intent jump relationships to obtain the jump frequency of the corresponding intent jump relationship. Then, the corresponding jump frequency carrying information is added to each intent jump relationship in the first intent relationship set. For example, assuming that the intent jump relationship added to the first intent relationship set includes (a→b) k1,k2 , then after obtaining the jump frequency of the intention jump relationship, update the intention jump relationship to (a→b) k1,k2 _ p, where a represents the identifier corresponding to the first intent, b represents the identifier corresponding to the second intent, k1 and k2 represent session identifiers, and p represents the jump frequency of the intent jump relationship.
[0084] In the above implementation scheme, the obtained intent jump relationship can be applied to the dialogue process design of the dialogue system or customer service system, and the dialogue process design can be optimized in combination with the frequency of occurrence of each intent jump relationship. For example, for high-frequency intent jump relationships, smoother transition statements can be designed to improve the coherence of the dialogue. At the same time, for low-frequency or non-existent intent jump paths, you can consider whether it is necessary to adjust the dialogue strategy or add corresponding guiding statements. In addition, the dialogue strategy can be dynamically adjusted according to the frequency of intent jumps to achieve a more personalized interactive experience.
[0085] In a feasible implementation manner, in the above step S10, identifying the intention of each dialogue sentence in the dialogue data set may include steps S101 to S104:
[0086] Step S101 , semantic clustering is performed on each dialogue sentence in the dialogue data set to obtain each sentence cluster, each sentence cluster including at least one dialogue sentence.
[0087] Among them, semantic clustering refers to grouping dialogue sentences into different clusters according to their semantic content, and dialogue sentences in the same cluster are semantically similar.
[0088] Specifically, the dialogue content processing device can use word embedding to convert dialogue sentences into semantic vectors, and cluster the semantic vectors through a clustering algorithm (such as DBSCAN or hierarchical clustering) to obtain clustering results. The clustering results may include the sentence clusters into which each dialogue sentence is divided.
[0089] Step S102: extract a dialogue sentence from each sentence cluster as a representative sentence.
[0090] Specifically, the conversation content processing device may use the mean-square error (MSE) distance formula or other distance formulas to calculate the distance between each semantic vector in each sentence cluster and the corresponding cluster center, and select the conversation sentence with the smallest distance between the corresponding semantic vector and the cluster center as the representative sentence. Alternatively, the conversation content processing device may randomly select a conversation sentence in the corresponding sentence cluster as the representative sentence corresponding to the corresponding sentence cluster. By selecting representative sentences, redundant data in subsequent intent recognition tasks is reduced.
[0091] Step S103, input each representative sentence into the intention recognition model to obtain the intention corresponding to each representative sentence.
[0092] The intent recognition model may be a pre-trained model for identifying the intent labels of dialogue sentences. After obtaining each representative sentence, the dialogue content processing device inputs each representative sentence into the intent recognition model to obtain the intent corresponding to each representative sentence, and then sets the intent corresponding to the corresponding sentence cluster as the intent corresponding to the representative sentence in the corresponding sentence cluster. In this way, it is not necessary to perform intent recognition for each dialogue sentence, thereby reducing the computational cost.
[0093] Step S104, for any sentence cluster, determining that the intentions corresponding to the respective dialogue sentences in the sentence cluster are the intentions corresponding to the representative sentences in the sentence cluster.
[0094] After obtaining the intentions corresponding to each sentence cluster, the conversation content processing device directly assigns the intentions corresponding to each conversation sentence in the corresponding sentence cluster to the intentions corresponding to the representative sentence in the corresponding sentence cluster.
[0095] In the above implementation, a large number of dialogue sentences are classified into sentence clusters through semantic clustering, and representative sentences are selected to identify the intention, which reduces the number of dialogue sentences that need to be processed separately and improves data processing efficiency. It is particularly suitable for scenarios where a large amount of highly repetitive dialogue data needs to be processed.
[0096] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated later. On this basis, the above-mentioned step S20 may also include: based on the first intention relationship set, generating and displaying an intention relationship graph, wherein the intention relationship graph uses intentions as nodes and jump relationships between intentions as edges.
[0097] After obtaining the jump relationship between intents, the intent nodes corresponding to each intent can be generated in the visualization interface, and the intent nodes corresponding to the first intent and the second intent with the intent jump relationship, i.e., the first intent node and the second intent node, can be identified, and then the directed edge from the first intent node to the second intent node can be connected. At the same time, the jump frequency corresponding to each intent jump relationship can be counted, and the jump frequency information of the corresponding intent jump relationship can be added to the directed edge representing the jump relationship between the corresponding intents.
[0098] As an example, see Figure 2 , Figure 2An intent relationship diagram involved in an embodiment of the present application is shown. Assume that the first intent relationship set includes an intent jump relationship from intent A to intent B, an intent jump relationship from intent A to intent C, an intent jump relationship from intent B to intent D, an intent jump relationship from intent D to intent F, and an intent jump relationship from intent C to intent E. The intent nodes corresponding to intent A, intent B, intent C, intent D, intent E, and intent F are intent node 1, intent node 2, intent node 3, intent node 4, intent node 5, and intent node 6, respectively, then the following can be obtained: Figure 2 Intent diagram shown.
[0099] In order to better identify the user role information (customer service or customer) corresponding to each displayed intent node, in a feasible implementation, when generating and displaying the intent relationship graph, it can also include: determining the user role corresponding to each intent included in the first intent relationship set; setting the display effect of the corresponding intent node based on the user role corresponding to the intent; rendering the intent nodes corresponding to each intent according to the corresponding display effect, and generating edges between the corresponding intent nodes based on the jump relationship between the intents to display the intent relationship graph. Among them, the display effect can include display color.
[0100] Specifically, when acquiring each dialogue sentence, the conversation content processing device can also acquire the user role information corresponding to each dialogue sentence, and the user role includes customer service or customer. The conversation content processing device can obtain the user role information corresponding to the dialogue sentence associated with the intent to obtain the user role corresponding to the intent. Then, based on the user role corresponding to the intent, the display effect of the node to be generated corresponding to the intent is determined, and when the intent node corresponding to the intent is generated in the visual interface, the intent node is synchronously rendered according to the corresponding display effect. For example, for the intent node corresponding to the intent corresponding to the user role of customer service, the intent node can be filled with blue, and for the intent node corresponding to the intent corresponding to the user role of customer service, the intent node can be filled with orange.
[0101] Based on the first / second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first / second embodiment can be referred to the above description, and will not be repeated in the following. On this basis, this embodiment can also include step A30 after the above step S20:
[0102] Step A30, based on the intention relationship set, generates an intention analysis result, the intention analysis result includes the target conversation intention trajectory, high-frequency intentions in the target conversation intention trajectory, high-frequency intentions and intentions that have an intention jump relationship with the high-frequency intentions, cross-intentions and at least one of emotional intentions.
[0103] The target conversation intention trajectory refers to the trajectory formed by the intentions corresponding to each conversation statement in the target conversation. In specific implementation, the conversation content processing device can identify multiple intention jump relationships associated with the target conversation identifier in the intention relationship set, and connect each intention jump relationship to obtain the target conversation trajectory. For example, assuming that the target conversation identifier is k1, multiple intention jump relationships associated with the k1 identifier can be screened out from the intention relationship set, including (a→b) k1 , (b→c) k1 and (c→d) k1 , and further obtain the corresponding intentions with the intention identifiers a, b, c, and d. Assuming that the intentions with the intention identifiers a, b, c, and d are A, B, C, and D respectively, the target conversation intention trajectory can be obtained as A→B→C→D. By extracting the target conversation intention trajectory, the conversation content processing device can clearly track the change trajectory of the user's intention during the conversation.
[0104] Among them, the high-frequency intention in the target conversation intention track refers to the high-frequency intention in the target conversation intention track. Specifically, after identifying the intention of each conversation sentence, the conversation content processing device can calculate the frequency of occurrence of each intention, and then use the corresponding intention in the target conversation intention track with a frequency greater than a preset threshold as the high-frequency intention in the target conversation intention track. By identifying the high-frequency intention, it is possible to understand which conversations are of high frequency concern to customers and conduct in-depth analysis.
[0105] Among them, high-frequency intent refers to the intent whose corresponding appearance frequency in all intents in the intent relationship set is greater than the preset threshold. Intents that have a jump relationship with high-frequency intents can be subdivided into upstream intents and downstream intents. Upstream intent refers to the intent that serves as the starting point and leads to high-frequency intents in multiple intention jump relationships, while downstream intent refers to the subsequent intent that the high-frequency intent points to and jumps to. For example, if there is a high-frequency intent A, all intents that can jump to the high-frequency intent A can be regarded as the upstream intention of A, and other intentions that A can jump to are the downstream intentions of the high-frequency intent A. By identifying high-frequency intents and their upstream and downstream intentions, it helps companies predict the user's possible next needs or questions. Based on this prediction, companies can prepare corresponding replies or solutions in advance, thereby significantly improving service response efficiency, reducing user waiting time, and enhancing user experience.
[0106] Cross-intent refers to an intent that is associated with multiple session identifiers. If an intent is associated with multiple session identifiers, it means that the intent appears in multiple sessions and is a common intent extracted from multiple sessions. The identification of cross-intents can reveal the common intents between different sessions, which helps to understand the common needs or problems of users. By paying attention to cross-intents, companies can discover potential service improvements or market trends, and then formulate more accurate market strategies and service optimization plans.
[0107] Among them, emotional intent refers to the intention of representing emotions. For example, the content of the intent contains positive and positive words that can be used to represent happy or satisfied emotions, or the content of the intent contains negative and negative words that can be used to represent dissatisfied or frustrated emotions. The conversation content processing device can identify whether the corresponding intent contains keywords representing emotions, thereby identifying whether the corresponding intent is an emotional intent. The introduction of emotional intent enables the conversation content processing device to perceive the emotional state of the user. This emotional analysis capability helps companies understand the user's satisfaction with the service or product, promptly discover and deal with the user's dissatisfaction, and thus maintain good customer relationships.
[0108] The embodiment of the present application further provides a conversation content processing device, the conversation content processing device comprising:
[0109] The intention recognition module 10 is used to obtain a dialogue data set generated in the conversation and identify the intentions corresponding to each dialogue sentence in the dialogue data set;
[0110] The intention relationship construction module 20 is used to perform association analysis on the intentions corresponding to each dialogue sentence based on the appearance sequence of each dialogue sentence in the conversation, and obtain a first intention relationship set. The first intention relationship set includes at least one intention jump relationship, and the intention jump relationship records the first intention and the second intention that have a jump relationship.
[0111] In a feasible implementation manner, the intention relationship building module 20 includes:
[0112] an intention pair determination unit, configured to perform association analysis on the intentions corresponding to the dialogue sentences respectively based on the appearance time sequence of the dialogue sentences in any one of the multiple dialogues, and obtain each intention pair contained in the dialogue, wherein the intention pair includes a first intention and a second intention respectively corresponding to two dialogue sentences adjacent in time sequence;
[0113] A relationship building unit, used to determine that a jump relationship exists between a first intent and a second intent in an intent pair, and to build a corresponding intent jump relationship based on the first intent and the second intent;
[0114] A set generating unit, configured to generate a second intent relationship set corresponding to the session based on each intent jump relationship included in the session;
[0115] The merging unit is used to merge the second intent relationship sets corresponding to each session according to a preset merging rule to obtain the first intent relationship set.
[0116] In a feasible implementation manner, the above-mentioned merging unit is further used for:
[0117] Initialize the first intent relationship set, where the initialized first intent relationship set does not contain any intent jump relationship;
[0118] Traversing each intent jump relationship in each second intent relationship set in turn, and if the currently traversed intent jump relationship does not exist in the first intent relationship set, adding the currently traversed intent jump relationship to the first intent relationship set;
[0119] During the traversal process, the frequency of occurrence of each intention jump relationship is accumulated;
[0120] After traversing all the intention jump relationships contained in all the second intention relationship sets, the jump frequency of each intention jump relationship is calculated based on the cumulative occurrence frequency of each intention jump relationship, and a first intention relationship set containing multiple intention jump relationships is generated, each intention jump relationship carries corresponding jump frequency information.
[0121] In a feasible implementation manner, the intention recognition module 10 is further used for:
[0122] Perform semantic clustering on each dialogue sentence in the dialogue data set to obtain each sentence cluster, each sentence cluster includes at least one dialogue sentence;
[0123] Extract one conversation sentence from each sentence cluster as a representative sentence;
[0124] Input each representative sentence into the intention recognition model to obtain the intention corresponding to each representative sentence, and set the intention corresponding to the corresponding sentence cluster as the intention corresponding to the representative sentence in the corresponding sentence cluster;
[0125] For any dialogue sentence in each sentence cluster, determine the intention corresponding to the dialogue sentence as the intention corresponding to the corresponding sentence cluster.
[0126] Compared with the prior art, the beneficial effects of the conversation content processing device provided in the embodiment of the present application are the same as the beneficial effects of the conversation content processing method provided in the above embodiment, and other technical features in the conversation content processing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0127] An embodiment of the present application provides a language conversation content processing device, which may include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the conversation content processing method in the above-mentioned embodiment one.
[0128] Reference below Figure 4 , which shows a schematic diagram of the structure of a language conversation content processing device suitable for implementing the embodiment of the present application. The language conversation content processing device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The language dialogue content processing device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0129] like Figure 4As shown, the language dialogue content processing device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the language dialogue content processing device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the language conversation content processing device to communicate with other devices wirelessly or by wire to exchange data. Although the language conversation content processing device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0130] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0131] Compared with the prior art, the beneficial effects of the conversation content processing device provided in the embodiment of the present application are the same as the beneficial effects of the conversation content processing method provided in the above embodiment, and other technical features in the conversation content processing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0132] It should be understood that the various parts disclosed in the embodiments of the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0133] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0134] An embodiment of the present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the conversation content processing method in the above embodiment.
[0135] The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0136] The computer-readable storage medium may be included in the conversation content processing device; or may exist independently without being assembled into the conversation content processing device.
[0137] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the language dialogue content processing device, the dialogue content processing device executes: obtaining a dialogue data set generated in the conversation, and identifying the intentions corresponding to each dialogue sentence in the dialogue data set, performing association analysis based on the appearance sequence of each dialogue sentence in the conversation and the intentions corresponding to each dialogue sentence, to obtain a first intention relationship set, the first intention relationship set includes at least one intention jump relationship, and the intention jump relationship records a first intention and a second intention that have a jump relationship.
[0138] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0139] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0140] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0141] The readable storage medium provided in the embodiment of the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer program) for executing the above-mentioned conversation content processing method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiment of the present application are the same as the beneficial effects of the conversation content processing method provided in the above-mentioned embodiment, which will not be repeated here.
[0142] An embodiment of the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned conversation content processing method when executed by a processor.
[0143] Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of the present application are the same as the beneficial effects of the conversation content processing method provided in the above embodiment, and will not be elaborated here.
[0144] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for processing conversation content, characterized in that: The method comprises: Acquire a dialogue data set generated in the conversation, and identify the intentions corresponding to each dialogue sentence in the dialogue data set; Based on the appearance sequence of each of the dialogue sentences in the conversation, an association analysis is performed on the intentions corresponding to each of the dialogue sentences to obtain a first intention relationship set, wherein the first intention relationship set includes at least one intention jump relationship, and the intention jump relationship records a first intention and a second intention having a jump relationship.
2. The method according to claim 1, characterized in that The conversation includes a plurality of conversations, and the step of performing association analysis on the intentions corresponding to the conversation sentences based on the appearance sequence of the conversation sentences in the conversation to obtain a first intention relationship set includes: For any one of the multiple conversations, based on the appearance sequence of each of the conversation sentences in the conversation, correlation analysis is performed on the intents corresponding to each of the conversation sentences to obtain each intent pair contained in the conversation, wherein the intent pair includes a first intent and a second intent corresponding to two conversation sentences adjacent in the sequence; Determine that a jump relationship exists between the first intent and the second intent in the intent pair, and construct a corresponding intent jump relationship based on the first intent and the second intent; Based on each of the intent jump relationships included in the session, generating a second intent relationship set corresponding to the session; The second intent relationship sets corresponding to the respective conversations are merged according to a preset merging rule to obtain the first intent relationship set.
3. The method according to claim 2, characterized in that The step of merging the second intent relationship sets corresponding to the respective sessions according to the preset merging rule to obtain the first intent relationship set comprises: The second intent relationship sets corresponding to the sessions are merged, and during the merging process, the same intent jump relationships are deduplicated to obtain the first intent relationship set.
4. The method according to claim 3, characterized in that The step of merging the second intent relationship sets corresponding to the sessions, and removing duplicate intent jump relationships during the merging process to obtain the first intent relationship set includes: Initialize the first intention relationship set; Traversing each of the intent jump relations in each of the second intent relationship sets in turn, and if the currently traversed intent jump relation does not exist in the first intent relationship set, adding the currently traversed intent jump relation to the first intent relationship set; In the process of traversal, the occurrence frequency of each of the intended jump relationships is accumulated; After traversing all the intention jump relationships contained in the second intention relationship set, the jump frequency of each intention jump relationship is calculated based on the cumulative occurrence frequency of each intention jump relationship, and a first intention relationship set containing multiple intention jump relationships is generated, each of which carries corresponding jump frequency information.
5. The method according to claim 1, characterized in that The step of identifying the intentions corresponding to the respective dialogue sentences in the dialogue data set comprises: Performing semantic clustering on each of the dialogue sentences in the dialogue data set to obtain each sentence cluster, each of the sentence clusters including at least one dialogue sentence; Extracting a dialogue sentence from each of the sentence clusters as a representative sentence; Inputting each of the representative sentences into an intention recognition model to obtain the intentions corresponding to each of the representative sentences; For any of the sentence clusters, it is determined that the intentions respectively corresponding to the dialogue sentences in the sentence cluster are the intentions corresponding to the representative sentences in the sentence cluster.
6. The method according to claim 1, characterized in that After the step of performing association analysis on the intentions corresponding to the dialogue sentences based on the appearance sequence of the dialogue sentences in the conversation to obtain the first intention relationship set, the step further includes: Based on the first intention relationship set, an intention relationship graph is generated and displayed, wherein the intention relationship graph uses intentions as nodes and jump relationships between intentions as edges.
7. A conversation content processing device, characterized in that: include: An intention recognition module is used to obtain a dialogue data set generated in a conversation and recognize the intention of each dialogue sentence in the dialogue data set; An intention relationship construction module is used to perform association analysis on the intentions corresponding to each of the dialogue sentences based on the sequence of appearance of each of the dialogue sentences in the conversation, and obtain a first intention relationship set, wherein the first intention relationship set includes at least one intention jump relationship, and the intention jump relationship records a first intention and a second intention that have a jump relationship.
8. A conversation content processing device, characterized in that: The conversation content processing device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the conversation content processing method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the conversation content processing method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method for processing conversation content according to any one of claims 1 to 6 are implemented.