Voice interaction method, device, electronic device and storage medium

Through semantic analysis of user speech and knowledge graph network recognition, avatars can accurately identify user intentions and generate replies, solving the problem of avatars being unable to recognize intentions, improving the accuracy and reliability of voice interaction, and reducing business processing costs. .

CN115497465BActive Publication Date: 2024-08-27PING AN BANK CO LTD

Patent Information

Application Number
CN202211086105.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2024-08-27
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

Existing virtual characters cannot accurately identify user intentions during the interview process, resulting in low voice interaction accuracy, inability to effectively handle users' non-preset problems, and increased business processing costs.

Method used

By semantically parsing the speech input by the user, using a prediction model based on the partially observable Markov decision process to determine the user's intention, and using the knowledge graph network to identify the reply text that meets the intention, generate reply speech, and improve the accuracy of voice interaction. and reliability.

Benefits of technology

It improves the accuracy and reliability of voice interaction between virtual characters and users, reduces the situation of "answering incorrect questions", reduces business processing costs, and enhances the efficiency of online signing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115497465B
    Figure CN115497465B
Patent Text Reader

Abstract

The present invention discloses a voice interaction method, device, electronic device and storage medium, which semantically parse the voice input by the user to obtain the semantic parsing result of the voice; predict the type of the semantic parsing result by using a prediction model established based on a partially observable Markov decision process to obtain the target dialogue type corresponding to the semantic parsing result; input the target dialogue type into a preset knowledge graph network to generate a knowledge graph vector, input the knowledge graph vector into a recommendation network to obtain a reply text corresponding to the target dialogue type, perform voice conversion on the reply text to obtain a reply voice corresponding to the reply text, and output the reply voice; the present invention can semantically parse the voice input by the user, determine the user intention according to the semantic parsing result based on the partially observable Markov decision process, and identify the reply text that meets the user intention according to the knowledge graph, thereby improving the accuracy and reliability of voice interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a voice interaction method, device, electronic device and storage medium. Background Art

[0002] With the development of computer technology and artificial intelligence, traditional offline businesses have gradually moved online, and this has become an irreversible trend. For example, remote interviews are mainly used to help embassies, banks and other institutions. Currently, interviews can be conducted through virtual characters to improve interview efficiency. However, during the interview process through virtual characters, when users have questions and need to consult and communicate, the current virtual characters can only find answers in the set options and cannot accurately identify the user's intentions, resulting in the phenomenon of "answering the wrong question" and low accuracy of the virtual character's voice interaction. Summary of the invention

[0003] The embodiments of the present invention provide a voice interaction method, device, electronic device and storage medium to improve the accuracy of existing voice interaction during face-to-face signing through a virtual character.

[0004] On the one hand, an embodiment of the present invention provides a voice interaction method, the method comprising:

[0005] Performing semantic analysis on the speech input by the user to obtain a semantic analysis result of the speech;

[0006] The semantic parsing result is predicted by a preset prediction model to obtain a target dialogue type corresponding to the semantic parsing result; the prediction model is established based on a partially observable Markov decision process, and the target dialogue type is used to indicate the user intention corresponding to the speech;

[0007] Inputting the target conversation type and the semantic parsing result into a preset knowledge graph network to generate a knowledge graph vector;

[0008] Inputting the knowledge graph vector into the recommendation network to obtain a reply text corresponding to the target conversation type;

[0009] The reply text is converted into speech to obtain a reply speech corresponding to the reply text, and the reply speech is output.

[0010] On the other hand, an embodiment of the present invention provides a voice interaction device, the device comprising:

[0011] The parsing module is used to perform semantic parsing on the speech input by the user to obtain the semantic parsing result of the speech;

[0012] A prediction module, used to predict the type of the semantic parsing result by using a preset prediction model to obtain a target dialogue type corresponding to the semantic parsing result; the prediction model is established based on a partially observable Markov decision process, and the target dialogue type is used to indicate the user intention corresponding to the speech;

[0013] An inference module, used for inputting the target dialogue type into a preset knowledge graph network to generate a knowledge graph vector;

[0014] A recommendation module, used to input the knowledge graph vector into a recommendation network to obtain a reply text corresponding to the target conversation type;

[0015] The output module is used to perform voice conversion on the reply text, obtain the reply voice corresponding to the reply text, and output the reply voice.

[0016] On the other hand, an embodiment of the present invention provides an electronic device, including a memory and a processor; the memory stores an application, and the processor is used to run the application in the memory to perform the operations in the voice interaction method.

[0017] On the other hand, an embodiment of the present invention provides a storage medium, which stores multiple instructions, and the instructions are suitable for loading by a processor to execute the steps in the voice interaction method.

[0018] The embodiment of the present invention performs semantic analysis on the speech input by the user to obtain a semantic analysis result of the speech; performs type prediction on the semantic analysis result through a prediction model established based on a partially observable Markov decision process to obtain a target dialogue type corresponding to the semantic analysis result, and recognizes the user intention; inputs the target dialogue type into a preset knowledge graph network to generate a knowledge graph vector, inputs the knowledge graph vector into a recommendation network to obtain a reply text corresponding to the target dialogue type, performs speech conversion on the reply text to obtain a reply speech corresponding to the reply text, and outputs the reply speech; the embodiment of the present invention can perform semantic analysis on the speech input by the user, determine the user intention according to the semantic analysis result based on the partially observable Markov decision process, and recognize the reply text that meets the user intention according to the knowledge graph, thereby improving the accuracy and reliability of voice interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a flow chart of a voice interaction method provided by an embodiment of the present invention;

[0021] Figure 2 is a structural diagram of a semantic parsing model provided by an embodiment of the present invention;

[0022] Figure 3 Schematic diagram of the updating process of the POMDP model provided by an embodiment of the present invention;

[0023] Figure 4 is a structural schematic diagram of a voice interaction device provided by an embodiment of the present invention;

[0024] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] As described in the background technology, face-to-face auditing by virtual characters can improve the efficiency of business processing. Most of the existing communication between virtual characters and users is to output pre-set options to users, determine the operations input by users based on the options, and output corresponding replies. The interaction method is relatively simple and has few applicable scenarios. Moreover, when the operation input by the user does not belong to the pre-set options, the virtual character may not be able to give an accurate reply, resulting in a "non-answer" situation. During the face-to-face audit and business processing of users, there may be questions that require consultation and communication. These questions may be related to the current business processing or may be unrelated to the current business processing. If the virtual character only looks for answers in the set options, instead of identifying the user's intentions and responding according to the user's intentions, this will reduce the accuracy of the voice interaction between the virtual character and the user, thereby causing the user's online business processing to fail. Although the existing online business processing can be communicated by business personnel with users when the virtual character cannot answer the user's questions, this requires continuous monitoring of the interaction between the virtual character and the user, which increases costs.

[0027] Based on this, an embodiment of the present invention provides a voice interaction method, which can perform semantic analysis on the voice input by the user, determine the user's intention according to the semantic analysis result based on the partially observable Markov decision process (POMDP, full name: Partially Observable Markov Decision Process), and identify the reply text that meets the user's intention according to the knowledge graph, thereby improving the accuracy and reliability of voice interaction.

[0028] like Figure 1 As shown, Figure 1 1 is a flow chart of a voice interaction method provided by an embodiment of the present invention. The voice interaction method shown includes steps 101 to 105:

[0029] 101, semantically analyze the speech input by the user to obtain a semantic analysis result of the speech.

[0030] In some embodiments of the present invention, there are multiple ways to perform semantic analysis on the speech input by the user, exemplary of which include:

[0031] (1) The speech input by the user can be converted into text, and the text can be semantically parsed to obtain the semantic parsing result of the speech input by the user.

[0032] In some embodiments of the present invention, the speech input by the user can be converted into text through a speech conversion model, wherein the speech conversion model is a trained neural network model, and the speech conversion model realizes the conversion of the speech input by the user into text through speech recognition technology. The speech recognition technology (ASR, Automatic Speech Recognition) takes speech as the research object, and automatically recognizes the text in the speech through speech signal processing and pattern. The process of speech-to-text conversion is that the speech conversion model pre-processes the speech input by the user (VAD, i.e., silence removal at the beginning and end) and frames the sound, and extracts features from each frame after the sound is framed, extracts the feature vector containing the sound information of each frame, and then converts each feature vector into a corresponding phoneme vector by converting the acoustic model, searches the dictionary library for the Chinese or English corresponding to each phoneme vector, and then recognizes the probability of the correlation between characters or between words through the speech model, and finally obtains the text with the highest probability.

[0033] (2) The input speech can be converted into a time domain signal or a frequency domain signal, and the semantic analysis of the user's input speech can be performed by performing signal recognition on the time domain signal or the frequency domain signal to obtain a semantic analysis result of the speech.

[0034] (3) The speech input by the user can be input into a preset semantic analysis model for semantic analysis to obtain a semantic analysis result of the speech.

[0035] In some embodiments of the present invention, the semantic parsing model may be a semantic parsing model based on machine learning, such as a semantic parsing model based on logistic regression, a semantic parsing model based on random forest, a semantic parsing model based on dictionary learning, etc.; in some embodiments of the present invention, the semantic parsing model may be a probability model, such as a Gaussian model, a normal distribution model, a Markov random process model, etc.; in some embodiments of the present invention, the semantic parsing model may also be a semantic parsing model based on a neural network, such as based on long short-term memory (LSTM), convolutional neural networks (CNN), deconvolutional neural networks (DN), deep neural networks (DNN), deep convolutional inverse graphics networks (DCIGN), region-based convolutional networks (RCNN), region-based fast convolutional networks (Faster RCNN) and bidirectional encoder representations from transformers (BERT) model.

[0036] It should be noted that the above-mentioned semantic parsing method is only for illustrative purposes and does not constitute a limitation on the voice interaction method provided in the embodiment of the present invention. The corresponding semantic parsing method can be selected according to the actual application scenario.

[0037] 102, predicting the type of the semantic parsing result by using a preset prediction model to obtain the target dialogue type corresponding to the semantic parsing result.

[0038] The prediction model is established based on a partially observable Markov decision process, and the target dialogue type is used to indicate the user intention corresponding to the speech. For example, when the target dialogue type is "01", the corresponding user intention is "A", and when the target dialogue type is "02", the corresponding user intention is "B". For example, when handling financial business, when the target dialogue type is query, the corresponding user intention is business query, user data query. For example, when the user inputs a voice of "detailed query", the target dialogue type is determined to be data query, that is, the user intention is user data query.

[0039] In some embodiments of the present invention, step 102 includes: inputting the semantic parsing result into a preset prediction model, calculating an approximate value through the Bellman optimality equation of the prediction model, first calculating the value function corresponding to the strategy through strategy search, obtaining the optimal strategy by finding the strategy with the highest reward value, and setting the optimal strategy as the target dialogue type.

[0040] 103, input the target dialogue type and semantic analysis results into the preset knowledge graph network to generate a knowledge graph vector.

[0041] In some embodiments of the present invention, the knowledge graph network extracts information from the semantic parsing results according to the target dialogue type to obtain the head semantic entity, semantic relationship and tail semantic entity, and then obtains the knowledge graph vector, in which each two-dimensional matrix slice represents a semantic relationship.

[0042] 104, input the knowledge graph vector into the recommendation network to obtain the reply text corresponding to the target dialogue type.

[0043] In some embodiments of the present invention, step 104 includes: inputting the knowledge graph vector into the recommendation network for feature extraction to obtain a factor matrix, wherein each row in the factor matrix represents a semantic entity, and the result restored by the knowledge graph vector and the factor matrix is ​​the probability corresponding to each candidate text, and the reply text corresponding to the target dialogue type is obtained according to the probability corresponding to each candidate text. In some embodiments of the present invention, the candidate text corresponding to the maximum probability can be set as the reply text.

[0044] In some embodiments of the present invention, step 104 includes: inputting the knowledge graph vector into the recommendation network for feature extraction to obtain a factor matrix, obtaining a score corresponding to each candidate text according to the factor matrix, and setting the candidate text with a score greater than or equal to a preset score as the reply text corresponding to the target dialogue type. The preset score can be a pre-set score or the maximum value of the scores corresponding to the candidate texts.

[0045] In some embodiments of the present invention, step 104 includes: inputting the knowledge graph vector into the recommendation network for feature extraction to obtain a factor matrix, and obtaining an atom set of all knowledge atoms based on the results of restoring the knowledge graph vector and the factor matrix, wherein each knowledge atom in the atom set is a candidate text, and each knowledge atom includes a head semantic entity, a semantic relationship, and a tail semantic entity. For each knowledge atom in the atom set, the degree of association between each knowledge atom is determined by a preset scoring function, and the score corresponding to each candidate text is obtained according to the degree of association between each knowledge atom. According to the score corresponding to each candidate text, a target candidate text with a score greater than or equal to a preset score is selected, and the selected target candidate text is set as the reply text corresponding to the target dialogue type.

[0046] 105, performing voice conversion on the reply text, obtaining a reply voice corresponding to the reply text, and outputting the reply voice.

[0047] In some embodiments of the present invention, the context information of the reply text can be obtained by performing text analysis on the reply text, speech conversion can be performed based on the context information of the reply text, the spectral parameters corresponding to the reply text can be obtained, and preset acoustic features can be obtained. A smooth target acoustic feature sequence can be generated based on the spectral parameters and the preset acoustic features, and the target acoustic feature sequence can be input into a preset sound synthesizer to obtain the reply speech corresponding to the reply text, and the reply speech can be output. Among them, the acoustic features represent the timbre, voiceprint, and tone. In some embodiments of the present invention, the preset acoustic features can be represented by Mel-frequency cepstral coefficients, and the spectral parameters represent the audio signal corresponding to each word or character in the reply text. In some embodiments of the present invention, the preset acoustic features can be the acoustic features corresponding to the virtual character selected by the user.

[0048] In the embodiment of the present invention, it is possible to perform semantic analysis on the speech input by the user, determine the user's intention according to the semantic analysis result based on a partially observable Markov decision process, and identify the reply text that meets the user's intention according to the knowledge graph, thereby improving the accuracy and reliability of voice interaction.

[0049] In some embodiments of the present invention, in order to ensure data security during face-to-face review and business processing, the user's identity can be authenticated before step 101. If the verification is successful, the voice input by the user is received, and voice interaction is performed with the user through a virtual character based on the voice input by the user to guide the user to perform face-to-face review or business processing; if the verification fails, a prompt message is output.

[0050] In some embodiments of the present invention, there are multiple ways to perform identity authentication, exemplary of which include:

[0051] (1) Verification information input by the user can be obtained, and the verification information input by the user can be compared with the pre-stored verification information; if the verification information input by the user is consistent with the pre-stored verification information, it is determined that the verification is passed; if the verification information input by the user is inconsistent with the pre-stored verification information, it is determined that the verification is not passed. The verification information can be a password or a password, wherein the password can be a verification code, and the password can be one or more of numbers, characters, letters, and graphics.

[0052] (2) A face image input by a user can be obtained, face detection can be performed on the face image to obtain a detection result, and the user's identity can be authenticated according to the detection result; wherein the detection result indicates whether the face image is consistent with a pre-stored reference face image, if the face image is consistent with the pre-stored reference face, then the authentication is determined to be passed; if the face image is inconsistent with the pre-stored reference face, then the authentication is determined to be failed. The reference face is a face image pre-input by the user for face recognition.

[0053] (3) A verification voice input by the user can be obtained, and voiceprint recognition can be performed based on the verification voice input by the user to obtain the voiceprint feature to be detected, and the voiceprint feature can be compared with the pre-stored reference voiceprint feature; if the voiceprint feature to be detected is consistent with the pre-stored reference voiceprint feature, it is determined that the verification is passed; if the voiceprint feature to be detected is inconsistent with the pre-stored reference voiceprint feature, it is determined that the verification is failed.

[0054] It should be noted that the above identity authentication method is only an exemplary description and is not intended to limit the voice interaction method provided in the embodiment of the present invention.

[0055] In some embodiments of the present invention, when the verification is passed, an interactive page view is output, and a virtual character is displayed on the interactive page view. The virtual character may be a virtual character obtained through 3D modeling, or the virtual character may be a two-dimensional animated character.

[0056] In some embodiments of the present invention, voice input by the user based on the interactive page view is obtained.

[0057] In some embodiments of the present invention, in order to improve the semantic analysis result, the speech input by the user can be converted into text to obtain text information, and semantic analysis is performed based on the text information to obtain the semantic analysis result. Specifically, the semantic analysis method includes steps a1 to a5:

[0058] Step a1, converting the voice input by the user into text to obtain text information corresponding to the voice.

[0059] In some embodiments of the present invention, the voice input by the user may be voices from different countries or dialects from different regions.

[0060] In some embodiments of the present invention, the speech input by the user may be converted into text by ASR based on Gaussian mixture-hidden Markov model (HMM-GMM) to obtain text information corresponding to the speech.

[0061] In some embodiments of the present invention, in order to ensure the accuracy of text information, text correction can be performed on the converted text. Specifically, the speech input by the user is converted into text by ASR based on HMM-GMM to obtain initial text information, and the initial text information is corrected by a preset correction algorithm to obtain text information corresponding to the speech. For example, when the initial text obtained by text conversion according to the language input by the user is "digital search", text correction is performed by a preset correction algorithm to obtain text information "data query" corresponding to the speech.

[0062] In some embodiments of the present invention, the preset error correction algorithm may be a language model based on LSTM; the preset error correction algorithm may be a language model combining the Burkhard-Keller tree (metric tree in discrete metric space) algorithm and the minimum edit distance method. The Burkhard-Keller tree algorithm and the minimum edit distance method are used to determine the distance required to convert the initial text information into text information.

[0063] Step a2: extract word vectors from the text information to obtain word vectors for the text information.

[0064] In some embodiments of the present invention, in order to improve the certainty of the word vector, the text information can be segmented to obtain multiple words, and each word is converted into a word vector to obtain the word vector of the text information. Specifically, the method of word vector conversion includes:

[0065] (1) Perform word segmentation on the text information to obtain multiple words in the text information, and determine the part of speech, word order and association relationship of each word.

[0066] (2) Determine the similarity between each word based on its part of speech, word order and association relationship.

[0067] (3) Perform entity disambiguation based on the similarity between each word to obtain the target word.

[0068] (4) By converting the target vocabulary into word vectors, the word vectors of the text information are obtained.

[0069] Among them, part of speech refers to the attributes of each word, including but not limited to nouns, verbs, adjectives, etc., association relationships represent the interdependence between words, keywords refer to named entities, which are used to determine whether a word is a proper noun, and word order is used to determine the sequential relationship between each word.

[0070] In some embodiments of the present invention, the text can be divided into words or phrases to obtain multiple vocabularies through the conditional random field (CRF) syntactic analyzer and the maximum entropy dependency syntactic analyzer in HanLP and Stanford parser, and the part of speech, word order, and association relationship of each word can be obtained.

[0071] In some embodiments of the present invention, entity disambiguation is used to identify words in multiple words that refer to different expressions of the same entity. In some embodiments of the present invention, the Cartesian product of part of speech, word order and association relationship can be calculated by a mapping-reduction method to obtain the similarity between each word. Calculate the similarity between each word. For n data records, i and j are both natural numbers between 0 and n, e i and e j represents one of the n words, and w represents the weight. The words with similar part of speech, word order and association relationship are selected by adaptive threshold for fusion to complete entity disambiguation and obtain the target word. Fusion refers to the fusion of the part of speech, word order and association relationship of words with similar part of speech, word order and association relationship.

[0072] In some embodiments of the present invention, the target vocabulary may be converted into a word vector by Word2Vec.

[0073] Step a3: perform fusion processing based on the part of speech, word order, and association relationship of each word vector to obtain a fused word vector.

[0074] In some embodiments of the present invention, the fusion processing includes but is not limited to concatenation, weighted fusion and hash calculation.

[0075] In some embodiments of the present invention, the fusion process is to fuse similar parts of speech, word orders, and association relationships to obtain new parts of speech, new word orders, new association relationships, and then obtain a fused word vector.

[0076] In some embodiments of the present invention, two or more similar parts of speech, word orders, and association relationships are directly concatenated to obtain a fused word vector. The weights corresponding to the part of speech, word order, and association relationship of each word vector in two or more similar parts of speech, word orders, and association relationships can also be determined, and two or more similar parts of speech, word orders, and association relationships are combined according to the weights corresponding to the part of speech, word order, and association relationship of each word vector to obtain a fused word vector. The hash values ​​corresponding to the part of speech, word order, and association relationship of each word vector in two or more similar parts of speech, word order, and association relationships can also be combined with the hash values ​​corresponding to the part of speech, word order, and association relationship of each word vector to obtain a fused word vector.

[0077] Step a4: input each fused word vector into the trained encoder for sparse coding to obtain the sparse coding of the fused word vector.

[0078] In some embodiments of the present invention, the encoder may be a sparse edge denoising encoder.

[0079] In some embodiments of the present invention, sparse constraints and regularization terms can be introduced into the hidden layer neurons of the deep confidence neural network to obtain a sparse edge denoising autoencoder, and a fused word vector that integrates part of speech, word order, and dependency relationships is input into the sparse edge denoising autoencoder to obtain a test encoding result. The training loss of the sparse edge denoising autoencoder is determined by a preset loss function and the test encoding result, and the parameters such as weights, biases, sparse constraints and regularization constraints of the sparse edge denoising autoencoder are adjusted according to the training loss to obtain a trained encoder.

[0080] Step a5, input the sparse coding of the fused word vector into the trained semantic parsing model for semantic parsing to obtain the semantic parsing result of the speech.

[0081] In some embodiments of the present invention, the semantic parsing model can be established based on a cascaded convolutional neural network, for example: Figure 2 As shown, Figure 2 is a structural diagram of a semantic parsing model provided by an embodiment of the present invention, Figure 2 The semantic parsing model shown in Figure (a) includes a cascaded convolution layer 1, a first cascade suppression classifier, a convolution layer 2, a second cascade suppression classifier, a convolution layer 3, and a third cascade suppression classifier, wherein the cascade suppression classifier is used to filter interference information and increase the accuracy of semantic parsing. Figure 2 As shown, the output of convolution layer 1 is input to the first cascade suppression classifier, the output of the first cascade suppression classifier is pooled by the first maximum pooling layer and then input to convolution layer 2, the output of convolution layer 2 is input to the second cascade suppression classifier, the output of the second cascade suppression classifier is pooled by the second maximum pooling layer and then input to convolution layer 3, the output of convolution layer 3 is input to the third cascade suppression classifier, the output of the third cascade suppression classifier is pooled by the third maximum pooling layer and then output by the output layer for the final semantic parsing result.

[0082] In some embodiments of the present invention, Figure 2 As shown in Figure (b), the cascade suppression classifier includes a cascaded first fully connected layer, a second fully connected layer and a selection layer, wherein the first fully connected layer and the second fully connected layer are connected by an activation function. In some embodiments of the present invention, the activation function may be a TanH function.

[0083] In some embodiments of the present invention, after obtaining the semantic analysis result of the speech, the semantic analysis result can be input into a preset prediction model for type prediction, and multiple candidate dialogue types and the confidence of each candidate dialogue type are obtained, and the confidence of each candidate dialogue type is sorted in descending order, and a preset number of target candidate dialogue types are selected from the sorted multiple candidate dialogue types, and the selected target candidate dialogue types are set as target dialogue types. For example, in financial services, when the semantic analysis result is "data query", the type prediction is performed through the preset prediction model, and the candidate dialogue types are determined to be expenditure detail query, income detail query, and user data query, and the confidence of user data query is determined to be 90%, expenditure detail query is 80%, and income detail query is 60%. Then, according to the confidence of each candidate dialogue type, the multiple candidate dialogue types are sorted in descending order of confidence: user data query--expenditure detail query--income detail query, and user data query and expenditure detail query are selected as target dialogue types.

[0084] In some embodiments of the present invention, the prediction model is established based on a partially observable Markov decision process. The partially observable Markov decision process (POMDP) ​​is to evolve the voice interaction into a Markov process, and to apply actions to the user's voice interaction environment state through POMDP to change the voice interaction environment state, obtain a certain reward, and measure the possibility of executing a series of strategies based on the accumulated rewards obtained, thereby converting the voice interaction problem into a strategy selection problem, and selecting the corresponding candidate dialogue type based on the semantic analysis results of the user's input voice. Among them, the strategy is the candidate dialogue type in the embodiment of the present invention.

[0085] Specifically, the POMDP starts from an initial state s0 of the voice interaction, and each subsequent state is represented by a transition probability p(s1|s t-1 ,a t-1 ) model, since the state s t The uncertainty of the semantic parsing of the user's input speech cannot be directly observed, so in each round, the semantic parsing result of the user's input speech is taken as a probability p(o t |s t ) of the user input noise observation o t. The transition probability and the noise observation probability are represented by a first random model, and the first random model is set as a dialogue model, that is, the dialogue model is used to solve each subsequent state through the transition probability and the probability of noise observation; the decision of which action to choose in each round is determined by the second random model, and the second random model is set as a strategy model, that is, the candidate dialogue type in each round is determined by the strategy model. In voice interaction, a reward function is assigned to each step, and the expected characteristics in the voice interaction are reflected by the reward function assigned to each step. In some embodiments of the present invention, the expected cumulative sum of the reward function can be maximized through online interaction with the user or through a voice interaction corpus collected in an offline similar domain to optimize the dialogue model and the strategy model to obtain a prediction model.

[0086] In some embodiments of the present invention, the dialogue model and the policy model may be optimized by deep reinforcement learning to obtain a prediction model. Specifically, the method for establishing the prediction model includes:

[0087] (1) The partially observable Markov decision process is represented by a multivariate<S,A,T,O,Q,β> Indicates, wherein the meaning of each element in the tuple is shown in Table 1, which is an illustration of the meaning of the tuple of the partially observable Markov decision process provided by an embodiment of the present invention.

[0088] The meaning of the tuple representing a portion of the observable Markov decision process

[0089]

[0090] (2) The confidence state in the POMDP probability distribution is expressed as B = {b t}, its probability distribution at time t is bt = {bt(s1),...,bt(sm)}. Among them, bt(si) means that the environment state at time t is s i By observing the current dialogue environment and choosing actions, POMDP derives the confidence value of the environment state at the next moment. Specifically, assuming that the confidence state at the start moment is b0, perform action a0 and observe o0, and obtain the confidence state b1 at the next moment. When in state s1, the observation obtained by the model is o1, and the internal state of the model is i1. Calculate, and select the corresponding action a1 according to the problem-guided strategy, resulting in the environment state transferring from s1 to s2, the model obtains reward r1 and observation o2, at which time the internal state of the model transfers from i1(b1) to i2(b2), and then the model continues to run in this way to obtain the prediction model, where η is a normalization constant. Figure 3 As shown, Figure 3 It is a schematic diagram of the updating process of the POMDP model provided by an embodiment of the present invention.

[0091] In some embodiments of the present invention, in selecting a corresponding action according to a question guiding strategy, the tracking of the dialogue state can be achieved by establishing a question guiding strategy estimation function, wherein the question guiding strategy estimation function is: in, is the value of the action vector state s corresponding to node n, s' is the action vector state at the current moment, ψ(n) represents the output action related to node n, and through strategy evolution, the guidance strategy estimation function of the problem at the next moment is obtained. Among them, b` is the confidence value at the current moment, is the optimal strategy, that is is the candidate dialogue type, is the guiding strategy function of the problem at the previous moment.

[0092] In some embodiments of the present invention, the strategy optimization method based on deep reinforcement learning can be used to solve Get the candidate dialogue type. Specifically, it includes: defining the expected total return of the POMDP model through reinforcement learning Among them, the return r t Each time step is converted by a factor γ∈[0,1], and T is the termination step. The action value function Q is used π (s,a) Observe state s t The expected return is calculated by using the neural network Q(s,a)=(Q(s,a;θ)) to approximate the action value function. π (s,a)=E[R t |s t =a,a1=a,π] through strategy Get the guidance strategy based on action a π , and construct the Bellman equation with action value a Among them, a` is the action value at the current moment. By adjusting the Q-network to solve the target parameters of the iterative Bellman equation, multiple candidate dialogue types are obtained.

[0093] In some embodiments of the present invention, in the selection of the target conversation type, the semantic parsing results can be input into a preset prediction model for type prediction to obtain multiple candidate conversation types and the confidence of each candidate conversation type; the confidence of each candidate conversation type is compared with a preset confidence threshold; if the confidence of each candidate conversation type is greater than or equal to the preset confidence threshold, each candidate conversation type is sorted in descending order of confidence, and the target conversation type is determined based on the sorted candidate conversation types.

[0094] In some embodiments of the present invention, if the confidence of each candidate dialogue type is less than a preset confidence threshold, a pre-trained recognition model is used to perform category prediction on the semantic parsing result to obtain the target dialogue type corresponding to the semantic parsing result. In some embodiments of the present invention, the recognition model may be a LSTM+CRF model.

[0095] In some embodiments of the present invention, after obtaining the target conversation type, the target conversation type and the semantic parsing result are input into a preset knowledge graph network, and the knowledge graph network extracts information from the semantic parsing result according to the target conversation type to obtain a knowledge graph vector, wherein the knowledge graph vector includes the head semantic entity, semantic relationship, and tail semantic entity of each knowledge atom.

[0096] In some embodiments of the present invention, after obtaining the knowledge graph vector, the knowledge atom association scores in the knowledge graph vector can be calculated in real time. The upper and lower bounds of the embedding cost are used to search for the optimal k embeddings and obtain the reply text corresponding to the target dialogue type. w,v and n u,v are the length and number of the shortest paths between knowledge atoms u and v, respectively. α is a predefined constant whose value is between 0 and 1. N is a value less than When n u,v >N, the upper bound of the association score between u and v is

[0097] In some embodiments of the present invention, when the application scenario of the voice interaction method is a single business scenario, for example, when the voice interaction method is applied to face-to-face audits in financial services, the knowledge graph can be used to determine the reply text corresponding to the target dialogue type, and the atom set A of all knowledge atoms can be obtained according to the steps in step 104. For each knowledge atom in the atom set A, the degree of association between each knowledge atom is determined by a preset scoring function s(h,l,t)=s1(h,l,t)+s2(h,l,t), and the score corresponding to each candidate text is obtained according to the degree of association between each knowledge atom. According to the score corresponding to each candidate text, a target candidate text with a score greater than or equal to a preset score is selected, and the selected target candidate text is set as the reply text corresponding to the target dialogue type.

[0098] In some embodiments of the present invention, when the application scenario of the voice interaction method is multiple business scenarios, for example, when the voice interaction method is applied to business processing in financial business, similar to a single business scenario, the set boundary is expanded to all business scenarios to form a new set B of possible combinations of knowledge atoms. Through the preset scoring function s(h,l,t)=s1(h,l,t)+s2(h,l,t), the global score Q1 of the set is obtained, and the knowledge atoms in set B and their accompanying path embeddings (vectors) and type embeddings are shared and submitted to multi-column convolutional neural networks to complete the supervised scenario classification of agreed types, and obtain three feature vectors of answer type, answer path, and answer surrounding entities. The similarity of these three feature vectors is calculated two by two and the sum is obtained to obtain the global score value Q2. By performing a dot product operation on Q1 and Q2, a fused global score value Q3 is obtained. The degree of association between knowledge atoms in multiple scenarios is judged according to the value of Q3. The score corresponding to each candidate text is obtained according to the degree of association between each knowledge atom. According to the score corresponding to each candidate text, a target candidate text with a score greater than or equal to a preset score is selected, and the selected target candidate text is set as the reply text corresponding to the target dialogue type.

[0099] In some embodiments of the present invention, when determining the reply text corresponding to the target conversation type, the knowledge graph vector may be input into the recommendation network for feature calculation to obtain the reply text. Specifically, the method for determining the reply text includes:

[0100] (1) The knowledge graph vector is input into the recommendation network, and the head semantic entity, semantic relationship and tail semantic entity of the knowledge graph vector are processed to obtain the autonomous attention representation.

[0101] (2) The head semantic entity and autonomous attention representation are aggregated to obtain aggregate information.

[0102] (3) Concatenate the target conversation type with the aggregated information to obtain a text matrix.

[0103] (4) Obtain the reply text corresponding to the target dialogue type based on the text matrix.

[0104] In some embodiments of the present invention, the recommendation network may be a graph neural network.

[0105] In some embodiments of the present invention, the knowledge graph vector is input into the recommendation network, the recommendation network converts the head semantic entity and the tail semantic entity of the knowledge graph vector into a degree matrix, converts the semantic relationship in the knowledge graph vector into an adjacency network, normalizes the degree matrix, and multiplies the normalized degree matrix with the adjacency network to obtain an attention representation. The attention representation is used to extract the dependency between contexts and is used for information propagation of the knowledge graph.

[0106] In some embodiments of the present invention, the head semantic entity, the semantic relationship and the tail semantic entity are input into the first linear network layer of the recommendation network, the head semantic entity and the semantic relationship passing through the first linear network layer are added to obtain the first intermediate data, the first intermediate data is input into the first activation function for processing, and the first intermediate data processed by the first activation function is multiplied with the tail semantic entity passing through the first linear network layer to obtain the autonomous attention representation.

[0107] In some embodiments of the present invention, the head semantic entity can be added to the autonomous attention representation to obtain second intermediate data, the second intermediate data can be input into the second linear network layer, the output of the second linear network layer can be input into the second activation function to obtain first information; the head semantic entity can be multiplied with the autonomous attention representation to obtain third intermediate data, the third intermediate data can be input into the third linear network layer, the output of the third network layer can be input into the third activation function to obtain second information; the first information can be added to the second information to obtain aggregated information.

[0108] In some embodiments of the present invention, the target conversation type is concatenated with the aggregate information to obtain a text matrix. For each element in the text matrix, the degree of correlation between each element in the text matrix can be obtained according to the steps in step 104, and a score corresponding to each element is obtained according to the degree of correlation between each element, wherein each element corresponds to a candidate text, and a target candidate text with a score greater than or equal to a preset score is selected according to the score corresponding to each candidate text, and the selected target candidate text is set as the reply text corresponding to the target conversation type.

[0109] In some embodiments of the present invention, after the reply text is obtained, the reply text can be converted into speech according to the method in step 105 to generate a reply speech corresponding to the reply text, and the reply speech can be output.

[0110] In some embodiments of the present invention, the reply text can be input into a preset hidden Markov model speech synthesis model to obtain spectral parameters and acoustic feature sequences, and speech conversion is performed based on the spectral parameters and acoustic feature sequences to obtain the reply speech corresponding to the reply text, and the reply speech is output.

[0111] In some embodiments of the present invention, in order to generate a smooth reply voice and ensure that the reply voice output by the virtual character is vivid, an initial acoustic feature sequence can be obtained according to the spectral parameters and the acoustic feature sequence, a preset acoustic feature can be obtained, the initial acoustic feature sequence can be adjusted according to the preset acoustic feature to obtain a target acoustic feature sequence, the target acoustic feature sequence can be smoothed, the smoothed target acoustic feature sequence can be input into a preset sound synthesizer to obtain a reply voice corresponding to the reply text, and the reply voice can be output.

[0112] In some embodiments of the present invention, when the reply voice is generated, in order to increase the authenticity of the output reply voice, semantic analysis can be performed based on the reply text to obtain the emotion coefficient corresponding to the reply text, and the sound characteristics of the reply voice can be adjusted according to the emotion coefficient. Among them, the emotion coefficient indicates the emotion type and level of the reply text. In some embodiments of the present invention, the emotion coefficient includes but is not limited to the sadness coefficient, the happiness coefficient, the anger coefficient, the regret coefficient, etc. The sound characteristics include pitch and sound. In some embodiments of the present invention, adjusting the sound characteristics of the reply voice according to the emotion coefficient includes: adjusting the pitch and sound of the reply voice according to the emotion coefficient, and adjusting the sound characteristics of the reply voice. For example, when the emotion coefficient is a sadness coefficient, the pitch and sound of the reply voice can be reduced according to the sadness coefficient, so that the output reply voice is low and slow.

[0113] In some embodiments of the present invention, in order to increase the accuracy of the reply voice and eliminate ambiguity in the voice interaction process, when determining the reply text, the inquiry voice corresponding to the inquiry text can be output, and the answer voice input by the user based on the inquiry voice can be obtained, and the scores corresponding to multiple candidate texts can be determined based on the semantic analysis results corresponding to the answer voice. For example, when the user inputs the "query" voice, when multiple candidate texts are obtained, the inquiry voice of "Excuse me, do you want to query user data or query details" is output, and when the semantic analysis result of the answer voice input by the user is "user data", then according to the semantic analysis result of the answer voice input by the user, the candidate cost of the multiple candidate texts whose similarity with the user data query is lower than the preset threshold is eliminated, thereby eliminating ambiguity, and the reply text is selected from the candidate texts after elimination, and the reply voice corresponding to the reply text is output.

[0114] The voice interaction method provided by the embodiment of the present invention can perform semantic analysis on the voice input by the user, determine the user's intention according to the semantic analysis result based on a partially observable Markov decision process, and identify the reply text that meets the user's intention according to the knowledge graph, thereby improving the accuracy and reliability of voice interaction.

[0115] In order to better implement the voice interaction method provided in the embodiment of the present invention, a voice interaction device is provided based on the voice interaction method, such as Figure 4 As shown, Figure 4 1 is a flow chart of an embodiment of a voice interaction device provided by an embodiment of the present invention, wherein the voice interaction device shown includes:

[0116] The parsing module 401 is used to perform semantic parsing on the speech input by the user to obtain a semantic parsing result of the speech;

[0117] Prediction module 402, used to predict the type of the semantic parsing result by using a preset prediction model to obtain a target dialogue type corresponding to the semantic parsing result; the prediction model is established based on a partially observable Markov decision process, and the target dialogue type is used to indicate the user intention corresponding to the speech;

[0118] The reasoning module 403 is used to input the target dialogue type into a preset knowledge graph network to generate a knowledge graph vector;

[0119] The recommendation module 404 is used to input the knowledge graph vector into the recommendation network to obtain the reply text corresponding to the target conversation type;

[0120] The output module 405 is used to perform voice conversion on the reply text, obtain the reply voice corresponding to the reply text, and output the reply voice.

[0121] In some embodiments of the present invention, the parsing module 401 is used to:

[0122] Convert the voice input by the user into text to obtain the text information corresponding to the voice;

[0123] Extract word vectors from text information to obtain word vectors for the text information;

[0124] According to the part of speech, word order, and dependency relationship of each word vector, a fused word vector is obtained;

[0125] Input each fused word vector into the trained encoder for sparse coding to obtain the sparse coding of the fused word vector;

[0126] The sparse coding of the fused word vector is input into the trained semantic parsing model for semantic parsing to obtain the semantic parsing result of the speech.

[0127] In some embodiments of the present invention, the parsing module 401 is used to:

[0128] Perform word segmentation on the text information to obtain multiple words in the text information;

[0129] Determine the part of speech, word order, and associations of each word;

[0130] Determine the similarity between each word based on its part of speech, word order and association relationship;

[0131] Perform entity disambiguation based on the similarity between each word to obtain the target word;

[0132] By converting the target vocabulary into word vectors, the word vectors of the text information are obtained.

[0133] In some embodiments of the present invention, the prediction module 402 is used to:

[0134] The semantic analysis results are input into a preset prediction model for type prediction to obtain multiple candidate dialogue types and the confidence level of each candidate dialogue type;

[0135] According to the confidence of each candidate dialogue type, the target dialogue type is determined.

[0136] In some embodiments of the present invention, the prediction module 402 is used to:

[0137] Compare the confidence of each candidate dialogue type with a preset confidence threshold;

[0138] If the confidence of each candidate dialogue type is greater than or equal to a preset confidence threshold, each candidate dialogue type is sorted in descending order of confidence, and the target dialogue type is determined based on the sorted candidate dialogue types;

[0139] If the confidence of each candidate dialogue type is less than the preset confidence threshold, the pre-trained LSTM+CRF model is used to predict the category of the semantic parsing result to obtain the target dialogue type corresponding to the semantic parsing result.

[0140] In some embodiments of the present invention, the recommendation module 404 is used to:

[0141] The knowledge graph vector is input into the recommendation network, and the head semantic entity, semantic relationship and tail semantic entity of the knowledge graph vector are processed to obtain autonomous attention representation;

[0142] The head semantic entity and autonomous attention representation are aggregated to obtain aggregate information;

[0143] Concatenate the target conversation type with the aggregate information to obtain a text matrix;

[0144] Get the reply text corresponding to the target dialogue type according to the text matrix.

[0145] In some embodiments of the present invention, the output module 405 is used to:

[0146] Input the reply text into the preset hidden Markov model speech synthesis model to obtain the spectrum parameters and acoustic feature sequence;

[0147] Perform speech conversion according to the spectrum parameters and acoustic feature sequence to obtain the reply speech corresponding to the reply text, and output the reply speech.

[0148] The voice interaction device provided by the embodiment of the present invention can perform semantic analysis on the voice input by the user, determine the user's intention according to the semantic analysis result based on a partially observable Markov decision process, and identify the reply text that meets the user's intention according to the knowledge graph, thereby improving the accuracy and reliability of voice interaction.

[0149] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present invention, specifically:

[0150] The electronic device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0151] The processor 501 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 502, and calling data stored in the memory 502, the processor 501 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.

[0152] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0153] The electronic device also includes a power supply 503 for supplying power to each component. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0154] The electronic device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0155] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 501 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 502 according to the following instructions, and the processor 501 will run the application programs stored in the memory 502, thereby realizing various functions, as follows:

[0156] Perform semantic analysis on the speech input by the user to obtain the semantic analysis result of the speech;

[0157] The semantic parsing result is predicted by a preset prediction model to obtain the target dialogue type corresponding to the semantic parsing result; the prediction model is established based on a partially observable Markov decision process, and the target dialogue type is used to indicate the user intention corresponding to the speech;

[0158] Input the target conversation type and semantic parsing results into the preset knowledge graph network to generate a knowledge graph vector;

[0159] Input the knowledge graph vector into the recommendation network to obtain the reply text corresponding to the target conversation type;

[0160] Perform speech conversion on the reply text, obtain the reply speech corresponding to the reply text, and output the reply speech.

[0161] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0162] To this end, an embodiment of the present invention provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the voice interaction methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:

[0163] Perform semantic analysis on the speech input by the user to obtain the semantic analysis result of the speech;

[0164] The semantic parsing result is predicted by a preset prediction model to obtain the target dialogue type corresponding to the semantic parsing result; the prediction model is established based on a partially observable Markov decision process, and the target dialogue type is used to indicate the user intention corresponding to the speech;

[0165] Input the target conversation type and semantic parsing results into the preset knowledge graph network to generate a knowledge graph vector;

[0166] Input the knowledge graph vector into the recommendation network to obtain the reply text corresponding to the target conversation type;

[0167] Perform speech conversion on the reply text, obtain the reply speech corresponding to the reply text, and output the reply speech.

[0168] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0169] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0170] Since the instructions stored in the storage medium can execute the steps in any voice interaction method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any voice interaction method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0171] The above is a detailed introduction to a voice interaction method, device, electronic device and storage medium provided in an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A voice interaction method, characterized in that: The method comprises: Performing semantic analysis on the speech input by the user to obtain a semantic analysis result of the speech; The semantic parsing result is predicted by a preset prediction model to obtain a target dialogue type corresponding to the semantic parsing result; the prediction model is established based on a partially observable Markov decision process, and the target dialogue type is used to indicate the user intention corresponding to the speech; Inputting the target conversation type and the semantic parsing result into a preset knowledge graph network to generate a knowledge graph vector; Inputting the knowledge graph vector into the recommendation network to obtain a reply text corresponding to the target conversation type; The reply text is converted into speech to obtain a reply speech corresponding to the reply text, and the reply speech is output.

2. The voice interaction method according to claim 1, characterized in that: The performing semantic analysis on the speech input by the user to obtain the semantic analysis result of the speech includes: Convert the voice input by the user into text to obtain text information corresponding to the voice; Extracting word vectors from the text information to obtain word vectors for the text information; Performing fusion processing according to the part of speech, word order, and dependency relationship of each word vector to obtain a fused word vector; Input each of the fused word vectors into a trained encoder for sparse coding to obtain a sparse coding of the fused word vector; The sparse coding of the fused word vector is input into a trained semantic parsing model for semantic parsing to obtain a semantic parsing result of the speech.

3. The voice interaction method according to claim 2, characterized in that: The extracting word vectors from the text information to obtain the word vectors of the text information includes: Performing word segmentation on the text information to obtain a plurality of words in the text information; Determine the part of speech, word order and association relationship of each of the words; Determine the similarity between each of the words according to the part of speech, word order and association relationship of each of the words; Perform entity disambiguation based on the similarity between each of the words to obtain a target word; The word vector of the text information is obtained by converting the target vocabulary into a word vector.

4. The voice interaction method according to claim 1, characterized in that: The performing type prediction on the semantic parsing result by using a preset prediction model to obtain a target dialogue type corresponding to the semantic parsing result includes: Inputting the semantic analysis result into a preset prediction model for type prediction to obtain a plurality of candidate dialogue types and a confidence level of each candidate dialogue type; According to the confidence level of each candidate dialogue type, a target dialogue type is determined.

5. The voice interaction method according to claim 4, characterized in that: Determining the target dialogue type according to the confidence of each candidate dialogue type includes: Comparing the confidence of each of the candidate dialogue types with a preset confidence threshold; If the confidence of each candidate conversation type is greater than or equal to a preset confidence threshold, each candidate conversation type is sorted in descending order of confidence, and a target conversation type is determined based on the sorted candidate conversation types; If the confidence of each candidate dialogue type is less than a preset confidence threshold, the semantic parsing result is classified according to a pre-trained recognition model to obtain a target dialogue type corresponding to the semantic parsing result.

6. The voice interaction method according to claim 1, characterized in that: The step of inputting the knowledge graph vector into the recommendation network to obtain a reply text corresponding to the target conversation type includes: Inputting the knowledge graph vector into a recommendation network, processing the head semantic entity, semantic relationship and tail semantic entity of the knowledge graph vector to obtain an autonomous attention representation; Aggregating the head semantic entity and the autonomous attention representation to obtain aggregate information; Concatenating the target conversation type with the aggregate information to obtain a text matrix; A reply text corresponding to the target dialogue type is obtained according to the text matrix.

7. The voice interaction method according to any one of claims 1 to 6, characterized in that: The performing voice conversion on the reply text to obtain a reply voice corresponding to the reply text, and outputting the reply voice comprises: Inputting the reply text into a preset speech synthesis model of a hidden Markov model to obtain spectrum parameters and acoustic feature sequences; Perform speech conversion according to the spectrum parameters and the acoustic feature sequence to obtain a reply speech corresponding to the reply text, and output the reply speech.

8. A voice interaction device, characterized in that: The device comprises: The parsing module is used to perform semantic parsing on the speech input by the user to obtain the semantic parsing result of the speech; A prediction module, used to predict the type of the semantic parsing result by using a preset prediction model to obtain a target dialogue type corresponding to the semantic parsing result; the prediction model is established based on a partially observable Markov decision process, and the target dialogue type is used to indicate the user intention corresponding to the speech; An inference module, used for inputting the target dialogue type into a preset knowledge graph network to generate a knowledge graph vector; A recommendation module, used to input the knowledge graph vector into a recommendation network to obtain a reply text corresponding to the target conversation type; The output module is used to perform voice conversion on the reply text, obtain the reply voice corresponding to the reply text, and output the reply voice.

9. An electronic device, characterized in that: It comprises a memory and a processor; the memory stores an application, and the processor is used to run the application in the memory to perform the operations in the voice interaction method described in any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a plurality of instructions, which are suitable for loading by a processor to execute the steps in the voice interaction method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Natural language semantic in-depth analysis algorithm with application of sparse encoding

    CN106919556A

  • Information processing device and word segmentation processing method thereof

    CN107291695A

  • Mobile customer service conversation management method based on state tracking and strategy guidance

    CN108282587A

  • Dialogue interaction method, device and computer readable storage medium

    CN110377716A

  • Ontology entity disambiguation method based on entity similarity calculation

    CN110532541A

Cited By

  • Server apparatus, system, and method for determining a reply in response to an audio input

    WO2026226094A1