Bluetooth audio test method and device, electronic equipment and storage medium

Through automated audio data processing and neural network detection methods, the problem of existing Bluetooth audio testing relying on manual operations is solved, and fast, accurate and cost-effective automated testing is achieved.

CN119673200APending Publication Date: 2025-03-21HEFEI LCFC INFORMATION TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411538389.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

Existing Bluetooth audio tests rely on manual operations, which pose a risk of misjudgment, and long-term operation will lose Bluetooth headsets and increase replacement costs.

Method used

By obtaining the audio data stream in the Bluetooth network of the device to be tested, preprocessing and feature extraction, and using a combined neural network model (convolutional neural network and long and short-term memory network) to perform in-depth feature mining and detection, realizing automated testing.

Benefits of technology

Complete automation of Bluetooth audio testing is achieved, significantly shortening testing time, ensuring consistency and accuracy of test standards, avoiding differences in human judgment, and saving testing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119673200A_ABST
    Figure CN119673200A_ABST
Patent Text Reader

Abstract

The invention provides a Bluetooth audio testing method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining an audio data stream played by to-be-tested equipment based on a Bluetooth network of the to-be-tested equipment; performing preprocessing and feature extraction on the audio data stream to obtain an audio feature set; inputting the audio feature set into a combined neural network model, wherein the combined neural network model is fused with a convolutional neural network and a long-short-term memory network; performing deep feature mining on the audio feature set through the convolutional neural network to generate an audio feature vector; and detecting the audio feature vector through a long short-term memory network to obtain a test result of the Bluetooth audio of the to-be-tested device. By applying the method disclosed by the invention, the Bluetooth audio of the to-be-tested equipment can be automatically tested, and the efficiency and the accuracy are relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a Bluetooth audio testing method, device, electronic device and storage medium. Background Art

[0002] In the production process of electronic devices, unpacking and testing of software systems before shipment is a key step in ensuring product quality. This process includes comprehensive testing of software and hardware devices to prevent defective products from entering the market. Verification of the audio playback effect of the Bluetooth module is an important step.

[0003] Current Bluetooth audio testing relies on manual operations, including manually pairing Bluetooth headsets with devices. Then, the audio playback effect is judged by human hearing. This method is complex to operate, relies on human subjective feelings, and has the risk of misjudgment. In addition, long-term pairing, button operation, and other operations on Bluetooth headsets will cause a certain degree of wear and tear on them, and regular replacement of Bluetooth headsets will increase costs. Summary of the invention

[0004] The present disclosure provides a Bluetooth audio testing method, device, electronic device and storage medium to at least solve the above technical problems existing in the prior art.

[0005] According to a first aspect of the present disclosure, a method for testing Bluetooth audio is provided, the method comprising:

[0006] Based on the Bluetooth network of the device under test, obtain the audio data stream played by the device under test;

[0007] Preprocessing and feature extraction are performed on the audio data stream to obtain an audio feature set;

[0008] Inputting the audio feature set into a combined neural network model, wherein the combined neural network model incorporates a convolutional neural network and a long short-term memory network;

[0009] Performing deep feature mining on the audio feature set through the convolutional neural network to generate an audio feature vector;

[0010] The audio feature vector is detected through a long short-term memory network to obtain a test result of the Bluetooth audio of the device under test.

[0011] In one possible implementation, obtaining an audio data stream played by the device under test based on a Bluetooth network of the device under test includes:

[0012] Based on the Bluetooth network of the device under test, an audio and video stream transmission channel is created with the device under test through the AVDTP protocol;

[0013] Based on the audio and video stream transmission channel, receiving the audio data packet sent by the device under test through L2CAP;

[0014] The audio data packet is parsed to obtain an audio data stream played by the device under test.

[0015] In one possible implementation manner, the preprocessing and feature extraction of the audio data stream to obtain an audio feature set includes:

[0016] Cutting and normalizing the audio data stream to obtain preprocessed audio data;

[0017] Feature extraction is performed on the preprocessed audio data to obtain an audio feature set.

[0018] In one possible implementation, each layer of the long short-term memory network includes a preset number of hidden units;

[0019] The detecting the audio feature vector by using a long short-term memory network to obtain a test result of the Bluetooth audio of the device under test includes:

[0020] Capturing the temporal characteristics of the audio feature vector through the hidden unit;

[0021] Processing the time series features to obtain the output of the long short-term memory network;

[0022] The output of the long short-term memory network is input into the fully connected layer to obtain the test result of the Bluetooth audio of the device under test.

[0023] In one possible implementation manner, inputting the output of the long short-term memory network into a fully connected layer to obtain a test result of the Bluetooth audio of the device under test includes:

[0024] Converting the output of the long short-term memory network into classification probability through the fully connected layer;

[0025] Based on the classification probability, a test result of the Bluetooth audio of the device under test is obtained.

[0026] In one possible implementation, converting the output of the long short-term memory network into a classification probability through the fully connected layer includes:

[0027] In the fully connected layer, weighted summing is performed on the outputs of the long short-term memory network to obtain a weighted summing result;

[0028] The weighted sum result is processed by an activation function to obtain the classification probability.

[0029] In one embodiment, the method further comprises:

[0030] A performance evaluation is performed on the combined neural network model to obtain a performance evaluation index, wherein the performance evaluation index is used to characterize the test capability of the combined neural network model.

[0031] According to a second aspect of the present disclosure, a Bluetooth audio testing device is provided, the device comprising:

[0032] An audio receiving module, used to obtain the audio data stream played by the device under test based on the Bluetooth network of the device under test;

[0033] An audio analysis module, used for preprocessing and extracting features from the audio data stream to obtain an audio feature set;

[0034] The audio analysis module is further used to input the audio feature set into a combined neural network model, wherein the combined neural network model integrates a convolutional neural network and a long short-term memory network;

[0035] The audio analysis module is further used to perform deep feature mining on the audio feature set through the convolutional neural network to generate an audio feature vector;

[0036] The audio analysis module is also used to detect the audio feature vector through a long short-term memory network to obtain a test result of the Bluetooth audio of the device under test.

[0037] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0038] at least one processor; and

[0039] a memory communicatively connected to the at least one processor; wherein,

[0040] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.

[0041] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the present disclosure.

[0042] The present invention discloses a test method, device, electronic device and storage medium for Bluetooth audio. First, the audio data stream played by the device to be tested is obtained through the Bluetooth network. Then, the audio data stream is feature extracted to obtain an audio feature set. The audio feature set is then input into a combined neural network model formed by a fusion of a convolutional neural network and a long short-term memory network. The audio feature set is analyzed by the combined neural network model to obtain the test results of the Bluetooth audio. According to the scheme disclosed in the present invention, the Bluetooth audio test is fully automated. Not only does it significantly shorten the test time, it also ensures the consistency and accuracy of the test standards, and avoids differences in human judgment. In addition, this scheme does not require the use of testing equipment such as Bluetooth headsets, saving testing costs.

[0043] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0045] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0046] Figure 1 The following is a schematic diagram showing the implementation process of a Bluetooth audio testing method according to an embodiment of the present disclosure. Figure 1 ;

[0047] Figure 2 A schematic diagram showing a test result of an embodiment of the present disclosure Figure 1 ;

[0048] Figure 3 A schematic diagram showing a test result of an embodiment of the present disclosure Figure 2 ;

[0049] Figure 4 A schematic diagram of an audio stream transmission process according to an embodiment of the present disclosure is shown;

[0050] Figure 5 A normal audio waveform diagram of an embodiment of the present disclosure is shown;

[0051] Figure 6 An abnormal audio waveform diagram according to an embodiment of the present disclosure is shown;

[0052] Figure 7 A schematic diagram showing the structure of a Bluetooth audio test device according to an embodiment of the present disclosure is shown;

[0053] Figure 8 A schematic diagram of an implementation scenario of the embodiment of the present disclosure is shown;

[0054] Fig. 9 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0055] In order to make the purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0056] According to a first aspect of an embodiment of the present disclosure, a method for testing Bluetooth audio is provided. Figure 1 A schematic diagram of the implementation process of a Bluetooth audio testing method according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method comprises the following steps:

[0057] Step 101: Acquire an audio data stream played by the device under test based on the Bluetooth network of the device under test.

[0058] The device under test can be a laptop, desktop computer or any other device with Bluetooth audio playback capability. First, establish a Bluetooth connection between the test environment and the device under test. Then, obtain the audio data being played from the device under test through the Bluetooth network to obtain the audio data stream.

[0059] Step 102: preprocess and extract features from the audio data stream to obtain an audio feature set.

[0060] First, the audio data stream is preprocessed, which mainly includes trimming the beginning and end of the audio data stream, removing unnecessary silence or transition parts, and ensuring the purity and pertinence of the audio analysis. Then, normalization is performed, mainly to adjust the amplitude range of the audio data to adapt it to a unified scale, reduce the differences between data, and facilitate subsequent processing and analysis.

[0061] After preprocessing, feature extraction is performed on the preprocessed audio data stream. This step is to convert the audio signal into a series of representative values ​​or vectors that can reflect the essential characteristics of the audio. In the feature extraction stage, a variety of methods can be used to extract audio features from the preprocessed audio data stream to construct an audio feature set. These features include but are not limited to time domain features, such as mean (reflecting the average level of the audio signal), standard deviation (measuring the degree of fluctuation of the audio signal), zero crossing rate (indicating the frequency of the signal crossing the zero axis, reflecting the activity of the audio), short-time energy (reflecting the change of the energy of the audio signal over time), etc. Or frequency domain features, through Fourier transform, the time domain signal is converted to the frequency domain to obtain the spectral features that characterize the frequency distribution and energy distribution of the audio signal. And time-frequency domain features, such as Mel spectrum, Mel spectrum coefficients, and short-time Fourier change. The extraction of these features provides an effective information basis for subsequent audio analysis, recognition or evaluation, forming an audio feature set.

[0062] Step 103: input the audio feature set into a combined neural network model, wherein the combined neural network model integrates a convolutional neural network and a long short-term memory network.

[0063] The audio feature set is input into the combined neural network model, which combines the advantages of convolutional neural networks (CNN) and long short-term memory networks (LSTM). The core structure of the combined neural network model is based on two core components: On the one hand, the convolutional neural network is good at extracting spatial features from spectrum images. It is highly sensitive to detecting irregular patterns in audio signals, such as intermittent sound quality problems and burst noise. By converting audio signals into spectrograms, convolutional neural networks can accurately identify patterns and anomalies in audio features and effectively distinguish normal audio from problematic audio segments. On the other hand, the long short-term memory network is good at processing time series data. By analyzing the time feature sequence in the audio signal, it can accurately evaluate the continuity of the playback effect. Therefore, the combined neural network model can simultaneously process the characteristics of audio signals in both spatial and temporal dimensions, significantly improving the accuracy and comprehensiveness of audio anomaly detection. It is also adaptable to different types of audio anomalies and has high robustness.

[0064] Step 104: perform deep feature mining on the audio feature set through the convolutional neural network to generate an audio feature vector.

[0065] The audio feature dataset is input into the combined neural network model. First, the convolutional neural network performs deep feature extraction on the audio feature set, extracting useful high-level semantic information from the original audio features. These feature information are then encoded to obtain the audio feature vector.

[0066] Step 105: Detect the audio feature vector through a long short-term memory network to obtain a test result of the Bluetooth audio of the device under test.

[0067] The audio feature vector is processed through the long short-term memory network to capture the temporal relationship. The feature vector is further analyzed and processed by the LSTM layer, and the model can learn the dynamic change patterns and potential laws in the audio signal. Finally, the output of the LSTM network is passed to the fully connected layer, which maps these high-level features to specific classification labels, such as normal playback and abnormal playback, so as to obtain the Bluetooth audio test results of the device under test. For example Figure 2 , Figure 3 As shown, Figure 2 The "Test FAIL" in the dotted box indicates that the test result of the Bluetooth audio is failed. Figure 3 The "Test PASS" in the dotted box indicates that the test result of the Bluetooth audio has passed.

[0068] The Bluetooth audio test method of this embodiment realizes the full automation of Bluetooth audio test. The test time is significantly shortened. After testing, the test time is reduced from the original 65 seconds to 30 seconds. The consistency and accuracy of the test standard are also ensured through the application of standardized algorithms, avoiding differences in human judgment. In addition, this solution does not require the use of test equipment such as Bluetooth headsets, saving test costs.

[0069] In one embodiment of the present disclosure, based on the Bluetooth network of the device under test, an audio data stream played by the device under test is obtained, which can be specifically achieved through the following technical means: based on the Bluetooth network of the device under test, an audio and video stream transmission channel is created with the device under test through the AVDTP protocol; based on the audio and video stream transmission channel, an audio data packet sent by the device under test is received through L2CAP; the audio data packet is parsed to obtain the audio data stream played by the device under test.

[0070] Specifically, Figure 4As shown, at the audio source end (i.e., the device under test end), the audio data is first encoded into a format suitable for wireless transmission. In order to protect the audio data from being intercepted or eavesdropped by unauthorized devices, the audio data can be encrypted so that the encrypted audio data can only be decrypted by the test device. AVDTP (Audio / Video Distribution Transport Protocol) is a Bluetooth protocol used to transmit audio between the device under test and the test device end to ensure the correct encapsulation and transmission of audio data. L2CAP (Logical Link Control and Transport Protocol Layer) is responsible for providing functions such as data segmentation, reorganization, quality service and protocol multiplexing, and is the basis for the AVDTP upper layer protocol to transmit audio data. L2CAP at the audio receiving end, as the basic protocol layer for data transmission, is also responsible for receiving and processing data from the audio source end. AVDTP is responsible for parsing the received audio data and passing it to the next layer for processing. If the audio data is encrypted before transmission, the receiving end needs to decrypt it to restore the original audio data. Finally, the decoder converts the encoded audio data back to the original audio format so that it can be played by the playback device.

[0071] During the Bluetooth audio transmission process, the data packet format changes as the steps progress. The initial data packet format only contains the media payload (Media PL), that is, the audio data itself. As the steps progress, the content protection header (CP), media packet header (MP) and L2CAP header are added to the data packet. The content protection header is used to protect the audio data from unauthorized access and tampering; the media packet header contains metadata about the audio data, such as timestamp, payload type, etc.; the L2CAP header contains key information about the packet length, channel identification, etc., which is used to ensure that the data packet can be correctly transmitted and received between Bluetooth devices.

[0072] The Bluetooth audio transmission method of this embodiment fully considers the transmission efficiency, security and integrity of audio data. Through the processing of encoding, encryption, AVDTP and L2CAP protocol layers, audio data can be transmitted from the device under test to the test device in an efficient and secure manner.

[0073] In one embodiment of the present disclosure, the preprocessing and feature extraction of the audio data stream to obtain an audio feature set includes: cropping and normalizing the audio data stream to obtain preprocessed audio data; and extracting features from the preprocessed audio data to obtain an audio feature set.

[0074] First, the beginning and end of the audio data stream are trimmed to remove unnecessary silence or noise, ensuring that only audio clips related to the test task are retained to reduce the amount of calculation. Then the audio data is normalized to adjust the amplitude of the audio data to a specific range. To eliminate the amplitude difference between different audio data. Feature extraction is performed on the audio data after trimming and normalization. In terms of time domain features, features such as mean, standard deviation, zero overrate and short-time energy can be extracted. These features can reflect the waveform and amplitude changes of the audio signal and can be used to distinguish different sounds. In terms of frequency domain features, Fourier transform can be used to convert the audio signal from the time domain to the frequency domain to obtain spectral features. Spectral features can reflect the frequency distribution and spectral characteristics of the audio signal and can be used to identify sounds with different frequency components. There are also time-frequency domain features, for example, Mel spectrum and Mel frequency cepstral coefficients are features extracted by simulating the auditory features of the human ear. Short-time Fourier transform can provide information in both the time domain and the frequency domain, and can capture dynamic changes in audio signals.

[0075] This embodiment can convert audio data into a form more suitable for model use by cropping, normalizing, and extracting time domain, frequency domain, and time-frequency domain features, thereby providing a basis for subsequent audio analysis.

[0076] In one embodiment of the present disclosure, each layer of the long short-term memory network includes a preset number of hidden units; the audio feature vector is detected by the long short-term memory network to obtain the test result of the Bluetooth audio of the device under test, which can be specifically achieved by the following technical means: the timing characteristics of the audio feature vector are captured by the hidden unit; the timing characteristics are then processed to obtain the output of the long short-term memory network; the output of the long short-term memory network is input into the fully connected layer to obtain the test result of the Bluetooth audio of the device under test.

[0077] First, the preprocessed audio feature vector is input into the hidden unit of the LSTM network. The preset number of hidden units is determined according to the specific task. These feature vectors contain the time domain, frequency domain or time-frequency domain information of the audio signal, and the LSTM hidden unit is responsible for capturing the timing features therein. Then, the LSTM network processes these timing features through its gating mechanism to deal with the long-term dependency problem in the sequence data and filter out the information that is critical for subsequent analysis. Then, the output of the LSTM network is passed to the fully connected layer. The fully connected layer maps the output of the LSTM network to a specific test result space through linear transformation and nonlinear activation, which can be realized as a quantitative score of audio quality, a judgment of the existence of a specific sound event, etc. Then, the test results of Bluetooth audio are obtained.

[0078] In one embodiment of the present disclosure, the output of the long short-term memory network is input into a fully connected layer to obtain a test result of the Bluetooth audio of the device under test, including: converting the output of the long short-term memory network into a classification probability through the fully connected layer; and obtaining the test result of the Bluetooth audio of the device under test based on the classification probability.

[0079] Specifically, the output of the LSTM network is input into the fully connected layer. In the fully connected layer, the output of the LSTM network first undergoes a linear transformation, that is, the weight and bias parameters between each output node and the neurons in the fully connected layer are weighted summed. Then, the result of the linear transformation is activated by a nonlinear activation function, such as the softmax function, to obtain the classification probability. The classification probability represents the possibility that the Bluetooth audio of the device under test belongs to each category. For example, in the audio quality assessment task, the classification probability may represent the probability that the audio belongs to categories such as "normal" and "abnormal". Finally, based on these classification probabilities, the test results of the Bluetooth audio are determined. Usually, the category with the highest classification probability is selected as the final test result. For example, if the classification probability of the "normal" category is the highest, then it can be determined that the Bluetooth audio of the device under test is normal.

[0080] In one embodiment of the present disclosure, the combined neural network model can be trained by the following steps:

[0081] Step 201, data preparation:

[0082] First, normal and abnormal samples of Bluetooth audio playback are collected. Abnormal samples include various types of intermittent phenomena and noise. Then, in order to enhance the diversity of the data set and improve the robustness of the model, the collected samples are enhanced, including adding background noise to the samples, adjusting the volume, etc. Finally, the data is labeled, that is, each audio sample is clearly labeled to indicate whether it has intermittent or noise problems. The samples and their labels shown in Table 1 below can be obtained, where LS692_Recording1.wav is normal audio, LS692_Recording2.wav is audio with noise, LS692_Recording3.wav is normal audio, and LS692_Recording4.wav is audio with intermittent sound segments.

[0083] Sound Samples Label LS692_Recording1.wav normal LS692_Recording2.wav Noise LS692_Recording3.wav normal LS692_Recording4.wav Intermittent …… ……

[0084] Table 1

[0085] Then, the collected sound samples are read one by one, and the audio files are converted into digital signals. The processed digital signals are then merged into a complete data set.

[0086] The preprocessing of the data set mainly includes two steps: one is to trim the opening and end of the sound data to remove unnecessary silence or noise; the other is to normalize the sound data to ensure that all data are in the same numerical range, thereby improving the training effect and accuracy of the model. Figure 5 A normal audio waveform is shown. Figure 6 An abnormal audio waveform is shown.

[0087] Next, feature extraction is performed on the preprocessed data set to convert the audio signal into features that can be recognized by the machine learning model. This includes various types of features, such as time domain features (such as mean, standard deviation, zero-overrate, short-time energy, etc.), frequency domain features (such as spectrum features obtained through Fourier transform), and time-frequency domain features (such as Mel spectrum, Mel frequency cepstral coefficients, short-time Fourier transform, etc.). These features can reflect different aspects of the audio signal and provide rich information for subsequent model training.

[0088] After feature extraction, the entire dataset is divided into a training set and a test set. Specifically, 70% is used as a training set for model training and optimization, and the remaining 30% is used as a test set to evaluate the performance and accuracy of the model.

[0089] Step 202, model selection:

[0090] A combined model of CNN and LSTM was selected. The CNN part uses the HuBERT model, which performs well in extracting spatial features of spectrum images. By converting audio signals into spectrograms, HuBERT can identify anomalies in audio features, especially irregularities in audio signals, such as intermittent and burst noise. The LSTM part is good at processing time series data and can capture the timing information in audio signals. This is crucial for detecting continuity and long-term noise in audio playback. By analyzing the time series characteristics of audio signals, LSTM can evaluate the continuity of playback effects. Therefore, the combined neural network model formed by CNN and LSTM has good comprehensiveness and robustness. Comprehensiveness is reflected in the ability to simultaneously process the time-frequency characteristics of audio signals, combining the advantages of CNN and LSTM to provide higher detection accuracy. Robustness is reflected in the ability to adapt to different types of audio anomalies, such as short intermittent and continuous noise, thereby improving the stability and reliability of the model.

[0091] Step 203, model implementation:

[0092] The specific implementation process is that the audio data is first extracted through the HuBERT model, and the generated feature vector is then passed to the LSTM network as input. Use the torch module to define the architecture of the LSTM network, set its input dimension to the dimension of the HuBERT output feature, and set the number of hidden units according to the specific task. The LSTM layer contains one or more LSTM layers, which are used to capture the timing characteristics of the audio signal. Each LSTM layer contains a certain number of hidden units to capture the complex patterns of the audio sequence. To prevent the model from overfitting, a Dropout layer is added after the LSTM layer. Finally, the fully connected layer maps the output of the LSTM to classification labels, such as normal playback and abnormal playback, thereby completing the task of Bluetooth audio detection.

[0093] Step 204, model evaluation:

[0094] Use the test set to evaluate the performance of the model and obtain performance evaluation indicators. Performance evaluation indicators can include the accuracy, precision, recall and F1 score (the harmonic mean of precision and recall) of the model.

[0095] Among them, the precision rate is the ratio of the number of samples correctly predicted by the model to the total number of samples, which measures the overall prediction ability of the model. Its calculation formula is: The accuracy provides the overall performance of the model on all samples.

[0096] The precision rate is the ratio of the number of samples predicted by the model as positive samples and correctly predicted to the number of samples predicted by the model as positive samples. It reflects the reliability of the model's prediction of positive samples, and its calculation formula is: The higher the precision, the more accurate the representation model is in predicting positive samples and the fewer false positives.

[0097] The recall rate is the ratio of the number of samples predicted by the model as positive samples and correctly predicted to all actual positive samples. It reflects the ability of the model to find positive samples, and its calculation formula is: The higher the recall, the more positive samples the representation model can identify.

[0098] The F1 score is the harmonic mean of precision and recall, which is used to strike a balance between precision and recall. The calculation formula is as follows: The F1 score takes into account both precision and recall and is suitable for unbalanced datasets. It can strike a balance between the two and provide a comprehensive performance evaluation.

[0099] Among them, “True Positives (TP)” is the number of positive samples correctly predicted by the model, “False Positives (FP)” is the number of positive samples incorrectly predicted by the model, and “False Negatives (FN)” is the number of negative samples incorrectly predicted by the model.

[0100] By obtaining the above indicators, we can get the performance evaluation information of the model. For example, a high accuracy rate indicates that the model has strong overall prediction ability, a high precision rate indicates that the model has high reliability in predicting positive samples, a high recall rate indicates that the model can find most of the positive samples, and a high F1 score means that the model has achieved a good balance between precision and recall.

[0101] According to a second aspect of an embodiment of the present disclosure, a Bluetooth audio testing device is provided. Figure 7 A schematic diagram of the structure of a Bluetooth audio test device according to an embodiment of the present disclosure is shown. Figure 7 As shown, the device includes the following modules:

[0102] The audio receiving module 701 is used to obtain the audio data stream played by the device under test based on the Bluetooth network of the device under test;

[0103] An audio analysis module 702 is used to preprocess and extract features from the audio data stream to obtain an audio feature set;

[0104] The audio analysis module 702 is further used to input the audio feature set into a combined neural network model, wherein the combined neural network model integrates a convolutional neural network and a long short-term memory network;

[0105] The audio analysis module 702 is further used to perform deep feature mining on the audio feature set through the convolutional neural network to generate an audio feature vector;

[0106] The audio analysis module 702 is further configured to detect the audio feature vector through a long short-term memory network to obtain a test result of the Bluetooth audio of the device under test.

[0107] In one embodiment of the present disclosure, the audio receiving module 701 is also used to create an audio and video stream transmission channel with the device under test through the AVDTP protocol based on the Bluetooth network of the device under test; based on the audio and video stream transmission channel, receive the audio data packet sent by the device under test through L2CAP; parse the audio data packet to obtain the audio data stream played by the device under test.

[0108] In one embodiment of the present disclosure, the audio analysis module 702 is further used to crop and normalize the audio data stream to obtain preprocessed audio data; and perform feature extraction on the preprocessed audio data to obtain an audio feature set.

[0109] In one embodiment of the present disclosure, the audio analysis module 702 is further used to capture the timing characteristics of the audio feature vector through the hidden unit; process the timing characteristics through a long short-term memory network to obtain the output of the long short-term memory network; input the output of the long short-term memory network to the fully connected layer to obtain the test result of the Bluetooth audio of the device under test.

[0110] In one embodiment of the present disclosure, the audio analysis module 702 is further used to capture the timing characteristics of the audio feature vector through the hidden unit; process the timing characteristics through a long short-term memory network to obtain the output of the long short-term memory network; input the output of the long short-term memory network to the fully connected layer to obtain the test result of the Bluetooth audio of the device under test.

[0111] In one embodiment of the present disclosure, the audio analysis module 702 is further used to convert the output of the long short-term memory network into a classification probability through the fully connected layer; and obtain the test result of the Bluetooth audio of the device under test based on the classification probability.

[0112] In one embodiment of the present disclosure, the audio analysis module 702 is further used to perform weighted summation on the output of the long short-term memory network in the fully connected layer to obtain a weighted summation result; and process the weighted summation result through an activation function to obtain the classification probability.

[0113] In one embodiment of the present disclosure, the device also includes an evaluation module (not shown in the figure) for performing performance evaluation on the combined neural network model to obtain a performance evaluation index, and the performance evaluation index is used to characterize the test capability of the combined neural network model.

[0114] Figure 8 A schematic diagram of an implementation scenario of the present disclosure is shown. Figure 8 As shown in the figure, the scenario includes the device under test and the test device. The device under test includes the automated test tool. Ensure that the device under test and the test device function normally and the Bluetooth driver has been installed and updated. Select and determine the audio file to be played, and ensure that the file format, size, and quality meet the test requirements.

[0115] First, the audio receiving module starts the Bluetooth automatic pairing monitoring service and the Bluetooth audio receiving service to ensure that the service has been successfully started and can normally monitor and receive Bluetooth connection requests. The automated test tool in the device under test turns on the Bluetooth function of the test machine and forces Bluetooth pairing with the test device. Check whether the test device receives the Bluetooth pairing completion message to ensure that the pairing is successful.

[0116] Then the automated test tool starts playing the specified audio file on the host computer and selects the connected Bluetooth module as the playback module. The audio receiving module receives the audio data of the device under test through the Bluetooth network. It is then transmitted to the audio analysis module for detection to obtain the test results. Finally, the test results are returned to the audio receiving module. The test results are sorted and saved to a storage location.

[0117] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.

[0118] Fig. 9 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0119] like Fig. 9 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0120] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0121] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the test method for Bluetooth audio. For example, in some embodiments, the test method for Bluetooth audio may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the test method for Bluetooth audio described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the test method for Bluetooth audio in any other appropriate manner (e.g., by means of firmware).

[0122] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0123] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0124] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0126] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0127] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0128] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0129] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0130] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for testing Bluetooth audio, characterized in that: The method comprises: Based on the Bluetooth network of the device under test, obtain the audio data stream played by the device under test; Preprocessing and feature extraction are performed on the audio data stream to obtain an audio feature set; Inputting the audio feature set into a combined neural network model, wherein the combined neural network model incorporates a convolutional neural network and a long short-term memory network; Performing deep feature mining on the audio feature set through the convolutional neural network to generate an audio feature vector; The audio feature vector is detected through a long short-term memory network to obtain a test result of the Bluetooth audio of the device under test.

2. The method according to claim 1, characterized in that: The obtaining of the audio data stream played by the device under test based on the Bluetooth network of the device under test includes: Based on the Bluetooth network of the device under test, an audio and video stream transmission channel is established with the device under test through the audio and video distribution transmission protocol AVDTP; Based on the audio and video stream transmission channel, receiving the audio data packet sent by the device under test through the logical link control and adaptation protocol layer L2CAP; The audio data packet is parsed to obtain an audio data stream played by the device under test.

3. The method according to claim 1, characterized in that The preprocessing and feature extraction of the audio data stream to obtain an audio feature set includes: Cutting and normalizing the audio data stream to obtain preprocessed audio data; Feature extraction is performed on the preprocessed audio data to obtain an audio feature set.

4. The method according to claim 1, characterized in that: Each layer of the LSTM network includes a preset number of hidden units; The detecting the audio feature vector by using a long short-term memory network to obtain a test result of the Bluetooth audio of the device under test includes: Capturing the temporal characteristics of the audio feature vector through the hidden unit; Processing the time series features to obtain the output of the long short-term memory network; The output of the long short-term memory network is input into the fully connected layer to obtain the test result of the Bluetooth audio of the device under test.

5. The method according to claim 4, characterized in that The step of inputting the output of the long short-term memory network into a fully connected layer to obtain a test result of the Bluetooth audio of the device under test includes: Converting the output of the long short-term memory network into classification probability through the fully connected layer; Based on the classification probability, a test result of the Bluetooth audio of the device under test is obtained.

6. The method according to claim 5, characterized in that The step of converting the output of the long short-term memory network into classification probability through the fully connected layer includes: In the fully connected layer, weighted summing is performed on the outputs of the long short-term memory network to obtain a weighted summing result; The weighted sum result is processed by an activation function to obtain the classification probability.

7. The method according to claim 1, characterized in that The method further comprises: A performance evaluation is performed on the combined neural network model to obtain a performance evaluation index, wherein the performance evaluation index is used to characterize the test capability of the combined neural network model.

8. A Bluetooth audio testing device, characterized in that: The device comprises: An audio receiving module, used to obtain the audio data stream played by the device under test based on the Bluetooth network of the device under test; An audio analysis module, used for preprocessing and extracting features from the audio data stream to obtain an audio feature set; The audio analysis module is further used to input the audio feature set into a combined neural network model, wherein the combined neural network model integrates a convolutional neural network and a long short-term memory network; The audio analysis module is further used to perform deep feature mining on the audio feature set through the convolutional neural network to generate an audio feature vector; The audio analysis module is also used to detect the audio feature vector through a long short-term memory network to obtain a test result of the Bluetooth audio of the device under test.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-7.

Citation Information

Cited By

  • Earphone-based snore processing method, earphone and storage medium

    CN120568246A