An intelligent customer service voice interaction method and system based on voice recognition

Through the hidden Markov model and speech signal segmentation technology, combined with vocabulary matching and semantic correlation, the candidate probability is corrected, and the problem of insufficient semantic understanding in speech recognition is solved, achieving more efficient speech recognition and intelligent customer service interaction.

CN120199247BActive Publication Date: 2025-08-12HUAZE ZHONGXI (BEIJING) TECH DEV CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510678456.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-08-12
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

The existing n-gram model fails to effectively understand the semantic relationships between words in text and sentence global information in speech recognition, resulting in low recognition efficiency and accuracy.

Method used

The speech signal segment is divided by the Hidden Markov model, the phoneme sequence and its candidate text are obtained, the vocabulary matching degree and semantic correlation degree are calculated, and the candidate probability is corrected based on time and similarity, and the speech signal is identified.

Benefits of technology

It improves the accuracy and accuracy of voice recognition, enhances the coherence and naturalness of voice interaction of intelligent customer service, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120199247B_ABST
    Figure CN120199247B_ABST
Patent Text Reader

Abstract

The present application relates to the field of speech recognition technology, and specifically to a method and system for intelligent customer service voice interaction based on speech recognition, the method comprising: real-time collection of voice signals of users in the process of issuing voice commands in a voice interaction scenario, as well as text data generated by users interacting in historical periods, to form a historical text set; dividing the voice signal into multiple signal segments; and obtaining each command signal segment; obtaining the phoneme sequence corresponding to each command signal segment and all corresponding candidate texts; calculating the matching degree and semantic relevance of each word in each candidate text to obtain the candidate probability of each candidate text; correcting the candidate probability to obtain the corrected candidate probability corresponding to each candidate text under each command signal segment, identifying the voice signal and performing voice interaction. The present application improves the accuracy of speech recognition, enabling intelligent customer service to more accurately understand and respond to user voice commands, thereby improving the accuracy of voice interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech recognition technology, and in particular to an intelligent customer service voice interaction method and system based on speech recognition. Background Art

[0002] IoT voice recognition technology converts voice input into recognizable data or commands, and then responds through IoT devices. In the IoT environment, voice recognition not only relies on traditional voice signal processing and natural language processing technologies, but also integrates the interconnectivity of IoT devices to achieve intelligent interaction between voice and devices, applications, and services. Through voice recognition, users can directly interact with intelligent customer service using voice commands, streamlining the process and improving the user experience.

[0003] During voice interaction, Hidden Markov Models (HMMs) are often used to screen candidate texts corresponding to speech signals. The n-gram model is often used to rank these candidate texts. However, the n-gram model is statistically based and does not understand the actual meaning or grammatical structure of words in a text. The n-gram model only captures the co-occurrence relationships between words, ignoring the deeper semantics between them. It also fails to capture the broader context or global information within the sentence, resulting in low efficiency and accuracy in speech signal recognition. Summary of the Invention

[0004] In order to solve the above technical problems, an intelligent customer service voice interaction method and system based on voice recognition are provided to solve the existing problems.

[0005] The solution to the technical problem of this application is to provide an intelligent customer service voice interaction method and system based on voice recognition, including the following steps:

[0006] In a first aspect, an embodiment of the present application provides an intelligent customer service voice interaction method based on voice recognition, the method comprising the following steps:

[0007] Real-time collection of voice signals from users issuing voice commands in voice interaction scenarios, as well as text data generated by user interactions in historical periods, to form a historical text set;

[0008] Based on the signal strength of the voice signal, the voice signal is divided into a plurality of signal segments; and all the signal segments are screened to obtain each command signal segment;

[0009] Using the hidden Markov model, the phoneme sequence corresponding to each instruction signal segment and all corresponding candidate texts are obtained;

[0010] Segment each candidate text, analyze the number of words represented by the combination of multiple phonemes corresponding to each word in each candidate text in the phoneme sequence, and calculate the matching degree of each word in each candidate text under each instruction signal segment;

[0011] The semantic relevance of each word in each candidate text under each instruction signal segment is determined by the distance between each word in each candidate text and its adjacent words in the text data that co-occur in the historical text set, as well as the number of co-occurrences. Combined with the matching degree, the candidate probability of each candidate text under each instruction signal segment is obtained;

[0012] The candidate probability is corrected based on the time length between each command signal segment and its previous different command signal segments, and the similarity of the candidate texts, to obtain the corrected candidate probability corresponding to each candidate text under each command signal segment, recognize the voice signal and perform voice interaction.

[0013] Preferably, the voice signal is divided into multiple signal segments, including: recording the moment when the signal strength in the voice signal is 0 as a silent moment; if the signal strengths of two moments adjacent to the silent moment in the voice signal are not all 0, then the silent moment is recorded as the zero point; and the voice signal is divided into multiple signal segments with the zero point as the dividing point.

[0014] Preferably, the further method for obtaining each instruction signal segment is: calculating the average value of all signal strengths in each signal segment, clustering the average values of all signal segments, and obtaining two clustering clusters; all signal segments in the cluster to which the maximum value of the average values of all signal segments belongs are recorded as each instruction signal segment.

[0015] Preferably, the obtaining of the phoneme sequence corresponding to each instruction signal segment and all corresponding candidate texts includes:

[0016] Preprocessing each command signal segment and extracting the Mel-frequency cepstral coefficients of each command signal segment after preprocessing as an observation sequence; obtaining a hidden state sequence based on the observation sequence through a hidden Markov model; mapping each hidden state in the hidden state sequence to a corresponding phoneme in a phoneme dictionary to obtain a phoneme sequence;

[0017] All texts corresponding to the phoneme sequence are recorded as candidate texts using the phoneme dictionary.

[0018] Preferably, the calculating of the matching degree of each word in each candidate text under each instruction signal segment includes:

[0019] The phonemes corresponding to each word in each candidate text in the phoneme sequence are combined into a local phoneme sequence;

[0020] Each phoneme in the local phoneme sequence and all the previous phonemes are combined into subsequences; wherein the subsequence composed of the last phoneme in the local phoneme sequence and all the previous phonemes is the local phoneme sequence;

[0021] All phonemes in the local phoneme sequence and the next phoneme corresponding to the last phoneme in the phoneme sequence form an extended sequence; all subsequences except the local phoneme sequence and the extended sequence in all subsequences are recorded as characteristic phoneme sequences;

[0022] Counting the number of all words corresponding to the local phoneme sequence in the phoneme dictionary; counting the number of all words corresponding to each characteristic phoneme sequence in the phoneme dictionary, and recording it as vocabulary;

[0023] The matching degree is the reciprocal of the product of the sum of the vocabulary values of all characteristic phoneme sequences and the number.

[0024] Preferably, determining the semantic relevance of each word in each candidate text under each instruction signal segment includes:

[0025] The words adjacent to any word in each candidate text are recorded as neighboring words; the number of times the word and its neighboring words co-occur in all text data in the historical text set is counted;

[0026] Calculating the cumulative sum of distances between any word and its neighboring words in all text data in which the two words co-appear in the historical text set;

[0027] The product of the number of times and the accumulated sum is used as the relevance between any word and its neighboring words;

[0028] The semantic relevance is the sum of the relevance between any word in each candidate text and all its neighboring words.

[0029] Preferably, the candidate probability of each candidate text under each instruction signal segment is a normalized result of the sum of the products of the matching degree and the semantic association degree of all words in each candidate text.

[0030] Preferably, obtaining the corrected candidate probability corresponding to each candidate text under each instruction signal segment includes:

[0031] Get the word vector for each candidate text;

[0032] No. The next command signal segment The corrected candidate probability corresponding to the candidate text The calculation formula is: ,in, For the Before the command signal segment The word vector of the candidate text corresponding to the maximum value of all correction candidate probabilities under the instruction signal segment is the same as the word vector of the first The next command signal segment The similarity between the word vectors of candidate texts; For the Before the command signal segment The maximum value of the corrected candidate probability of all candidate texts under the instruction signal segment, For the The first command signal segment and the one before it The time interval between command signal segments, For the The number of all instruction signal segments before the instruction signal segment, wherein the corrected candidate probability corresponding to each candidate text under the first instruction signal segment is the candidate probability.

[0033] Preferably, the recognition of voice signals and voice interaction include: selecting the candidate text corresponding to the maximum value of all the corrected candidate probabilities under each instruction signal segment as the result of voice recognition; and performing voice interaction by finding the corresponding answer in a preset knowledge base based on the result of voice recognition.

[0034] In the second aspect, an embodiment of the present application also provides an intelligent customer service voice interaction system based on speech recognition, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-mentioned intelligent customer service voice interaction methods based on speech recognition.

[0035] This application has at least the following beneficial effects:

[0036] The present application divides the voice signal and filters all signal segments to obtain each instruction signal segment. The beneficial effect is that the signal corresponding to each instruction issued by the user is filtered, thereby eliminating the signal during the silent moment, which helps to remove irrelevant voice or noise segments. Then, through the hidden Markov model, the phoneme sequence corresponding to each instruction signal segment and all corresponding candidate texts are obtained. The beneficial effect is that all texts matching the phonemes corresponding to the voice signal in the public phoneme dictionary are matched, so that more matching texts can be screened out later; the matching degree of each word in each candidate text under each instruction signal segment is calculated. The beneficial effect is that among all the phonemes corresponding to the words, the number of words that match in the public phoneme dictionary through different combinations is used to illustrate the possibility that the phonemes corresponding to each word are incorrectly divided, reflecting the matching situation between each word and the word represented by the corresponding phoneme; determining each The semantic relevance of each word in each candidate text is taken into account. The beneficial effect is that it takes into account the co-occurrence of each word in each candidate text and its adjacent words in historical texts to reflect the semantic relationship between words; the candidate probability of each candidate text under each instruction signal segment is obtained, the candidate probability is corrected, and the corrected candidate probability corresponding to each candidate text under each instruction signal segment is obtained, the voice signal is recognized and voice interaction is performed. The beneficial effect is that it takes into account the similarity and time interval between each instruction signal segment and the text after the previous instruction signal segment, and corrects the candidate probability. By selecting the candidate text corresponding to the maximum corrected candidate probability as the voice recognition result of each instruction signal segment, and then performing voice interaction, the accuracy of voice recognition is improved, so that the intelligent customer service can understand and respond to the user's voice instructions more accurately, improve the accuracy, coherence and naturalness of voice interaction, and enhance user experience satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The following is a detailed description of an intelligent customer service voice interaction method based on voice recognition in this application in conjunction with the accompanying drawings.

[0038] Figure 1 A flowchart of the steps of an intelligent customer service voice interaction method based on voice recognition provided in an embodiment of the present application;

[0039] Figure 2 A flowchart of the steps of a method for obtaining the matching degree of each word in each candidate text provided in an embodiment of the present application;

[0040] Figure 3 A flowchart of the steps of a method for obtaining the semantic relevance of each word in each candidate text provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] To make the purpose, technical solutions, and advantages of this application more clearly understood, the following, in conjunction with the accompanying drawings and implementation examples, further describes in detail a method and system for intelligent customer service voice interaction based on voice recognition proposed in this application. It should be understood that the specific embodiments described herein are merely intended to explain this application and are not intended to limit this application.

[0042] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0043] See also Figure 1 , which shows a flowchart of a method for intelligent customer service voice interaction based on voice recognition provided by an embodiment of the present application, the method comprising the following steps:

[0044] Step 1: Collect the voice signals of users in the process of issuing voice commands in the voice interaction scenario in real time, as well as the text data generated by users' interactions in historical periods, to form a historical text set.

[0045] With the rapid development of artificial intelligence, human-computer interaction methods, such as voice question-answering, are widely used in service consulting industries such as e-commerce, electricity, finance, and education. Before intelligent customer service representatives can respond via voice, they need to accurately understand the user's intent in the voice signal. This is achieved by converting the voice signal into text, thereby identifying the user's intent.

[0046] Therefore, we collect the user's voice signals in the scenario of voice interaction between the user and the intelligent customer service, and compile all the text data generated by the user's interaction in the historical period into a historical text set;

[0047] In this embodiment, a historical text set is formed by converting text data generated by text records of customer service work orders, chat records, and customer service phone recordings when different users interact in historical periods.

[0048] At this point, the user's voice signal and historical text set during voice interaction are obtained.

[0049] Step 2: Based on the signal strength in the speech signal, the speech signal is divided into multiple signal segments; all signal segments are screened to obtain each command signal segment; and a hidden Markov model is used to obtain the phoneme sequence corresponding to each command signal segment and all corresponding candidate texts.

[0050] When a user interacts with an intelligent customer service representative through voice, the user issues a voice command, the intelligent customer service representative understands the voice signal, and provides feedback on the user's problem. The user then issues subsequent voice commands, thereby forming an information exchange. The voice signal only contains the user's voice, and the intelligent customer service representative's response is not included in the voice signal. Therefore, there are natural pauses when the user interacts with the intelligent customer service representative, as well as silent periods when the intelligent customer service representative provides feedback on the problem. Silence detection can be used to divide the voice signal into multiple signal segments, specifically:

[0051] The moment when the signal strength of the voice signal is 0 is recorded as a silent moment; if the signal strengths of the two moments adjacent to the silent moment in the voice signal are not both 0, the silent moment is recorded as zero point;

[0052] Dividing the speech signal into a plurality of signal segments using the zero point as a segmentation point;

[0053] Secondly, the signal segments include signals when user commands are issued and signals when the voice is muted. The signal segments are distinguished by the voice intensity of the signal segments to obtain the command signal segments, specifically:

[0054] Calculating the average value of all signal intensities in each signal segment, clustering the average values of all signal segments to obtain two clusters;

[0055] In this embodiment, the k-means clustering algorithm is used for clustering, wherein the k-means clustering algorithm is a well-known technology and will not be described in detail here. As other implementation methods, the implementer can adopt other methods of the existing technology, such as the DBSCAN clustering algorithm, etc. This embodiment does not impose any special restrictions on this.

[0056] All signal segments in the cluster to which the maximum value of the average value of all signal segments belongs are recorded as command signal segments;

[0057] It should be noted that the larger the average value, the weaker the signal of the signal segment, which may be a signal when there is silence or a long pause in the user's expression. Therefore, the signal segment in the cluster with the largest average value is more likely to be the signal segment corresponding to the user issuing an instruction.

[0058] Furthermore, the Hidden Markov Model (HMM) is the most commonly used mathematical model in speech recognition. Usually, each word, phrase, or sentence that can be individually recognized can be simulated by an HMM. The speech signal of each command signal segment is mapped to text through the Hidden Markov Model. Specifically:

[0059] Preprocess each command signal segment and extract the Mel-frequency cepstral coefficient of each command signal segment after preprocessing as an observation sequence;

[0060] In this embodiment, the extraction of Mel-frequency cepstral coefficients (MFCC coefficients) is a well-known technology and will not be described in detail here. Secondly, the preprocessing process includes pre-emphasis, framing, windowing, FFT, MEL filter group, DCT, etc., among which the preprocessing process is a well-known technology and will not be described in detail here. By extracting the Mel-frequency cepstral coefficients of each frame in each instruction signal segment, an observation sequence is formed.

[0061] It should be noted that the observation sequence ,in, are the MFCC coefficients extracted at time t.

[0062] Based on the observation sequence, a hidden state sequence is obtained through a hidden Markov model; each hidden state in the hidden state sequence is mapped to a corresponding phoneme in a phoneme dictionary to obtain a phoneme sequence;

[0063] It should be noted that the hidden Markov model is a well-known technology and will not be described here in detail. ,in, Indicates time Next hidden state, each hidden state Corresponding to a specific phoneme; secondly, the process of mapping the hidden state to the corresponding phoneme is generally implemented through the state and phoneme mapping relationship in the phoneme dictionary or HMM model, wherein the phoneme dictionary is generally created through the pronunciation rules of speech and a large-scale language data set. The specific process is a well-known technology and will not be repeated here; in this embodiment, the phoneme dictionary of the Chinese entry adopts the Chinese phoneme set lexcion in the Tsinghua University corpus.

[0064] It should be noted that the hidden Markov model needs to be trained. The specific training process is: by collecting a large amount of labeled voice data, which should contain voice signals of different users and corresponding text annotations, to form a data set, the voice signals in the data set are preprocessed, and the Mel-frequency cepstral coefficients (MFCC) are extracted as the observation sequence, and the hidden Markov model is trained; the hidden state sequence is obtained through the observation sequence corresponding to each command signal segment combined with the trained hidden Markov model.

[0065] Secondly, phonemes are the smallest speech units in linguistics. They are the smallest sound units that distinguish different words or semantics. Each phoneme represents an independent speech feature, usually a sound produced by organs such as the mouth and throat. Different languages have different phoneme systems, and the combination of phonemes constitutes the speech forms such as words and sentences in the language. Therefore, in the speech recognition process, the phoneme sequence is mapped to the text, so that the user's intention can be grasped and understood through the voice signal. However, due to the existence of semantic ambiguity, the same phoneme may exist in multiple words, resulting in a phoneme sequence corresponding to multiple texts. For example, taking an English phoneme sequence [ / k / / a / / t / ] as an example, it may correspond to "cat" or "cot". Therefore, all candidate texts corresponding to each command signal segment are obtained, specifically:

[0066] Using the phoneme dictionary, all texts corresponding to the phoneme sequence are recorded as candidate texts;

[0067] It should be noted that the phoneme sequence corresponding to each instruction signal segment is matched with the corresponding vocabulary in the phoneme dictionary to form a text, so that multiple texts can be obtained.

[0068] At this point, all candidate texts corresponding to each instruction signal segment are obtained.

[0069] Step 3: Segment each candidate text, analyze the number of words represented by the combination of multiple phonemes corresponding to each word in each candidate text in the phoneme sequence, and calculate the matching degree of each word in each candidate text under each instruction signal segment; determine the semantic relevance of each word in each candidate text under each instruction signal segment through the distance between each word in each candidate text and its adjacent words in the text data that co-appear in the historical text set, as well as the number of co-occurrences, and combine the matching degree to obtain the candidate probability of each candidate text under each instruction signal segment.

[0070] Furthermore, traditional algorithms use an n-gram model to sort candidate texts, obtain their corresponding candidate probabilities, and select the candidate with the highest probability as the final speech recognition result. However, when re-ranking candidate texts, the n-gram model relies only on the context of the first n words for prediction, lacking a deep understanding of the semantic relationships between words and the context of the sentence. This results in a low match between the selected candidate texts and the actual speech signal, which in turn affects the accuracy and efficiency of intelligent customer service voice interaction.

[0071] Based on the above analysis, the candidate text is first segmented, the number of words corresponding to the phonemes of the segmented words in the phoneme dictionary is analyzed, and the matching degree is calculated to evaluate the accuracy of the phoneme division when the candidate text is obtained. The step flow chart of the method for obtaining the matching degree of each word in each candidate text provided in the embodiment of the present application is as follows: Figure 2 As shown, specifically including:

[0072] Perform word segmentation on each candidate text corresponding to the phoneme sequence of each instruction signal segment to obtain each word of each candidate text;

[0073] In this embodiment, Jieba word segmentation is used for processing, wherein Jieba word segmentation is a well-known technology and will not be described in detail here. As other implementation methods, implementers can adopt other methods of existing technologies, such as HanLP, SnowNLP, etc. This embodiment does not impose any special restrictions on this.

[0074] The phonemes corresponding to any word in each candidate text in the phoneme sequence are combined into a local phoneme sequence;

[0075] It should be noted that the candidate text is segmented into multiple words and phrases, which are recorded as individual words. For example, the sentence "I have a problem" can be segmented into "I," "have," "a," and "problem." For each word in the candidate text, since phonemes are the smallest sound units of a word, the corresponding phonemes can be directly obtained based on the pronunciation of the word. The phonemes corresponding to each word in the phoneme sequence are obtained, forming a local phoneme sequence.

[0076] Each phoneme in the local phoneme sequence and all the previous phonemes are combined into subsequences;

[0077] All the phonemes in the local phoneme sequence and the next phoneme corresponding to the last phoneme in the phoneme sequence form an extended sequence;

[0078] It should be noted that, for ease of understanding, assuming that the phoneme sequence is [ / k / / a / / t / / n / / æ / / p / ], the local phoneme sequence corresponding to a certain word is [ / k / / a / / t / ], and the subsequences are [ / k / ], [ / k / / a / ], and [ / k / / a / / t / ], where the subsequence [ / k / / a / / t / ] is the local phoneme sequence, and the last phoneme / t / in the local phoneme sequence corresponds to the next phoneme / n / in the phoneme sequence. / k / / a / / t / and / n / form a sequence, so the extended sequence is [ / k / / a / / t / / n / ].

[0079] The remaining subsequences in all subsequences except the local phoneme sequence and the extended sequence are recorded as characteristic phoneme sequences;

[0080] Counting the number of all words corresponding to the local phoneme sequence in the phoneme dictionary;

[0081] Counting the number of all words corresponding to each characteristic phoneme sequence in the phoneme dictionary, recording it as the vocabulary size, and taking the inverse of the product of the sum of the vocabulary sizes of all characteristic phoneme sequences and the number as the matching degree of any word in each candidate text;

[0082] It should be noted that the larger the number, the richer the information contained in the local phoneme sequence, and the more likely it is to correspond to multiple meanings. If each characteristic phoneme sequence has a corresponding vocabulary in the phoneme dictionary, and the larger the vocabulary, the more likely it is that there will be deviations in the division of phonemes in the phoneme sequence when obtaining the candidate text above. The smaller the resulting matching degree, the more vocabulary represented by the local phoneme sequence, and the smaller the possibility that the vocabulary represented by the local phoneme sequence is the vocabulary in any of the candidate texts. The larger the matching degree, the fewer vocabulary represented by the local phoneme sequence, and the more likely it is that the vocabulary represented by the local phoneme sequence is the corresponding vocabulary in any of the candidate texts.

[0083] Secondly, the above matching degree reflects the matching status between phoneme features and vocabulary, and does not take into account the correlation between vocabulary, which may cause semantic confusion in the selected text. Therefore, the semantic correlation is calculated by the semantic correlation between different vocabulary in any candidate text. The step flow chart of the method for obtaining the semantic correlation of each vocabulary in each candidate text provided in the embodiment of the present application is as follows: Figure 3 As shown, specifically including:

[0084] Record the words adjacent to any of the words in each candidate text as neighboring words;

[0085] Counting the number of times any word and its neighboring words co-occur in all text data in the historical text set;

[0086] Calculating the cumulative sum of distances between any word and its neighboring words in all text data in which the two words co-appear in the historical text set;

[0087] In this embodiment, the distance is measured by calculating the character distance between any word and its neighboring words in all text data that co-appear in the historical text set. The calculation of the character distance is a well-known technique and will not be described in detail here.

[0088] The product of the number of times and the accumulated sum is used as the relevance between any word and its neighboring words;

[0089] The sum of the relevance between any word in each candidate text and all adjacent words is used as the semantic relevance of any word in each candidate text;

[0090] In this embodiment, for each instruction signal segment, taking the kth word in the mth candidate text as an example, the calculation formula for its semantic relevance is:

[0091] ,

[0092] in, For the The candidate text The semantic relevance of words, For the The candidate text The word and The number of times the neighboring words appear together in all text data in the historical text set, For the The candidate text The word and The neighboring words in the historical text set The character distance between two words in the text data of the first occurrence, For the The candidate text The number of all neighboring words of a word; among them, is the correlation.

[0093] It should be noted that the greater the number, the The word and The frequency of simultaneous appearance of adjacent words in texts of historical periods is high; the smaller the distance, the higher the correlation between the two words; the greater the obtained semantic correlation, the more relevant the semantic information between the two words is in the intelligent customer service voice interaction scenario, and the greater the overall sentence fluency; conversely, the smaller the obtained semantic correlation, the smaller the correlation of the semantic information between the two words.

[0094] Furthermore, based on the matching degree and the semantic relevance, the candidate probability is determined, specifically:

[0095] Normalizing the sum of the products of the matching degrees and the semantic association degrees of all words in each candidate text as the candidate probability of each candidate text;

[0096] In this embodiment, the sigmoid function is used for normalization processing, wherein the sigmoid function is a well-known technology and will not be described in detail here. As other implementation methods, the implementer can adopt other methods of the existing technology, such as the softmax function, the tanh function, etc., and this embodiment does not impose any special restrictions on this.

[0097] It should be noted that the larger the candidate probability is, the more likely it is that the text meaning represented by the candidate text is the true meaning expressed by each instruction signal segment; conversely, the smaller the candidate probability is, the less likely it is that the text meaning represented by the candidate text is the true meaning expressed by each instruction signal segment.

[0098] At this point, the candidate probability of each candidate text is obtained.

[0099] Step 4: Modify the candidate probability based on the time length between each command signal segment and its previous different command signal segments, and the similarity of the candidate texts, to obtain the modified candidate probability corresponding to each candidate text under each command signal segment, recognize the voice signal and perform voice interaction.

[0100] Furthermore, since different command signal segments are related to each other, based on the text corresponding to the initial command signal segment, the candidate probabilities of the candidate texts corresponding to the remaining command signal segments are modified, specifically:

[0101] Get the word vector for each candidate text;

[0102] In this embodiment, the Word2Vec model is used to convert each candidate text into a word vector. The Word2Vec model is a well-known technology and will not be described in detail here. As other implementation methods, implementers can adopt other methods of the existing technology, such as BERT, etc. This embodiment does not impose any special restrictions on this.

[0103] The calculation formula for the corrected candidate probability corresponding to each candidate text under each instruction signal segment is:

[0104] ,

[0105] in, For the The next command signal segment The probability of corrected candidates corresponding to candidate texts, For the Before the command signal segment The word vector of the candidate text corresponding to the maximum value of all correction candidate probabilities under the instruction signal segment is the same as the word vector of the first The next command signal segment The similarity between the word vectors of candidate texts; For the Before the command signal segment The maximum value of the corrected candidate probability of all candidate texts under the instruction signal segment, For the The first command signal segment and the one before it The time interval between command signal segments, For the The number of all instruction signal segments before the instruction signal segment, wherein the corrected candidate probability corresponding to each candidate text under the first instruction signal segment is the candidate probability.

[0106] In this embodiment, the similarity is expressed by Before the command signal segment The word vector of the candidate text corresponding to the maximum value of all correction candidate probabilities under the instruction signal segment is the same as the word vector of the first The next command signal segment The cosine similarity between the word vectors of the candidate texts is measured, where the calculation of cosine similarity is a well-known technology and will not be described here; secondly, the time interval is calculated by The duration between the start time of the command signal segment and the end time of the previous command signal segment.

[0107] It should be noted that, for the first instruction signal segment, the candidate probability of each candidate text corresponding to it is used as the corrected candidate probability of each candidate text, and the candidate text corresponding to the maximum value of all corrected candidate probabilities under the first instruction signal segment is recorded as the matching text of the first instruction signal segment. Therefore, for the second instruction signal segment, the cosine similarity between the word vector of each candidate text under the second instruction signal segment and the word vector of the matching text corresponding to the previous instruction signal segment is calculated, and then the corrected candidate probability of each candidate text under the second instruction signal segment is obtained, and the candidate text corresponding to the maximum value of the corrected candidate probability under the second instruction signal segment is selected and recorded as the matching text corresponding to the second instruction signal segment, and so on, so as to obtain the corrected candidate probability corresponding to each candidate text under each instruction signal segment.

[0108] It should be noted that the greater the similarity, the The next command signal segment The correlation between a candidate text and the text data corresponding to the previous instruction signal segment is high. The smaller the time interval is and the closer the signal issuance time between the two instruction signal segments is, the higher the correlation between the two instruction signal segments may be. The greater the probability of the corrected candidate is, the more likely the candidate text is to be the result of speech recognition of the corresponding instruction signal segment.

[0109] Furthermore, the candidate text corresponding to the maximum value of all the corrected candidate probabilities under each command signal segment is selected as the result of speech recognition, and the user's key entities and intentions are identified through the natural language processing algorithm. Based on the result of the user's speech recognition, the corresponding answer is found in the preset knowledge base to realize voice interaction between the intelligent customer service and the user.

[0110] Based on the same inventive concept as the above method, an embodiment of the present application also provides an intelligent customer service voice interaction system based on speech recognition, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-mentioned intelligent customer service voice interaction methods based on speech recognition.

[0111] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0112] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0113] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the present application. It should be noted that a person skilled in the art can make various modifications and improvements without departing from the spirit of the present application. Therefore, any simple modifications, equivalent variations, and modifications to the above embodiments made in accordance with the technical essence of the present application without departing from the content of the present application's technical solution fall within the scope of protection of the present application's technical solution.

Claims

1. An intelligent customer service voice interaction method based on voice recognition, characterized in that: The method comprises the following steps: Real-time collection of voice signals from users issuing voice commands in voice interaction scenarios, as well as text data generated by user interactions in historical periods, to form a historical text set; Based on the signal strength of the voice signal, the voice signal is divided into a plurality of signal segments; and all the signal segments are screened to obtain each command signal segment; Using the hidden Markov model, the phoneme sequence corresponding to each instruction signal segment and all corresponding candidate texts are obtained; Segment each candidate text, analyze the number of words represented by the combination of multiple phonemes corresponding to each word in each candidate text in the phoneme sequence, and calculate the matching degree of each word in each candidate text under each instruction signal segment; The semantic relevance of each word in each candidate text under each instruction signal segment is determined by the distance between each word in each candidate text and its adjacent words in the text data that co-occur in the historical text set, as well as the number of co-occurrences. Combined with the matching degree, the candidate probability of each candidate text under each instruction signal segment is obtained; The candidate probability is modified by comparing the time length between each command signal segment and its previous different command signal segments, and the similarity between the candidate texts. The modified candidate probability corresponding to each candidate text under each command signal segment is obtained to recognize the voice signal and perform voice interaction. Calculating the matching degree of each word in each candidate text under each instruction signal segment includes: The phonemes corresponding to each word in each candidate text in the phoneme sequence are combined into a local phoneme sequence; Each phoneme in the local phoneme sequence and all the previous phonemes are combined into subsequences; wherein the subsequence composed of the last phoneme in the local phoneme sequence and all the previous phonemes is the local phoneme sequence; All phonemes in the local phoneme sequence and the next phoneme corresponding to the last phoneme in the phoneme sequence form an extended sequence; all subsequences except the local phoneme sequence and the extended sequence in all subsequences are recorded as characteristic phoneme sequences; Counting the number of all words corresponding to the local phoneme sequence in the phoneme dictionary; counting the number of all words corresponding to each characteristic phoneme sequence in the phoneme dictionary, and recording it as vocabulary; The matching degree is the reciprocal of the product of the sum of the vocabulary values of all characteristic phoneme sequences and the number.

2. The intelligent customer service voice interaction method based on voice recognition according to claim 1, characterized in that: The method of dividing the speech signal into multiple signal segments includes: recording a moment when the signal strength of the speech signal is 0 as a silent moment; if the signal strengths of two moments adjacent to the silent moment in the speech signal are not both 0, recording the silent moment as the zero point; and dividing the speech signal into multiple signal segments using the zero point as a dividing point.

3. The intelligent customer service voice interaction method based on voice recognition according to claim 1, characterized in that: A further method for obtaining each command signal segment is as follows: calculating the average value of all signal strengths in each signal segment, clustering the average values of all signal segments to obtain two clusters; and recording all signal segments in the cluster to which the maximum value of the average values of all signal segments belongs as each command signal segment.

4. The intelligent customer service voice interaction method based on voice recognition according to claim 1, characterized in that: The step of obtaining the phoneme sequence corresponding to each instruction signal segment and all corresponding candidate texts includes: Preprocessing each command signal segment and extracting the Mel-frequency cepstral coefficients of each command signal segment after preprocessing as an observation sequence; obtaining a hidden state sequence based on the observation sequence through a hidden Markov model; mapping each hidden state in the hidden state sequence to a corresponding phoneme in a phoneme dictionary to obtain a phoneme sequence; All texts corresponding to the phoneme sequence are recorded as candidate texts using the phoneme dictionary.

5. The intelligent customer service voice interaction method based on voice recognition according to claim 1, characterized in that: Determining the semantic relevance of each word in each candidate text under each instruction signal segment includes: The words adjacent to any word in each candidate text are recorded as neighboring words; the number of times the word and its neighboring words co-occur in all text data in the historical text set is counted; Calculating the cumulative sum of distances between any word and its neighboring words in all text data in which the two words co-appear in the historical text set; The product of the number of times and the accumulated sum is used as the relevance between any word and its neighboring words; The semantic relevance is the sum of the relevance between any word in each candidate text and all its neighboring words.

6. The intelligent customer service voice interaction method based on voice recognition according to claim 1, characterized in that: The candidate probability of each candidate text under each instruction signal segment is a normalized result of the sum of the products of the matching degrees and the semantic association degrees of all words in each candidate text.

7. The intelligent customer service voice interaction method based on voice recognition according to claim 1, characterized in that: Obtaining the corrected candidate probability corresponding to each candidate text under each instruction signal segment includes: Get the word vector for each candidate text; No. The next command signal segment The corrected candidate probability corresponding to the candidate text The calculation formula is: ,in, For the Before the command signal segment The word vector of the candidate text corresponding to the maximum value of all correction candidate probabilities under the instruction signal segment is the same as the word vector of the first The next command signal segment The similarity between the word vectors of candidate texts; For the Before the command signal segment The maximum value of the corrected candidate probability of all candidate texts under the instruction signal segment, For the The first command signal segment and the one before it The time interval between the command signal segments, For the The number of all instruction signal segments before the instruction signal segment, wherein the corrected candidate probability corresponding to each candidate text under the first instruction signal segment is the candidate probability.

8. The intelligent customer service voice interaction method based on voice recognition according to claim 1, characterized in that: The method of recognizing a voice signal and performing voice interaction includes: selecting a candidate text corresponding to the maximum value of all the modified candidate probabilities under each instruction signal segment as a result of voice recognition; and performing voice interaction by finding a corresponding answer in a preset knowledge base based on the result of voice recognition.

9. An intelligent customer service voice interaction system based on voice recognition, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the intelligent customer service voice interaction method based on voice recognition as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Audio processing method and device, language model training method and device and computer equipment

    CN111933129A

  • Speech recognition method and device and storage medium

    CN114974249A

  • Human-robot voice interaction system based on end-to-end

    CN117542358A