Voice interaction method and system based on quantum heuristic algorithm, and computer equipment

By using quantum-inspired algorithms to screen features, optimize model parameters and speech features, the problems of inaccurate feature selection and high computational complexity in traditional methods are solved, an efficient and accurate voice interaction process is achieved, and the quality of text recognition and speech output is improved.

CN120600027APending Publication Date: 2025-09-05深圳玄源科技有限公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510853161.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

When dealing with complex text recognition and speech output tasks, traditional computing methods have problems such as inaccurate feature selection, high computational complexity, and slow convergence, resulting in insufficient efficiency and accuracy in speech interaction.

Method used

A method based on quantum-inspired algorithms is adopted to adjust the feature selection probability through quantum rotating gates, optimize model parameters using quantum genetic algorithms, and map speech feature parameters to quantum state space for optimization. The quantum-inspired attention mechanism is then combined for semantic understanding and speech synthesis.

Benefits of technology

Effectively screen out efficient feature subsets, reduce computational complexity, improve the efficiency and quality of text recognition and speech output, narrow the gap between synthesized speech and real speech, and improve the overall efficiency and accuracy of voice interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120600027A_ABST
    Figure CN120600027A_ABST
Patent Text Reader

Abstract

The invention relates to an artificial intelligence technology, and discloses a voice interaction method and system based on a quantum heuristic algorithm, and computer equipment, and the method comprises the steps: carrying out the preprocessing of a voice signal after receiving voice input, and extracting voice features; taking different combinations of the voice features as superposition of quantum states, dynamically adjusting the selection probability of the voice features based on quantum revolving door operation, and iterating and screening feature subsets with the probability meeting a preset requirement; inputting the screened feature subset into a character recognition model for training, and generating a character recognition result; performing semantic understanding on a character recognition result based on a large language model; after the text information is obtained, extracting voice feature parameters based on the text information; the voice feature parameters are optimized and adjusted through quantum evolution operation; and based on the optimized voice feature parameters, performing voice output by adopting a voice synthesis algorithm. The invention further discloses a computer readable storage medium. The invention aims to improve the efficiency and 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 artificial intelligence technology, and in particular to a voice interaction method, voice interaction system, computer device, and computer-readable storage medium based on a quantum-inspired algorithm. Background Art

[0002] In today's artificial intelligence field, deep learning has driven the rapid development of Automatic Speech Recognition (ASR) and Text-to-Speech (TTS) technologies, enabling their widespread application in numerous fields, such as intelligent voice assistants and speech recognition software. Text recognition technology converts speech signals into text, enabling human-computer voice interaction; while speech output technology converts text information into natural and fluent speech, enhancing the convenience of information transmission. As the scale of artificial intelligence applications continues to expand, the amount of data is exploding, and the model structure is becoming increasingly complex. However, traditional computational methods have gradually revealed many limitations when handling these complex text recognition and speech output tasks: (1) Traditional feature selection methods are often based on heuristic search or greedy algorithms, which are prone to falling into local optimality and cannot effectively screen out the most discriminative feature subset for text recognition, resulting in high feature dimension and high computational complexity; (2) Traditional optimization algorithms (such as gradient descent) converge slowly, especially in high-dimensional parameter spaces, and require a lot of computing resources and time; (3) Existing speech feature parameter optimization methods are difficult to accurately adjust the characteristics of synthesized speech, resulting in a large gap between the naturalness and similarity of synthesized speech and real speech.

[0003] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a voice interaction method, voice interaction system, computer device and computer-readable storage medium based on a quantum-inspired algorithm, aiming to improve the efficiency and accuracy of voice interaction. By drawing on the principles of quantum computing, efficient feature selection, model parameter optimization and voice feature parameter optimization methods are designed to improve the efficiency and quality of text recognition and voice output. Accurate text recognition provides a reliable foundation for semantic understanding, and semantic understanding can provide more accurate semantic guidance for subsequent feature parameter extraction and speech synthesis, ensuring the efficiency and accuracy of the entire voice interaction process.

[0005] To achieve the above objectives, the present application provides a voice interaction method based on a quantum-inspired algorithm, comprising the following steps: After receiving the voice input, the voice signal is preprocessed and the voice features are extracted; Different combinations of speech features are regarded as superpositions of quantum states. The selection probability of speech features is dynamically adjusted based on quantum rotating gate operation, and the feature subsets whose probabilities meet the preset requirements are iteratively screened. Inputting the selected feature subset into a text recognition model for training to generate text recognition results; wherein the text recognition model optimizes model parameters based on a quantum genetic algorithm, uses quantum bit encoding to represent model parameters, and performs parallel search and optimization of parameters through quantum gate operations; Perform semantic understanding of text recognition results based on a large language model; wherein the large language model is built based on a quantum-inspired attention mechanism; After obtaining the text information, extracting speech feature parameters based on the text information; Mapping speech feature parameters to quantum state space and optimizing and adjusting speech feature parameters using quantum evolution operations; Based on the optimized speech feature parameters, a speech synthesis algorithm is used for speech output.

[0006] To achieve the above objectives, the present application also provides a voice interaction system, comprising a text recognition module, a large model module, a voice output module, and a hybrid computing architecture module; wherein the hybrid computing architecture module is used to provide computing power support for the text recognition module, the large model module, and the voice output module; The text recognition module includes a speech feature extraction submodule, a quantum-inspired feature selection submodule, a quantum genetic algorithm model parameter optimization submodule, and a text recognition submodule; the large model module includes a quantum-inspired attention mechanism submodule and a semantic understanding submodule; the speech output module includes a speech feature parameter extraction submodule, a quantum mapping speech feature parameter optimization submodule, and a speech synthesis submodule; the hybrid computing architecture module includes a quantum simulator submodule, a classical computing submodule, and a task scheduling submodule; The speech feature extraction submodule is used to pre-process the speech signal and extract speech features after receiving the speech input; The quantum-inspired feature selection submodule is used to regard different combinations of speech features as superpositions of quantum states, dynamically adjust the selection probability of speech features based on quantum rotating gate operations, and iteratively select and select feature subsets whose probabilities meet preset requirements; The quantum genetic algorithm model parameter optimization submodule is used to optimize the model parameters of the text recognition model based on the quantum genetic algorithm, use quantum bit encoding to represent the model parameters, and perform parallel search and optimization of the parameters through quantum gate operations; The text recognition submodule is used to input the screened feature subset into the text recognition model for training to generate text recognition results; The large model module is used to perform semantic understanding of the text recognition results based on a large language model; wherein the large language model is constructed based on a quantum-inspired attention mechanism; The speech feature parameter extraction submodule is used to extract speech feature parameters based on the text information after obtaining the text information; The quantum mapping speech feature parameter optimization submodule is used to map the speech feature parameters to the quantum state space and optimize and adjust the speech feature parameters using quantum evolution operations; The speech synthesis submodule is used to output speech using a speech synthesis algorithm based on the optimized speech feature parameters.

[0007] To achieve the above-mentioned purpose, the present application also provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the voice interaction method based on the quantum-inspired algorithm are implemented as described above.

[0008] To achieve the above objectives, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the voice interaction method based on the quantum-inspired algorithm are implemented.

[0009] The speech interaction method, speech interaction system, computer device and computer-readable storage medium based on the quantum-inspired algorithm provided in this application regard different combinations of speech features as superpositions of quantum states, and dynamically adjust the selection probability through a quantum rotating gate, which can effectively screen out feature subsets that meet the requirements and reduce feature dimensions and computational complexity; the text recognition model is based on a quantum genetic algorithm, uses quantum bit encoding to represent parameters, and conducts parallel search and optimization through quantum gate operations, which greatly improves the convergence speed and reduces the consumption of computing resources and time; and maps speech feature parameters to the quantum state space, and uses quantum evolution operations for optimization and adjustment, which can greatly improve the naturalness and similarity of the synthesized speech, narrow the gap with real speech, and bring a better experience to speech interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 This is a schematic diagram of the steps of a voice interaction method based on a quantum-inspired algorithm in one embodiment of the present application; Figure 2 This is a flowchart of the quantum-inspired feature selection process in one embodiment of the present application; Figure 3 This is a flow chart of the quantum genetic algorithm model parameter optimization process in one embodiment of the present application; Figure 4 This is a flowchart of the semantic understanding process of the quantum-inspired attention mechanism in one embodiment of the present application; Figure 5 This is a flowchart of the quantum mapping speech feature parameter optimization process in one embodiment of the present application; Figure 6 This is a schematic diagram of the voice interaction system architecture in one embodiment of the present application; Figure 7 Schematic diagram of the internal structure of a computer device according to an embodiment of the present application.

[0011] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0012] The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be understood as limiting the present application. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application without making any creative efforts shall fall within the scope of protection of the present application.

[0013] In addition, any descriptions of "first," "second," etc., in this application are for descriptive purposes only (e.g., to distinguish identical or similar features) and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include at least one such feature. Furthermore, the technical solutions of various embodiments may be combined with each other, but this must be based on the ability of a person of ordinary skill in the art to implement them. If the combination of technical solutions contradicts or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0014] Reference Figure 1 In one embodiment, the voice interaction method based on the quantum-inspired algorithm includes: Step S10: After receiving the voice input, pre-process the voice signal and extract voice features; Step S20: Treat different combinations of speech features as superpositions of quantum states, dynamically adjust the selection probability of speech features based on the quantum rotating gate operation, and iterate and screen out feature subsets whose probabilities meet preset requirements; Step S30: Input the selected feature subset into a text recognition model for training to generate text recognition results; wherein the text recognition model optimizes model parameters based on a quantum genetic algorithm, uses quantum bit encoding to represent model parameters, and performs parallel search and optimization of parameters through quantum gate operations; Step S40: performing semantic understanding on the text recognition results based on a large language model; wherein the large language model is constructed based on a quantum-inspired attention mechanism; Step S50: After acquiring the text information, extracting speech feature parameters based on the text information; Step S60: Mapping the speech feature parameters to the quantum state space, and optimizing and adjusting the speech feature parameters using quantum evolution operations; Step S70: Based on the optimized speech feature parameters, a speech synthesis algorithm is used to output speech.

[0015] In this embodiment, the execution terminal of the embodiment may be a computer device, or may be other equipment or devices (such as a voice interaction system) that controls the computer device.

[0016] As described in step S10, the input speech signal is first preprocessed, including voice activity detection and endpoint detection, to remove silence and background noise from the speech signal. Then, the Mel-Frequency Cepstral Coefficient (MFCC) algorithm is used to extract speech features. The MFCC algorithm converts the speech signal to a Mel-Frequency scale, simulating the human ear's perception of sounds of different frequencies, and extracts cepstral coefficients that reflect the characteristics of the speech signal. The specific calculation formula is as follows: ; in, represents the i-th Mel-frequency cepstral coefficient, is the weight of the i-th Mel filter at the j-th frequency point, is the amplitude spectrum value of the jth frequency point, N is the number of frequency points, and M is the number of filters. The extracted speech features will be used for subsequent feature selection and model training.

[0017] For example, a 5-second speech signal with a sampling rate of 16 kHz is preprocessed to produce 80 speech frames. For each frame, 13 Mel-frequency cepstral coefficients are calculated, ultimately resulting in an 80 × 13 speech feature matrix.

[0018] As described in step S20, refer to Figure 2After performing speech feature extraction based on step S10, we can draw on the principles of quantum state superposition and quantum entanglement in quantum computing to design a quantum-inspired feature selection algorithm. Different combinations of speech features are considered as superpositions of quantum states. The selection probability of features is dynamically adjusted through quantum rotating gate operations to quickly select the most discriminative feature subset for text recognition, effectively reducing feature dimensionality and improving recognition efficiency. The specific implementation process is as follows: In the feature selection process, the selection state of each feature is represented as a quantum bit qubit, and the state of the quantum bit can be expressed as and The superposition state of , that is: ; Where α and β are complex coefficients, satisfying |α|²+|β|²=1. Indicates that the feature is not selected. Indicates that the feature is selected. The state of the quantum bit is adjusted through the quantum rotation gate operation, thereby changing the probability of feature selection. The matrix form of the quantum rotation gate operation is: ; Where θ is the rotation angle. Assume that initially, the selection probability of all features is equal, that is, The selection of feature subsets is optimized by adjusting the rotation angle θ through multiple iterations.

[0019] In each iteration, the text recognition accuracy for the current feature subset is calculated. Assume that in a certain iteration, features 1, 3, and 5 are selected for training, and a Support Vector Machine (SVM) classifier is used to train and test the training data, achieving an accuracy of 92%. The rotation angle θ is updated based on the accuracy, using the following formula: ; Where η is the learning rate and Δθ is the gradient update calculated based on the accuracy.

[0020] After multiple iterations, a feature subset is selected whose probability meets the preset requirement, where the preset requirement is that the probability is the highest or the probability is greater than a preset threshold.

[0021] Optionally, after the iteration end condition is met (such as reaching a set number of iterations), a feature subset with the highest probability or a probability greater than a preset threshold is selected.

[0022] Ultimately, a subset of features with higher probabilities can be selected as input features for subsequent text recognition model training. For example, after 50 iterations, features 1, 3, 5, 7, and 9 are selected as the optimal feature subset, reducing the feature dimension from 13 to 5, significantly improving computational efficiency.

[0023] As described in step S30, refer to Figure 3 After obtaining the quantum-inspired feature selection results in step S20, a model parameter optimization method based on a quantum genetic algorithm is introduced. The model parameters are represented by quantum bit encoding, and the parallel search and optimization of the parameters are achieved through quantum gate operations to accelerate the convergence of the model. The specific implementation process is as follows: During the model parameter optimization process, the model parameters are encoded into a quantum bit string. The state of each quantum bit is represented as , where α and β are complex coefficients, indicating that the qubit is and Assume that initially, the length of the qubit string is 10, and the α and β of each qubit are randomly initialized.

[0024] The quantum bit string is evolved through quantum gate operations, including quantum rotation gates and quantum swap gates. Quantum rotation gates are used to adjust the state of a quantum bit, and quantum swap gates are used to swap the states of two quantum bits. In each iteration, the text recognition accuracy under the current model parameters is calculated, and the fitness value is calculated based on the accuracy. The fitness value calculation formula is: ; Among them, Accuracy is the text recognition accuracy under the current model parameters, Accuracy max It is the highest accuracy on the training set. Based on the fitness value, excellent qubit strings are selected for crossover and mutation operations to generate new qubit strings.

[0025] Suppose that in a certain iteration, the qubit string is "0101101101", and the corresponding model parameters are [0.1, 0.3, 0.5, 0.7, 0.9]. After the quantum rotating gate operation, the qubit string becomes "0110110101", and the corresponding model parameters are [0.2, 0.4, 0.6, 0.8, 1.0]. The text recognition accuracy under the new model parameters is calculated to be 95%, higher than the previous 92%. Therefore, this qubit string is retained and iterated again. Iterations are repeated until the preset number of iterations or convergence condition is reached. Finally, the model parameters with the highest fitness value are selected as the optimized model parameters.

[0026] As described in step S40, refer to Figure 4 After obtaining the text recognition result based on step S30, the accuracy and efficiency of semantic understanding can be improved based on the quantum-inspired attention mechanism.

[0027] In large speech models, a quantum-inspired attention mechanism is proposed that combines traditional attention weight calculation with the concept of quantum probability amplitude. Through the coherent superposition and phase adjustment of quantum states, the model's ability to focus on key semantic information is enhanced, improving the accuracy and efficiency of semantic understanding. The specific implementation process is as follows: In the attention mechanism, the correlation between the query vector (query), key vector (key), and value vector (value) is calculated. The concept of quantum probability amplitude is introduced, and the attention weight is expressed as the probability amplitude of the quantum state. Through the coherent superposition and phase adjustment of quantum states, the model's ability to focus on key semantic information is enhanced. The specific calculation formula is as follows: ; Among them, Q represents the query vector, K represents the key vector, and V represents the value vector. is the dimension of the key vector.

[0028] Suppose in a certain calculation, the query vector Q = [0.1, 0.2, 0.3], the key vector K = [0.4, 0.5, 0.6], the value vector V = [0.7, 0.8, 0.9], the dimension of the key vector =3. Calculation , after normalization, the attention weight is The value vector is weighted and summed according to the attention weights, resulting in an output vector of 0.58×[0.7, 0.8, 0.9]=[0.406, 0.464, 0.522]. Through the quantum-inspired attention mechanism, the correlation between the query vector, key vector, and value vector is adjusted, improving the model's ability to capture key semantic information.

[0029] As described in step 50, after executing step S40, if the currently executed task is a question-answering task, response information is obtained according to the semantic understanding result, and the response information is used as text information processed in step S50.

[0030] In the speech output module, text information is preprocessed, including text cleaning, word segmentation, and part-of-speech tagging. Then, speech feature parameters are extracted from the text, including pitch, timbre, and speaking rate. These feature parameters are used for subsequent speech feature parameter optimization and speech synthesis.

[0031] For example, consider the text message "The weather is really nice today." After preprocessing, we obtain the word sequence ["today," "weather," "real," "good"]. For each word, we calculate its characteristic parameters, such as pitch, timbre, and speaking rate. The pitch range is set to 80–250 Hz, the timbre dimension is 10, and the speaking rate range is set to 0.5–2.0 times the speed. The extracted speech feature parameters will be used for subsequent optimization and synthesis.

[0032] As described in step S60, after the speech feature parameter extraction result is obtained based on step S50, refer to Figure 5 , design a speech feature parameter optimization algorithm based on quantum mapping, map the speech feature parameters to the quantum state space, and use quantum evolution operations to optimize and adjust the parameters, so that the characteristics of the synthesized speech are closer to the distribution of real speech. The specific implementation process is as follows: During the speech feature parameter optimization process, the speech feature parameters are mapped to the quantum state space. Each speech feature parameter corresponds to a quantum bit, and the state of the quantum bit is represented as , where α and β are complex coefficients, indicating that the qubit is and Assume that at the beginning, the α and β of the quantum bit are randomly initialized.

[0033] The quantum bits are adjusted through quantum evolution operations, including quantum rotary gate operations and quantum phase adjustment operations. The quantum rotary gate operation is used to adjust the state of the quantum bit, and the quantum phase adjustment operation is used to adjust the phase of the quantum bit. In each iteration, the similarity between the synthesized speech and the real speech under the current speech feature parameters is calculated. The similarity calculation formula is: ; in, is the i-th eigenvalue of the synthesized speech, is the ith eigenvalue of the real speech, and N is the number of eigenvalues. Then the fitness value is calculated based on the similarity, where the fitness value calculation formula is: ; Among them, Similarity max It is the highest similarity on the training set. According to the fitness value, excellent qubit strings are selected for crossover and mutation operations to generate new qubit strings.

[0034] Suppose that in one iteration, the qubit string corresponding to the speech feature parameters is "01100110." After the quantum rotating gate operation, the qubit string becomes "01001110," and the corresponding speech feature parameters are [120Hz, 0.8, 1.2]. The calculated similarity between the synthesized speech and the real speech is 0.85, higher than the previous 0.78. Therefore, this qubit string is retained and the iteration continues. Iterations are repeated until the preset number of iterations or convergence criteria are reached. Finally, the speech feature parameters with the highest fitness value are selected as the optimized speech feature parameters.

[0035] As described in step S70, a speech signal is generated by a speech synthesis algorithm using the optimized speech feature parameters. The speech synthesis algorithm can use a waveform generation method or a parameter synthesis method to convert text into natural and fluent speech output. Taking the parameter synthesis method as an example, the corresponding speech waveform is generated based on the optimized parameters such as pitch, timbre, and speaking speed. Assume that the optimized pitch is 150Hz, the timbre vector is [0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.1, 0.2], and the speaking speed is 1.0 times the speed. Based on these parameters, a speech waveform is generated and output. The synthesized speech signal has been evaluated by subjective auditory tests and objective indicators, and its naturalness and similarity are better than those of the unoptimized speech signal.

[0036] In one embodiment, different combinations of speech features are regarded as superpositions of quantum states. The selection probability is dynamically adjusted through a quantum rotating gate, which can effectively screen out a feature subset that meets the requirements and reduce the feature dimension and computational complexity. The text recognition model is based on a quantum genetic algorithm, using quantum bit encoding to represent parameters. Parallel search and optimization through quantum gate operations greatly improves the convergence speed and reduces the consumption of computing resources and time. In addition, the speech feature parameters are mapped to the quantum state space. With the help of quantum evolution operations for optimization and adjustment, the naturalness and similarity of the synthesized speech can be greatly improved, narrowing the gap with real speech and bringing a better experience for voice interaction.

[0037] Among them, accurate text recognition provides a reliable foundation for semantic understanding, and semantic understanding can provide more precise semantic guidance for subsequent feature parameter extraction and speech synthesis, ensuring the efficiency and accuracy of the entire voice interaction process.

[0038] In this way, by drawing on the principles of quantum computing, we can design efficient feature selection, model parameter optimization, and speech feature parameter optimization methods to improve the efficiency and quality of text recognition and speech output, and give full play to the parallel advantages of quantum computing to achieve exponential acceleration of server-side processing.

[0039] In one embodiment, based on the above embodiment, after the step of performing semantic understanding on the text recognition result based on the large language model, the method further includes: If the currently executed task is a question-answering task, the response information is obtained according to the semantic understanding result, and the response information is used as the text information, and then steps S50-S70 are executed.

[0040] In this embodiment, after semantic understanding of the text recognition results is performed based on the large language model, when it is determined that the currently executed task is a question-answering task, the system will query the knowledge base, call the search engine, generate answers based on a pre-trained model (such as a generative model), and other methods based on the results of the semantic understanding to obtain corresponding response information, and treat the response information as text information in the subsequent process, and then continue to complete the voice output operation according to steps S50-S70.

[0041] In question-answering tasks, semantic understanding based on quantum algorithms can more efficiently and accurately obtain response information; in speech synthesis, quantum evolution operations optimize speech feature parameters. This systematic optimization strengthens the performance of the entire voice interaction system, forming a comprehensive quantum optimization system from input to output.

[0042] In this way, accurate semantic understanding ensures that the system can correctly grasp the core of the user's question, and the user can get high-quality answers in a short time, which reduces waiting time, improves the efficiency of obtaining information, and enhances the user's trust and satisfaction with the system.

[0043] In one embodiment, based on the above embodiment, after the step of performing semantic understanding on the text recognition result based on the large language model, the method further includes: If the currently executed task is a command execution task, the step of extracting speech feature parameters based on the text information after acquiring the text information is skipped, and the corresponding task operation is performed according to the semantic understanding result.

[0044] In this embodiment, after completing the step of performing semantic understanding on the text recognition results based on the large language model, the system will determine the type of task currently being executed.

[0045] If the system detects that the current task is a command execution task, it means that the user's voice input is essentially an instruction that requires the system to respond immediately and perform a specific operation. In this case, the system will skip the step of "extracting voice feature parameters based on the text information after obtaining it" in the original process (i.e., steps S50-S70 will not be executed).

[0046] This is because in command execution scenarios, the system's core goal is to quickly and accurately respond to user commands, rather than performing voice output-related processing. For example, a user might issue voice commands such as "open the windows," "turn off the lights," or "check today's weather." These commands require the system to interact directly with the relevant device or information source to complete the corresponding operation.

[0047] The system then directly executes the corresponding task based on the results of semantic understanding. If the semantic understanding indicates that the user requested to open a window, the system will send an opening command to the smart device that controls the window opening. If the command is to query the weather, the system will access the meteorological data interface to obtain and display the weather information for that day. This processing method can more efficiently handle command execution tasks, reduce unnecessary processing steps, and improve response speed and user experience.

[0048] In one embodiment, based on the above embodiment, after the step of inputting the filtered feature subset into the text recognition model for training to generate the text recognition result, the method further includes: If the currently executed task is a timbre conversion task, the text recognition result is used as the text information, and the step of extracting speech feature parameters based on the text information after obtaining the text information is directly executed; The timbre of the target character selected by the timbre conversion task is used as the timbre basis of the speech synthesis algorithm.

[0049] In this embodiment, after completing step S30, the system will determine the type of task currently being executed.

[0050] When the system identifies the current task as voice conversion, it indicates that the user wants to have text spoken in the voice of a specific target character. For example, the user may want to have a text read aloud in the voice of a famous voice actor, celebrity, or specific character.

[0051] At this point, the system skips step S40 and treats the newly generated text recognition results directly as the "text information" required for subsequent processing, then proceeds directly to steps S50-S70. During this process, the system conducts an in-depth analysis of the text information, extracting speech feature parameters such as pitch, duration, intonation, and speaking rate. These parameters describe the various properties of the text at the phonetic level and serve as an important basis for subsequent speech synthesis. For example, for different words and sentences, the system determines appropriate pitch changes and intonation patterns based on semantic and grammatical rules.

[0052] In voice conversion tasks, users typically preselect a target character's voice. This selected target character's voice serves as the basis for the speech synthesis algorithm. Therefore, when synthesizing speech, the system uses this target character's voice as a model and combines it with previously extracted voice feature parameters to shape the speech.

[0053] For example, if the target voice is that of a gentle female voice actor, the system will imitate the voice actor's vocal characteristics during the speech synthesis process, including the softness of the voice, the delicacy of the timbre, etc., so that the final output voice has the timbre characteristics of the target person.

[0054] Finally, based on the optimized and adjusted voice feature parameters and the target character's timbre, the system uses a speech synthesis algorithm to generate speech output with the target timbre. This allows users to hear the text content read aloud with the specific target character's timbre, achieving the desired timbre conversion.

[0055] In one embodiment, based on the above embodiment, the voice interaction method based on the quantum-inspired algorithm further includes: If the currently executed task is a text-to-speech task, after receiving the text information input, the step of extracting speech feature parameters based on the text information after obtaining the text information is directly executed (i.e., skipping steps S10-S40 and directly executing steps S50-S70).

[0056] In this embodiment, within the quantum-inspired voice interaction method, the system flexibly adjusts the processing flow based on the type of task being performed. If the task being performed is detected as text-to-speech, meaning the user has already provided the text directly, eliminating the need for voice input processing, the system will adopt a more efficient processing strategy.

[0057] Throughout the voice interaction system's operation, the system will determine the nature of the current task in real time. Once it determines that the current task is text-to-speech, it indicates that the user's need is to convert existing text content into speech output. For example, the user may enter an article, poem, or explanatory text on the system interface and want the system to read it aloud.

[0058] Since the text-to-speech task already has ready-made text information, the system will skip a series of steps in the original process from voice input to text recognition and semantic understanding, that is, skip steps S10-S40 and directly start execution from step S50.

[0059] By flexibly adjusting the processing flow according to the task type, the system can more efficiently meet the needs of different users and improve the efficiency and quality of voice interaction.

[0060] In addition, refer to Figure 6 , the embodiment of the present application further provides a voice interaction system, including a text recognition module, a large model module, a voice output module and a hybrid computing architecture module; wherein the hybrid computing architecture module is used to provide computing power support for the text recognition module, the large model module and the voice output module; The text recognition module includes a speech feature extraction submodule, a quantum-inspired feature selection submodule, a quantum genetic algorithm model parameter optimization submodule, and a text recognition submodule; the large model module includes a quantum-inspired attention mechanism submodule and a semantic understanding submodule; the speech output module includes a speech feature parameter extraction submodule, a quantum mapping speech feature parameter optimization submodule, and a speech synthesis submodule; the hybrid computing architecture module includes a quantum simulator submodule, a classical computing submodule, and a task scheduling submodule; The speech feature extraction submodule is used to pre-process the speech signal and extract speech features after receiving the speech input; The quantum-inspired feature selection submodule is used to regard different combinations of speech features as superpositions of quantum states, dynamically adjust the selection probability of speech features based on quantum rotating gate operations, and iteratively select and select feature subsets whose probabilities meet preset requirements; The quantum genetic algorithm model parameter optimization submodule is used to optimize the model parameters of the text recognition model based on the quantum genetic algorithm, use quantum bit encoding to represent the model parameters, and perform parallel search and optimization of the parameters through quantum gate operations; The text recognition submodule is used to input the screened feature subset into the text recognition model for training to generate text recognition results; The large model module is used to perform semantic understanding of the text recognition results based on a large language model; wherein the large language model is constructed based on a quantum-inspired attention mechanism; The speech feature parameter extraction submodule is used to extract speech feature parameters based on the text information after obtaining the text information; The quantum mapping speech feature parameter optimization submodule is used to map the speech feature parameters to the quantum state space and optimize and adjust the speech feature parameters using quantum evolution operations; The speech synthesis submodule is used to output speech using a speech synthesis algorithm based on the optimized speech feature parameters.

[0061] In this embodiment, the voice interaction system may be a virtual system (such as a virtual machine) or a physical device (such as a physical device other than a computer device that can execute the corresponding method).

[0062] Furthermore, within the hybrid computing architecture module, the quantum simulator submodule is a crucial component for simulating the quantum computing environment. Because actual quantum computers currently face numerous limitations, such as stability and scalability, the quantum simulator submodule can simulate the quantum computing process and behavior on a classical computer.

[0063] The quantum simulator submodule provides a virtual quantum computing environment for the quantum-inspired algorithms involved in the entire voice interaction system. In the text recognition module, large model module, and speech output module, when quantum-inspired algorithms are used for feature selection and parameter optimization, the quantum simulator submodule simulates the evolution of quantum states and the operation of quantum gates, helping the system leverage the unique properties of quantum computing to improve performance.

[0064] The classical computing submodule performs computations based on traditional classical computer architecture and algorithms, efficiently handling common computing tasks. In voice interaction systems, the classical computing submodule undertakes many fundamental computational tasks, such as preliminary preprocessing of voice signals, data storage and management, and the execution of classical algorithms. It collaborates with the quantum simulator submodule to complete the system's computational tasks. While the quantum simulator submodule simulates the quantum computing process, the classical computing submodule provides necessary auxiliary computation and data support.

[0065] The task scheduling submodule is responsible for properly allocating and scheduling various computing tasks in the system. It determines which tasks are executed on the quantum simulator submodule and which on the classical computing submodule based on factors such as the needs of different modules, computing resource usage, and task priority.

[0066] Through rational task scheduling, the task scheduling submodule can fully leverage the strengths of both the quantum simulator submodule and the classical computing submodule, improving the computational efficiency and performance of the entire system. For example, tasks suitable for quantum computing, such as model parameter optimization using quantum-inspired algorithms, are assigned to the quantum simulator submodule by the task scheduling submodule. Meanwhile, tasks that can be efficiently handled by classical algorithms, such as simple data processing and logical reasoning, are assigned to the classical computing submodule. This avoids wasted resources and ensures that the system can quickly and accurately complete various voice interaction tasks.

[0067] In summary, the hybrid computing architecture module provides powerful computing power support for the voice interaction system through the collaborative work of the quantum simulator sub-module, the classical computing sub-module and the task scheduling sub-module, enabling the system to fully utilize the advantages of quantum-inspired algorithms and improve performance in speech recognition, semantic understanding and speech synthesis.

[0068] In addition, a computer device is also provided in an embodiment of the present application. The internal architecture of the computer device can be as follows: Figure 7As shown, it includes a processor, memory, communication interface, and input interface connected via a system bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database is used to store data called by the computer program. The communication interface is used to communicate data with an external terminal. The input interface is used to receive signals input by an external device. When the computer program is executed by the processor, it implements a voice interaction method based on a quantum-inspired algorithm as described in the above embodiment.

[0069] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application and does not limit the computer device to which the solution of the present application is applied. For example, in some optional embodiments, the computer device may further include an output interface (not shown in the figure), and the output interface is also connected to the system bus and is used to output corresponding signals to the peripheral device.

[0070] In addition, this application also proposes a computer-readable storage medium, which includes a computer program. When executed by a processor, the computer program implements the steps of the quantum-inspired algorithm-based voice interaction method described in the above embodiment. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0071] In summary, the voice interaction method, voice interaction system, computer device, and computer-readable storage medium based on the quantum-inspired algorithm provided in the embodiments of this application have the following advantages: (1) Significantly improve the processing efficiency and quality of text recognition and speech output. By using quantum-inspired algorithms to deeply optimize feature selection, model parameters, and speech feature parameters, the accuracy of text recognition can be effectively improved, while making the naturalness and similarity of synthesized speech close to the level of real speech. (2) Efficiently accelerate the model training and optimization process. Quantum genetic algorithms can perform rapid and comprehensive searches of the model parameter space, significantly shortening the model convergence time and effectively reducing the time cost and computing resource consumption of the training process. (3) Fully activate the parallel processing potential of quantum computing, cleverly integrate the advantages of the two computing modes through a distributed quantum-classical hybrid computing architecture, and provide exponential acceleration capabilities for server-side processing, paving the way for the smooth operation and widespread application of large-scale voice interaction applications; (4) Significantly enhance the adaptability and flexibility of the system. The quantum-inspired algorithm, with its unique optimization mechanism, can easily cope with different types of speech features and diverse model architectures, demonstrating strong adaptability and scalability, ensuring that the system maintains stable and efficient performance in diverse and complex application scenarios.

[0072] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct RAM bus dynamic RAM (DRDRAM), and RAM bus dynamic RAM (RDRAM).

[0073] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.

[0074] The above description is only a preferred embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A voice interaction method based on quantum-inspired algorithm, characterized in that: include: After receiving the voice input, the voice signal is preprocessed and the voice features are extracted; Different combinations of speech features are regarded as superpositions of quantum states. The selection probability of speech features is dynamically adjusted based on quantum rotating gate operation, and the feature subsets whose probabilities meet the preset requirements are iteratively screened. Inputting the selected feature subset into a text recognition model for training to generate text recognition results; wherein the text recognition model optimizes model parameters based on a quantum genetic algorithm, uses quantum bit encoding to represent model parameters, and performs parallel search and optimization of parameters through quantum gate operations; Perform semantic understanding of text recognition results based on a large language model; wherein the large language model is built based on a quantum-inspired attention mechanism; After obtaining the text information, extracting speech feature parameters based on the text information; Mapping speech feature parameters to quantum state space and optimizing and adjusting speech feature parameters using quantum evolution operations; Based on the optimized speech feature parameters, a speech synthesis algorithm is used for speech output.

2. The voice interaction method based on quantum-inspired algorithm according to claim 1, characterized in that: After the step of performing semantic understanding on the text recognition result based on the large language model, the method further includes: If the currently executed task is a question-answering task, answer information is obtained according to the semantic understanding result, and the answer information is used as the text information.

3. The voice interaction method based on quantum-inspired algorithm according to claim 1, characterized in that: After the step of performing semantic understanding on the text recognition result based on the large language model, the method further includes: If the currently executed task is a command execution task, the step of extracting speech feature parameters based on the text information after acquiring the text information is skipped, and the corresponding task operation is performed according to the semantic understanding result.

4. The voice interaction method based on quantum heuristic algorithm according to claim 1, characterized in that: After the step of inputting the filtered feature subset into the text recognition model for training to generate the text recognition result, the method further includes: If the currently executed task is a timbre conversion task, the text recognition result is used as the text information, and the step of extracting speech feature parameters based on the text information after obtaining the text information is directly executed; The timbre of the target character selected by the timbre conversion task is used as the timbre basis of the speech synthesis algorithm.

5. The voice interaction method based on quantum-inspired algorithm according to claim 1, characterized in that: The voice interaction method based on the quantum-inspired algorithm also includes: If the currently executed task is a text-to-speech task, then after receiving the text information input, the step of extracting speech feature parameters based on the text information after obtaining the text information is directly executed.

6. The voice interaction method based on quantum-inspired algorithm according to claim 1, characterized in that: The preset requirement is that the probability is the highest or the probability is greater than a preset threshold; In each iteration, the rotation angle is updated according to the text recognition accuracy under the current feature subset; the rotation angle is used to adjust the rotation probability.

7. The voice interaction method based on quantum-inspired algorithm according to claim 1, characterized in that: The quantum-inspired attention mechanism represents the attention weight as the probability amplitude of the quantum state, and enhances the model's ability to focus on key semantic information through the coherent superposition and phase adjustment of the quantum state.

8. A voice interaction system, characterized in that: It includes a text recognition module, a large model module, a speech output module and a hybrid computing architecture module; wherein the hybrid computing architecture module is used to provide computing power support for the text recognition module, the large model module and the speech output module; The text recognition module includes a speech feature extraction submodule, a quantum-inspired feature selection submodule, a quantum genetic algorithm model parameter optimization submodule, and a text recognition submodule; the large model module includes a quantum-inspired attention mechanism submodule and a semantic understanding submodule; the speech output module includes a speech feature parameter extraction submodule, a quantum mapping speech feature parameter optimization submodule, and a speech synthesis submodule; the hybrid computing architecture module includes a quantum simulator submodule, a classical computing submodule, and a task scheduling submodule; The speech feature extraction submodule is used to pre-process the speech signal and extract speech features after receiving the speech input; The quantum-inspired feature selection submodule is used to regard different combinations of speech features as superpositions of quantum states, dynamically adjust the selection probability of speech features based on quantum rotating gate operations, and iteratively select and select feature subsets whose probabilities meet preset requirements; The quantum genetic algorithm model parameter optimization submodule is used to optimize the model parameters of the text recognition model based on the quantum genetic algorithm, use quantum bit encoding to represent the model parameters, and perform parallel search and optimization of the parameters through quantum gate operations; The text recognition submodule is used to input the screened feature subset into the text recognition model for training to generate text recognition results; The large model module is used to perform semantic understanding of the text recognition results based on a large language model; wherein the large language model is constructed based on a quantum-inspired attention mechanism; The speech feature parameter extraction submodule is used to extract speech feature parameters based on the text information after obtaining the text information; The quantum mapping speech feature parameter optimization submodule is used to map the speech feature parameters to the quantum state space and optimize and adjust the speech feature parameters using quantum evolution operations; The speech synthesis submodule is used to output speech using a speech synthesis algorithm based on the optimized speech feature parameters.

9. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the voice interaction method based on the quantum-inspired algorithm as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the voice interaction method based on a quantum-inspired algorithm as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Speech emotion similarity evaluation method and device, storage medium, product and equipment

    CN120853547A

  • Fault identification method for permanent magnet synchronous motor

    CN121348085A