Man-machine conversation method, device and storage medium

CN114020872BActive Publication Date: 2026-10-16BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111322486.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2026-10-16
Estimated Expiration
2041-11-09

AI Technical Summary

Benefits of technology

[0064] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: acquiring the user's current speech data, extracting semantic features from the speech data, obtaining corresponding semantic feature data, and then reasoning about the semantic feature data based on a common sense graph, so that electronic devices using the human-computer dialogue method of this disclosure have common sense reasoning capabilities, and can generate natural and fluent response data that conforms to common sense reasoning based on the user's speech data and the corresponding reasoning feature data, thereby improving the fluency and intelligence of human-computer dialogue and expanding the application scope of human-computer dialogue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114020872B_ABST
    Figure CN114020872B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a human-computer conversation method, device and storage medium. The human-computer conversation method comprises: obtaining current speech data of a user; performing semantic feature extraction on the speech data to obtain target semantic feature data; performing reasoning on the target semantic feature data based on a common sense graph to obtain reasoning feature data corresponding to the target semantic feature data; and determining reply data for the speech data according to the speech data and the reasoning feature data. Through the present disclosure, the human-computer conversation can be natural and smooth, and the application range of the human-computer conversation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of natural language processing, and in particular to a human-computer dialogue method, apparatus, and storage medium. Background Technology

[0002] With rising labor costs, the use of intelligent devices to replace customer service personnel in direct communication with customers in specific dialogue scenarios, providing them with the information they need, has become very common. For example, a machine receives a human question, performs semantic understanding, searches a knowledge base to obtain the answer, and then organizes the answer into a human-like language format to provide the answer to the human's question.

[0003] However, how to improve the efficiency of response output in human-computer dialogue scenarios has become an urgent problem to be solved. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this disclosure provides a human-computer dialogue method, apparatus and storage medium.

[0005] According to a first aspect of the present disclosure, a human-computer dialogue method is provided, comprising:

[0006] Obtain the user's current speech data;

[0007] Semantic features are extracted from the utterance data to obtain target semantic feature data;

[0008] Reasoning is performed on the target semantic feature data based on the common sense graph to obtain reasoning feature data corresponding to the target semantic feature data;

[0009] Based on the utterance data and the inference feature data, response data is determined for the utterance data.

[0010] In some embodiments, the extraction of semantic features from the discourse data to obtain target semantic feature data includes:

[0011] The utterance data is segmented into words to obtain the segmentation results;

[0012] Noise data included in the word segmentation results are filtered out to obtain preprocessed word segmentation results;

[0013] Semantic features are extracted from the preprocessed word segmentation results to obtain the target semantic feature data.

[0014] In some embodiments, the target semantic feature data includes:

[0015] At least one of the following: part-of-speech feature data, sentence component feature data, sentence type feature data, and auxiliary clustering feature data;

[0016] The auxiliary clustering feature data refers to the feature data corresponding to the clustering of words included in the discourse data.

[0017] In some embodiments, the common sense graph includes: multiple nodes connected by edges, each node corresponding to a common sense template data, and each edge corresponding to a common sense attribute.

[0018] In some embodiments, the step of reasoning about the target semantic feature data based on a commonsense graph to obtain reasoning feature data corresponding to the target semantic feature data includes:

[0019] Based on the target semantic feature data and the common sense template data corresponding to each node in the common sense graph, semantic feature nodes corresponding to the target semantic feature data are obtained;

[0020] Based on the adjacent nodes of the semantic feature nodes, the inference feature nodes are obtained;

[0021] The common sense template data corresponding to the reasoning feature nodes are used as reasoning feature data.

[0022] In some embodiments, the target semantic feature data includes the sentence component feature data;

[0023] The step of obtaining the semantic feature node corresponding to the target semantic feature data based on the target semantic feature data and the common sense template data corresponding to each node in the common sense graph includes:

[0024] Based on synonym matching, the semantic similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is determined, and a first similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is obtained;

[0025] Based on the first similarity value, a second similarity value is obtained with each of the common sense template data;

[0026] The node corresponding to the second similarity value with the largest value is taken as the semantic feature node corresponding to the target semantic feature data.

[0027] In some embodiments, obtaining a second similarity value with each of the common sense template data based on the first similarity value includes:

[0028] Obtain the weight coefficient corresponding to each of the sentence component feature data;

[0029] Based on the weight coefficients corresponding to each sentence component feature data and each first similarity value, a weighted average is applied to each first similarity value to obtain a weighted target similarity value.

[0030] The target similarity value is used as the second similarity value with each of the common sense template data.

[0031] In some embodiments, determining response data for the utterance data based on the utterance data and the inference feature data includes:

[0032] Input the utterance data and the inference feature data into the trained human-computer dialogue response model;

[0033] The response data output by the human-computer dialogue response model is obtained after sentence completion of the inference feature data.

[0034] According to a second aspect of the present disclosure, a human-computer interaction device is provided, comprising:

[0035] The acquisition module is used to acquire the user's current speech data;

[0036] The extraction module is used to extract semantic features from the discourse data to obtain target semantic feature data;

[0037] The reasoning module is used to reason about the target semantic feature data based on the common sense graph to obtain reasoning feature data corresponding to the target semantic feature data.

[0038] The determination module is used to determine response data for the target utterance data based on the utterance data and the inference feature data.

[0039] In some embodiments, the extraction module extracts semantic features from the discourse data in the following manner to obtain target semantic feature data:

[0040] The utterance data is segmented into words to obtain the segmentation results;

[0041] Noise data included in the word segmentation results are filtered out to obtain preprocessed word segmentation results;

[0042] Semantic features are extracted from the preprocessed word segmentation results to obtain the target semantic feature data.

[0043] In some embodiments, the target semantic feature data includes:

[0044] At least one of the following: part-of-speech feature data, sentence component feature data, sentence type feature data, and auxiliary clustering feature data;

[0045] The auxiliary clustering feature data refers to the feature data corresponding to the clustering of words included in the discourse data.

[0046] In some embodiments, the common sense graph includes: multiple nodes connected by edges, each node corresponding to a common sense template data, and each edge corresponding to a common sense attribute.

[0047] In some embodiments, the reasoning module performs reasoning on the target semantic feature data based on a commonsense graph to obtain reasoning feature data corresponding to the target semantic feature data:

[0048] Based on the target semantic feature data and the common sense template data corresponding to each node in the common sense graph, the semantic feature nodes corresponding to the semantic feature data are obtained;

[0049] Based on the adjacent nodes of the semantic feature nodes, the inference feature nodes are obtained;

[0050] The common sense template data corresponding to the reasoning feature nodes are used as reasoning feature data.

[0051] In some embodiments, the target semantic feature data includes the sentence component feature data;

[0052] The reasoning module obtains the semantic feature nodes corresponding to the target semantic feature data based on the target semantic feature data and the common sense template data corresponding to each node in the common sense graph in the following manner:

[0053] Based on synonym matching, the semantic similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is determined, and a first similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is obtained;

[0054] Based on the first similarity value, a second similarity value is obtained with each of the common sense template data;

[0055] The node corresponding to the second similarity value with the largest value is taken as the semantic feature node corresponding to the target semantic feature data.

[0056] In some embodiments, the reasoning module obtains a second similarity value with each of the common sense template data based on the first similarity value in the following manner:

[0057] Obtain the weight coefficient corresponding to each of the sentence component feature data;

[0058] Based on the weight coefficients corresponding to each sentence component feature data and each first similarity value, a weighted average is applied to each first similarity value to obtain a weighted target similarity value.

[0059] The target similarity value is used as the second similarity value with each of the common sense template data.

[0060] In some embodiments, the determining module determines the response data for the utterance data based on the utterance data and the inference feature data in the following manner:

[0061] Input the utterance data and the inference feature data into the trained human-computer dialogue response model;

[0062] The response data output by the human-computer dialogue response model is obtained after sentence completion of the inference feature data.

[0063] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, having stored thereon computer program instructions that, when executed by a processor, implement the steps of the human-computer dialogue method provided in the first aspect of the present disclosure.

[0064] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: acquiring the user's current speech data, extracting semantic features from the speech data, obtaining corresponding semantic feature data, and then reasoning about the semantic feature data based on a common sense graph, so that electronic devices using the human-computer dialogue method of this disclosure have common sense reasoning capabilities, and can generate natural and fluent response data that conforms to common sense reasoning based on the user's speech data and the corresponding reasoning feature data, thereby improving the fluency and intelligence of human-computer dialogue and expanding the application scope of human-computer dialogue.

[0065] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0066] 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.

[0067] Figure 1 This is a flowchart illustrating a human-computer dialogue method according to an exemplary embodiment of the present disclosure.

[0068] Figure 2 This is a flowchart illustrating a human-computer dialogue method according to an exemplary embodiment of the present disclosure.

[0069] Figure 3This is a block diagram illustrating a human-computer interaction device according to an exemplary embodiment of the present disclosure.

[0070] Figure 4 This is a block diagram illustrating an electronic device for human-computer interaction according to an exemplary embodiment of the present disclosure.

[0071] Figure 5 This is a block diagram illustrating an apparatus for human-computer dialogue according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0073] The exemplary embodiments disclosed herein can be applied to human-computer dialogue scenarios in open dialogue systems. In this scenario, the open dialogue system may include, for example, a user terminal and a human-computer dialogue system. The user terminal includes, but is not limited to, fixed or mobile electronic devices such as smartphones, tablets, laptops, desktop computers, and e-book readers. The human-computer dialogue system can be an electronic device used for human-computer dialogue; this electronic device can be a terminal device or a server (including local servers, cloud servers, etc.), for example, an open human-computer dialogue robot. The user initiates a dialogue with the open human-computer dialogue robot by inputting dialogue on their terminal. After receiving the dialogue initiated by the user, the open human-computer dialogue robot determines the best response content that matches the initiated dialogue and provides feedback to the user.

[0074] In related technologies, for open-ended human-computer dialogue scenarios, it is currently not possible for machines to output natural and fluent responses that conform to common sense. Instead, a lot of time and effort is required to manually write responses based on a type of user speech data, which is inefficient.

[0075] This disclosure provides a human-computer dialogue method. By acquiring the user's current speech data, semantic features are extracted from the speech data to obtain corresponding semantic feature data. Reasoning can then be performed on the semantic feature data based on a common sense graph, enabling electronic devices using this human-computer dialogue method to possess common sense reasoning capabilities. Furthermore, based on the user's speech data and the corresponding reasoning feature data, natural and fluent response data conforming to common sense reasoning can be generated, thereby improving the fluency and intelligence of human-computer dialogue and expanding its application scope.

[0076] Figure 1 This is a flowchart illustrating a human-computer dialogue method according to an exemplary embodiment, such as... Figure 1 As shown, the human-computer dialogue method includes the following steps.

[0077] In step S11, the user's current speech data is obtained.

[0078] The user's current speech data can be either text data or voice data, and this disclosure does not impose any restrictions.

[0079] In step S12, semantic features are extracted from the discourse data to obtain target semantic feature data.

[0080] In some possible implementations, semantic features can be extracted from the discourse data to obtain target semantic feature data, for example, in the following manner:

[0081] The discourse data is segmented into words to obtain segmentation results. Noise data included in the segmentation results is filtered out to obtain preprocessed segmentation results. Semantic features are extracted from the preprocessed segmentation results to obtain the target semantic feature data.

[0082] In this disclosure, the target semantic feature data may include at least one of part-of-speech feature data, sentence component feature data, sentence type feature data, and auxiliary clustering feature data.

[0083] Among them, part-of-speech feature data can be obtained by extracting part-of-speech features from the words included in the discourse data, thus indicating the part-of-speech of the words included in the discourse data. For example, the part-of-speech can indicate whether the corresponding word is a verb, adjective, noun, adverb, pronoun, preposition, etc.

[0084] Sentence type feature data can be data that indicates the tone of the dialogue data after extracting sentence types from the dialogue data. For example, sentence type feature data indicates whether the dialogue data is a declarative sentence, interrogative sentence, exclamatory sentence, rhetorical question, or other sentence types.

[0085] Sentence component feature data can be obtained by extracting sentence component features from words in dialogue data, and then obtaining data indicating the sentence components of the corresponding words. For example, sentence component data can indicate the subject, predicate, object, attributive, adverbial, complement, etc. of the corresponding words.

[0086] Auxiliary clustering feature data can be obtained by clustering words in the dialogue data into synonyms, thus indicating the clustering data corresponding to the dialogue data.

[0087] For example, if the discourse data is "My dad drank a cup of tea yesterday", after performing auxiliary clustering feature extraction on the words (my dad, drank a cup of tea) included in the above discourse information, we can obtain the clustering feature data corresponding to the instruction "My dad drank a cup of tea yesterday", that is, (family, eating, drinking and playing, subject-verb relationship).

[0088] For example, if the discourse data is "I plan to eat pizza tomorrow", after extracting auxiliary clustering features from the words (I, eat pizza) included in the discourse information, we obtain the clustering feature data corresponding to the instruction "I plan to eat pizza tomorrow", which is (family, eating, drinking and having fun, subject-verb relationship). Therefore, in practical applications, the granularity of the target semantic feature data can be adjusted by extracting auxiliary clustering features from the discourse data.

[0089] Among them, auxiliary clustering features can be designed manually or implemented through models such as synonym matching.

[0090] In step S13, reasoning is performed on the target semantic feature data based on the common sense graph to obtain reasoning feature data corresponding to the target semantic feature data.

[0091] The common sense graph in this disclosure can be a pre-defined graph centered around common sense reasoning. This graph includes: multiple nodes connected by edges, each node corresponding to a common sense template data, and each edge corresponding to a common sense attribute.

[0092] The common sense template data can be phrase templates or sentence templates (e.g., "A slapped B", "A was very happy", etc.), and each edge corresponds to a common sense attribute (e.g., possible reasons, possible consequences, personal feelings, personal thoughts, etc.).

[0093] For example, the common sense template data corresponding to a node in a common sense graph is: "Some people like elephants." The attributes of the edges connected to this node can include cause and effect. The node, its edges, and its adjacent nodes can be represented as follows:

[0094] Some people like elephants - because elephants have long trunks;

[0095] Some people like elephants - consequences - watching elephant documentaries;

[0096] Some people like elephants - the consequence - going to the zoo to see elephants;

[0097] Some people like elephants – and consequently – they collect elephant-related souvenirs.

[0098] In some possible implementations, reasoning based on a commonsense graph can be performed on the semantic feature data to obtain reasoning feature data corresponding to the semantic feature data, for example:

[0099] Based on the semantic feature data and the common sense template data corresponding to each node in the common sense graph, the semantic feature nodes corresponding to the semantic feature data are obtained. Based on the adjacent nodes of the semantic feature nodes, the reasoning feature nodes are obtained. The common sense template data corresponding to the reasoning feature nodes are used as the reasoning feature data.

[0100] In step S14, response data for the discourse data is obtained based on the discourse data and inference feature data.

[0101] In some possible implementations, for example, utterance data and inference feature data are input into the human-computer dialogue response model, and the human-computer dialogue response model performs sentence completion on the inference feature data based on the utterance data, and outputs the completed response data.

[0102] Among them, the human-computer dialogue response model can be a seq2seq model.

[0103] In an exemplary embodiment of this disclosure, the user's current speech data is acquired, semantic features are extracted from the speech data, and corresponding semantic feature data is obtained. Then, reasoning can be performed on the semantic feature data based on a common sense graph, so that the electronic device using the human-computer dialogue method of this disclosure has common sense reasoning ability. In this way, it can generate natural and fluent response data that conforms to common sense reasoning based on the user's speech data and the corresponding reasoning feature data, thereby improving the fluency and intelligence of human-computer dialogue and expanding the application scope of human-computer dialogue.

[0104] Figure 2 This is a flowchart illustrating a human-computer dialogue method according to an exemplary embodiment, such as... Figure 2 As shown, the human-computer dialogue method includes the following steps.

[0105] In step S21, the user's current speech data is obtained.

[0106] In step S22, semantic features are extracted from the discourse data to obtain target semantic feature data.

[0107] In step S23, based on the target semantic feature data and the common sense template data corresponding to each node in the common sense graph, the semantic feature nodes corresponding to the target semantic feature data are obtained.

[0108] For example, the target semantic feature data includes sentence component feature data. Based on the target semantic feature data and the common sense template data corresponding to each node in the common sense graph, semantic feature nodes corresponding to the target semantic feature data are obtained, including:

[0109] Based on synonym matching, the semantic similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is determined, and the first similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is obtained. Based on the first similarity value, the second similarity value with each common sense template data is obtained, and based on the second similarity value, the semantic feature node corresponding to the target semantic feature data is obtained.

[0110] For example, given the discourse data "I watched a movie," after extracting sentence component features, we obtain sentence component feature data (subject-verb-object sentence components: I, watched, movie). Then, we match the subject, verb, and object separately with the subject, verb, and object included in each common sense template data set. This yields a first similarity value between (I, watched, movie) and the corresponding sentence component feature data in each common sense template data set. We sum these first similarity values ​​to obtain a total similarity value, which is the second similarity value with each common sense template data set. The node corresponding to the second similarity value with the highest value is then used as the semantic feature node corresponding to the target semantic feature data.

[0111] Furthermore, to highlight the weight of certain sentence component features, such as assigning higher weights to predicates, objects, and time adverbs, a weighted average is applied to each first similarity value based on the different weights of each sentence component feature data and each first similarity value, resulting in a weighted target similarity value. This target similarity value is then used as the second similarity value between the target semantic feature data and each common sense template data.

[0112] After obtaining the second similarity value between the target semantic feature data and each common sense template data, the node corresponding to the second similarity value with the largest value is taken as the semantic feature node corresponding to the target semantic feature data. Therefore, based on synonym matching, matching the target semantic feature data and common sense template data of the discourse data makes the matching more accurate. Furthermore, matching the target semantic feature data and common sense template data of the discourse data can be performed according to different weights of sentence features, making the matching more controllable.

[0113] In step S24, reasoning feature nodes are obtained based on the neighboring nodes of semantic feature nodes, and the common sense template data corresponding to the reasoning feature nodes are used as reasoning feature data.

[0114] For example, from multiple neighboring nodes of a semantic feature node, a neighboring node is randomly selected, and this neighboring node is used as the reasoning feature node, and the common sense template data corresponding to the reasoning feature node is used as the reasoning feature data.

[0115] In step S25, response data for the utterance data is determined based on the utterance data and the inference feature data.

[0116] In an exemplary embodiment of this disclosure, the user's current speech data is obtained, semantic features are extracted from the speech data, and corresponding semantic feature data is obtained. Then, based on the synonym matching method, the target semantic feature data of the speech data is matched one by one with the common sense template data in the knowledge graph, so that the matching is more accurate. At the same time, the target semantic feature data of the speech data and the common sense template data can be matched according to the different weights of sentence features, so that the matching is more controllable.

[0117] Figure 3 This is a block diagram 200 illustrating a human-computer interaction device according to an exemplary embodiment. (Refer to...) Figure 3 The device includes an acquisition module 201, an extraction module 202, a reasoning module 203, and a determination module 204.

[0118] Among them, the acquisition module 201 is used to acquire the user's current speech data;

[0119] Extraction module 202 is used to extract semantic features from the discourse data to obtain target semantic feature data;

[0120] The reasoning module 203 is used to reason about the target semantic feature data based on the common sense graph to obtain reasoning feature data corresponding to the target semantic feature data;

[0121] The determining module 204 is used to determine response data for the utterance data based on the utterance data and the inference feature data.

[0122] In some embodiments, the extraction module 202 extracts semantic features from the discourse data in the following manner to obtain target semantic feature data:

[0123] The utterance data is segmented into words to obtain the segmentation results;

[0124] Noise data included in the word segmentation results are filtered out to obtain preprocessed word segmentation results;

[0125] Semantic features are extracted from the preprocessed word segmentation results to obtain the target semantic feature data.

[0126] In some embodiments, the target semantic feature data includes:

[0127] At least one of the following: part-of-speech feature data, sentence component feature data, sentence type feature data, and auxiliary clustering feature data;

[0128] The auxiliary clustering feature data refers to the feature data corresponding to the clustering of words included in the discourse data.

[0129] In some embodiments, the common sense graph includes: multiple nodes connected by edges, each node corresponding to a common sense template data, and each edge corresponding to a common sense attribute.

[0130] In some embodiments, the reasoning module 203 performs reasoning on the target semantic feature data based on a commonsense graph in the following manner to obtain reasoning feature data corresponding to the target semantic feature data:

[0131] Based on the target semantic feature data and the common sense template data corresponding to each node in the common sense graph, semantic feature nodes corresponding to the target semantic feature data are obtained;

[0132] Based on the adjacent nodes of the semantic feature nodes, the inference feature nodes are obtained;

[0133] The common sense template data corresponding to the reasoning feature nodes are used as reasoning feature data.

[0134] In some embodiments, the target semantic feature data includes the sentence component feature data;

[0135] The reasoning module 203 obtains the semantic feature nodes corresponding to the target semantic feature data based on the target semantic feature data and the common sense template data corresponding to each node in the common sense graph in the following manner:

[0136] Based on synonym matching, the semantic similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is determined, and a first similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is obtained;

[0137] Based on the first similarity value, a second similarity value is obtained with each of the common sense template data;

[0138] The node corresponding to the second similarity value with the largest value is taken as the semantic feature node corresponding to the target semantic feature data.

[0139] In some embodiments, the reasoning module 203 obtains a second similarity value with each of the common sense template data based on the first similarity value in the following manner:

[0140] Obtain the weight coefficient corresponding to each of the sentence component feature data;

[0141] Based on the weight coefficients corresponding to each sentence component feature data and each first similarity value, a weighted average is applied to each first similarity value to obtain a weighted target similarity value.

[0142] The target similarity value is used as the second similarity value with each of the common sense template data.

[0143] In some embodiments, the determining module 204 determines the response data for the utterance data based on the utterance data and the inference feature data in the following manner:

[0144] Input the utterance data and the inference feature data into the trained human-computer dialogue response model;

[0145] The response data output by the human-computer dialogue response model is obtained after sentence completion of the inference feature data.

[0146] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0147] This disclosure also provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the steps of the human-computer dialogue method provided in this disclosure.

[0148] Figure 4 This is a block diagram illustrating an electronic device 800 for human-computer interaction according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0149] Reference Figure 4 The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0150] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the aforementioned human-computer interaction method. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0151] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0152] Power component 806 provides power to various components of electronic device 800. Power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.

[0153] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0154] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0155] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0156] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0157] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0158] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the human-machine dialogue method described above.

[0159] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to complete the aforementioned human-computer interaction method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0160] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the above-described human-computer dialogue method when executed by the programmable device.

[0161] Figure 5 This is a block diagram illustrating an apparatus 1900 for human-computer interaction according to an exemplary embodiment. For example, apparatus 1900 may be provided as a server. (Refer to...) Figure 5 The device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the aforementioned human-computer interaction method.

[0162] Device 1900 may also include a power supply component 1926 configured to perform power management of device 1900, a wired or wireless network interface 1950 configured to connect device 1900 to a network, and an input / output (I / O) interface 1958. Device 1900 can operate on an operating system, such as Windows Server, stored in memory 1932. TM macOS X TM Unix TM Linux TM FreeBSD TM Or similar.

[0163] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0164] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A human-computer dialogue method, characterized in that, include: Obtain the user's current speech data; Semantic features are extracted from the discourse data to obtain target semantic feature data, which includes sentence component feature data, and the number of sentence component feature data is multiple. Based on synonym matching, the semantic similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is determined, and the first similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data is obtained; Based on the first similarity value, a second similarity value is obtained with each of the common sense template data. The second similarity value of each of the common sense template data is the sum of the first similarity values ​​between each of the sentence component feature data and the corresponding sentence component feature data in each of the common sense template data. The second similarity value of each of the common sense template data is obtained by weighting the corresponding first similarity value according to the weight of each sentence component feature data. The node corresponding to the second similarity value with the largest value is taken as the semantic feature node corresponding to the target semantic feature data. Based on the adjacent nodes of the semantic feature nodes, the inference feature nodes are obtained; Use the common sense template data corresponding to the reasoning feature nodes as the reasoning feature data; Based on the utterance data and the inference feature data, response data is determined for the utterance data.

2. The method according to claim 1, characterized in that, The step of extracting semantic features from the discourse data to obtain target semantic feature data includes: The utterance data is segmented into words to obtain the segmentation results; Noise data included in the word segmentation results are filtered out to obtain preprocessed word segmentation results; Semantic features are extracted from the preprocessed word segmentation results to obtain the target semantic feature data.

3. The method according to claim 1, characterized in that, The target semantic feature data includes: At least one of the following: part-of-speech feature data, sentence component feature data, sentence type feature data, and auxiliary clustering feature data; The auxiliary clustering feature data refers to the feature data corresponding to the clustering of words included in the discourse data.

4. The method according to claim 1, characterized in that, The common sense graph includes: multiple nodes connected by edges, each node corresponding to a common sense template data, and each edge corresponding to a common sense attribute.

5. The method according to claim 1, characterized in that, The step of obtaining a second similarity value with each of the common sense template data based on the first similarity value includes: Obtain the weight coefficient corresponding to each of the sentence component feature data; Based on the weight coefficients corresponding to each sentence component feature data and each first similarity value, a weighted average is applied to each first similarity value to obtain a weighted target similarity value. The target similarity value is used as the second similarity value with each of the common sense template data.

6. The method according to claim 1, characterized in that, The step of determining response data for the utterance data based on the utterance data and the inference feature data includes: Input the utterance data and the inference feature data into the trained human-computer dialogue response model; The response data output by the human-computer dialogue response model is obtained after sentence completion of the inference feature data.

7. A human-computer dialogue device, characterized in that, include: The acquisition module is used to acquire the user's current speech data; The extraction module is used to extract semantic features from the discourse data to obtain target semantic feature data, wherein the target semantic feature data includes sentence component feature data, and the number of sentence component feature data is multiple. The reasoning module is used to determine the semantic similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data based on synonym matching, and to obtain the first similarity value between each sentence component feature data and the corresponding sentence component feature data in each common sense template data. Based on the first similarity value, a second similarity value is obtained with each of the common sense template data. The second similarity value of each of the common sense template data is the sum of the first similarity values ​​between each of the sentence component feature data and the corresponding sentence component feature data in each of the common sense template data. The second similarity value of each of the common sense template data is obtained by weighting the corresponding first similarity value according to the weight of each sentence component feature data. Based on the adjacent nodes of the semantic feature nodes, inference feature nodes are obtained. The common sense template data corresponding to the inference feature nodes is used as the inference feature data, and the node corresponding to the second similarity value with the largest value is used as the semantic feature node corresponding to the target semantic feature data. The determination module is used to determine response data for the utterance data based on the utterance data and the inference feature data.

8. A human-computer dialogue device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to, when executing, implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When executed by a processor, the program instructions implement the steps of the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Man-machine conversation method and device and storage medium

    CN112487173A

  • Man-machine conversation depth intention understanding method based on affair graph

    CN112905774A

  • Dialogue module pushing method and device, equipment and storage medium

    CN113127621A