A waveform matching method, apparatus, device, and computer storage medium
By extracting features and encoding vibration data, the problem of low vibration waveform matching efficiency in existing technologies is solved. This enables efficient matching of target vibration waveforms in a limited waveform library, improving the success rate and saving data space.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2026-03-20
AI Technical Summary
In existing technologies, vibration waveform matching methods are inefficient and have a low success rate, especially when matching audio data, particularly when the amount of waveform library data is limited, making it difficult to match appropriate vibration waveforms.
By extracting features from the input audio data, vibration requirement data is determined, and vibration encoding is performed based on the vibration requirement data to generate vibration encoding results. Based on the vibration encoding results, similarity matching is performed to output the target vibration waveform.
With a limited amount of waveform library data, the success rate and efficiency of vibration waveform matching are improved, while saving data space in the waveform library.
Smart Images

Figure CN116364112B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vibration processing, and particularly relates to a waveform matching method and device, equipment and a computer storage medium. BACKGROUND
[0002] Vibration is one of the most important functions of an electronic device, and high-quality vibration can greatly improve the user experience of the electronic device. With the enrichment of the system and application functions of the electronic device, the vibration involved in the audio data of the electronic device is also increasing.
[0003] In the related art, the matching method of the vibration waveform is basically to match the waveforms by index matching or one-to-one matching, and the original data amount of the waveform library is required to be huge. When the data amount of the waveform library is limited, there is a high probability that a suitable vibration waveform cannot be matched. In the current vibration demand, it is difficult to match a suitable vibration waveform, especially when the audio data is matched with the waveform, the efficiency is low and the success rate is also not high. SUMMARY
[0004] The present application provides a waveform matching method, device, equipment and computer storage medium, which matches the waveforms according to the vibration change trend, improves the efficiency, and also improves the success rate of matching.
[0005] The technical solution of the present application is as follows:
[0006] In a first aspect, the present application provides a waveform matching method, which comprises the following steps:
[0007] obtaining input audio data;
[0008] performing feature extraction on the input audio data to determine vibration sensation demand data;
[0009] performing vibration sensation coding according to the vibration sensation demand data to obtain vibration sensation coding results;
[0010] performing similarity matching based on the vibration sensation coding results to output target vibration sensation waveforms.
[0011] In some embodiments, the step of performing feature extraction on the input audio data to determine vibration sensation demand data comprises:
[0012] performing feature extraction on the input audio data to determine quantifiable data corresponding to each time instant of the input audio data;
[0013] arranging the quantifiable data corresponding to each time instant according to the time dimension to obtain the vibration sensation demand data.
[0014] In some embodiments, when the quantifiable data is vibration intensity, the method further includes:
[0015] The vibration intensity is classified to determine multiple vibration data; wherein, different categories of vibration intensity correspond to different vibration data.
[0016] In some embodiments, classifying the vibration intensity to determine multiple vibration data includes:
[0017] If the vibration intensity belongs to the i-th intensity category, then the vibration intensity is determined to correspond to the i-th vibration data.
[0018] If the vibration intensity belongs to the (i+1)th intensity category, then the vibration intensity is determined to correspond to the (i+1)th vibration data.
[0019] Where i is an integer greater than 0, and when the i-th intensity category is lower than the (i+1)-th intensity category, the i-th vibration data is less than the (i+1)-th vibration data.
[0020] In some embodiments, obtaining the vibration requirement data by arranging the quantifiable data corresponding to each moment according to the time dimension includes:
[0021] Obtain the vibration data corresponding to the input audio data at each moment;
[0022] The vibration requirement data is obtained by arranging the vibration data corresponding to each moment according to the time dimension.
[0023] In some embodiments, the step of performing vibration coding based on the vibration requirement data to obtain the vibration coding result includes:
[0024] Determine the trend of vibration data change between the current moment and the next moment in the vibration demand data;
[0025] The vibration sensing demand data is encoded based on the trend of vibration sensing data changes to obtain the vibration sensing encoding result.
[0026] In some embodiments, determining the trend of vibration data change between the current moment and the next moment in the vibration demand data includes:
[0027] If the vibration data at the current moment is the same as the vibration data at the next moment, then the trend of the vibration data change is determined to be that the vibration remains unchanged.
[0028] If the vibration data at the current moment is lower than the vibration data at the next moment, then the trend of the vibration data change is determined to be an increase in vibration.
[0029] If the vibration sensing data at the current time is higher than the vibration sensing data at the next time, it is determined that the vibration sensing data change trend is vibration weakening.
[0030] In some embodiments, the vibration sensing data change trend is encoded according to the vibration sensing demand data, to obtain the vibration encoding result, including:
[0031] If the vibration sensing data change trend is vibration invariable, the vibration encoding result is determined as a first value;
[0032] If the vibration sensing data change trend is vibration strengthening, the vibration encoding result is determined as a second value;
[0033] If the vibration sensing data change trend is vibration weakening, the vibration encoding result is determined as a third value.
[0034] In some embodiments, the first value is equal to 0, the second value is equal to 1, and the third value is equal to 2.
[0035] In some embodiments, the vibration encoding according to the vibration sensing demand data to obtain the vibration encoding result further includes:
[0036] determining a vibration intensity corresponding to the vibration sensing demand data, and encoding the vibration intensity; and / or,
[0037] determining a vibration data difference between the current time and the next time in the vibration sensing demand data;
[0038] encoding the vibration sensing demand data according to the vibration data difference, to obtain the vibration encoding result.
[0039] In some embodiments, the similarity matching based on the vibration encoding result to output the target vibration waveform includes:
[0040] obtaining an encoding result of at least one vibration waveform in a preset waveform library;
[0041] performing similarity calculation on the vibration encoding result and the encoding result of the at least one vibration waveform, to determine at least one similarity value;
[0042] determining the target vibration waveform from the at least one vibration waveform according to the at least one similarity value.
[0043] In some embodiments, the determination of the target vibration waveform from the at least one vibration waveform according to the at least one similarity value includes:
[0044] selecting a maximum similarity value from the at least one similarity value;
[0045] The vibration sensation waveform corresponding to the maximum similarity value is determined as the target vibration sensation waveform.
[0046] In a second aspect, an embodiment of the present application provides a waveform matching device, the waveform matching device comprising:
[0047] An acquisition unit configured to acquire input audio data;
[0048] A determination unit configured to perform feature extraction on the input audio data and determine vibration sensation demand data;
[0049] An encoding unit configured to perform vibration sensation encoding according to the vibration sensation demand data and obtain a vibration sensation encoding result;
[0050] A matching unit configured to perform similarity matching based on the vibration sensation encoding result and output a target vibration sensation waveform.
[0051] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0052] A memory configured to store a computer program capable of running on a processor;
[0053] A processor configured to, when running the computer program, execute the waveform matching method according to any one of the first aspect.
[0054] In a fourth aspect, an embodiment of the present application provides a computer storage medium, the computer storage medium storing a computer program, the computer program being executed by at least one processor to implement the waveform matching method according to any one of the first aspect.
[0055] The waveform matching method, device, equipment and computer storage medium provided by the embodiments of the present application acquire input audio data, perform feature extraction on the input audio data, determine vibration sensation demand data, perform vibration sensation encoding according to the vibration sensation demand data, obtain a vibration sensation encoding result, and perform similarity matching based on the vibration sensation encoding result and output a target vibration sensation waveform. In this way, by performing data feature extraction on the input audio data, vibration sensation demand data is obtained, and vibration sensation encoding is performed according to the vibration sensation demand data, so that the vibration sensation encoding result is matched with a target vibration sensation waveform similar to the vibration sensation encoding result. In this way, in a scenario where the amount of data in the preset waveform library is limited, a suitable vibration sensation waveform can still be found according to the similarity matching mode, which not only improves the success rate and efficiency in the waveform matching process, but also saves the data space occupied by the preset waveform library. BRIEF DESCRIPTION OF DRAWINGS
[0056] Figure 1 A flowchart of a waveform matching method provided by an embodiment of the present application;
[0057] Figure 2 A detailed flowchart of a waveform matching method provided by an embodiment of the present application is shown in the figure;
[0058] Figure 3 A vibration intensity classification diagram provided by an embodiment of the present application is shown in the figure;
[0059] Figure 4 A vibration intensity waveform diagram provided by an embodiment of the present application is shown in the figure;
[0060] Figure 5 Another vibration intensity waveform diagram provided by an embodiment of the present application is shown in the figure;
[0061] Figure 6 A component structure diagram of a waveform matching device provided by an embodiment of the present application is shown in the figure;
[0062] Figure 7 A specific hardware structure diagram of an electronic device provided by an embodiment of the present application is shown in the figure;
[0063] Figure 8 A component structure diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0064] In order to enable a person skilled in the art to better understand the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings, and the accompanying drawings are only used for reference and are not intended to limit the embodiments of the present application.
[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0066] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0067] It can be understood that vibration is one of the most important functions of the current electronic device, and high-quality vibration can greatly improve the user's experience of using the electronic device. With the richness of the system and application functions of the electronic device, the vibration involved in the audio data in the electronic device is also increasing.
[0068] In the related art, the matching method of the vibration waveform is basically through index matching or one-to-one waveform matching, which requires a huge amount of original waveform library data. When the data amount of the waveform library is limited, there is a high probability that the appropriate vibration waveform cannot be matched. In the current variable vibration demand and various combination scenarios, it is difficult to match the appropriate vibration waveform. When the audio data is waveform matched, the efficiency is low and the success rate is not high.
[0069] In short, the current method is basically through index matching or one-to-one waveform matching, which requires a huge amount of original waveform library data. When the data amount of the waveform library is limited, there is a high probability that the appropriate vibration waveform cannot be matched. In the current variable vibration demand and various combination scenarios, it is difficult to match the appropriate vibration waveform. When the data amount of the waveform in the waveform library is limited, the vibration waveform that needs or approximately needs can still be matched for various changing music input data.
[0070] Based on this, the embodiment of the present application provides a waveform matching method, which extracts data features from input audio data to obtain vibration sensation demand data, and encodes the vibration sensation demand data to obtain a vibration sensation encoding result, so as to match a target vibration sensation waveform similar to the vibration sensation encoding result. In this way, in the scene where the data amount in the preset waveform library is limited, the appropriate vibration sensation waveform can still be found according to the similarity matching method, which not only improves the success rate and efficiency in the waveform matching process, but also saves the data space occupied by the preset waveform library.
[0071] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0072] In an embodiment of the present application, referring to Figure 1 , a flowchart of a waveform matching method provided by an embodiment of the present application is shown. As Figure 1 indicated, the method can include:
[0073] S101: Obtain input audio data.
[0074] It should be noted that the waveform matching method provided in the embodiments of the present application can be applied to a waveform matching device having a waveform matching requirement, or an electronic device integrated with the device. Here, the electronic device can be, for example, a computer, a smart phone, a tablet computer, a notebook computer, a palm computer, a personal digital assistant (PDA), a portable media player (PMP), a navigation device, a wearable device, and the like, and the embodiments of the present application do not make a specific limitation in this regard.
[0075] It should also be noted that in the embodiments of the present application, the input audio data can be any obtained audio data, for example, any intercepted music data, or any intercepted voice data, and the like, and the present application does not make a specific limitation in this regard.
[0076] S102: performing feature extraction on the input audio data to determine vibration sensation requirement data.
[0077] It should be noted that in the embodiments of the present application, in the process of performing feature extraction on the input audio data, the vibration sensation requirement data can include vibration sensation intensity, vibration sensation frequency, or other data features other than the foregoing, to reflect the vibration features of the input audio data, and here we take the vibration sensation requirement data as an example, which can represent the vibration sensation intensity corresponding to each time point in the input audio data.
[0078] It should also be noted that in the embodiments of the present application, the input audio data can be a fixed-frequency waveform or a variable-frequency waveform, and the input audio data can be a single waveform or a composite audio data obtained by superimposing multiple waveforms, and the present application does not make any limitation in this regard.
[0079] In a possible implementation manner, the performing feature extraction on the input audio data to determine vibration sensation requirement data can include:
[0080] performing feature extraction on the input audio data to determine quantifiable data corresponding to each time point of the input audio data;
[0081] arranging the quantifiable data corresponding to each time point according to a time dimension to obtain the vibration sensation requirement data.
[0082] It should be noted that in the embodiments of the present application, in the process of feature extraction on the input audio data, the vibration demand data can include vibration intensity and vibration frequency; in addition, the vibration demand data can also include other data features, such as other vibration features that can reflect the input audio data. The vibration demand data can represent the vibration intensity corresponding to each time point in the input audio data, or the vibration frequency corresponding to each time point in the input audio data.
[0083] Specifically, in some embodiments, when the quantifiable data is vibration intensity, the method can further include:
[0084] classifying the vibration intensity to determine a plurality of vibration data; wherein different categories of vibration intensity correspond to different vibration data.
[0085] It should be noted that in the embodiments of the present application, it should be noted that the data features extracted in the input audio data can be vibration intensity or vibration frequency, or other data features reflecting vibration features. Here we take vibration intensity as an example. After determining the vibration intensity corresponding to each time point, the vibration intensity of each time point is classified according to the vibration intensity, and the time points belonging to the same vibration intensity interval are assigned the same vibration demand data, wherein the vibration demand data can be multiple and can be designed in a ladder shape. Based on the same principle, the vibration frequency feature can also be extracted in the process of input audio feature extraction. After determining the vibration frequency corresponding to each time point, the vibration frequency of each time point is classified according to the vibration frequency, and the time points belonging to the same vibration frequency interval are assigned the same vibration demand data; wherein the vibration demand data can be multiple and can be designed in a ladder shape.
[0086] For example, for the vibration frequency feature, the input audio data can be segmented, and the data is calculated by FFT after segmentation to obtain frequency domain data; then the maximum two frequency points are obtained, and the average of the maximum two frequency points is calculated, which can be taken as the vibration frequency of the segment, which is not limited.
[0087] In some embodiments, the classification of the vibration intensity to determine a plurality of vibration data can include:
[0088] If the vibration intensity belongs to the i-th intensity category, the vibration intensity is determined to correspond to the i-th vibration data;
[0089] If the vibration intensity belongs to the i+1-th intensity category, the vibration intensity is determined to correspond to the i+1-th vibration data;
[0090] wherein i is an integer greater than 0, and the ith vibration sensation data is less than the i+1th vibration sensation data when the ith intensity category is lower than the i+1th intensity category.
[0091] It should be noted that in the embodiments of the present application, the vibration sensation intensity can be divided into several categories according to the overall situation of the input audio data, and the vibration sensation intensity of different categories can be assigned corresponding vibration sensation demand data in a conventional manner. The first vibration sensation intensity, the second vibration sensation intensity, the third vibration sensation intensity, and the like can be used as vibration sensation demand data, or the vibration sensation intensity a, the vibration sensation intensity b, the vibration sensation intensity c, and the like can be used as vibration sensation demand data. The number of categories and the naming manner are not limited herein.
[0092] It should be further noted that in the embodiments of the present application, the vibration sensation intensity can be classified into several categories according to the overall size of the vibration sensation intensity, and different vibration sensation intensity of different categories can be assigned different vibration sensation demand data. In the process of classifying the vibration sensation demand data, the vibration sensation intensity within the same vibration sensation range is assigned the same vibration sensation demand data according to the vibration sensation intensity at different moments. The more the number of vibration sensation intensity categories, the more accurate the vibration sensation demand data.
[0093] It should be further noted that in the embodiments of the present application, the number and span of intensity categories can be preset according to experience. The span between adjacent categories can be equal, that is, in the example of the embodiments of the present application, the i+1th intensity can be twice the ith intensity, the i+2th intensity can be three times the ith intensity, and the like.
[0094] It should be further noted that in the embodiments of the present application, based on the same principle, the vibration sensation frequency can also be used as data features to obtain vibration sensation demand data, and the rules and details are the same as those of using vibration sensation intensity as data features to obtain vibration sensation demand data, which will not be repeated herein.
[0095] In some embodiments, the vibration sensation demand data can be obtained by arranging the quantifiable data corresponding to each moment in the time dimension, which can include:
[0096] The vibration sensation data corresponding to each moment of the input audio data is obtained.
[0097] The vibration sensation data corresponding to each moment is arranged in the time dimension to obtain the vibration sensation demand data.
[0098] It should be noted that in the embodiments of the present application, the vibration sensation data corresponding to each time of the input audio data can include vibration sensation intensity and vibration sensation frequency, the vibration sensation data corresponding to each time of the input audio data is different, and the vibration sensation data corresponding to each time is arranged in the time dimension, so that different vibration sensation demand data arranged in time sequence is obtained, wherein the vibration sensation data belonging to the same category has the same vibration sensation demand data.
[0099] In this way, after feature extraction is performed on the input audio data, the vibration sensation demand data corresponding to each category is determined according to the size of the vibration sensation intensity feature extracted.
[0100] S103: Perform vibration sensation coding according to the vibration sensation demand data to obtain a vibration sensation coding result.
[0101] It should be noted that in the embodiments of the present application, the vibration sensation demand data corresponding to each time of the input audio data is determined, the change trend of the vibration sensation demand data between adjacent times is determined, and the input audio data is coded on the basis of the change trend of the vibration sensation demand data between adjacent times to obtain a corresponding vibration sensation coding result. The vibration sensation coding result reflects the vibration sensation change trend of the input audio data, and also reflects the vibration feature of the input audio data.
[0102] It should be further noted that in the embodiments of the present application, the process of the vibration sensation coding result can simply reflect three coding conditions of vibration sensation invariable, vibration sensation strengthening or vibration sensation weakening, or can reflect the change amplitude of the vibration sensation change trend, which requires further coding on the basis of the previous three coding conditions, and has a more detailed coding rule.
[0103] In some embodiments, the vibration sensation coding according to the vibration sensation demand data to obtain a vibration sensation coding result can include:
[0104] determining a vibration sensation data change trend between a current time and a next time in the vibration sensation demand data;
[0105] coding the vibration sensation demand data according to the vibration sensation data change trend to obtain the vibration sensation coding result.
[0106] It should be noted that in the embodiments of the present application, the vibration sensation demand data change trend between a previous time and a next time in the input audio data can be invariable, strengthening or weakening, the process of the vibration sensation coding result can be simple coding, only reflecting three coding conditions of vibration sensation invariable, vibration sensation strengthening or vibration sensation weakening, generally using ternary coding, or can reflect the change amplitude of the vibration sensation change trend, which requires further coding on the basis of the previous three coding conditions, and has a more detailed coding rule.
[0107] It should also be noted that in the embodiments of this application, the encoding form can be an intensity change trend, or it can be a direct uniform quantization of the vibration intensity, or a Huffman coding form to quantize the specific value of the intensity. Specifically, according to the encoding requirements, the specific value of the intensity can be quantized through a method similar to Huffman coding, and an appropriate encoding method can be adopted according to the number of bits required for the encoding. Binary, ternary, and N-ary encoding methods can be used for encoding, and no limitation is made here.
[0108] In some embodiments, determining the trend of vibration data change between the current moment and the next moment in the vibration demand data may include:
[0109] If the vibration data at the current moment is the same as the vibration data at the next moment, then the trend of the vibration data change is determined to be that the vibration remains unchanged.
[0110] If the vibration data at the current moment is lower than the vibration data at the next moment, then the trend of the vibration data change is determined to be an increase in vibration.
[0111] If the vibration data at the current moment is higher than the vibration data at the next moment, then the trend of the vibration data change is determined to be a decrease in vibration.
[0112] It should be noted that, in this embodiment of the application, the trend of vibration demand data change between the previous moment and the next moment in the input audio data can be unchanged, strengthened, or weakened. If the vibration data at the current moment is the same as the vibration data at the next moment, then the trend of vibration data change is determined to be unchanged vibration; if the vibration data at the current moment is lower than the vibration data at the next moment, then the trend of vibration data change is determined to be strengthened vibration; if the vibration data at the current moment is higher than the vibration data at the next moment, then the trend of vibration data change is determined to be weakened vibration.
[0113] In some embodiments, encoding the vibration demand data according to the vibration data change trend to obtain the vibration encoding result may include:
[0114] If the vibration data shows a trend of constant vibration, then the vibration encoding result is determined to be the first value;
[0115] If the vibration data shows an increasing vibration, then the vibration encoding result is determined to be the second value;
[0116] If the vibration data shows a decreasing vibration, then the vibration encoding result is determined to be the third value.
[0117] In some embodiments, the first value is equal to 0, the second value is equal to 1, and the third value is equal to 2.
[0118] It should be noted that, in the embodiments of the present application, for the determination of the vibration sensation coding result, simple coding can be performed, only reflecting three coding cases of vibration sensation change trend being vibration sensation unchanged, vibration sensation strengthened or vibration sensation weakened, and generally a ternary coding manner can be adopted, or the change amplitude of the vibration sensation change trend can be reflected, which requires further coding based on the previous three coding manners, with more detailed coding rules.
[0119] It should be noted that, in the embodiments of the present application, in the process of vibration sensation coding result, simple coding can be performed, only reflecting three coding cases of vibration sensation change trend being vibration sensation unchanged, vibration sensation strengthened or vibration sensation weakened, and generally a ternary coding manner can be adopted, specifically, the first trend coding corresponding to vibration sensation unchanged can be represented by 0, the second trend coding corresponding to vibration sensation strengthened can be represented by 1, and the third trend coding corresponding to vibration sensation weakened can be represented by 2, and the vibration sensation coding result can also reflect the change amplitude of the vibration sensation change trend, which requires further coding based on the previous three coding manners, with more detailed coding rules. For example, the specific value of the intensity can be quantified by a method similar to Huffman coding according to the coding requirement, and an appropriate coding manner can be adopted according to the digit requirement of the coding, which is not limited here.
[0120] In some embodiments, the vibration sensation coding according to the vibration sensation demand data to obtain the vibration sensation coding result can further include:
[0121] determining the vibration intensity corresponding to the vibration sensation demand data, and coding the vibration intensity; and / or,
[0122] determining the vibration data difference between the current time and the next time in the vibration sensation demand data;
[0123] coding the vibration sensation demand data according to the vibration data difference to obtain the vibration sensation coding result.
[0124] It should be noted that, in the embodiments of the present application, in the process of directly coding the vibration intensity, the intensity value corresponding to the vibration intensity can be directly coded, for example, the vibration data reflecting the vibration intensity can be directly coded, or the vibration data difference between adjacent time points can be determined, the vibration data difference corresponding to adjacent time points is taken as the coding basis, the specific value of the vibration data difference corresponding to adjacent time points is quantified, and the vibration data is coded, specifically, the vibration intensity can be uniformly quantified in the coding process, or the specific value of the vibration data difference can be quantified in the form of Huffman coding.
[0125] In this way, the vibration encoding result corresponding to the input audio data can be generated according to the vibration demand data, so as to reflect the vibration characteristics of the input audio data.
[0126] In S104, similarity matching is performed based on the vibration encoding result, and a target vibration waveform is output.
[0127] It should be noted that, in the embodiment of the present application, the vibration characteristics reflected by the vibration encoding result are compared in the waveform library, and a waveform that is the same as or close to the vibration encoding result is selected as the waveform matching result of the input audio data, that is, a plurality of input audio data with similar vibration characteristics can share the same target vibration waveform, so that a large amount of waveform data needs to be stored in the waveform library in the process of one-to-one matching, and resources are wasted.
[0128] In some embodiments, the similarity matching based on the vibration encoding result and outputting the target vibration waveform can include:
[0129] Obtaining an encoding result of at least one vibration waveform in a preset waveform library;
[0130] Calculating the similarity between the vibration encoding result and the encoding result of the at least one vibration waveform to determine at least one similarity value;
[0131] Determining the target vibration waveform from the at least one vibration waveform according to the at least one similarity value.
[0132] It should be noted that, in the embodiment of the present application, a plurality of encoding results in the preset waveform library need to be compared with the vibration encoding result corresponding to the input audio data in the process of similarity matching, to determine the target vibration encoding result that is closest to the vibration encoding result, and the waveform corresponding to the target vibration encoding result is determined as the target vibration waveform.
[0133] It should also be noted that, in the embodiment of the present application, since there are a plurality of encoding results, there can be two or more target vibration encoding results in the process of comparison and matching, in which case, any one of them can be selected as the final target vibration encoding result.
[0134] It should also be noted that, in the embodiment of the present application, when the similarity between the vibration encoding result and the encoding result of the at least one vibration waveform is calculated, the similarity can be calculated by distance. For example, the similarity can be calculated by using Euclidean distance, Manhattan distance, Minkowski distance, Hamming distance, and cosine distance, without being limited to the above.
[0135] Exemplarily, taking the Euclidean distance as an example, given two codes A=(a1, a2,...an) and B=(b1, b2,...,bn), the Euclidean distance between A and B is: Wherein, the smaller the Euclidean distance between A and B is, the greater the similarity is; otherwise, the greater the Euclidean distance between A and B is, the smaller the similarity is.
[0136] In some embodiments, the determining the target vibration waveform in the at least one vibration waveform according to the at least one similarity value can comprise:
[0137] selecting a maximum similarity value in the at least one similarity value;
[0138] determining the vibration waveform corresponding to the maximum similarity value as the target vibration waveform.
[0139] It should be noted that, in the embodiments of the present application, since there are several encoding results, there can be two or more target vibration encoding results with the same similarity in the process of comparison and matching. In this case, any one can be selected as the final target vibration encoding result, and after the matching is completed, the vibration encoding results in the preset waveform library to be matched are supplemented or refined according to the size of the similarity.
[0140] In this way, the corresponding target vibration waveform can be matched and output based on the vibration encoding result, and one type of input audio data with similar vibration characteristics can share the same target vibration waveform, which avoids the need for a large number of stored waveform data in the waveform library in the process of one-to-one matching, thereby saving resources.
[0141] The embodiments of the present application provide a waveform matching method, which acquires input audio data, extracts features of the input audio data, determines corresponding vibration demand data, generates vibration encoding results corresponding to the input audio data according to the vibration demand data, and matches and outputs corresponding target vibration waveforms based on the vibration encoding results. In this way, the success rate and efficiency in the process of waveform matching are improved by extracting features of the input audio data to obtain vibration demand data, generating corresponding vibration encoding results according to the vibration demand data, and matching vibration waveforms similar to the vibration encoding results as target vibration waveforms.
[0142] In another embodiment of the present application, based on the waveform matching method described in the foregoing embodiments, referring to Figure 2 which shows a detailed flowchart of a waveform matching method provided by the embodiments of the present application. As shown in Figure 2 the method can comprise:
[0143] S201: input audio data.
[0144] It should be noted that there are various waveform characteristics in the input audio data.
[0145] S202: Feature extraction of audio data.
[0146] S203: Forming trend encoding.
[0147] S204: Encoding similarity matching with data in the waveform library.
[0148] S205: Output target vibration sensation waveform.
[0149] Specifically, the embodiment of the present application provides a waveform matching method, and the basic flow of the method includes: inputting audio data, extracting vibration sensation demand data, forming vibration sensation encoding result, and matching vibration sensation waveform.
[0150] Referring to Figure 3 , a vibration sensation intensity classification diagram provided by the embodiment of the present application is shown, as Figure 3 shown, the extracted quantifiable vibration sensation demand data can be understood as the stacking of many blocks, classifying vibration sensation intensity, one block representing vibration sensation 1, two blocks representing vibration sensation 2, three blocks representing vibration sensation 3, and so on, and finally forming the arrangement of different vibration sensation intensity data in time granularity, that is, forming the encodable vibration sensation demand data.
[0151] The input audio data is processed and audio data feature extraction is performed, and the quantifiable vibration sensation demand data is extracted, and the vibration sensation intensity encoding of the audio segment changing over time (i.e., the vibration sensation encoding result in the foregoing embodiment) is formed through the quantifiable data, and the N-ary encoding result (for example, ternary trend encoding, only quantifying the change trend of vibration sensation intensity: 0 represents no change in vibration sensation, 1 represents vibration sensation strengthening, and 2 represents vibration sensation weakening; or the specific value of the intensity can be quantified through a similar Huffman encoding method;). Specifically, referring to Figure 4 and Figure 5 , a vibration sensation intensity waveform diagram and an encoding result after vibration sensation encoding are respectively shown, wherein 0 represents no change in vibration sensation, 1 represents vibration sensation strengthening, and 2 represents vibration sensation weakening.
[0152] The trend encoding obtained by calculation is subjected to encoding similarity matching in the pre-constructed waveform library, and a vibration waveform with higher similarity is found.
[0153] The embodiment of the present application provides a waveform matching method, and the specific implementation of the foregoing embodiment is described in detail based on the foregoing embodiment. As can be seen from the technical scheme of the foregoing embodiment, according to the technical scheme of the foregoing embodiment, the present technical scheme proposes that audio data feature extraction (quantifiable) is performed; corresponding vibro-encoding results (N-ary encoding) are performed according to the audio data features; and waveform library similarity matching is performed. In the scenario where the amount of waveform library data is limited, the input data features can still be extracted to form trend encoding, and finally the appropriate vibro-waveform can be found through the method of similarity matching, thereby greatly improving the success rate and efficiency of finding and outputting results, and saving the data space occupied by the waveform library.
[0154] In another embodiment of the present application, referring to Figure 6 , a component structure schematic diagram of a waveform matching device provided by the embodiment of the present application is shown. As Figure 6 indicated, the waveform matching device 60 can include:
[0155] The acquisition unit 601 is configured to acquire input audio data.
[0156] The determination unit 602 is configured to perform feature extraction on the input audio data, and determine vibro-demand data.
[0157] The generation unit 603 is configured to perform vibro-encoding according to the vibro-demand data, and obtain vibro-encoding results.
[0158] The matching unit 604 is configured to perform similarity matching based on the vibro-encoding results, and output target vibro-waveform.
[0159] In some embodiments, the determination unit 602 is specifically configured to perform feature extraction on the input audio data, determine quantifiable data corresponding to each moment of the input audio data, and arrange the quantifiable data corresponding to each moment according to the time dimension to obtain the vibro-demand data.
[0160] In some embodiments, the determination unit 602 is specifically configured to classify the vibro-intensity, and determine a plurality of vibro-data; wherein different categories of vibro-intensity correspond to different vibro-data.
[0161] In some embodiments, the determination unit 602 is specifically configured to determine that the vibro-intensity corresponds to the i-th vibro-data if the vibro-intensity belongs to the i-th intensity category, and determine that the vibro-intensity corresponds to the i+1-th vibro-data if the vibro-intensity belongs to the i+1-th intensity category; wherein i is an integer greater than 0, and the i-th vibro-data is less than the i+1-th vibro-data when the i-th intensity category is lower than the i+1-th intensity category.
[0162] In some embodiments, the determining unit 602 is specifically configured to acquire vibration sensation data corresponding to each time instant of the input audio data; and arrange the vibration sensation data corresponding to each time instant in a time dimension to obtain the vibration sensation demand data.
[0163] In some embodiments, the encoding unit 603 is specifically configured to determine a vibration sensation data change trend between a current time instant and a next time instant in the vibration sensation demand data; and encode the vibration sensation demand data according to the vibration sensation data change trend to obtain the vibration sensation encoding result.
[0164] In some embodiments, the encoding unit 603 is specifically configured to determine that the vibration sensation data change trend is vibration sensation invariable if the vibration sensation data of the current time instant is the same as the vibration sensation data of the next time instant; determine that the vibration sensation data change trend is vibration sensation enhancement if the vibration sensation data of the current time instant is lower than the vibration sensation data of the next time instant; and determine that the vibration sensation data change trend is vibration sensation attenuation if the vibration sensation data of the current time instant is higher than the vibration sensation data of the next time instant.
[0165] In some embodiments, the encoding unit 603 is specifically configured to determine that the vibration sensation encoding result is a first value if the vibration sensation data change trend is vibration sensation invariable; determine that the vibration sensation encoding result is a second value if the vibration sensation data change trend is vibration sensation enhancement; and determine that the vibration sensation encoding result is a third value if the vibration sensation data change trend is vibration sensation attenuation.
[0166] In some embodiments, the first value is equal to 0, the second value is equal to 1, and the third value is equal to 2.
[0167] In some embodiments, the encoding unit 603 is further configured to determine a vibration sensation intensity corresponding to the vibration sensation demand data, encode the vibration sensation intensity; and / or determine a vibration sensation data difference value between the current time instant and the next time instant in the vibration sensation demand data, and encode the vibration sensation demand data according to the vibration sensation data difference value to obtain the vibration sensation encoding result.
[0168] In some embodiments, the matching unit 604 is specifically configured to acquire an encoding result of at least one vibration sensation waveform in a preset waveform library; and perform similarity calculation on the vibration sensation encoding result and the encoding result of the at least one vibration sensation waveform to determine at least one similarity value; and determine the target vibration sensation waveform from the at least one vibration sensation waveform according to the at least one similarity value.
[0169] In some embodiments, the matching unit 604 is specifically configured to select a maximum similarity value from the at least one similarity value; and determine the vibration sensation waveform corresponding to the maximum similarity value as the target vibration sensation waveform.
[0170] It can be understood that, in this embodiment, the "unit" can be a partial circuit, a partial processor, a partial program or software, etc., and of course can also be a module, and can also be non-modular. Moreover, the components in this embodiment can be integrated in a processing unit, or can be physically present as individual units, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.
[0171] The integrated unit, if realized in the form of a software function module and not sold or used as an independent product, can be stored in a computer-readable storage medium, based on such understanding, the technical solutions of the embodiment can be embodied in the form of a software product in essence or in the part that contributes to the prior art or the whole or part of the technical solutions. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in the embodiment. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0172] Therefore, the embodiment provides a computer storage medium storing a waveform matching program, the waveform matching program being executed by at least one processor to implement the steps of the method of any one of the foregoing embodiments.
[0173] Based on the components of the waveform matching device 60 and the computer storage medium, refer to Figure 7 , which shows a specific hardware structure schematic diagram of an electronic device provided by the embodiment of the application. As Figure 7 indicated, the electronic device 70 can include a communication interface 701, a memory 702, and a processor 703; each component is coupled together through a bus system 704. It can be understood that the bus system 704 is used to realize the connection communication between the components. In addition to including a data bus, the bus system 704 also includes a power bus, a control bus, and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 704 in Figure 7 . Among them, the communication interface 701 is used for receiving and sending signals in the information receiving and sending process between other external network elements;
[0174] The memory 702 is used to store computer programs capable of running on the processor 703;
[0175] The processor 703 is configured to execute the following when the computer program is run:
[0176] obtain input audio data;
[0177] perform feature extraction on the input audio data to determine haptic demand data;
[0178] perform haptic encoding according to the haptic demand data to obtain a haptic encoding result;
[0179] perform similarity matching based on the haptic encoding result to output a target haptic waveform.
[0180] It can be understood that the memory 702 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM) used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchronous link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 702 of the system and method described herein is intended to include but not limited to these and any other suitable types of memory.
[0181] The processor 703 can be an integrated circuit chip logic circuit having a processing capability. In implementation, each step of the above method can be completed by integrated logic circuit of hardware in the processor 703 or instruction in the form of software. The processor 703 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, and other mature storage mediums in the art. The storage medium is located in the storage 702, and the processor 703 reads the information in the storage 702 and completes the steps of the above method in combination with the hardware.
[0182] It can be understood that the embodiments described herein can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described in the embodiments of the present application, or a combination thereof.
[0183] For software implementation, the techniques described herein can be implemented with a module (for example, procedures, functions, and so on) that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0184] Optionally, as another embodiment, the processor 703 is further configured to execute the steps of the method in any of the preceding embodiments when running the computer program.
[0185] In some embodiments, referring to Figure 8 , a schematic diagram of a composition structure of an electronic device 70 is shown. As Figure 8 indicated, the electronic device 70 at least includes the waveform matching apparatus 60 in any of the preceding embodiments.
[0186] In the embodiments of the present application, for the electronic device 70, by performing data feature extraction on the input audio data, the vibration sensation demand data is obtained, and the vibration sensation encoding result is performed according to the vibration sensation demand data, so as to match the target vibration sensation waveform similar to the vibration sensation encoding result by the vibration sensation encoding result. In this way, in the scene where the data amount in the preset waveform library is limited, the suitable vibration sensation waveform can still be found according to the similarity matching mode, which not only improves the success rate and efficiency in the waveform matching process, but also saves the data space occupied by the preset waveform library.
[0187] It should be noted that in the present application, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or apparatuses including a series of elements not only include those elements, but also include other elements not explicitly listed, or further include elements inherent to such processes, methods, articles or apparatuses. Without more limitations, the element defined by the statement "including a" does not exclude the presence of additional identical elements in the process, method, article or apparatus including the element.
[0188] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0189] The methods disclosed in the several method embodiments of the present application can be combined arbitrarily without conflict to obtain new method embodiments.
[0190] The features disclosed in the several product embodiments of the present application can be combined arbitrarily without conflict to obtain new product embodiments.
[0191] The features disclosed in the several method or device embodiments of the present application can be combined arbitrarily without conflict to obtain new method or device embodiments.
[0192] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A waveform matching method, characterized in that, The method includes: Get the input audio data; Feature extraction is performed on the input audio data, and time points belonging to the same vibration interval are assigned the same vibration demand data to determine the vibration demand data; Determine the vibration data change trend between the current moment and the next moment in the vibration demand data, and perform vibration coding on the vibration demand data according to the vibration data change trend to obtain the vibration coding result; Based on the vibration coding results, similarity matching is performed to output the target vibration waveform.
2. The method according to claim 1, characterized in that, The step of extracting features from the input audio data to determine the vibration requirement data includes: Feature extraction is performed on the input audio data to determine the quantifiable data corresponding to the input audio data at each time step; The vibration requirement data is obtained by arranging the quantifiable data corresponding to each moment according to the time dimension.
3. The method according to claim 2, characterized in that, When the quantifiable data is vibration intensity, the method further includes: The vibration intensity is classified to determine multiple vibration data; wherein, different categories of vibration intensity correspond to different vibration data.
4. The method according to claim 3, characterized in that, The process of arranging the quantifiable data corresponding to each moment according to the time dimension to obtain the vibration requirement data includes: Obtain the vibration data corresponding to the input audio data at each moment; The vibration requirement data is obtained by arranging the vibration data corresponding to each moment according to the time dimension.
5. The method according to claim 1, characterized in that, Determining the trend of vibration data change between the current moment and the next moment in the vibration demand data includes: If the vibration data at the current moment is the same as the vibration data at the next moment, then the trend of the vibration data change is determined to be that the vibration remains unchanged. If the vibration data at the current moment is lower than the vibration data at the next moment, then the trend of the vibration data change is determined to be an increase in vibration. If the vibration data at the current moment is higher than the vibration data at the next moment, then the trend of the vibration data change is determined to be a decrease in vibration.
6. The method according to claim 5, characterized in that, The step of encoding the vibration demand data according to the vibration data change trend to obtain the vibration encoding result includes: If the vibration data shows a trend of constant vibration, then the vibration encoding result is determined to be the first value; If the vibration data shows an increasing vibration, then the vibration encoding result is determined to be the second value; If the vibration data shows a decreasing vibration, then the vibration encoding result is determined to be the third value.
7. The method according to claim 6, characterized in that, The first value is equal to 0, the second value is equal to 1, and the third value is equal to 2.
8. The method according to claim 1, characterized in that, The step of performing vibration coding based on the vibration requirement data to obtain the vibration coding result further includes: Determine the vibration intensity corresponding to the vibration demand data, and encode the vibration intensity; and / or, Determine the difference in vibration data between the current moment and the next moment in the vibration demand data; The vibration sensing requirement data is encoded based on the difference in the vibration sensing data to obtain the vibration sensing encoding result.
9. The method according to claim 1, characterized in that, The step of performing similarity matching based on the vibration coding result and outputting the target vibration waveform includes: Obtain the encoding result of at least one vibration waveform from the preset waveform library; The similarity between the vibration sensing encoding result and the encoding result of the at least one vibration sensing waveform is calculated to determine at least one similarity value; The target vibration waveform is determined from the at least one vibration waveform based on the at least one similarity value.
10. The method according to claim 9, characterized in that, Determining the target vibration waveform from the at least one vibration waveform based on the at least one similarity value includes: Select the maximum similarity value from the at least one similarity value; The vibration waveform corresponding to the maximum similarity value is determined as the target vibration waveform.
11. A waveform matching device, characterized in that, The waveform matching device includes: The acquisition unit is configured to acquire input audio data; The determining unit is configured to extract features from the input audio data, and assign the same vibration demand data to time points belonging to the same vibration interval, so as to determine the vibration demand data. The encoding unit is configured to determine the vibration data change trend between the current moment and the next moment in the vibration sensing demand data, and to perform vibration encoding on the vibration sensing demand data according to the vibration data change trend to obtain the vibration encoding result. The matching unit is configured to perform similarity matching based on the vibration coding result and output the target vibration waveform.
12. An electronic device, characterized in that, The electronic device includes: Memory is used to store computer programs that can run on a processor; A processor, configured to perform the method as described in any one of claims 1 to 10 when running the computer program.
13. A computer storage medium, characterized in that, The computer storage medium stores a computer program that, when executed by at least one processor, implements the method as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Vibration control method and device and computer readable storage medium
CN112269895A