Vector encoding method and system for fast speech retrieval

By calculating the importance and index efficiency of the speech signal feature vector, screening out key feature vectors and building a search table, the problem of insufficient retrieval speed and accuracy of MFCC in longer speech signals is solved, and more efficient and accurate speech retrieval is achieved.

CN119517094BActive Publication Date: 2025-04-25FUJIAN EAN INTELLIGENT TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510072430.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-04-25
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

The speed and accuracy of using MFCC for speech retrieval in longer speech signals are poor, which affects the user experience.

Method used

By obtaining the feature vectors of each signal segment of the speech signal, the importance of each feature vector is calculated, and the target feature vector is filtered based on the importance. Then, based on the attention score between the target feature vectors, index efficiency is obtained, index feature vectors are filtered out, and a search table is constructed based on the timeline for speech search.

Benefits of technology

It improves the efficiency and accuracy of speech retrieval, improves the user experience, and solves the problem of poor retrieval speed and accuracy of MFCC in longer speech signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119517094B_ABST
    Figure CN119517094B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of speech retrieval technology, and in particular to a vector encoding method and system for rapid speech retrieval. The method obtains feature vectors of each signal segment of a speech signal; obtains the importance of each feature vector and then screens out a target feature vector based on the correlation between each feature vector and the feature vector in its preset local window, the attention weight of each feature vector and the attention weight of the feature vector in the preset local window of each feature vector; obtains the index efficiency of each target feature vector based on the attention score between each target feature vector and other target feature vectors, and then obtains the index feature vector and constructs it into a retrieval table according to the time axis for speech retrieval. The present invention effectively improves the efficiency and accuracy of speech retrieval and enhances the user experience by accurately obtaining the index feature vector and constructing the retrieval table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of speech retrieval technology, and in particular to a vector encoding method and system for rapid speech retrieval. Background Art

[0002] Fast speech retrieval technology refers to the process of quickly finding relevant speech data in a large amount of speech data based on the user's query conditions. It can be retrieved based on multiple dimensions such as speech features, speech content, and speech structure. The core of this technology is to convert speech signals into retrievable formats, such as text or feature vectors, for efficient search and matching. It is known that MFCC (Mel Frequency Cepstral Coefficients) is a technology widely used in speech retrieval, mainly used for feature extraction of speech signals. MFCC takes into account the auditory characteristics of humans, first maps the linear spectrum to the Mel nonlinear spectrum based on auditory perception, and then converts it to the cepstrum, thereby vector encoding the speech signal for fast speech retrieval.

[0003] Using MFCC for speech retrieval will have better performance in shorter speech signals, but in longer speech signals, the speech signal has more content, resulting in poor speed and accuracy of using MFCC for speech retrieval, affecting the user experience. Summary of the invention

[0004] In order to solve the technical problem that the speed and accuracy of voice retrieval using MFCC in a long voice signal are poor, which affects the user experience, the purpose of the present invention is to provide a vector encoding method and system for fast voice retrieval, and the technical solution adopted is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a vector encoding method for fast speech retrieval, the method comprising the following steps:

[0006] Obtaining feature vectors of each signal segment of the speech signal;

[0007] Obtain the importance of each feature vector according to the correlation between each feature vector and the feature vector in its preset local window, the attention weight of each feature vector, and the attention weight of the feature vector in the preset local window of each feature vector; and select the target feature vector based on the importance;

[0008] Obtain the indexing efficiency of each target feature vector based on the attention score between each target feature vector and other target feature vectors;

[0009] The index feature vector is obtained based on the index efficiency and constructed as a retrieval table according to the time axis for voice retrieval.

[0010] Furthermore, the method for obtaining the importance is:

[0011] For any eigenvector, according to the correlation between the eigenvector and the eigenvector in the preset local window, the first local importance of the eigenvector is obtained;

[0012] The result of normalizing the mean of the attention weights of all feature vectors in the preset local window of the feature vector is used as the second local importance of the feature vector;

[0013] The result of normalizing the product of the attention weight, the first local importance and the second local importance of the feature vector is used as the importance of the feature vector.

[0014] Furthermore, the method for obtaining the first local importance is:

[0015] For any feature vector, the feature vectors in the preset local window of the feature vector are all used as reference vectors, the attention scores between the feature vector and each reference vector are obtained, and the attention scores between the feature vector and each reference vector are sorted according to the order of the reference vectors on the time axis to obtain the attention score sequence of the feature vector;

[0016] Sort the attention weights of all reference vectors according to the order of the reference vectors on the time axis to obtain the attention weight sequence of the feature vector;

[0017] Matching the normalized elements in the attention score sequence with the normalized elements in the attention weight sequence by using a DTW algorithm to obtain a reference matching pair;

[0018] Obtain the mean of the differences between the two data in all reference matching pairs as the first eigenvalue;

[0019] Obtain the mean of the distances between the two data in all reference matching pairs as the second eigenvalue;

[0020] A result of negatively correlating and normalizing the product of the first eigenvalue and the second eigenvalue is used as the first local importance of the eigenvector.

[0021] Furthermore, the method for obtaining the target feature vector is:

[0022] When the importance is greater than a preset importance threshold, the corresponding feature vector is used as the target feature vector.

[0023] Furthermore, the method for obtaining the index efficiency is:

[0024] For any target feature vector, obtain the attention scores between the target feature vector and each other target feature vector and construct them into a set as the target set of the target feature vector;

[0025] Dividing the target set by the maximum inter-class variance, and taking the local target set with the highest overall attention score as the analysis set of the target feature vector;

[0026] The target feature vectors corresponding to each element in the analysis set that are not the target feature vectors are all taken as designated vectors;

[0027] Arrange the elements in the analysis set according to the order of the corresponding specified vectors in the time axis to obtain the analysis sequence of the target feature vector;

[0028] The central moment of the time period corresponding to each specified vector is taken as the target moment of each specified vector;

[0029] For any element in the analysis sequence, the difference between the target time of the element and the designated vector corresponding to the adjacent previous element is taken as the reference distance difference of the element;

[0030] The result of adding the mean of the reference distance difference and the variance of the reference distance difference of all elements in the analysis sequence is taken as the distance dispersion degree;

[0031] The result of normalizing the ratio of the distance dispersion degree to the cumulative result of all elements in the analysis sequence is used as the index efficiency of the target feature vector.

[0032] Furthermore, the method for obtaining the index feature vector is:

[0033] When the index efficiency is greater than a preset index efficiency threshold, the corresponding target feature vector is used as the index feature vector.

[0034] Furthermore, the method for obtaining the retrieval table is:

[0035] All index feature vectors are arranged according to the order of the time axis to construct a search table; wherein, in the search table, the target moment of each index feature vector is used as a unique mark of the corresponding index feature vector.

[0036] Furthermore, the method for obtaining the attention weight and the attention score is:

[0037] The attention weight of each feature vector and the attention score between each feature vector and other feature vectors are directly obtained through the self-attention mechanism.

[0038] Furthermore, the method for obtaining the feature vector of each signal segment of the speech signal is:

[0039] The speech signal is specialized through the MFCC technology to obtain the feature vector of each signal segment of the speech signal; wherein, one signal segment corresponds to the speech signal within a window in the MFCC technology.

[0040] In the second aspect, another embodiment of the present invention provides a vector encoding system for fast speech retrieval, the system 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 methods.

[0041] The present invention has the following beneficial effects:

[0042] The present invention obtains the importance of each feature vector according to the correlation between each feature vector and the feature vector in its preset local window, the attention weight of each feature vector and the attention weight of the feature vector in the preset local window of each feature vector, accurately reflecting the importance and richness of the speech signal corresponding to each feature vector; in order to improve the efficiency of speech retrieval, the target feature vector is screened out based on the importance, and the feature vectors with unimportant information are removed to improve the retrieval speed; in order to further improve the retrieval efficiency, the indexing efficiency of each target feature vector is further obtained based on the attention score between each target feature vector and other target feature vectors, accurately reflecting the indexing effect of each target feature vector, which is conducive to screening out the target feature vector for indexing, removing the target feature vector without obvious distinction and not conducive to indexing, improving the accuracy and efficiency of speech retrieval, and then obtaining the index feature vector based on the indexing efficiency and constructing it into a retrieval table according to the time axis to perform accurate and efficient speech retrieval, improving the user experience, and at the same time solving the problem of poor speed and accuracy of speech retrieval using MFCC in longer speech signals. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A schematic flow chart of a vector encoding method for rapid speech retrieval provided by one embodiment of the present invention;

[0045] Figure 2 A flow chart of a method for obtaining importance provided by an embodiment of the present invention;

[0046] Figure 3 A structural diagram of a vector coding system for rapid speech retrieval provided by one embodiment of the present invention;

[0047] Figure 4 A schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the vector encoding method and system for fast speech retrieval proposed by the present invention, its specific implementation method, structure, features and effects are described in detail as follows in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0049] 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 invention belongs.

[0050] The specific scheme of the vector encoding method and system for rapid speech retrieval provided by the present invention is described in detail below with reference to the accompanying drawings.

[0051] Embodiment 1:

[0052] The present invention proposes a vector encoding method for fast speech retrieval, please refer to Figure 1 , which shows a schematic flow chart of a vector encoding method for fast speech retrieval provided by an embodiment of the present invention, the method comprising the following steps:

[0053] Step S1: Obtain feature vectors of each signal segment of a speech signal.

[0054] Specifically, this embodiment takes an 8-hour speech signal as an example for analysis. The implementer can select speech signals of different lengths according to the actual situation, and there is no limitation here. It should be noted that the subsequent speech signals are all the above-mentioned 8-hour speech signals. The speech signal is specialized through the MFCC (Mel Frequency Cepstral Coefficients) technology, that is, the speech signal is pre-emphasized, framed and windowed to obtain the feature vectors of each signal segment of the speech signal; wherein, one signal segment corresponds to the speech signal within a window in the MFCC technology. Among them, MFCC (Mel Frequency Cepstral Coefficients) technology is a well-known technology and will not be described in detail.

[0055] Step S2: Obtain the importance of each feature vector based on the correlation between each feature vector and the feature vector in its preset local window, the attention weight of each feature vector, and the attention weight of the feature vector in the preset local window of each feature vector; and select the target feature vector based on the importance.

[0056] In actual situations, not all speech signals corresponding to each feature vector are important information. When searching for a certain speech signal segment, if searching is performed in all feature vectors, the search speed may be slow, which affects the user experience. In order to improve the speed of searching for speech signal segments, this embodiment analyzes each feature vector, obtains the importance of each feature vector, and then selects feature vectors that are useful and rich in speech information, removes useless feature vectors, and thus speeds up the search speed.

[0057] It is known that the more important the feature vector is, the greater the attention weight is in the overall speech signal; at the same time, when the attention score between a feature vector and other surrounding feature vectors matches the attention weight of the feature vectors around the feature vector, it means that the correlation between the feature vector and other surrounding feature vectors is stronger, which indirectly reflects that the feature vector can characterize the feature vectors around it, and the feature vector is more important; on the other hand, when the attention weights of the feature vectors around a feature vector are larger, it also indirectly reflects that the feature vector is more important; therefore, this embodiment obtains the importance of each feature vector according to the correlation between each feature vector and the feature vector in its preset local window, the attention weight of each feature vector and the attention weight of the feature vector in the preset local window of each feature vector. It should be noted that this embodiment directly obtains the attention weight of each feature vector and the attention score between each feature vector and other feature vectors through the self-attention mechanism. Among them, the self-attention mechanism is a well-known technology and will not be repeated.

[0058] The greater the importance, the more important and rich the speech signal corresponding to the corresponding feature vector is, and the more likely the corresponding feature vector will appear in the process of speech retrieval, and thus the present embodiment selects the target feature vector based on the importance. The speech signal corresponding to the target feature vector contains important and rich information, and the target feature vector is the basis for speech signal retrieval.

[0059] Preferably, in one possible implementation of this embodiment, the method for obtaining the importance degree is as follows: Figure 2 , which shows a flow chart of a method for obtaining the importance provided by this embodiment, the method comprising the following steps:

[0060] Step S201: For any feature vector, a first local importance of the feature vector is obtained according to the correlation between the feature vector and feature vectors in a preset local window.

[0061] This embodiment takes any feature vector as the center and constructs a window with a length of 21 as the preset local window of the feature vector, that is, the preset local window of the feature vector includes 21 feature vectors. The implementer can set the size of the preset local window according to the actual situation, which is not limited here. It should be noted that when a feature vector is a boundary feature vector, the preset local window of the feature vector will exceed the overall speech signal. At this time, only the feature vector corresponding to the speech signal is analyzed.

[0062] Preferably, in a method that can be implemented in this embodiment, the method for obtaining the first local importance is: for any feature vector, the feature vectors in the preset local window of the feature vector are all used as reference vectors, the attention score between the feature vector and each reference vector is obtained and sorted according to the order of the reference vectors on the time axis to obtain the attention score sequence of the feature vector; the attention weights of all reference vectors are sorted according to the order of the reference vectors on the time axis to obtain the attention weight sequence of the feature vector; it should be noted that the attention weights of the reference vectors are all for the overall speech signal. In order to accurately analyze the correlation between the feature vector and its local feature vector, the elements in the attention score sequence and the attention weight sequence of the feature vector are normalized to eliminate the dimension, so as to facilitate the subsequent matching of the elements in the attention score sequence and the attention weight sequence. Then, the normalized elements in the attention score sequence are matched with the normalized elements in the attention weight sequence through the DTW (Dynamic Time Warping) algorithm to obtain a reference matching pair; it should be noted that each reference matching pair must only include two data, one is the normalized attention score and the other is the normalized attention weight. Among them, the DTW (Dynamic Time Warping) algorithm is a well-known technology and will not be described in detail;

[0063] Get the mean of the absolute value of the difference between the two data in all reference matching pairs as the first eigenvalue; get the mean of the distance between the two data in all reference matching pairs as the second eigenvalue; when both the first eigenvalue and the second eigenvalue are smaller, it means that the attention score of the reference vector matches the attention weight more closely, which indirectly reflects that the correlation between the eigenvector and its surrounding eigenvectors is stronger, the eigenvector can better represent its surrounding eigenvectors, the more important the speech signal corresponding to the eigenvector is, and the more conducive the eigenvector is to retrieval. Then, the product of the first eigenvalue and the second eigenvalue is negatively correlated and normalized as the first local importance of the eigenvector. The larger the first local importance, the more important the eigenvector is, and the more conducive it is to retrieval.

[0064] Among them, the calculation formula of the first local importance is: ; In the formula, is the first local importance of the i-th eigenvector; is the number of reference matching pairs corresponding to the i-th feature vector; is the absolute value of the difference between the two data in the nth reference matching pair corresponding to the i-th eigenvector; is the distance between the two data in the nth reference matching pair corresponding to the i-th feature vector; is the first eigenvalue; is the second eigenvalue; exp is an exponential function with a natural constant as the base.

[0065] Step S202: normalize the mean of the attention weights of all feature vectors in the preset local window of the feature vector as the second local importance of the feature vector.

[0066] When the attention weights of all feature vectors in a preset local window of a certain feature vector are larger, it means that the speech signal corresponding to the feature vector is in an important part, which indirectly means that the feature vector is more important; therefore, this embodiment normalizes the mean of the attention weights of all feature vectors in the preset local window of the feature vector as the second local importance of the feature vector. It should be noted that this embodiment normalizes the mean of the attention weights of all feature vectors in the preset local window of the feature vector by the norm normalization function.

[0067] Step S203: normalize the product of the attention weight, the first local importance and the second local importance of the feature vector as the importance of the feature vector.

[0068] It is known that the larger the attention weight of a feature vector is, the more effective information the feature vector contains, and the more important the feature vector is; the larger the first local importance and the second local importance of the feature vector are, the more important the feature vector is. Therefore, this embodiment normalizes the product of the attention weight, the first local importance and the second local importance of the feature vector as the importance of the feature vector.

[0069] The calculation formula of importance is: ; In the formula, is the importance of the i-th eigenvector; is the attention weight of the i-th feature vector; is the first local importance of the i-th eigenvector; is the second local importance of the i-th eigenvector; norm is the normalization function.

[0070] At this point, the importance of each eigenvector is obtained.

[0071] It is known that the greater the importance, the more conducive the corresponding feature vector is to retrieval. In order to improve the efficiency of retrieval and filter out useless feature vectors, this embodiment sets the preset importance threshold to 0.4. The implementer can set the value of the preset importance threshold according to the actual situation, which is not limited here. When the importance is greater than the preset importance threshold, the corresponding feature vector is used as the target feature vector. At this point, the target feature vector in the feature vector is filtered out.

[0072] Step S3: Based on the attention scores between each target feature vector and other target feature vectors, the indexing efficiency of each target feature vector is obtained.

[0073] It is known that the speech signal corresponding to the target feature vector is more important and rich. At the same time, the target feature vector has a strong local representation and can better express the information and characteristics of the speech signal. However, the speech signals corresponding to different target feature vectors may have strong repetitiveness, which further affects the retrieval efficiency of the speech signal. Therefore, this embodiment further analyzes each target feature vector. It is known that when the attention score between a certain target feature vector and other target feature vectors is larger, it means that the repetitiveness of the speech signal corresponding to the target feature vector in the overall speech signal is stronger, the speech signal corresponding to the target feature vector is less discriminative, and the index efficiency corresponding to the target feature vector is lower. Then, this embodiment obtains the index efficiency of each target feature vector based on the attention score between each target feature vector and other target feature vectors. The greater the index efficiency, the better the indexing effect of the corresponding target feature vector.

[0074] Preferably, in a method that can be implemented in this embodiment, the method for obtaining indexing efficiency is: for any target feature vector, obtain the attention score between the target feature vector and each other target feature vector and construct a set as the target set of the target feature vector; in order to improve the efficiency of analyzing the indexing effect of the target feature vector and ensure the accuracy of the analysis, this embodiment divides the target set by the maximum inter-class variance, and then uses the local target set with the highest overall attention score as the analysis set of the target feature vector; it should be noted that only the attention scores in the analysis set are subsequently analyzed. Among them, the maximum inter-class variance is a well-known technology and will not be described in detail;

[0075] On the other hand, considering that the smaller the distance between the target feature vectors corresponding to the attention score in the analysis set, the more concentrated the distribution of the speech signal repeated by the speech signal corresponding to the target feature vector is, the lower the index efficiency corresponding to the target feature vector is. Furthermore, in this embodiment, the target feature vector corresponding to each element in the analysis set, which is not the target feature vector, is used as the designated vector; the elements in the analysis set are arranged according to the order of the corresponding designated vectors in the time axis to obtain the analysis sequence of the target feature vector; the central moment of the time period corresponding to each designated vector is used as the target moment of each designated vector; for any element in the analysis sequence, the difference between the target moments of the designated vector corresponding to the element and its adjacent previous element is used as the reference distance difference of the element; wherein the reference distance difference must be greater than 0; it should be noted that the first element in the analysis sequence does not have an adjacent previous element, and the first element in the analysis sequence is not analyzed. The smaller the reference distance difference is, the more concentrated the distribution of the speech signals repeated by the speech signal corresponding to the target feature vector is. At the same time, when the variance of the reference distance difference of the elements in the analysis sequence is smaller, it is more accurately explained that the more concentrated the speech signals repeated by the speech signal corresponding to the target feature vector are, the worse the indexing effect of the target feature vector is. Therefore, in this embodiment, the result of adding the mean of the reference distance difference of all elements in the analysis sequence to the variance of the reference distance difference is used as the distance dispersion degree. The smaller the distance dispersion degree is, the worse the indexing effect of the target feature vector is.

[0076] The larger the cumulative result of all elements in the analysis sequence, the more repeated speech signals there are in the overall speech signal corresponding to the target feature vector, and the worse the indexing effect of the target feature vector. Therefore, this embodiment normalizes the ratio of the distance discreteness to the cumulative result of all elements in the analysis sequence as the indexing efficiency of the target feature vector. The greater the indexing efficiency, the better the indexing effect of the target feature vector. It should be noted that this embodiment normalizes the ratio of the distance discreteness to the cumulative result of all elements in the analysis sequence through the norm normalization function.

[0077] At this point, the index efficiency of each target feature vector is obtained.

[0078] Step S4: Obtain an index feature vector based on the index efficiency and construct a search table according to the time axis for voice search.

[0079] It is known that the greater the indexing efficiency, the better the indexing effect of the corresponding target feature vector. Therefore, this embodiment obtains the index feature vector based on the indexing efficiency, removes the target feature vector with unclear retrieval discrimination, and then constructs the index feature vector into a retrieval table according to the time axis to improve the efficiency of speech signal retrieval.

[0080] Preferably, in a method that can be implemented in this embodiment, the method for obtaining the index feature vector is as follows: This embodiment sets the preset index efficiency threshold to 0.6, and the implementer can set the value of the preset index efficiency threshold according to the actual situation, which is not limited here. When the index efficiency is greater than the preset index efficiency threshold, the corresponding target feature vector is used as the index feature vector. At this point, all index feature vectors are screened out from the target feature vector.

[0081] Preferably, in a method that can be implemented in this embodiment, the method for obtaining the retrieval table is: all index feature vectors are arranged in order according to the time axis to construct a retrieval table; wherein, in the retrieval table, the target moment of each index feature vector is used as a unique mark of the corresponding index feature vector to facilitate precise positioning during the retrieval process.

[0082] Preferably, in a method that can be implemented in this embodiment, the method for voice retrieval is: first obtain the voice signal segment to be retrieved as the voice signal to be retrieved; then perform MFCC characterization on the voice signal to be retrieved to obtain the feature vector to be retrieved; further calculate the similarity between the feature vector to be retrieved and each index feature vector in the retrieval table, wherein the method for obtaining the similarity is a well-known technology and will not be repeated. Then, a preset number of index feature vectors with the largest similarity are used as suspected target vectors; this embodiment sets the preset number to 6, and the implementer can set the size of the preset number according to actual conditions, which is not limited here. Extract and retrieve from both sides from the target moment of the voice signal corresponding to each suspected target vector until it is the same length as the voice signal to be retrieved, and use it as the suspected target voice signal of the voice signal to be retrieved. Perform a detailed comparison between the suspected target voice signal and the voice signal to be retrieved, and finally determine the position of the voice signal to be retrieved in the overall voice signal, so as to complete the voice retrieval accurately and quickly.

[0083] In summary, this embodiment obtains the feature vectors of each signal segment of the speech signal; according to the correlation between each feature vector and the feature vector in its preset local window, the attention weight of each feature vector and the attention weight of the feature vector in the preset local window of each feature vector, the importance of each feature vector is obtained and then the target feature vector is screened out; based on the attention score between each target feature vector and other target feature vectors, the index efficiency of each target feature vector is obtained and then the index feature vector is obtained and constructed as a retrieval table according to the time axis for speech retrieval. The present invention effectively improves the efficiency and accuracy of speech retrieval and enhances the user experience by accurately obtaining the index feature vector and constructing the retrieval table.

[0084] Embodiment 2:

[0085] The present invention also proposes a vector coding system for fast speech retrieval, see Figure 3 , which shows a structural diagram of a vector encoding system for fast speech retrieval provided by an embodiment of the present invention, the system includes: a feature vector acquisition module 10, a target feature vector acquisition module 20, an index efficiency acquisition module 30 and a speech retrieval module 40.

[0086] The feature vector acquisition module 10 is used to acquire the feature vector of each signal segment of the speech signal.

[0087] The target feature vector acquisition module 20 is used to obtain the importance of each feature vector based on the correlation between each feature vector and the feature vector in its preset local window, the attention weight of each feature vector and the attention weight of the feature vector in the preset local window of each feature vector; and filter out the target feature vector based on the importance.

[0088] The index efficiency acquisition module 30 is used to acquire the index efficiency of each target feature vector based on the attention score between each target feature vector and other target feature vectors.

[0089] The speech retrieval module 40 is used to obtain an index feature vector based on index efficiency and construct a retrieval table according to a time axis to perform speech retrieval.

[0090] It should be noted that: the system provided in the above embodiment is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the vector coding system for fast voice retrieval provided in the above embodiment and the vector coding method embodiment for fast voice retrieval belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0091] Embodiment 3:

[0092] The present invention also proposes a vector encoding device for fast voice retrieval, which includes a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to execute a vector encoding method for fast voice retrieval provided in an embodiment of the present application. The device can be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a vector encoding method for fast voice retrieval provided in the above embodiment.

[0093] In addition, the present application embodiment also protects a computer device, see Figure 4 The computer device includes a memory 401, a processor 402, and a computer program 403 stored in the memory 401 and running on the processor 402, wherein when the processor 402 executes the computer program 403, the computer device can execute any one of the vector encoding methods for fast speech retrieval introduced above.

[0094] Embodiment 4:

[0095] This embodiment also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a vector encoding method for fast speech retrieval provided in the above embodiment.

[0096] Embodiment 5:

[0097] This embodiment also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement a vector encoding method for fast speech retrieval provided in the above embodiment.

[0098] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0099] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0100] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A vector encoding method for fast speech retrieval, characterized in that: The method comprises the following steps: Obtaining feature vectors of each signal segment of the speech signal; Obtain the importance of each feature vector according to the correlation between each feature vector and the feature vector in its preset local window, the attention weight of each feature vector, and the attention weight of the feature vector in the preset local window of each feature vector; and select the target feature vector based on the importance; Obtain the index efficiency of each target feature vector based on the attention score between each target feature vector and other target feature vectors; Based on the index efficiency, the index feature vector is obtained and constructed into a search table according to the time axis for voice retrieval; The method for obtaining the importance is: For any eigenvector, according to the correlation between the eigenvector and the eigenvector in the preset local window, the first local importance of the eigenvector is obtained; The result of normalizing the mean of the attention weights of all feature vectors in the preset local window of the feature vector is used as the second local importance of the feature vector; The result of normalizing the product of the attention weight, the first local importance and the second local importance of the feature vector is used as the importance of the feature vector.

2. A vector encoding method for fast speech retrieval as claimed in claim 1, characterized in that: The method for obtaining the first local importance is: For any feature vector, the feature vectors in the preset local window of the feature vector are all used as reference vectors, the attention scores between the feature vector and each reference vector are obtained, and the attention scores between the feature vector and each reference vector are sorted according to the order of the reference vectors on the time axis to obtain the attention score sequence of the feature vector; Sort the attention weights of all reference vectors according to the order of the reference vectors on the time axis to obtain the attention weight sequence of the feature vector; Matching the normalized elements in the attention score sequence with the normalized elements in the attention weight sequence by using a DTW algorithm to obtain a reference matching pair; Obtain the mean of the differences between the two data in all reference matching pairs as the first eigenvalue; Obtain the mean of the distances between the two data in all reference matching pairs as the second eigenvalue; A result of negatively correlating and normalizing the product of the first eigenvalue and the second eigenvalue is used as the first local importance of the eigenvector.

3. A vector encoding method for fast speech retrieval as claimed in claim 1, characterized in that: The method for obtaining the target feature vector is: When the importance is greater than a preset importance threshold, the corresponding feature vector is used as the target feature vector.

4. A vector encoding method for fast speech retrieval as claimed in claim 1, characterized in that: The method for obtaining the index efficiency is: For any target feature vector, obtain the attention scores between the target feature vector and each other target feature vector and construct them into a set as the target set of the target feature vector; Dividing the target set by the maximum inter-class variance, and taking the local target set with the highest overall attention score as the analysis set of the target feature vector; The target feature vectors corresponding to each element in the analysis set that are not the target feature vectors are all taken as designated vectors; Arrange the elements in the analysis set according to the order of the corresponding specified vectors in the time axis to obtain the analysis sequence of the target feature vector; The central moment of the time period corresponding to each specified vector is taken as the target moment of each specified vector; For any element in the analysis sequence, the difference between the target time of the element and the designated vector corresponding to the adjacent previous element is taken as the reference distance difference of the element; The result of adding the mean of the reference distance difference and the variance of the reference distance difference of all elements in the analysis sequence is taken as the distance dispersion degree; The result of normalizing the ratio of the distance dispersion degree to the cumulative result of all elements in the analysis sequence is used as the index efficiency of the target feature vector.

5. A vector encoding method for fast speech retrieval as claimed in claim 1, characterized in that: The method for obtaining the index feature vector is: When the index efficiency is greater than a preset index efficiency threshold, the corresponding target feature vector is used as the index feature vector.

6. A vector encoding method for fast speech retrieval as claimed in claim 4, characterized in that: The method for obtaining the retrieval table is: All index feature vectors are arranged according to the order of the time axis to construct a search table; wherein, in the search table, the target moment of each index feature vector is used as a unique mark of the corresponding index feature vector.

7. A vector encoding method for fast speech retrieval as claimed in claim 1, characterized in that: The method for obtaining the attention weight and attention score is: The attention weight of each feature vector and the attention score between each feature vector and other feature vectors are directly obtained through the self-attention mechanism.

8. A vector encoding method for fast speech retrieval as claimed in claim 1, characterized in that: The method for obtaining the feature vectors of each signal segment of the speech signal is: The speech signal is specialized through the MFCC technology to obtain the feature vector of each signal segment of the speech signal; wherein one signal segment corresponds to the speech signal within a window in the MFCC technology.

9. A vector coding system for rapid speech retrieval, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When executing the computer program, the processor implements the steps of a vector encoding method for fast speech retrieval as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Domain speech recognition method and system based on RAG

    CN119296516A

  • Speaker recognition method and apparatus, electronic device, and storage medium

    WO2022007766A1