Semantic space based dialogue method, apparatus, device and storage medium

CN117648402BActive Publication Date: 2026-10-20MIDEA GRP (SHANGHAI) CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311588584.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2026-10-20
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

[0003]但是,在模型训练阶段需要大量的训练语料,还要进行人工标注,耗费大量的人力物力和时间成本,且对于多轮对话无法准确的继承前轮对话中的信息导致回复的准确率也比较低

Benefits of technology

[0019]本公开提供的基于语义空间的对话方法,预先构建有语义空间,语义空间包括多个状态节点和多条跳转边,多个状态节点间通过跳转边连接,每个跳转边用于连接两个状态节点,所述多个状态节点包括应用于不同对话类型的节点,且至少有一个跳转边所连接的两个状态节点属于不同对话类型,包括:获取用户在当前轮对话发出的当前语句;从多个状态节点中确定和当前轮对话的目标对话任务匹配的目标状态节点,其中,从目标状态节点出发的目标跳转边和当前语句匹配;将目标跳转边指向的状态节点确定为当前轮对话的当前状态节点,并基于当前状态节点生成当前语句的回复语句,完成当前轮对话。本公开提供的方法,有效提高了对话回复的准确率,在一定程度上减少了人力物力和时间成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117648402B_ABST
    Figure CN117648402B_ABST
Patent Text Reader

Abstract

The application relates to a semantic space-based dialogue method, device, equipment and storage medium. A pre-constructed semantic space comprises a plurality of state nodes and a plurality of jump edges, each jump edge is used for connecting two state nodes, the plurality of state nodes comprise nodes applied to different dialogue types, and at least two state nodes connected by a jump edge belong to different dialogue types. The method comprises the following steps: obtaining a current sentence issued by a user in a current round of dialogue; determining a target state node matched with a target dialogue task of the current round of dialogue from the plurality of state nodes, wherein a target jump edge starting from the target state node matches the current sentence; determining a state node pointed to by the target jump edge as a current state node of the current round of dialogue, and generating a reply sentence of the current sentence based on the current state node, and completing the current round of dialogue. The method provided by the disclosure effectively improves the accuracy of dialogue reply, and reduces the manpower, material resources and time cost to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a semantic space-based dialogue method, apparatus, device, and storage medium. Background Technology

[0002] With the development of artificial intelligence, human-computer interaction methods that enable real-time dialogue with users through dialogue systems have gradually become a research focus. Currently, most human-computer interaction methods use neural network models, which are trained using a large amount of dialogue history in the early stages, and then generate dialogue responses directly from the trained model.

[0003] However, the model training phase requires a large amount of training data and manual annotation, which consumes a lot of manpower, material resources and time. Furthermore, it cannot accurately inherit information from previous rounds of dialogue in multi-turn dialogues, resulting in a relatively low accuracy rate of responses. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of this disclosure provide a semantic space-based dialogue method, apparatus, device, and storage medium, which effectively improves the accuracy of dialogue responses and reduces manpower, material resources, and time costs to a certain extent.

[0005] In a first aspect, embodiments of this disclosure provide a semantic space-based dialogue method, wherein a semantic space is pre-constructed, the semantic space including multiple state nodes and multiple jump edges, each jump edge connecting two state nodes, the multiple state nodes including nodes applied to different dialogue types, and at least one jump edge connecting two state nodes belonging to different dialogue types, the method including:

[0006] Get the current statement made by the user in the current round of conversation;

[0007] From the plurality of state nodes, determine the target state node that matches the target dialogue task of the current round of dialogue, wherein the target jump edge originating from the target state node matches the current statement;

[0008] The state node pointed to by the target jump edge is determined as the current state node of the current round of dialogue, and the response statement of the current statement is generated based on the current state node to complete the current round of dialogue.

[0009] Secondly, embodiments of this disclosure provide a semantic space-based dialogue device, which pre-constructs a semantic space including multiple state nodes and multiple transition edges. Each transition edge connects two state nodes. The multiple state nodes include nodes applicable to different dialogue types, and at least one transition edge connects two state nodes belonging to different dialogue types. The device includes:

[0010] The acquisition unit is used to acquire the current statement issued by the user in the current round of dialogue;

[0011] A determining unit is configured to determine, from the plurality of state nodes, a target state node that matches the target dialogue task of the current round of dialogue, wherein a target jump edge originating from the target state node matches the current statement.

[0012] The generation unit is used to determine the state node pointed to by the target jump edge as the current state node of the current round of dialogue, and generate the reply statement of the current statement based on the current state node to complete the current round of dialogue.

[0013] Thirdly, embodiments of this disclosure provide an electronic device, including:

[0014] Memory;

[0015] Processor; and

[0016] Computer programs;

[0017] The computer program is stored in the memory and configured to be executed by the processor to implement the semantic space-based dialogue method as described above.

[0018] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the semantic space-based dialogue method described above.

[0019] The semantic space-based dialogue method disclosed herein pre-constructs a semantic space comprising multiple state nodes and multiple jump edges. The state nodes are connected by jump edges, with each jump edge connecting two state nodes. The multiple state nodes include nodes applicable to different dialogue types, and at least one jump edge connects two state nodes belonging to different dialogue types. The method includes: obtaining the current statement issued by the user in the current round of dialogue; determining a target state node from the multiple state nodes that matches the target dialogue task of the current round of dialogue, wherein the target jump edge originating from the target state node matches the current statement; determining the state node pointed to by the target jump edge as the current state node of the current round of dialogue; and generating a response statement based on the current statement based on the current state node to complete the current round of dialogue. The method provided herein effectively improves the accuracy of dialogue responses and, to a certain extent, reduces human, material, and time costs. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0021] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A schematic diagram illustrating an application scenario provided by an embodiment of this disclosure;

[0023] Figure 2 A flowchart illustrating a semantic space-based dialogue method provided in this embodiment of the disclosure;

[0024] Figure 3 A schematic diagram of the structure of a semantic space provided in an embodiment of this disclosure;

[0025] Figure 4 This is a schematic diagram of another semantic space structure provided in an embodiment of the present disclosure;

[0026] Figure 5 A schematic diagram of the structure of a semantic space-based dialogue device provided in an embodiment of this disclosure;

[0027] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0028] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0029] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0030] To address the aforementioned technical problems, this disclosure provides a semantic space-based dialogue method that fully considers the correlation between each round of dialogue, effectively improving the efficiency and accuracy of response statement generation. This will be described in detail through one or more of the following embodiments.

[0031] Specifically, semantic space-based dialogue methods can be executed by either a terminal or a server. For example, in one application scenario, such as... Figure 1As shown, server 12 constructs a semantic space. Terminal 11 obtains the semantic space from server 12 and generates a response statement for the current statement using the pre-constructed semantic space. In another application scenario, server 12 constructs a semantic space. Further, server 12 generates a response statement for the current statement using the pre-constructed semantic space. In yet another application scenario, terminal 11 constructs a semantic space. Further, terminal 11 generates a response statement for the current statement using the pre-constructed semantic space.

[0032] It is understood that the semantic space-based dialogue method provided in this disclosure is not limited to the possible scenarios described above. The following detailed explanation uses the example of a terminal constructing a semantic space and generating a response statement for the current statement using the pre-constructed semantic space.

[0033] Figure 2 A semantic space-based dialogue method provided in this disclosure is applied to a terminal where a human-computer interaction intelligent system is deployed, specifically including, as follows: Figure 2 The following steps S201 to S203 are shown:

[0034] A semantic space is pre-constructed, which includes multiple state nodes and multiple jump edges. The multiple state nodes are connected through the jump edges, and the multiple state nodes include nodes applied to different dialogue types.

[0035] In some embodiments, the semantic space is constructed for a vertical domain. For example, the semantic space is associated with refrigerator food management, and is constructed based on data samples corresponding to refrigerator food management.

[0036] Understandably, a semantic space is pre-constructed. For example, data samples related to refrigerator food management are obtained and divided into different sample sets according to conversation type. The sample sets include at least a first sample set for continuous question-and-answer types and a second sample set for task-based dialogue types, and may also include sample sets for other dialogue types. Subsequently, a sub-semantic space is constructed for each dialogue type based on the sample sets, and then all sub-semantic spaces are aggregated into a complete semantic space. In addition, jump edges connecting nodes of different dialogue types can be manually set, automatically generated during the semantic space construction process, or added on the basis of an existing semantic space. The semantic space includes a root node, multiple jump edges, and multiple state nodes. Each state node includes at least one jump edge originating from it, and each jump edge carries a preset character. The preset character can be a word, a completed statement, or an incomplete statement, such as an address, date, or object. Every two state nodes can be connected and jump between each other through jump edges. Multiple state nodes include nodes used to execute different types of dialogues. For example, multiple state nodes include nodes for at least two types of dialogues. Nodes for other dialogue types are not limited and can be constructed according to user needs. The first type of node is a continuous question-and-answer type node, which is denoted as a Community Question Answer (CQA) node (abbreviated as CQA node). The second type of node is a task type node, such as a second type of node used for refrigerator food entry tasks, which is denoted as a Task-oriented Dialog Systems (TOD) node (abbreviated as TOD node).

[0037] S201. Obtain the current statement made by the user in the current round of dialogue.

[0038] Understandably, the current statement in the current round of dialogue is obtained. The current statement can be in different forms, such as audio or text, emitted by the user. For example, the current statement is "put it in the freezer". Understandably, the statements output by the user and the terminal during an interaction constitute a round of dialogue. The application scenario of this disclosure embodiment is to obtain the statement emitted by the user terminal in a round of dialogue, and record it as the current statement in the current round of dialogue.

[0039] S202. Determine the target state node that matches the target dialogue task of the current round of dialogue from the plurality of state nodes.

[0040] Among them, the target jump edge originating from the target state node matches the current statement.

[0041] Understandably, based on the above S201, a target state node matching the target dialogue task of the current round of dialogue is determined from the multiple state nodes included in the semantic space. The current state node to which the current round of dialogue belongs can be determined from the target state node. The target state node can be regarded as the previous state node and serves as the query node for the current round of dialogue.

[0042] Optionally, determining the target state node that matches the target dialogue task in the current round of dialogue from the plurality of state nodes in S202 above can be achieved through the following steps:

[0043] Parse the current statement to determine the target dialogue task for the current round of dialogue; if the target dialogue task is not a continuation of the previous round of dialogue task, determine the target state node from the plurality of state nodes, wherein the current state node and the end state node pointed to by the target jump edge emanating from the target state node belong to different dialogue types, and the end state node is the most recently experienced historical state node; if the target dialogue task is a continuation of the previous round of dialogue task, then take the historical state node from the plurality of state nodes as the target state node, wherein the current state node and the end state node belong to the same dialogue type.

[0044] Understandably, parsing the dialogue tasks included in the current statement determines the target dialogue task for the current round of dialogue. Each current statement can be parsed to obtain at least one dialogue task. It then determines whether the target dialogue task is a continuation of a previous round of dialogue tasks. A previous round of dialogue tasks refers to the dialogue tasks generated before the current round of dialogue. A target dialogue task being a continuation of a previous round of dialogue tasks means that both rounds of dialogue tasks are implemented based on the same task scenario. For example, in a refrigerator data entry task, the previous round statement was "The watermelon is in the refrigerator," and the current round statement is "It's put in the freezer." Both belong to the refrigerator food entry task, and the complete statement expressed by both rounds of dialogue is "The watermelon is in the refrigerator." This situation indicates that the target dialogue task is a continuation of a previous round of dialogue tasks, and the second type of node can be used to implement multi-round dialogues. When the target dialogue task is a continuation of a previous dialogue task, historical state nodes are determined from multiple state nodes. These historical state nodes correspond to the state nodes of previous dialogues. These historical state nodes are then used as the target state node. The current and end state nodes pointed to by the target jump edges originating from the target state node belong to the same dialogue type, meaning the jump occurs between nodes of the same dialogue type. The end state node is the most recently experienced historical state node, which is also the state node corresponding to the previous dialogue. Conversely, when the target dialogue task is not a continuation of a previous dialogue task, meaning the current dialogue has started a new topic—which may be completely unrelated to the previous dialogue task or may be a new task initiated based on the previous dialogue—the target state node is determined from multiple state nodes. The current and end state nodes pointed to by the target jump edges originating from the target state node belong to different dialogue types, meaning the jump occurs between nodes of different dialogue types. For example, based on the previous round of dialogue, the current statement is "How long can it be kept?", which is a continuous question and answer. It is a new round of dialogue that starts after the task of putting the watermelon in the refrigerator is completed. The complete statement of the current statement is "How long can the watermelon be kept in the refrigerator?".

[0045] Optionally, if the target dialogue task is not a continuation of the previous round of dialogue tasks, the target state node is determined from the plurality of state nodes, which can be achieved through the following steps:

[0046] If the target dialogue task is not a continuation of the previous round of dialogue tasks, the root node among the plurality of state nodes is taken as the target state node; or, the first state node other than the root node among the plurality of state nodes is taken as the target state node, wherein the first state node and the end state node belong to the same dialogue type; or, the second state node other than the root node among the plurality of state nodes is taken as the target state node, wherein the second state node and the end state node belong to different dialogue types.

[0047] Understandably, when the target dialogue task is not a continuation of the previous dialogue task (i.e., when starting a new dialogue task), if no matching target transition edge is found by tracing back through historical state nodes, the root node is directly used as the target state node. This means a new topic is initiated from the root node, which does not have a dialogue type. Alternatively, during the tracing back through historical state nodes, a first state node belonging to the same dialogue type as the ending state node is found and used as the target state node. This means they do not belong to the same dialogue task, but both state nodes belong to the same dialogue type. In this case, the transition is made directly from the edge connecting the different dialogue types originating from the first state node. Or, during the tracing back through historical state nodes, a second state node belonging to a different dialogue type than the ending state node is found and used as the target state node. This means they do not belong to the same dialogue task, and both state nodes do not belong to the same dialogue type. In this case, the transition is made from the edge connecting the different dialogue types originating from the second state node.

[0048] Optionally, the above-described parsing of the current statement to determine the target dialogue task of the current round of dialogue can be achieved through the following steps:

[0049] The current statement is parsed using a pre-trained language processing model to identify the dialogue tasks it contains. If the parsing determines that the current statement contains multiple dialogue tasks, then each dialogue task is sequentially identified as the target dialogue task for the current round of dialogue according to the order in which the partial statements corresponding to each dialogue task appear in the current statement. The partial statements corresponding to each dialogue task constitute the current statement.

[0050] Understandably, a pre-trained language processing model can be used to parse the dialogue tasks included in the current statement. This language processing model can be an NLP model, and the current statement can consist of multiple parts, each corresponding to a dialogue task. For example, based on the previous round of dialogue, the current statement is "If I put it in the refrigerator, how long can it be kept?". The language processing model can parse the current statement into two dialogue tasks. The first dialogue task corresponds to the first part of the statement "If I put it in the refrigerator," which is a continuation of the previous round of dialogue and still belongs to the refrigerator food input task. The second dialogue task corresponds to the second part of the statement "How long can it be kept?", which is not a continuation of the previous round of dialogue and starts a new topic. After parsing the current statement dialogue task, determine the number of dialogue tasks obtained. If multiple dialogue tasks are obtained, determine each dialogue task as the target dialogue task in the order in which the corresponding partial statements appear in the current statement. For example, in the above example, the current statement is parsed into two dialogue tasks. The first dialogue task with the first partial statement is determined as the target dialogue task. After the target dialogue task is completed or executed, the second dialogue task with the second partial statement is determined as the target dialogue task and execution continues.

[0051] Optionally, the above-mentioned historical state node among the multiple state nodes can be used as the target state node, which can be achieved through the following steps:

[0052] Traverse at least one historical state node to determine the current historical state node; calculate the semantic matching degree between the preset character of each jump edge starting from the current historical state node and the current statement; if the semantic matching degree is greater than or equal to a preset threshold, then determine the current historical state node as the target state node; or, if the semantic matching degree is less than the preset threshold, traverse the next historical state node until the target state node is determined or the at least one historical state node has been traversed.

[0053] Understandably, at least one historical state node is sorted by time, resulting in multiple sorted historical state nodes. After each round of dialogue determines its corresponding state node, a time identifier is added to that state node, representing the time when that round of dialogue was generated, such as the time when the current statement was obtained. Subsequently, a current historical state node is determined from the sorted historical state nodes, for example, by traversing multiple historical state nodes in chronological order. After determining the current historical state node, the semantic matching degree between the preset characters carried by each jump edge originating from the current historical state node and the current statement is calculated. If the current historical state node has a jump edge with a matching degree greater than or equal to a preset threshold, then the current historical state node is directly determined as the target state node, and the jump edge is determined as the target jump edge. Alternatively, a certain number of current historical state nodes are selected from the multiple historical state nodes, and the matching degree between the preset characters carried by each jump edge originating from the current historical state node and the current statement is calculated. All matching degrees are sorted in descending order, and the current historical state node corresponding to the jump edge with the largest matching degree value that is greater than the preset threshold is taken as the target state node. If all the matching degrees of the current historical state node are less than the preset threshold, then continue to traverse from multiple historical state nodes to determine the next historical state node. Then calculate the matching degree between the preset character carried by each jump edge from the next historical state node and the current statement, until the target state node is determined or multiple historical state nodes have been traversed.

[0054] S203. Determine the state node pointed to by the target jump edge as the current state node of the current round of dialogue, and generate the reply statement of the current statement based on the current state node to complete the current round of dialogue.

[0055] Understandably, based on the above S202, the matching degree between the preset characters carried by all jump edges originating from the target state node and the current statement is obtained. The jump edge with the largest matching degree value that is greater than a preset threshold is determined as the target jump edge. Understandably, there may be multiple target jump edges for the same target state node, and different target jump edges point to different state nodes. Subsequently, the current state node pointed to by the target jump edge is determined. The current state node is the state node to which the current round of dialogue belongs. A round of dialogue may include multiple different current state nodes. The target state node and the current state node are connected through the target jump edge. The response statement of the current statement is generated based on the current state node to complete the current round of dialogue. The current round of dialogue includes the current statement issued by one end and the response statement issued by the other end in response to the current statement. The current state node can also be marked as a completed state, and the time identifier of the current state node can be the time when the current statement was issued.

[0056] For example, see Figure 3 , Figure 3 This is a schematic diagram of the structure of a semantic space provided in an embodiment of the present disclosure. The semantic space includes a root node and state nodes 1 to 9. State nodes 1 to 6 are marked as completed states and are the state nodes to which the previous round of dialogue belongs. After obtaining the current statement of the current round of dialogue, if the current round of dialogue is not the first round of dialogue, the root node and state nodes 1 to 6 are taken as historical state nodes. The six historical state nodes are sorted according to time. Each historical state node is traversed, and the latest determined state node is taken as the current historical state node. The matching degree between the preset characters carried by each jump edge starting from the current historical state node and the current statement is calculated. One possible scenario is that state node 6 is the most recently determined state node. If state node 6 does not have a jump edge matching the current statement, then jump edge 1 from state node 6 leads to state node 5. State nodes 6 and 5 are connected by jump edge 1. It is then determined whether state node 5 has a jump edge matching the current statement. When traversing from state nodes 6 and 5 to the root node, if the calculated matching degree is still less than the preset threshold (meaning the target state node is still not determined after traversing 3 state nodes), in this case, the traversal can continue from the root node in the connection order from state node 1 to state node 4 until the target state node is determined or all historical state nodes have been traversed. Alternatively, when traversing to... If the target state node is still not determined from the root node, obtain the state nodes in the incomplete state from the remaining untraversed historical state nodes. For example, state node 4, where every jump edge from state node 4 does not point to any state node. In this case, instead of traversing state nodes 1 to 3, directly use state node 4 as the current historical state node. If state node 4 has a jump edge with a matching degree greater than a preset threshold, then state node 4 is determined as the target state node. If state node 4 does not have a jump edge with a matching degree greater than the preset threshold, then start from state node 4 and traverse state nodes 3 to 1 in connection order until the target state node is determined or all historical state nodes have been traversed. Another possible case is that state node 4 is the most recently determined state node. If the target state node is still not determined after traversing 3 state nodes starting from state node 4 (i.e., after traversing state node 2), the remaining untraversed state nodes in the incomplete state can be used as the current historical state nodes. The subsequent steps for determining the target state node are explained above and will not be repeated here.

[0057] The plurality of status nodes include a plurality of first-type nodes and a plurality of second-type nodes. The first-type nodes include a first complete statement pair and slot information, and the second-type nodes include a second complete statement pair and slot information.

[0058] Understandably, the semantic space includes a root node, multiple first-class nodes, and multiple second-class nodes. First-class nodes can be understood as CQA nodes, and second-class nodes can be understood as TOD nodes.

[0059] Optionally, if the target dialogue task is not a continuation of the previous round of dialogue tasks, in S203 above, the state node pointed to by the target jump edge is determined as the current state node of the current round of dialogue, and the response statement of the current statement is generated based on the current state node. This can be achieved through the following steps:

[0060] The first type of node pointed to by the target jump edge is determined as the current state node of the current round of dialogue; the reply statement of the current statement is generated based on the first complete statement pair included in the current state node and the slot information collected from the second type of node corresponding to the previous round of dialogue task.

[0061] Understandably, when the target dialogue task and the previous round of dialogue tasks are not the same, a new round of question and answer needs to be started from the root node. The first type of node pointed to by the target jump edge is determined as the current state node. Subsequently, the slot information collected by the second type of node corresponding to the previous round of dialogue tasks is obtained. After determining the corresponding state node in each round of dialogue, key information from the current round of dialogue and / or the previous round of dialogue is collected as the slot information of the state node. Based on the slot information and the current state node, the response statement for the current statement is generated to complete the current round of dialogue, realizing the jump between different types of nodes. Specifically, it realizes the jump from the second type of node (TOD node) to the first type of node (CQA node). The current round of dialogue includes the current statement issued by one end and the response statement issued by the other end in response to the current statement. The current state node can also be marked as a completed state, and the time identifier of the current state node can be the time when the current statement was issued.

[0062] The first complete statement pair includes at least one first statement and at least one second statement, wherein the at least one first statement has the same semantics.

[0063] Understandably, a first complete statement pair includes at least one first statement and at least one second statement. The at least one first statement has the same semantic meaning; for example, the first statement could be something like "How's the weather tomorrow?" or "Is the weather good tomorrow?", indicating the weather tomorrow. The at least one second statement may also contain statements with the same semantic meaning, or they may be completely different statements. For example, the second statement could be something like "The weather is very good tomorrow?" or "The weather is nice tomorrow," indicating good weather tomorrow, or it could be something like "Where would you like to inquire about the weather?", indicating location. Understandably, each state node includes a complete statement pair. Different state nodes applied to different dialogue types may include the same or different complete statement pairs; that is, the first complete statement pair and the second complete statement pair may be the same or different.

[0064] Optionally, the response statement for the current statement is generated based on the slot information collected from the first complete statement pair included in the current state node and the second type of node corresponding to the previous round of dialogue tasks, including:

[0065] Based on the first statement included in the current state node and the slot information included in the second type of node corresponding to the previous round of dialogue tasks, the current statement is rewritten to generate a complete statement; based on the target statement in at least one second statement included in the current state node that matches the complete statement, a response statement for the current statement is generated.

[0066] Understandably, the current statement is rewritten based on the first statement included in the current state node and the slot information collected from the second type of nodes corresponding to the previous round of dialogue, generating the complete statement of the current statement. For example, based on the above example, the complete statement of the current statement "How long can it be kept?" is "How long can a watermelon be kept in the refrigerator?". After generating the complete statement of the current statement, a reply template matching the complete statement is selected from at least one second statement included in the current state node, and a reply statement matching the complete statement is generated. For example, if the previous round of dialogue was "Book a plane ticket" and "Okay, where are you departing from?", and the current statement of the current round of dialogue is "Beijing", the generated reply statement would be "Okay, where are you going?", or "Okay, what is the destination?", completing the current round of dialogue. At this point, the current round of dialogue is "Book a plane ticket from Beijing" and "Okay, what is the destination?".

[0067] The first type of node also includes slot information, and the second type of node also includes a second complete statement pair.

[0068] Optionally, if the target dialogue task is not a continuation of the previous round of dialogue tasks, determining the state node pointed to by the target jump edge as the current state node of the current round of dialogue, and generating the response statement of the current statement based on the current state node, can be implemented through the following steps:

[0069] The second type of node pointed to by the target jump edge is determined as the current state node; the response statement of the current statement is generated based on the second complete statement pair included in the current state node and the slot information collected from the first type of node corresponding to the previous round of dialogue tasks.

[0070] In one possible implementation, if the target state node is a first-type node, the current state node pointed to by the target jump edge can be a second-type node. In this case, a response statement for the current statement is generated based on the second complete statement pair included in the current state node and the slot information collected by the first-type node. Specifically, this involves a jump from the second-type node (TOD node) to the first-type node (CQA node). It is understood that, in the case of a jump from a TOD node to a CQA node, the specific steps for generating the response statement are the same as those for the jump from a CQA node to a TOD node in the above embodiments, and will not be repeated here.

[0071] Optionally, determining the state node pointed to by the target jump edge as the current state node of the current round of dialogue, and generating the response statement for the current statement based on the current state node, can be achieved through the following steps:

[0072] For each dialogue task, the state node pointed to by the target jump edge is determined as the current state node of the partial statement corresponding to each dialogue task; a partial response statement is generated for each partial statement based on the current state node of each partial statement; and a complete response statement for the current statement is generated based on the partial response statement for each partial statement; wherein, the current round of dialogue includes the current statement and the complete response statement.

[0073] Understandably, each dialogue task is sequentially identified as a target dialogue task. The state node pointed to by the target state node corresponding to the target dialogue task is determined as the current state node. That is, the current statement may include multiple dialogue tasks, each with a corresponding target state node. Each target state node points to the current state node via a target jump edge. Different dialogue types may have different target state nodes, and the current state nodes pointed to by these target state nodes will also differ. Based on the above example, the first part of the response statement is generated based on the current state node of the first part of the statement, such as "Okay, recorded." The second part of the response statement is generated based on the current state node of the second part of the statement, such as "Generally saved for 24 hours." Subsequently, the user can be answered after each partial response statement is generated, or all partial response statements can be combined into a complete response statement before answering the user. For example, the complete response statement could be "Okay, recorded. Generally saved for 24 hours."

[0074] For example, see Figure 4 , Figure 4This is a schematic diagram of another semantic space structure provided by an embodiment of this disclosure. For example, the previous dialogue is "The watermelon is in the refrigerator," and the response is "Okay, the watermelon has been recorded." It starts from TOD Node 0, where TOD Node 0 can be the root node or other second-type nodes. The following embodiment uses TOD Node 0 as the root node as an example for illustration. The jump edge issued by TOD Node 0 points to TOD Node 1. The state node to which the previous dialogue belongs is recorded as TOD Node 1. The current statement is "I put it in the refrigerator, how long can it be kept?". The language processing model parses the current statement into two dialogue tasks. The first part of the statement corresponding to the first dialogue task is "I put it in the refrigerator," which belongs to the refrigerator food entry task. The second part of the statement corresponding to the second dialogue task is "How long can it be kept?", which does not belong to the refrigerator food entry task but is a continuous question and answer. Subsequently, each dialogue task is executed sequentially. The target root node corresponding to the first dialogue task is determined to be TOD Node 1. Starting from TOD Node 1, the target jump edge issued by TOD Node 1 points to TOD Node 2 (the current state node). The response statement for the first part of the statement is generated based on TOD Node 2. That is, the first part of the statement for the first dialogue task is "Put it in the freezer", and the response statement is "Okay, recorded". Subsequently, the second dialogue task is executed. Since the second dialogue task does not continue with the refrigerator food entry task, but instead asks "How long can it be kept?", the second part of the statement is rewritten to become a complete statement: "How long can watermelon be kept in the refrigerator?". This can be understood as the second dialogue task starting a new round of question and answer. Therefore, the root node (TOD Node0) is directly used as the target state node for the second dialogue task. Jump edges originating from the root node point to the first type of node, denoted as CQA Node 1. This achieves the jump between the first and second type of nodes. The multi-jump process of the above state node is as follows: TOD Node 0: Root node --> TOD Node 1: Watermelon is in the refrigerator --> TOD Node 2: Watermelon is in the refrigerator --> CQA Node 1: How long can watermelon be kept in the refrigerator? If the second part of the statement is "The cucumber is also in", then continue to execute the refrigerator food entry task. You can use TOD Node 2 as the target state node and jump between the second type of nodes. Jump to TOD Node 3. It can be understood that you can jump between different types of nodes and between nodes of the same type. Other possible ways of jumping between nodes are not limited here.

[0075] This disclosure provides a semantic space-based dialogue method. By navigating between state nodes in a pre-constructed semantic space, the method determines the target dialogue task corresponding to the current round of dialogue. Based on the dialogue task, it determines the target state node for querying and identifies the state node pointed to by the jump edge of the target state node as the current state node to which the current round of dialogue belongs. If the dialogue task to be achieved in the current round of dialogue is different from that in the previous round, the corresponding target state node can be selected, and the jump between different types of nodes can be achieved through the connection relationship between the state nodes. The method can also be based on the state nodes to which the previous round of dialogue belonged (historical state nodes) to achieve the jump between nodes of the same type. By using node jumps, the method fully considers the correlation between each round of dialogue, reduces the ambiguity of statements, accurately rewrites the current statement, generates a complete statement that precisely expresses the semantics, and then generates a response statement based on the complete statement, effectively improving the generation efficiency and accuracy of the response statement.

[0076] Figure 5 This is a schematic diagram of a semantic space-based dialogue device provided in an embodiment of this disclosure. The semantic space-based dialogue device provided in this embodiment can execute the processing flow provided in the semantic space-based dialogue method embodiment. The semantic space-based dialogue device has a pre-constructed semantic space, which includes multiple state nodes and multiple jump edges. Each jump edge connects two state nodes. The multiple state nodes include nodes applied to different dialogue types, and at least one jump edge connects two state nodes belonging to different dialogue types, such as... Figure 5 As shown, the semantic space-based dialogue device 500 includes an acquisition unit 501, a determination unit 502, and a generation unit 503, wherein:

[0077] The acquisition unit 501 is used to acquire the current statement issued by the user in the current round of dialogue;

[0078] The determining unit 502 is configured to determine, from the plurality of state nodes, a target state node that matches the target dialogue task of the current round of dialogue, wherein the target jump edge originating from the target state node matches the current statement.

[0079] The generation unit 503 is used to determine the state node pointed to by the target jump edge as the current state node of the current round of dialogue, and generate the reply statement of the current statement based on the current state node to complete the current round of dialogue.

[0080] Optionally, the determining unit 502 is used for:

[0081] Parse the current statement to determine the target dialogue task for the current round of dialogue;

[0082] If the target dialogue task is not a continuation of the previous dialogue task, a target state node is determined from the plurality of state nodes. The current state node and the end state node pointed to by the target jump edge from the target state node belong to different dialogue types. The end state node refers to the most recently experienced historical state node.

[0083] If the target dialogue task is a continuation of the previous round of dialogue tasks, then the historical state node among the multiple state nodes is taken as the target state node, wherein the current state node and the end state node belong to the same dialogue type.

[0084] Optionally, the determining unit 502 is used for:

[0085] If the target dialogue task is not a continuation of the previous round of dialogue tasks, the root node among the plurality of state nodes is taken as the target state node; or, the first state node other than the root node among the plurality of state nodes is taken as the target state node, wherein the first state node and the end state node belong to the same dialogue type; or, the second state node other than the root node among the plurality of state nodes is taken as the target state node, wherein the second state node and the end state node belong to different dialogue types.

[0086] The plurality of status nodes include a plurality of first-type nodes and a plurality of second-type nodes. The first-type nodes include a first complete statement pair, and the second-type nodes include slot information.

[0087] Optionally, the generating unit 503 is used for:

[0088] The first type of node pointed to by the target jump edge is determined as the current state node of the current round of dialogue;

[0089] Based on the first complete statement pair included in the current state node and the slot information collected by the second type of node corresponding to the previous round of dialogue tasks, a response statement for the current statement is generated.

[0090] The first type of node also includes slot information, and the second type of node also includes a second complete statement pair.

[0091] Optionally, the generating unit 503 is used for:

[0092] The second type of node pointed to by the target jump edge is determined as the current state node;

[0093] Based on the second complete statement pair included in the current state node and the slot information collected by the first type of node corresponding to the previous round of dialogue tasks, a response statement for the current statement is generated.

[0094] The complete statement pair includes a first statement and at least one second statement.

[0095] Optionally, the generating unit 503 is used for:

[0096] Based on the first statement included in the current state node and the slot information included in the second type of node corresponding to the previous round of dialogue tasks, the current statement is rewritten to generate a complete statement;

[0097] The response statement for the current statement is generated based on the target statement that matches the complete statement in at least one second statement included in the current state node.

[0098] Optionally, the determining unit 502 is used for:

[0099] Iterate through at least one historical state node obtained to determine the current historical state node;

[0100] Calculate the semantic matching degree between the preset characters of each jump edge originating from the current historical state node and the current statement;

[0101] If the semantic matching degree is greater than or equal to a preset threshold, the current historical state node is determined as the target state node; or, if the semantic matching degree is less than the preset threshold, the next historical state node is traversed until the target state node is determined or the at least one historical state node is traversed.

[0102] Optionally, the determining unit 502 is used for:

[0103] The dialogue task contained in the current statement is parsed using a pre-trained language processing model;

[0104] If the parsing determines that the current statement contains multiple dialogue tasks, then each dialogue task is sequentially determined as the target dialogue task of the current round of dialogue according to the order in which the partial statements corresponding to each dialogue task appear in the current statement.

[0105] The current statement is composed of a portion of the statements corresponding to each dialogue task.

[0106] Optionally, the generating unit 503 is used for:

[0107] For each dialogue task, the state node pointed to by the target jump edge is determined as the current state node of the part of the statement corresponding to each dialogue task;

[0108] Generate a partial response statement for each partial statement based on the current state node of each partial statement;

[0109] Based on the partial response statements of each partial statement, generate the complete response statement for the current statement;

[0110] The current round of dialogue includes the current statement and the complete reply statement.

[0111] Optionally, the semantic space in device 500 is associated with refrigerator food management, and the semantic space is constructed based on data samples corresponding to refrigerator food management.

[0112] Figure 5 The semantic space-based dialogue device of the illustrated embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0113] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device can be a refrigerator, and its semantic space is associated with the refrigerator's food management. See below for details. Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device 600 in the embodiments of this disclosure. The electronic device 600 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0114] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603 to implement the semantic space-based dialogue method as described in the embodiments of this disclosure. Various programs and data required for the operation of electronic device 600 are also stored in RAM 603. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0115] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0116] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the semantic space-based dialogue method as described above. In such embodiments, the computer program can be downloaded and installed from a network via communication device 609, or installed from storage device 608, or installed from ROM 602. When the computer program is executed by processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.

[0117] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0118] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0119] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0120] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also perform other steps described in the above embodiments.

[0121] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0122] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0123] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0124] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0125] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0126] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or gateway that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or gateway. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or gateway that includes said element.

[0127] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A dialogue method based on semantic space, characterized in that, A semantic space is pre-constructed, comprising multiple state nodes and multiple transition edges. Each transition edge connects two state nodes. The multiple state nodes include nodes applicable to different dialogue types, and at least one transition edge connects two state nodes belonging to different dialogue types. The method includes: Get the current statement made by the user in the current round of conversation; From the plurality of state nodes, determine the target state node that matches the target dialogue task of the current round of dialogue, wherein the target jump edge originating from the target state node matches the current statement; The state node pointed to by the target jump edge is determined as the current state node of the current round of dialogue, and the response statement of the current statement is generated based on the current state node to complete the current round of dialogue; The step of determining the target state node that matches the target dialogue task in the current round of dialogue from the plurality of state nodes includes: Parse the current statement to determine the target dialogue task for the current round of dialogue; If the target dialogue task is not a continuation of the previous round of dialogue tasks, a target state node is determined from the plurality of state nodes. The current state node and the end state node pointed to by the target jump edge from the target state node belong to different dialogue types. The end state node refers to the most recently experienced historical state node. When the target dialogue task is a continuation of the previous round of dialogue tasks, the historical state node among the multiple state nodes is taken as the target state node, wherein the current state node and the end state node belong to the same dialogue type.

2. The method according to claim 1, characterized in that, When the target dialogue task is not a continuation of the previous round of dialogue tasks, determining the target state node from the plurality of state nodes includes: If the target dialogue task is not a continuation of the previous round of dialogue tasks, the root node among the plurality of state nodes is taken as the target state node; or, the first state node other than the root node among the plurality of state nodes is taken as the target state node, wherein the first state node and the end state node belong to the same dialogue type; or, the second state node other than the root node among the plurality of state nodes is taken as the target state node, wherein the second state node and the end state node belong to different dialogue types.

3. The method according to claim 1, characterized in that, The multiple status nodes include multiple first-type nodes and multiple second-type nodes. The first-type nodes include first complete statement pairs, and the second-type nodes include slot information. When the target dialogue task is not a continuation of the previous round of dialogue tasks, determining the state node pointed to by the target jump edge as the current state node of the current round of dialogue, and generating the response statement of the current statement based on the current state node, includes: The first type of node pointed to by the target jump edge is determined as the current state node of the current round of dialogue; Based on the first complete statement pair included in the current state node and the slot information collected by the second type of node corresponding to the previous round of dialogue tasks, a response statement for the current statement is generated.

4. The method according to claim 3, characterized in that, The first type of node also includes slot information, and the second type of node also includes a second complete statement pair. When the target dialogue task is not a continuation of the previous round of dialogue tasks, determining the state node pointed to by the target jump edge as the current state node of the current round of dialogue, and generating the response statement of the current statement based on the current state node, includes: The second type of node pointed to by the target jump edge is determined as the current state node; Based on the second complete statement pair included in the current state node and the slot information collected by the first type of node corresponding to the previous round of dialogue tasks, a response statement for the current statement is generated.

5. The method according to claim 3, characterized in that, The first complete statement pair includes a first statement and at least one second statement. The step of generating the response statement for the current statement based on the first complete statement pair included in the current state node and the slot information collected from the second type of nodes corresponding to the previous round of dialogue tasks includes: Based on the first statement included in the current state node and the slot information included in the second type of node corresponding to the previous round of dialogue tasks, the current statement is rewritten to generate a complete statement; The response statement for the current statement is generated based on the target statement that matches the complete statement in at least one second statement included in the current state node.

6. The method according to claim 1, characterized in that, The step of using historical state nodes from the plurality of state nodes as target state nodes includes: Iterate through at least one historical state node obtained to determine the current historical state node; Calculate the semantic matching degree between the preset characters of each jump edge originating from the current historical state node and the current statement; If the semantic matching degree is greater than or equal to a preset threshold, the current historical state node is determined as the target state node; or, if the semantic matching degree is less than the preset threshold, the next historical state node is traversed until the target state node is determined or the at least one historical state node is traversed.

7. The method according to claim 1, characterized in that, The step of parsing the current statement and determining the target dialogue task for the current round of dialogue includes: The dialogue task contained in the current statement is parsed using a pre-trained language processing model; If the parsing determines that the current statement contains multiple dialogue tasks, then each dialogue task is sequentially determined as the target dialogue task of the current round of dialogue according to the order in which the partial statements corresponding to each dialogue task appear in the current statement. The current statement is composed of a portion of the statements corresponding to each dialogue task.

8. The method according to claim 7, characterized in that, The step of determining the state node pointed to by the target jump edge as the current state node of the current round of dialogue, and generating the response statement of the current statement based on the current state node, includes: For each dialogue task, the state node pointed to by the target jump edge is determined as the current state node of the part of the statement corresponding to each dialogue task; Generate a partial response statement for each partial statement based on the current state node of each partial statement; Based on the partial response statements of each partial statement, generate the complete response statement for the current statement; The current round of dialogue includes the current statement and the complete reply statement.

9. The method according to claim 1, characterized in that, The semantic space is associated with refrigerator food management, and it is constructed based on data samples corresponding to refrigerator food management.

10. A semantic space-based dialogue device, characterized in that, A semantic space is pre-constructed, comprising multiple state nodes and multiple transition edges. Each transition edge connects two state nodes. The multiple state nodes include nodes applicable to different dialogue types, and at least one transition edge connects two state nodes belonging to different dialogue types. The device includes: The acquisition unit is used to acquire the current statement issued by the user in the current round of dialogue; A determining unit is configured to determine, from the plurality of state nodes, a target state node that matches the target dialogue task of the current round of dialogue, wherein a target jump edge originating from the target state node matches the current statement; comprising: parsing the current statement to determine the target dialogue task of the current round of dialogue; if the target dialogue task is not a continuation of a previous round of dialogue task, determining the target state node from the plurality of state nodes, wherein the current state node pointed to by the target jump edge originating from the target state node and the end state node belong to different dialogue types, the end state node referring to the most recently experienced historical state node; if the target dialogue task is a continuation of the previous round of dialogue task, using the historical state nodes from the plurality of state nodes as the target state node, wherein the current state node and the end state node belong to the same dialogue type; The generation unit is used to determine the state node pointed to by the target jump edge as the current state node of the current round of dialogue, and generate the reply statement of the current statement based on the current state node to complete the current round of dialogue.

11. An electronic device, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the semantic space-based dialogue method as described in any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the semantic space-based dialogue method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Dialogue management method, dialogue management system and device, and storage medium

    CN114428844A