CN112463945B - Conversation context dividing method and system, interaction method and interaction system - Google Patents
Conversation context dividing method and system, interaction method and interaction system Download PDFInfo
- Publication number
- CN112463945B CN112463945B CN202110139520.0A CN202110139520A CN112463945B CN 112463945 B CN112463945 B CN 112463945B CN 202110139520 A CN202110139520 A CN 202110139520A CN 112463945 B CN112463945 B CN 112463945B
- Authority
- CN
- China
- Prior art keywords
- context
- node
- nodes
- loss
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000003993 interaction Effects 0.000 title claims abstract description 24
- 238000005457 optimization Methods 0.000 claims abstract description 27
- 238000012545 processing Methods 0.000 claims abstract description 11
- 238000000638 solvent extraction Methods 0.000 claims description 47
- 230000002452 interceptive effect Effects 0.000 claims description 17
- 238000005192 partition Methods 0.000 claims description 12
- 230000000295 complement effect Effects 0.000 claims description 7
- 238000012546 transfer Methods 0.000 abstract description 15
- 230000009471 action Effects 0.000 abstract description 6
- 230000008569 process Effects 0.000 description 6
- 230000008901 benefit Effects 0.000 description 5
- 230000008451 emotion Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3346—Query execution using probabilistic model
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Artificial Intelligence (AREA)
- Probability & Statistics with Applications (AREA)
- Machine Translation (AREA)
Abstract
The invention relates to the field of intelligent assistants, and discloses a session context dividing method, an interaction method and a system thereof. The conversation context dividing method comprises the following steps: determining an association probability between each pair of nodes in the historical conversation; predicting the total division loss of the context of the historical conversation according to the association probability between each node pair and the identifier to which the context of each node pair belongs; performing convex optimization processing on the total division loss, and acquiring a preset context belonged identifier of each node pair to form a preset context belonged identifier set formed by the preset context belonged identifiers of each node pair; and dividing the contexts to which the plurality of nodes in the historical conversation belong according to the preset context belonging identification set. The invention can realize the effective division of the conversation context, thereby realizing the guided transfer of the user context by guiding the action selection of the user context transfer.
Description
Technical Field
The invention relates to the field of intelligent assistants, in particular to a conversation context division method, a conversation context division system, an interaction method and an interaction system.
Background
In the application of the intelligent assistant, all the applications are developed in a question-and-answer mode. The expansion of the form of one question and one answer means that when a user asks a question, the intelligent assistant gives a corresponding answer; and the user asks a question again, the intelligent assistant gives an answer again (i.e., a single intent to represent the user's status). In fact, during the whole chat process between the two parties of the conversation, the subjects of the chat are dispersed throughout the conversation, and the conversion between each subject is random, thus making the division of the conversation context difficult.
Disclosure of Invention
The invention aims to provide a conversation context division method, a conversation context division system, an interaction method and an interaction system, which can realize effective division of conversation context, so that the guided transfer of user context can be realized by guiding the action selection of user context transfer.
In order to achieve the above object, a first aspect of the present invention provides a session context dividing method, including: determining an association probability between each node pair of a plurality of nodes in a historical session, wherein the plurality of nodes respectively represent a plurality of query intents, and the node pair comprises a first node and a second node; predicting a total partitioning loss of a context of the historical conversation according to the association probability between each node pair and a context belonging identifier of each node pair, wherein the context belonging identifier indicates whether the first node and the second node belong to the same context; performing convex optimization processing on the total division loss, and acquiring a preset context belonged identifier of each node pair to form a preset context belonged identifier set formed by the preset context belonged identifiers of each node pair; and dividing the contexts to which the plurality of nodes in the historical conversation belong according to the preset context belonging identification set.
Preferably, the predicting the total partitioning loss of the context of the historical conversation comprises: determining a partitioning loss resulting from partitioning a single context to which the first node belongs from the history session based on the association probability between each pair of nodes, wherein the single context does not include the second node; and determining a total partitioning loss of the context of the history session based on the partitioning loss resulting from partitioning the single context to which the first node belongs from the history session and the context belonging identification of the each node pair.
Preferably, the determining a division loss resulting from dividing the single context to which the first node belongs from the history session comprises: determining from the historical sessionDividing the single context to which the first node i belongsWijWherein the single context does not include a second node j: based on an association probability between the first node i and the second node jbijAnd determining a single context to which said first node i belongsDiAnd the contextDiIn complementary context ofDegree of correlation between:(ii) a Based on an association probability between the first node i and the second node jbijAnd the following formula, determining the contextDiInternal degree of cohesion O: (Di):(ii) a And according to the correlation degreeThe degree of cohesion O: (Di) And determining the partition loss byWij:。
Preferably, the determining a total division loss of the context of the history session based on the division loss resulting from dividing the single context to which the first node belongs from the history session and the identification to which the context of each node pair belongs comprises: based on the partitioning lossWijContext belonging identification of the first node i and the second node jCijAnd determining a total partition penalty Q for the session context,whereinnThe number of the plurality of nodes.
Preferably, the convex optimization processing on the total partition loss comprises: optimizing the identifier of the context of each node pair when the plurality of nodes meet the constraint condition, and predicting the total division loss of the contexts of the historical conversation under different optimization conditions; and determining the identifier to which the context belongs of each node pair corresponding to the total division loss of the context of the history conversation as the preset identifier to which the context belongs under the condition that the division loss of the context of the history conversation reaches the minimum value.
Preferably, the constraint is that any one of the plurality of nodes belongs to one context.
Preferably, before performing the determining the association probability between each node pair of the plurality of nodes in the historical conversation, the conversation context dividing method further comprises: identifying a plurality of query intents corresponding to a plurality of user queries in the historical session; and establishing a plurality of nodes corresponding to the plurality of query intents.
Through the technical scheme, the method creatively determines the association probability between each node pair in a plurality of nodes in the historical conversation; then predicting the total dividing loss of the context of the historical conversation according to the association probability between each node pair and the belonged identifier of the context; then carrying out convex optimization processing on the total division loss, and acquiring the preset context belonged identification of each node pair; and finally, dividing the contexts of the plurality of nodes in the historical conversation according to a preset context belonging identification set formed by the preset context belonging identification of each node pair. Therefore, the invention can realize effective and accurate division of the conversation context, so that the guided transfer of the user context can be realized by guiding the action selection of the user context transfer.
The second aspect of the present invention provides an interaction method, including: based on the conversation context division method, obtaining the contexts of a plurality of nodes in the historical conversation; and determining a session guide between the user and the interactive party according to the contexts to which the plurality of nodes belong.
Through the technical scheme, the context to which a plurality of nodes in the historical conversation belong is creatively obtained according to the conversation context division method; and then determining the conversation guide between the user and the interactive party according to the contexts to which the nodes belong, so that the guide transfer of the user contexts can be realized by guiding the action selection of the transfer of the user contexts, and the interaction efficiency and the satisfaction degree of the user can be effectively improved.
A third aspect of the present invention provides a conversation context dividing system, comprising: an association probability determination device for determining an association probability between each node pair of a plurality of nodes in the historical session, wherein the plurality of nodes respectively represent a plurality of query intents, and the node pair comprises a first node and a second node; predicting means for predicting a total partitioning loss of the context of the historical conversation based on the association probability between each node pair and a context belonging identifier of each node pair, wherein the context belonging identifier indicates whether the first node and the second node belong to the same context; the optimization device is used for performing convex optimization processing on the total division loss and acquiring the preset context belonged identifier of each node pair so as to form a preset context belonged identifier set formed by the preset context belonged identifiers of each node pair; and dividing means for dividing the contexts to which the plurality of nodes in the history session belong according to the preset context belonging identifier set.
Preferably, the prediction means comprises: a loss determination module for determining a division loss resulting from dividing a single context to which the first node belongs from the history session based on the association probability between each pair of nodes; and a total loss determination module for determining a total division loss of the context of the history session based on a division loss generated by dividing a single context to which the first node belongs from the history session and the context belonging identifier of each node pair.
Preferably, the loss determining module includes: a relevance determination unit for determining relevance based on the first nodei and the second node jbijAnd determining a single context to which said first node i belongsDiAnd the contextDiIn complementary context ofDegree of correlation between:(ii) a A cohesion determination unit for determining the cohesion degree based on the association probability between the first node i and the second node jbijAnd the following formula, determining the contextDiInternal degree of cohesion O: (Di):(ii) a And a loss determination unit for determining the loss according to the correlationThe degree of cohesion O: (Di) And determining the partition loss byWij:。
Preferably, the total loss determination module for determining the total partitioning loss of the context of the historical session comprises: based on the partitioning lossWijContext belonging identification of the first node i and the second node jCijAnd determining a total partition penalty Q for the context of the historical conversation,whereinnThe number of the plurality of nodes.
Preferably, the optimization device comprises: the optimization module is used for optimizing the identifier to which the context belongs of each node pair under the condition that the nodes meet the constraint condition, and predicting the total division loss of the contexts of the historical conversation under different optimization conditions; and a preset affiliated identifier determining module, configured to determine, as the preset context affiliated identifier, the context affiliated identifier of each node pair corresponding to a total division loss of the context of the history session, when the division loss of the context of the history session reaches a minimum value.
Preferably, the constraint is that any one of the plurality of nodes belongs to one context.
Preferably, the session context dividing system further comprises: identifying means for identifying a plurality of query intents corresponding to a plurality of user queries in the historical session; and establishing means for establishing a plurality of nodes corresponding to the plurality of query intents.
For specific details and benefits of the session context partitioning system provided by the present invention, reference may be made to the above description of the session context partitioning method, which is not described herein again.
The fourth aspect of the present invention also provides an interactive system, including: the conversation context division system is used for acquiring the contexts of a plurality of nodes in historical conversation; and a direction determining device for determining the conversation direction between the user and the interactive party according to the contexts of the plurality of nodes.
For details and advantages of the interactive system provided by the present invention, reference may be made to the above description of the interactive method, which is not described herein again.
The fifth aspect of the present invention also provides a machine-readable storage medium having stored thereon instructions for causing a machine to execute the session context dividing method and the interaction method.
The sixth aspect of the present invention also provides an electronic apparatus, including: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instruction from the memory and executing the instruction to realize the conversation context division method and the interaction method.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the embodiments of the invention without limiting the embodiments of the invention. In the drawings:
FIG. 1 is a flowchart of a method for session context partitioning according to an embodiment of the present invention;
FIG. 2 is a flow chart of predicting total partition loss for the context of the historical session according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of contextual modeling provided by an embodiment of the invention; and
fig. 4 is a flowchart of an interaction method according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
Before describing various embodiments of the present invention, a brief description of several concepts related to the present invention will be provided.
Fig. 1 is a flowchart of a session context dividing method according to an embodiment of the present invention. As shown in fig. 1, the session context dividing method may include the following steps S101-S104.
Before performing step S101, the session context dividing method may further include: identifying a plurality of query intents corresponding to a plurality of user queries in the historical session; and establishing a plurality of nodes corresponding to the plurality of query intents.
The data source for the historical conversation may come from the text data in the online chat tool: for example, 9000 ten thousand or more of data in 6 months in 2020. Through random selection, 1000 ten thousand data can be analyzed. The data may then be pre-processed: screening data (a session starting with a user sending a house source) with business opportunities (i.e., house source transaction events resulting from a user entering the session from a house source detail page), the screened or filtered data may be 300 million.
First, a plurality of user queries in the historical session may be identified by an intent recognition model (or manual recognition) to determine a plurality of query intents corresponding to the plurality of user queries. For example, several intentions of a kindergarten, elementary school, middle school, etc. are recognized. Then, a plurality of nodes corresponding to the plurality of intents as shown in fig. 3 may be established.
Wherein, the intention of the user inquiry (i.e. the question posed by the user) can be used as a node, such as: when the user consults the situation of the information of the elementary school, the current context is the node of the elementary school. While a context may comprise a plurality of nodes, such as in a school context, the context may comprise a primary school, middle school, kindergarten, and the like. In particular, an ordered set of these nodes can be constructed as one context.
Step S101, an association probability between each node pair of the plurality of nodes in the history session is determined.
Wherein the plurality of nodes respectively represent a plurality of query intents, and the pair of nodes includes a first node and a second node. For example, node 1 (representing intent 1) and node 3 (representing intent 3). The association probability refers to the association of the user transferring from one node to the next node, and is calculated by combining the theme, emotion, sentence, slot and reference of the node (which can be calculated by adopting various existing reasonable modes).
Taking the second-order markov probability correlation as an example, it is assumed that in the transformation process of the user node, the correlation between nodes can be generated only under the condition that adjacent nodes or one node is separated. Fig. 3 illustrates this problem. That is, 0 represents no correlation between nodes (correlation distance between nodes is too far).bijRepresenting the association probability between the ith node and the jth node. Wherein j is greater than i. FIG. 3 shows the associations between nodes in a singly linked list. However, since the association between nodes is mutual, it is possible to prevent the occurrence of a failure in the networkbijIs equal tobji. Wherein,bijcan be composed of said pluralityThe topic, emotion, sentence, slot and/or reference of the node are calculated or labeled by a labeling person, and the sum of the related probabilities of each node is 1 (for a node, the sum of the related probabilities between the node and other nodes to which the node is to be converted is 1).
Of course, the embodiments of the present invention are not limited to the above second order Markov probability correlation, and any node may generate a correlation.
TABLE 1 node (i.e. intent or topic) Association distribution Table
Context relevance | Intention 1 | Intention 2 | Intention 3 | Intention 4 | Intention 5 | Intention 6 | Intention 7 | Intention 8 | Intention 9 |
Intention 1 | 0 | b12 | b13 | 0 | 0 | 0 | 0 | 0 | 0 |
Intention 2 | b21 | 0 | b23 | b24 | 0 | 0 | 0 | 0 | 0 |
Intention 3 | b31 | b32 | 0 | b34 | b35 | 0 | 0 | 0 | 0 |
Intention 4 | 0 | b42 | b43 | 0 | b45 | b46 | 0 | 0 | 0 |
Intention 5 | 0 | 0 | b53 | b54 | 0 | b56 | b57 | 0 | 0 |
Intention 6 | 0 | 0 | 0 | b64 | b65 | 0 | b67 | b68 | 0 |
Intention 7 | 0 | 0 | 0 | 0 | b75 | b76 | 0 | b78 | b79 |
Intention 8 | 0 | 0 | 0 | 0 | 0 | b86 | b87 | 0 | b89 |
Intention 9 | 0 | 0 | 0 | 0 | 0 | 0 | b97 | b98 | 0 |
And step S102, predicting the total dividing loss of the context of the historical conversation according to the association probability between each node pair and the identifier of the context of each node pair.
Wherein the context belonging flag indicates whether the first node and the second node belong to the same context. For example, context belonging identifications for node i and node j may be availableCijRepresents: when the node i and the node j are in one context, thenCij= 1; and if it is negative or positive, it is 0. Namely, it isCij∈{0,1}。CijIndicating whether node i and node j are one context.
For step S102, the predicting the total partitioning loss of the context of the historical session may include the following steps S201-S202, as shown in fig. 2.
Step S201, determining a division loss resulting from dividing the single context to which the first node belongs from the history session based on the association probability between each node pair.
For step S201, the determining a division loss resulting from dividing the single context to which the first node belongs from the history session may include: determining a partitioning loss resulting from partitioning the history session into a single context to which the first node i belongsWijWherein the single context does not include the second node j.
First, based on the association probability between any node s and another node tbstAnd a definition of the degree of association (as shown in the following formula (1)), and determining the context M and the t context N to which the node s belongskDegree of association W (M, N) betweenk) (ii) a Then according to the relevance W (M, N)k) And the following equation (2) for determining a single context to which the first node i belongsDiAnd the contextDiIn complementary context of(i.e. context in the corpus context)DiComplement of) of the same,
In contextDiIs composed ofD1And the complementary contexts mentioned aboveIncludedD2AndD3(context of the corpusD1、D2AndD3) In the case of (1), NkCan belong to context respectivelyD2AndD3. That is, based on the association probability between the first node i and the second node jbijAnd (3) determining a single context to which said first node i belongsDiAnd the contextDiIn complementary context ofDegree of correlation between,
Secondly, based on the association probability between the first node i and the second node jbijAnd the following formula (4), determining the contextDiInternal degree of cohesion O: (Di):
Finally, according to the correlation degreeThe degree of cohesion O: (Di) And the following formula (5) for determining the division lossWij:
The process of step S201 is a modeling design according to an actual application scenario, which can accurately determine the division loss generated by dividing the single context to which the first node belongs from the history session based on the association probability between each node pair.
Step S202, determining a total partitioning loss of the context of the history session based on the partitioning loss generated by partitioning the single context to which the first node belongs from the history session and the identifier to which the context of each node pair belongs.
For step S202, the determining the total partitioning loss of the context of the historical session may include: based on the partitioning lossWijContext belonging identification of the first node i and the second node jCijAnd the following formula (6) for determining the total partition loss of the context of the historical conversationThe Q is lost,
whereinnThe number of the plurality of nodes.
Step S103, performing convex optimization processing on the total division loss, and obtaining the identifier to which the preset context belongs of each node pair, so as to form a preset context belonging identifier set formed by the identifiers to which the preset context belongs of each node pair.
For step S103, the convex optimization processing on the total partition loss may include: optimizing the identifier of the context of each node pair when the plurality of nodes meet the constraint condition, and predicting the total division loss of the contexts of the historical conversation under different optimization conditions; and determining the identifier to which the context belongs of each node pair corresponding to the total division loss of the context of the history conversation as the preset identifier to which the context belongs under the condition that the division loss of the context of the history conversation reaches the minimum value. The identifier to which the preset context belongs may be an identifier to which the optimal preset context belongs. Wherein the constraint may be that any one of the plurality of nodes belongs to only one context.
Specifically, the following two cases can be considered:
wherein,dijkindicating whether node k is included in the context formed by node i and node j, i.e.. Constraint conditions in the present embodimentTo exclude the other cases of the above cases (1) and (2), the constraint conditions are:. The constraints have two main roles: (1) nodes can be prevented from not belonging to any context; (2) nodes can be prevented from belonging to multiple contexts.
Specifically, the convex optimization process means that the association between user contexts can be regarded as a 0-1 planning problem, i.e. the association between nodes can be divided into two ways of association and disconnection, and is represented by 0 or 1. Different convex optimization conditions (i.e. different sets of context belongings (the set is the set formed by the context belongings of each node pair)C12, C13,…C24…C35…}), i.e. the identifier to which each context belongs may be 0 or 1), the partitioning loss of the contexts of the historical session is optimized until Q = Qmin and the following constraint is satisfied:
s.t.(subject to)
Optimization of the above process by Branch and cut (Branch and cut)Cij0-1 linear integer programming problem) is solved using the CBC (Coin-OR Branch-and-Cut)2.10.5 open source framework as Solver (Solver). And a heuristic pre-solving function is opened during solving, and a delimiting Generator (Cut Generator) function is opened during solving each child node, so that the solving speed can be effectively accelerated. Wherein,Cije {0,1} which belongs to a 0-1 programming problem, can be solved by using the solverCijThe relaxation is:。
and step S104, dividing the contexts to which the plurality of nodes in the historical conversation belong according to the preset context belonging identification set.
Said predetermined context belonging to a set of identifiers (e.g. an optimal context belonging to a set of identifiers)C12,C13,…C24… C35…In case of = {0,1, … 1, … 1, … }, it indicates that node 1 (e.g., kindergarten) does not belong to the same context as node 2 (e.g., area of house origin), node 1 (e.g., kindergarten) belongs to the same context as node 3 (e.g., elementary school), node 2 belongs to the same context as node 4, and node 3 (e.g., elementary school) belongs to the same context as node 5 (e.g., middle school), and node 1 (e.g., kindergarten), node 3 (e.g., elementary school) and node 5 (e.g., middle school) may be divided into the same context, and similar operations are performed on other nodes.
The context of the historical conversation in a certain time period is divided through the conversation context dividing process, and the following dividing results are obtained. The contents within each box represent a context, as shown in table 2. Specifically, box 1 corresponds to the house source context, box 2 corresponds to the house fund context, box 3 corresponds to the school context, and box 4 corresponds to the overview context.
TABLE 2 Effect of Session context segmentation
user _ id represents user;
agent _ id represents a broker;
conv _ ID represents session ID;
msg _ ID represents a message ID;
from _ ID represents a transmission ID;
to _ ID represents a reception ID; and
msg represents the transmitted message.
In summary, the present invention inventively begins by determining an association probability between each node pair of a plurality of nodes in a historical session; then predicting the total dividing loss of the context of the historical conversation according to the association probability between each node pair and the belonged identifier of the context; then carrying out convex optimization processing on the total division loss, and acquiring the preset context belonged identification of each node pair; and finally, dividing the contexts of the plurality of nodes in the historical conversation according to a preset context belonging identification set formed by the preset context belonging identification of each node pair. Therefore, the invention can realize effective and accurate division of the conversation context, so that the guided transfer of the user context can be realized by guiding the action selection of the user context transfer.
Fig. 4 is a flowchart of an interaction method according to an embodiment of the present invention. As shown in fig. 4, the interaction method may include: step S401, based on the session context division method, obtaining contexts to which a plurality of nodes in a history session belong; and step S402, determining conversation guidance between the user and the interactive party according to the contexts of the nodes.
Specifically, the context transfer between the user and the broker can be guided according to the house source context, the house fund context, the school context and the appointment context obtained in table 2, so as to realize the guided transfer of the conversation context. Therefore, the embodiment can help the broker to determine the session guidance (i.e. the direction of the context transfer), for example, after the user finishes consulting the items about house resources, the user can be guided about the topic about house money, so that the interaction efficiency can be effectively improved, and the establishment of business opportunities can be greatly promoted.
In summary, the context to which a plurality of nodes in a history session belong is creatively obtained according to the session context division method; and then determining the conversation guide between the user and the interactive party according to the contexts to which the nodes belong, so that the guide transfer of the user contexts can be realized by guiding the action selection of the transfer of the user contexts, and the interaction efficiency and the satisfaction degree of the user can be effectively improved.
An embodiment of the present invention further provides a system for dividing a session context, where the system for dividing a session context includes: an association probability determination device for determining an association probability between each node pair of a plurality of nodes in the historical session, wherein the plurality of nodes respectively represent a plurality of query intents, and the node pair comprises a first node and a second node; predicting means for predicting a total partitioning loss of the context of the historical conversation based on the association probability between each node pair and a context belonging identifier of each node pair, wherein the context belonging identifier indicates whether the first node and the second node belong to the same context; the optimization device is used for performing convex optimization processing on the total division loss and acquiring the preset context belonged identifier of each node pair so as to form a preset context belonged identifier set formed by the preset context belonged identifiers of each node pair; and dividing means for dividing the contexts to which the plurality of nodes in the history session belong according to the preset context belonging identifier set.
Preferably, the prediction means comprises: a loss determination module for determining a division loss resulting from dividing a single context to which the first node belongs from the history session based on the association probability between each pair of nodes; and a total loss determination module for determining a total division loss of the context of the history session based on a division loss generated by dividing a single context to which the first node belongs from the history session and the context belonging identifier of each node pair.
Preferably, the loss determining module includes: a relevance determining unit for determining relevance probability between the first node i and the second node jbijAnd determining a single context to which said first node i belongsDiAnd the contextDiIn complementary context ofDegree of correlation between:(ii) a A cohesion determination unit for determining the cohesion degree based on the association probability between the first node i and the second node jbijAnd the following formula, determining the contextDiInternal degree of cohesion O: (Di):(ii) a And a loss determination unit for determining the loss according to the correlationThe degree of cohesion O: (Di) And determining the partition loss byWij:。
Preferably, the total loss determination module for determining the total partitioning loss of the context of the historical session comprises: based on the partitioning lossWijContext belonging identification of the first node i and the second node jCijAnd determining a total partition penalty Q for the context of the historical conversation,whereinnThe number of the plurality of nodes.
Preferably, the optimization device comprises: the optimization module is used for optimizing the identifier to which the context belongs of each node pair under the condition that the nodes meet the constraint condition, and predicting the total division loss of the contexts of the historical conversation under different optimization conditions; and a preset affiliated identifier determining module, configured to determine, as the preset context affiliated identifier, the context affiliated identifier of each node pair corresponding to a total division loss of the context of the history session, when the division loss of the context of the history session reaches a minimum value.
Preferably, the constraint is that any one of the plurality of nodes belongs to one context.
Preferably, the session context dividing system further comprises: identifying means for identifying a plurality of query intents corresponding to a plurality of user queries in the historical session; and establishing means for establishing a plurality of nodes corresponding to the plurality of query intents.
For specific details and benefits of the session context partitioning system provided by the present invention, reference may be made to the above description of the session context partitioning method, which is not described herein again.
An embodiment of the present invention further provides an interactive system, where the interactive system includes: the conversation context division system is used for acquiring the contexts of a plurality of nodes in historical conversation; and a direction determining device for determining the conversation direction between the user and the interactive party according to the contexts of the plurality of nodes.
For details and advantages of the interactive system provided by the present invention, reference may be made to the above description of the interactive method, which is not described herein again.
An embodiment of the present invention further provides a machine-readable storage medium, having stored thereon instructions for causing a machine to execute the session context dividing method and the interaction method.
An embodiment of the present invention further provides an electronic device, including: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instruction from the memory and executing the instruction to realize the conversation context division method and the interaction method.
Although the embodiments of the present invention have been described in detail with reference to the accompanying drawings, the embodiments of the present invention are not limited to the details of the above embodiments, and various simple modifications can be made to the technical solutions of the embodiments of the present invention within the technical idea of the embodiments of the present invention, and the simple modifications all belong to the protection scope of the embodiments of the present invention.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, the embodiments of the present invention do not describe every possible combination.
Those skilled in the art will understand that all or part of the steps in the method according to the above embodiments may be implemented by a program, which is stored in a storage medium and includes several instructions to enable a single chip, a chip, or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In addition, any combination of various different implementation manners of the embodiments of the present invention is also possible, and the embodiments of the present invention should be considered as disclosed in the embodiments of the present invention as long as the combination does not depart from the spirit of the embodiments of the present invention.
Claims (12)
1. A method for session context division, the method comprising:
determining an association probability between each node pair of a plurality of nodes in a historical session, wherein the plurality of nodes respectively represent a plurality of query intents, and the node pair comprises a first node and a second node;
predicting a total partitioning loss of a context of the historical conversation according to the association probability between each node pair and a context belonging identifier of each node pair, wherein the context belonging identifier indicates whether the first node and the second node belong to the same context;
performing convex optimization processing on the total division loss, and acquiring a preset context belonged identifier of each node pair corresponding to the total division loss to form a preset context belonged identifier set formed by the preset context belonged identifiers of each node pair; and
and dividing the contexts to which the plurality of nodes in the historical conversation belong according to the preset context belonging identification set.
2. The method according to claim 1, wherein predicting the total partitioning loss of the context of the historical conversation comprises:
determining a partitioning loss resulting from partitioning a single context to which the first node belongs from the history session based on the association probability between each pair of nodes, wherein the single context does not include the second node; and
determining a total partitioning loss for the context of the history session based on partitioning losses resulting from partitioning the history session a single context to which the first node belongs and the context belonging identification of the each node pair.
3. The method according to claim 2, wherein said determining a partitioning loss resulting from partitioning the single context to which the first node belongs from the history session comprises: determining a partitioning penalty resulting from partitioning a single context to which a first node i belongs from the history session in the following mannerWijWherein the single context does not include a second node j:
based on an association probability between the first node i and the second node jbijAnd determining a single context to which said first node i belongsDiAnd the contextDiIn complementary context ofDegree of correlation between:
Based on an association probability between the first node i and the second node jbijAnd the following formula, determining the contextDiInternal degree of cohesion O: (Di):
according to the degree of associationThe degree of cohesion O: (Di) And determining the partition loss byWij:
4. The method according to claim 3, wherein the determining the total partitioning loss of the context of the history session based on the partitioning loss generated by partitioning the single context to which the first node belongs from the history session and the context belonging identifier of each node pair comprises:
based on the partitioning lossWijContext belonging identification of the first node i and the second node jCijAnd determining a total partition penalty Q for the context of the historical conversation,
whereinnThe number of the plurality of nodes.
5. The method according to claim 1, wherein said convex optimization of said total partitioning loss comprises:
optimizing the identifier of the context of each node pair when the plurality of nodes meet the constraint condition, and predicting the total division loss of the history session context under different optimization conditions; and
determining the identifier to which the context belongs of each node pair corresponding to the total division loss of the context of the history session as the preset identifier to which the context belongs when the division loss of the context of the history session reaches a minimum value.
6. The method according to claim 5, wherein the constraint is that any one of the plurality of nodes belongs to only one context.
7. The method according to claim 1, wherein prior to performing the determining the probability of association between each node pair of the plurality of nodes in the historical conversation, the method further comprises:
identifying a plurality of query intents corresponding to a plurality of user queries in the historical session; and
a plurality of nodes corresponding to the plurality of query intents is established.
8. An interaction method, characterized in that the interaction method comprises:
based on the session context division method according to any one of claims 1 to 7, obtaining contexts to which a plurality of nodes in a history session belong; and
determining a session guide between the user and the interactive party according to the contexts to which the plurality of nodes belong.
9. A conversation context partitioning system, comprising:
an association probability determination device for determining an association probability between each node pair of a plurality of nodes in the historical session, wherein the plurality of nodes respectively represent a plurality of query intents, and the node pair comprises a first node and a second node;
predicting means for predicting a total partitioning loss of the context of the historical conversation based on the association probability between each node pair and a context belonging identifier of each node pair, wherein the context belonging identifier indicates whether the first node and the second node belong to the same context;
the optimization device is used for performing convex optimization processing on the total division loss and acquiring the preset context belonged identifier of each node pair corresponding to the total division loss so as to form a preset context belonged identifier set formed by the preset context belonged identifiers of each node pair; and
and the dividing device is used for dividing the contexts to which the plurality of nodes in the historical conversation belong according to the preset context belonging identification set.
10. An interactive system, characterized in that the interactive system comprises:
the session context partitioning system according to claim 9, for obtaining contexts to which a plurality of nodes in a history session belong; and
and the guide determining device is used for determining the conversation guide between the user and the interactive party according to the contexts of the nodes.
11. A machine-readable storage medium having stored thereon instructions for causing a machine to perform the session context dividing method of any one of claims 1 to 7 and the interaction method of claim 8.
12. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the session context dividing method according to any one of the preceding claims 1 to 7 and the interaction method according to the preceding claim 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110139520.0A CN112463945B (en) | 2021-02-02 | 2021-02-02 | Conversation context dividing method and system, interaction method and interaction system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110139520.0A CN112463945B (en) | 2021-02-02 | 2021-02-02 | Conversation context dividing method and system, interaction method and interaction system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112463945A CN112463945A (en) | 2021-03-09 |
CN112463945B true CN112463945B (en) | 2021-04-23 |
Family
ID=74802504
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110139520.0A Active CN112463945B (en) | 2021-02-02 | 2021-02-02 | Conversation context dividing method and system, interaction method and interaction system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112463945B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114036959A (en) * | 2021-11-25 | 2022-02-11 | 北京房江湖科技有限公司 | Method, apparatus, computer program product and storage medium for determining a context of a conversation |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1701343A (en) * | 2002-09-20 | 2005-11-23 | 德克萨斯大学董事会 | Computer program products, systems and methods for information discovery and relational analyses |
CN110313154A (en) * | 2017-02-14 | 2019-10-08 | 微软技术许可有限责任公司 | Intelligent assistant with the information discrimination based on intention |
CN111445263A (en) * | 2019-01-15 | 2020-07-24 | 北京京东尚科信息技术有限公司 | Information processing method, device, computer system and medium |
-
2021
- 2021-02-02 CN CN202110139520.0A patent/CN112463945B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1701343A (en) * | 2002-09-20 | 2005-11-23 | 德克萨斯大学董事会 | Computer program products, systems and methods for information discovery and relational analyses |
CN110313154A (en) * | 2017-02-14 | 2019-10-08 | 微软技术许可有限责任公司 | Intelligent assistant with the information discrimination based on intention |
CN111445263A (en) * | 2019-01-15 | 2020-07-24 | 北京京东尚科信息技术有限公司 | Information processing method, device, computer system and medium |
Non-Patent Citations (2)
Title |
---|
Supervised Clustering of Questions into Intents;Iryna Haponchyk等;《SUPERVISED CLUSTERING OF QUESTIONS INTO INTENTS FOR DIALOG》;20181031;第2310-2321页 * |
融合多视角多标签信息的隐语义空间学习;韦滨;《万方》;20201214;第二章 * |
Also Published As
Publication number | Publication date |
---|---|
CN112463945A (en) | 2021-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210406473A1 (en) | System and method for building chatbot providing intelligent conversational service | |
US11526664B2 (en) | Method and apparatus for generating digest for message, and storage medium thereof | |
US11461317B2 (en) | Method, apparatus, system, device, and storage medium for answering knowledge questions | |
Jiroušek et al. | Compositional models and conditional independence in evidence theory | |
CN112463945B (en) | Conversation context dividing method and system, interaction method and interaction system | |
US20230418879A1 (en) | System and method of data transformation | |
Li et al. | A semantic collaboration method based on uniform knowledge graph | |
CN117271084A (en) | Workflow generation method and device, electronic equipment and storage medium | |
CN111666388B (en) | Dialogue data processing method, device, computer equipment and storage medium | |
US11699435B2 (en) | System and method to interpret natural language requests and handle natural language responses in conversation | |
Rahane et al. | Artificial intelligence based solarbot | |
Skibski et al. | Partition decision trees: representation for efficient computation of the Shapley value extended to games with externalities | |
Eckstein et al. | Projective hedging algorithms for multistage stochastic programming, supporting distributed and asynchronous implementation | |
Xiao et al. | A Hesitant Fuzzy Linguistic Multicriteria Decision‐Making Method with Interactive Criteria and Its Application to Renewable Energy Projects Selection | |
JP2014096058A (en) | Inter-document relationship estimation model learning unit, inter-document relationship estimation device, method and program | |
Chairatanakul et al. | Cross-lingual transfer for text classification with dictionary-based heterogeneous graph | |
Sakurai et al. | A compact representation scheme of coalitional games based on multi-terminal zero-suppressed binary decision diagrams | |
Villacorta et al. | Towards fuzzy linguistic Markov chains | |
Aha et al. | Causal Query Elaboration in Conversational Case-Based Reasoning. | |
Oudshoorn et al. | Reasoning with the Core Chase: the Case of SHACL Validation over ELHI Knowledge Bases | |
Laradji et al. | Workflow discovery from dialogues in the low data regime | |
CN111858832B (en) | Dialogue method, dialogue device, electronic equipment and storage medium | |
Kala | On sampling inside obstacles for boosted sampling of narrow corridors | |
US20240184996A1 (en) | Method and system for generating contextual explanation for model predictions | |
Han et al. | Using Pi-calculus to model dynamic web services composition based on the authority model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |