Method and system for repairing audio data loss in AI recording scenarios

By using timestamps and verification codes to detect lost data in AI recording scenarios, combined with machine learning and device status matching recovery algorithms, the problem of audio data loss is solved, real-time repair and quality optimization of audio data are achieved, and user experience is improved.

CN119943090BActive Publication Date: 2025-09-02SHENZHEN BEIBO INTELLIGENT TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510430060.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-09-02
Estimated Expiration
2045-04-08

AI Technical Summary

Technical Problem

In AI recording scenarios, audio data loss leads to playback interruption and sound quality degradation, lacking efficient and intelligent real-time repair solutions, affecting the user experience.

Method used

By detecting lost data based on integrity based on timestamps and verification codes, using machine learning algorithms to identify the location and amount of lost data, combining AI device status matching with appropriate audio data recovery algorithm for data recovery, and optimizing audio quality through spectrum analysis.

Benefits of technology

Real-time detection and repair of audio data in AI recording scenarios is realized, improving the stability and user experience of audio applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119943090B_ABST
    Figure CN119943090B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for repairing audio data loss in an AI recording scenario, including: obtaining audio data from an AI device in a recording scenario; verifying the audio data based on the integrity of a timestamp and a checksum, and marking the audio segment of the lost data; performing in-depth analysis on the marked audio segment of the lost data to determine the specific location of the lost data in the audio segment and the amount of lost data; obtaining the device status of the AI ​​device, matching the corresponding audio data recovery algorithm based on the device status, and performing data recovery on the audio segment where the lost data is located to obtain preliminary recovered audio data; performing quality optimization processing based on spectrum analysis on the preliminary recovered audio data to obtain target audio data that meets playback requirements. In the present invention, in a recording scenario, whether there is lost data is detected in real time, and the lost data is repaired in real time, overcoming the current defect of being unable to repair lost audio data in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of speech processing, and in particular to a method and system for repairing audio data loss in an AI recording scenario. Background Art

[0002] With the widespread adoption of Android devices for multimedia applications like audio playback and recording, audio data loss has become a major pain point in user experience. Data loss or corruption can occur during audio transmission, storage, or processing, leading to playback interruptions and reduced sound quality.

[0003] Currently, there is a lack of an efficient and intelligent solution that cannot repair lost audio data in real time, affecting the stability of audio applications and user experience. Summary of the Invention

[0004] The main purpose of the present invention is to provide a method and system for repairing audio data loss in an AI recording scenario, aiming to overcome the defect that the lost audio data cannot be repaired in real time.

[0005] To achieve the above objectives, the present invention provides a method for repairing audio data loss in an AI recording scenario, comprising the following steps:

[0006] Obtain audio data from AI devices in recording scenarios;

[0007] Verifying the audio data based on the integrity of the timestamp and the check code, and marking the audio segments with missing data;

[0008] Perform in-depth analysis on the audio clips marked with missing data to determine the specific location and amount of missing data in the audio clips;

[0009] Obtain the device status of the AI ​​device, match the corresponding audio data recovery algorithm based on the device status, and recover the audio segment containing the lost data to obtain preliminary recovered audio data;

[0010] The initially restored audio data is subjected to quality optimization processing based on spectrum analysis to obtain target audio data that meets playback requirements.

[0011] Furthermore, the audio data is verified based on the integrity of the timestamp and the check code, including:

[0012] Timestamping the audio data at fixed time intervals, dividing the audio data into a plurality of data blocks, and generating a check code for each data block;

[0013] By comparing the continuity of adjacent timestamps and the correctness of the check code, it is determined whether the audio data is complete. If the timestamp is interrupted or the check code is wrong, the corresponding audio segment is marked as an audio segment with lost data.

[0014] Furthermore, an in-depth analysis is performed on the audio clips marked with lost data to determine the specific location and amount of lost data in the audio clips, including:

[0015] Using machine learning algorithms, the frequency, amplitude, and phase characteristics of audio clips are extracted, and the characteristic differences between normal audio and audio clips with lost data are identified, thereby determining the specific location and amount of lost data.

[0016] Furthermore, data recovery is performed on the audio segment containing the lost data to obtain preliminary recovered audio data, including:

[0017] The audio data within a preset range before and after the lost data is input into the audio data recovery algorithm, and the audio data recovery algorithm fills or reconstructs the lost part to obtain preliminary recovered audio data.

[0018] Furthermore, the audio data of the AI ​​device in the recording scenario is obtained, including:

[0019] Start the recording program of the AI ​​device, put the recording and noise reduction operations into the same independent thread for processing, and extract the recording operation into an independent process; transfer data through AIDL to obtain the audio data obtained by recording;

[0020] The audio data obtained from the recording is stored based on the buffer pool, and another thread is opened to reduce the noise of the audio data in the buffer pool to obtain the audio data in the recording scene.

[0021] Furthermore, the audio data recovery algorithm corresponding to the device state matching includes:

[0022] Inputting the device status into a deep neural network model, the device status including network connection quality, remaining storage space, current CPU load rate, and memory idle rate;

[0023] In the hidden layer of the deep neural network model, a structure of alternating multiple convolutional layers and pooling layers is set; the convolutional layer uses convolution kernels of different sizes to extract features of the input device status and capture the correlation between device states at different scales; the pooling layer uses the maximum pooling operation to reduce the dimension of the features extracted by the convolutional layer to obtain key features.

[0024] After multiple convolution and pooling operations, the data is input into the fully connected layer for processing, mapping the processed feature data to the index space of multiple preset audio data recovery algorithms, and outputting the probability value of each recovery algorithm being selected;

[0025] The recovery algorithm with the largest probability value is selected as the corresponding audio data recovery algorithm.

[0026] Furthermore, after obtaining the target audio data that meets the playback requirements, the method further includes:

[0027] Comparing difference information in multiple dimensions between the audio data in the recording scenario and the target audio data that meets the playback requirements;

[0028] Constructing a data matrix based on the difference information; obtaining device information of the AI ​​device and constructing it into a character matrix; extracting matrix features of multiple dimensions of the data matrix and the character matrix;

[0029] Performing mutation processing on the character matrix based on the data matrix to obtain a mutation matrix;

[0030] A management authority code is generated based on the variation matrix and matrix features of multiple dimensions to perform authority management on the audio data that meets the playback requirements.

[0031] Furthermore, performing mutation processing on the character matrix based on the data matrix to obtain a mutation matrix includes:

[0032] Performing quantum state encoding processing on the data matrix and the character matrix, mapping the elements in the data matrix and the character matrix to different quantum states of quantum bits, respectively, to obtain a quantum encoding matrix pair;

[0033] Using quantum superposition and entanglement properties, a quantum entanglement operation is performed on the quantum coding matrix pair to generate an entangled quantum matrix;

[0034] Performing a customized transformation on the entangled quantum matrix through a sequence of quantum gate operations to obtain a variant quantum matrix; the sequence of quantum gate operations is generated based on algorithmic rules that change dynamically over time;

[0035] Performing quantum measurement decoding processing on the variation quantum matrix to obtain a variation matrix.

[0036] Furthermore, generating a management authority code based on the variation matrix and matrix features of multiple dimensions includes:

[0037] Combining the variation matrix and matrix features of multiple dimensions into a high-dimensional vector, and converting the high-dimensional vector into a polynomial function using a polynomial fitting algorithm;

[0038] Based on the polynomial function, a corresponding two-dimensional curve is drawn on a two-dimensional plane;

[0039] Constructing a three-dimensional surface graph in a three-dimensional space according to the coefficients and degrees of the polynomial function;

[0040] Performing feature extraction on the polynomial function, the two-dimensional curve, and the three-dimensional surface graph, and combining the extracted features into a combined feature vector;

[0041] The combined feature vector is encrypted based on a chaotic encryption algorithm to obtain a ciphertext; and the ciphertext is binary-encoded to obtain the management authority code.

[0042] The present invention also provides a system for repairing audio data loss in an AI recording scenario, comprising:

[0043] The acquisition module is used to obtain audio data from AI devices in recording scenarios;

[0044] A verification module, configured to verify the audio data based on the integrity of the timestamp and the check code, and mark the audio segments with missing data;

[0045] An analysis module is used to perform in-depth analysis on the audio clips marked with lost data to determine the specific location and amount of lost data in the audio clips;

[0046] A recovery module is used to obtain the device status of the AI ​​device, match the corresponding audio data recovery algorithm based on the device status, and recover the audio segment containing the lost data to obtain preliminary recovered audio data;

[0047] The optimization module is used to perform quality optimization processing on the initially restored audio data based on spectrum analysis to obtain audio data that meets playback requirements.

[0048] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0049] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0050] The present invention provides a method and system for repairing audio data loss in an AI recording scenario, including: obtaining audio data from an AI device in a recording scenario; verifying the audio data based on the integrity of a timestamp and a checksum, and marking the audio segment of the lost data; performing an in-depth analysis on the marked audio segment of the lost data to determine the specific location of the lost data in the audio segment and the amount of lost data; obtaining the device status of the AI ​​device, matching a corresponding audio data recovery algorithm based on the device status, and performing data recovery on the audio segment where the lost data is located to obtain preliminarily recovered audio data; performing quality optimization processing based on spectrum analysis on the preliminarily recovered audio data to obtain target audio data that meets playback requirements. In the present invention, in a recording scenario, whether there is lost data is detected in real time, and the lost data is repaired in real time, overcoming the current defect that lost audio data cannot be repaired in real time. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is a schematic diagram of the steps of a method for repairing audio data loss in an AI recording scenario according to one embodiment of the present invention;

[0052] Figure 2 This is a structural block diagram of a system for repairing audio data loss in an AI recording scenario according to one embodiment of the present invention;

[0053] Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0054] The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with embodiments. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0056] Reference Figure 1 In one embodiment of the present invention, a method for repairing audio data loss in an AI recording scenario is provided, comprising the following steps:

[0057] Step S1, obtaining audio data of the AI ​​device in the recording scenario;

[0058] Step S2: verifying the audio data based on the integrity of the timestamp and the check code, and marking the audio segments with missing data;

[0059] Step S3, performing an in-depth analysis on the audio segment with the marked missing data to determine the specific location of the missing data in the audio segment and the amount of missing data;

[0060] Step S4: Obtain the device status of the AI ​​device, match the corresponding audio data recovery algorithm based on the device status, and recover the audio segment containing the lost data to obtain preliminary recovered audio data;

[0061] Step S5: performing quality optimization processing based on spectrum analysis on the preliminarily restored audio data to obtain target audio data that meets playback requirements.

[0062] In this embodiment, as described in step S1 above, obtaining the audio data of the AI ​​device in the recording scenario is to obtain the original data for subsequent processing and is the basis for the entire repair process. Specifically, with the help of the built-in recording function module of the AI ​​device, for example, using recording tools such as AlsaRecord, by setting appropriate parameters (such as sampling rate, number of channels, audio encoding format, etc.) to perform recording operations, the sound signal is converted into digital audio data. Different AI devices may use different recording interfaces or software frameworks, but the core is to collect the sound in the environment and convert it into a processable data format.

[0063] As described in step S2 above, based on the integrity of the timestamp and the check code, the audio data is checked, the audio segments of the lost data are marked, the lost parts of the audio data are identified, and the problem areas are located for subsequent recovery work.

[0064] During the recording process, a timestamp is added to each audio data block to record the order and time of data generation. A checksum, such as a CRC (Cyclic Redundancy Check) or MD5, is also calculated for each data block. During verification, the timestamps of adjacent data blocks are compared for continuity. If the time interval is abnormal, a preliminary determination of data loss is made. The checksum for each data block is then recalculated and compared with the original checksum. If they are inconsistent, a problem is identified with the data block, and the audio clip containing that data block is marked as missing data. This dual verification mechanism improves detection accuracy and avoids false positives.

[0065] As described in step S3 above, the audio clip marked with lost data is deeply analyzed to determine the specific location and amount of lost data in the audio clip, accurately locate the detailed information of the lost data, and provide a basis for selecting an appropriate recovery algorithm.

[0066] Audio signal processing technology and machine learning algorithms are used for analysis. Starting with audio signal characteristics, frequency, amplitude, and phase are extracted, and the differences between normal and lost audio are compared. Simple loss scenarios can be located by analyzing the temporal continuity of the audio signal. Complex loss scenarios are identified using machine learning models (such as convolutional neural networks (CNNs). By learning from a large number of normal and lost audio samples, the model establishes a mapping between features and the location and amount of lost data, enabling accurate analysis of the marked audio segments.

[0067] As described in step S4 above, the device status of the AI ​​device is obtained, the corresponding audio data recovery algorithm is matched based on the device status, and the audio segment where the lost data is located is recovered to obtain preliminarily recovered audio data. Specifically, information such as the network status (such as network connection stability, bandwidth), storage status (remaining storage space, read and write speed), and computing resource status (CPU usage, memory occupancy) of the AI ​​device is obtained. A correspondence between the device status and the recovery algorithm is established. For example, when the network is good, the storage space is sufficient, and the computing resources are abundant, a high-precision recovery algorithm based on a complex model is selected, such as an audio reconstruction algorithm based on deep learning; when device resources are tight, a simple and efficient algorithm is selected, such as a linear interpolation algorithm. After the algorithm is selected, the audio segment where the lost data is located and related information are input into the algorithm, and the preliminarily recovered audio data is obtained after calculation.

[0068] As described in step S5 above, the initially recovered audio data is subjected to quality optimization processing based on spectrum analysis to obtain target audio data that meets the playback requirements. Using spectrum analysis technology, the audio data is converted from the time domain to the frequency domain, and its frequency components and energy distribution are analyzed. By comparing the spectral characteristics of normal audio, the abnormal frequency components or energy deviations in the restored audio are found. The abnormal parts are adjusted and optimized through signal processing methods such as filtering and equalization. For example, a bandpass filter is used to remove high-frequency noise in the restored audio, and an equalizer is used to adjust the volume balance of different frequency bands, so that the optimized audio is closer to normal audio in terms of spectral characteristics, meeting the auditory quality requirements during playback.

[0069] In one embodiment, verifying the audio data based on the integrity of the timestamp and the check code includes:

[0070] Timestamping the audio data at fixed time intervals, dividing the audio data into a plurality of data blocks, and generating a check code for each data block;

[0071] By comparing the continuity of adjacent timestamps and the correctness of the check code, it is determined whether the audio data is complete. If the timestamp is interrupted or the check code is wrong, the corresponding audio segment is marked as an audio segment with lost data.

[0072] In this embodiment, during the audio data acquisition or transmission process, a timestamp is added to the audio data at a pre-set fixed time interval (e.g., every 10 milliseconds). A timestamp is an identifier that records the time sequence of data generation or processing, and it can be accurate to milliseconds or even higher. By timestamping the audio data, not only can the audio data be given a time sequence, but the continuity of the data can also be checked based on the time sequence during subsequent verification. For example, if the start time of audio data acquisition is 0 seconds and the fixed time interval is 10 milliseconds, the timestamp of the first data block may be marked as 0:00:00.010, the second data block as 0:00:00.020, and so on. In this way, the audio data has a clear sequence identification in the time dimension.

[0073] Audio data is divided into multiple data blocks, each containing a certain number of audio samples. The size of a data block is typically determined based on actual application requirements and technical implementation, taking into account factors such as the audio sampling rate, encoding format, and system performance. Generally speaking, a typical data block size ranges from a few hundred bytes to a few thousand bytes. The purpose of dividing data blocks is to facilitate the management and verification of audio data. Each data block can serve as an independent verification unit, improving verification accuracy and efficiency.

[0074] A checksum is generated for each data block. This checksum is a code calculated using a specific algorithm based on the data content within the block. Common checksum algorithms include cyclic redundancy check (CRC) and hash functions (such as MD5 and SHA-1). For example, the CRC algorithm performs a polynomial division on the binary data within the data block, generating a remainder that serves as the checksum. The purpose of the checksum is to detect errors during data transmission or storage, as the recalculated checksum will likely differ from the original checksum. Because the checksum is generated based on the data block content, any change in any bit in the block will result in a change in the checksum. Therefore, the checksum effectively verifies data integrity.

[0075] When verifying audio data, the timestamps of adjacent data blocks are checked sequentially. Normally, the difference between the timestamps of adjacent data blocks should be equal to a pre-set fixed time interval. For example, if the fixed time interval is 10 milliseconds, the difference between the timestamps of two adjacent data blocks should always be 10 milliseconds. If the difference between adjacent timestamps is greater than 10 milliseconds, it indicates that data may have been lost during this period, indicating a timestamp interruption. Timestamp interruptions are a key clue to possible audio data loss and can help quickly locate the location of potentially problematic audio data.

[0076] For each data block, after receiving or reading the data, the checksum for that data block is recalculated and compared with the originally generated and stored checksum. If the recalculated checksum is identical to the original checksum, no data errors occurred during the transmission or storage of the data block. Conversely, if the two are inconsistent, the data in the data block has been altered, possibly due to data corruption caused by a transmission error, storage failure, or other reasons. Comparing the correctness of the checksum can accurately detect data errors within the data block and is an important basis for determining the integrity of the audio data.

[0077] When the timestamp is interrupted or the checksum is wrong, the audio segment containing these problem data blocks will be marked as an audio segment with lost data. The marking method can be to set a specific identification bit in the data structure, or to create an index table that records the location and range of the lost data. For example, a field can be added to the metadata of the audio data to mark whether a certain audio segment has data loss; or the start time, end time, data block number and other information of the audio segment with lost data can be recorded in a special error log. The purpose of marking the audio segment with lost data is to provide a clear goal and scope for subsequent data recovery work, so as to facilitate more targeted processing of lost data.

[0078] In one embodiment, performing an in-depth analysis on the audio segment marked as having lost data to determine the specific location and amount of the lost data in the audio segment includes:

[0079] Using machine learning algorithms, the frequency, amplitude, and phase characteristics of audio clips are extracted, and the characteristic differences between normal audio and audio clips with lost data are identified, thereby determining the specific location and amount of lost data.

[0080] In this embodiment, first, a complex signal such as audio is converted into quantifiable and analyzable feature data, which provides a basis for subsequent identification of the differences between normal and lost data audio segments.

[0081] Audio signals are composed of sinusoidal waves of varying frequencies, and different sounds have unique frequency distributions. A common method for extracting frequency features is to use the Fast Fourier Transform (FFT) to convert audio signals from the time domain to the frequency domain. The FFT can be used to determine the energy distribution of the audio at different frequencies. For example, vowels and consonants in a speech signal have distinct frequency differences. High-frequency components may contain more consonant information, while low-frequency components are associated with vowels. In practice, audio clips are divided into multiple small time windows, and the FFT is performed on the audio signal within each window to obtain the frequency feature vector for that window.

[0082] Amplitude reflects the strength of an audio signal. In audio processing, amplitude features can be directly derived from time-domain signals. Common amplitude features include root mean square (RMS) and peak value. RMS measures the average energy of an audio signal, while peak value indicates the signal's maximum intensity at a given moment. For example, in music, the amplitude of a climax is typically greater than that of an intro. By calculating amplitude features at different time points within an audio clip, we can generate a curve showing how the amplitude changes over time.

[0083] Phase describes the relative positions of different frequency components in an audio signal. While not as widely considered as frequency and amplitude in many audio processing tasks, it is crucial for accurately restoring audio signals in certain situations. Methods such as the Hilbert transform can be used to extract phase information from audio signals. Phase features are crucial in processing multichannel audio or when accurate audio reconstruction is required.

[0084] By comparing the features of normal audio and audio clips with missing data, we can identify key differences that distinguish the two and provide a basis for determining the location and amount of missing data. First, we need to collect a large number of normal audio clips and audio clips with known missing data as training data. This data should be representative, covering different types of audio (such as speech, music, and ambient sound) and varying degrees of data loss.

[0085] Select an appropriate machine learning algorithm, such as a support vector machine (SVM), decision tree, or neural network, and train it on the training data. For example, a neural network uses the extracted frequency, amplitude, and phase features as input, and outputs the labeling of audio clips as normal or missing data. By continuously adjusting the neural network's weights and biases, the model learns the characteristic differences between normal audio and audio clips with missing data. The trained model can then classify new audio clips as missing data. Furthermore, by analyzing the model's decision-making process, it is possible to identify features that significantly influence the classification results—that is, key differences between normal and missing data audio clips. For example, it may be found that the energy at certain frequencies in the missing data audio clip is significantly lower than that of normal audio, or that the amplitude variations are more irregular.

[0086] Based on the identified characteristic differences, the specific location of the lost data in the audio clip is precisely located, and the amount of lost data is calculated, providing accurate information for subsequent data recovery. By analyzing the audio clip frame by frame or window by window, the characteristic differences are combined to determine whether each small portion is lost data. For example, if the frequency characteristics of a window are significantly different from normal audio, and this difference matches the characteristic pattern of the audio clip with lost data, it is considered that there is lost data in this window. By recording the start and end positions of these abnormal windows, the specific location of the lost data in the audio clip can be determined.

[0087] After determining the location of the lost data, the amount of lost data can be calculated based on parameters such as the audio sampling rate and bit rate. For example, if the audio sampling rate is 44100 Hz (44100 samples per second, each sample is 16 bits), and the time range of the lost data is determined to be 1 second, the amount of lost data can be calculated as 44100 x 16 bits. In actual calculations, factors such as the data encoding format may need to be considered to more accurately calculate the amount of lost data.

[0088] In one embodiment, performing data recovery on the audio segment containing the lost data to obtain preliminary recovered audio data includes:

[0089] The audio data within a preset range before and after the lost data is input into the audio data recovery algorithm, and the audio data recovery algorithm fills or reconstructs the lost part to obtain preliminary recovered audio data.

[0090] In this embodiment, in an audio segment where lost data has been marked, the starting point and ending point of the lost data are used as a reference, and the audio data before and after are selected according to a preset range parameter. The size of this preset range is set based on experience and understanding of audio characteristics. Different audio types and loss situations may require different ranges. For example, for voice audio, audio data within 100 milliseconds before and after the lost data is set as a reference; for music audio, due to the continuity of its melody and rhythm, the range is expanded to 200-500 milliseconds before and after. Choosing the right range is critical. If the range is too small, it may not provide enough information for the algorithm to accurately recover the lost data. If the range is too large, it may introduce too much irrelevant information, increase the computational burden of the algorithm, and may affect the recovery effect.

[0091] With the help of a specially designed audio data recovery algorithm, the lost part of the data is processed based on the input surrounding audio data to restore the lost audio content. The audio data within the preset range before and after the lost data determined in the first step is accurately input into the audio data recovery algorithm in accordance with the format and data organization required by the algorithm. Different algorithms have different requirements for input data. Some algorithms may require audio data to be input in a specific sampling rate, number of channels, quantization accuracy and other formats, so the selected audio data may need to be converted to the corresponding format and pre-processed before input. For example, the algorithm requires the input of mono audio data with a sampling rate of 16kHz, while the original selected audio data is stereo with a sampling rate of 44.1kHz. It needs to be converted into a format that meets the requirements of the algorithm before input.

[0092] Through algorithmic calculation and processing, based on the input surrounding audio data, attempts are made to fill the gaps in the lost data, or to reconstruct the lost audio data, so that it can be restored to its state before the loss to a certain extent.

[0093] Filling is a relatively simple and direct recovery method, suitable for situations where the amount of lost data is small or the audio features are relatively stable. A common filling method is based on interpolation algorithms, such as linear interpolation. Assuming that the audio sample values ​​at two time points before and after the lost data are known, the linear interpolation algorithm will calculate the value of the middle missing sample according to a linear relationship between these two values. If the frequency and amplitude changes of the audio data are relatively stable, linear interpolation can better fill the gaps in the lost data and maintain the basic continuity of the audio. There is also a method based on spline interpolation, which can fit the missing data by constructing a smooth curve. Compared with linear interpolation, it can produce smoother audio transition effects and reduce the sudden changes or unnaturalness that may appear in the audio after filling.

[0094] When the amount of missing data is large or the audio features are complex, reconstruction is necessary. Machine learning-based reconstruction algorithms, such as deep learning-based audio generation models, have been widely used in recent years. For example, a generative adversarial network (GAN) consists of two parts: a generator and a discriminator. The generator attempts to generate the missing audio data based on the surrounding audio input, while the discriminator determines the similarity between the generated audio data and the real audio data. Through continuous adversarial training between the generator and the discriminator, the generator gradually learns to generate more realistic audio data to reconstruct the missing data. There are also algorithms based on recurrent neural networks (RNNs) and their variants (such as LSTMs and GRUs). These algorithms can handle the time series nature of audio data and reconstruct the missing data by learning the dependencies between the audio data. They are particularly suitable for audio with distinct time series characteristics, such as speech and melodic music.

[0095] After processing by the audio data recovery algorithm, a version of the audio data that preliminarily restores the lost portion is obtained. Although some imperfections may still exist, it provides a foundation for subsequent optimization and processing. After the algorithm completes filling or reconstructing the lost portion, the recovered audio data is integrated with the original audio portion that was not lost. During integration, the continuity of the audio data on the timeline and the smooth transition of audio features must be ensured to avoid obvious breakpoints or sudden changes in audio quality. For example, when splicing the restored and intact audio portions, the audio signals at the junction need to be appropriately fused, such as using a fade-in / fade-out method to make the audio transition at the junction more natural.

[0096] In one embodiment, obtaining audio data from an AI device in a recording scenario includes:

[0097] Start the recording program of the AI ​​device, put the recording and noise reduction operations into the same independent thread for processing, and extract the recording operation into an independent process; transfer data through AIDL to obtain the audio data obtained by recording;

[0098] The audio data obtained from the recording is stored based on the buffer pool, and another thread is opened to reduce the noise of the audio data in the buffer pool to obtain the audio data in the recording scene.

[0099] In this embodiment, a predefined recording interface or related function in the AI ​​device system is first called to trigger the start of the recording process. This process typically involves interaction with the device's underlying hardware driver, enabling the recording device (such as a microphone) to collect sound signals and convert them into electrical signals. For example, in an Android-based AI device, the system-provided MediaRecorder class or AudioRecord class can be used to start the recording function. The basic recording properties are determined by setting relevant parameters (such as the audio source, sampling rate, number of channels, and encoding format).

[0100] Create a new, independent thread within the operating system's thread management mechanism. Within this thread, write the code logic for both the recording and noise reduction operations. The recording operation continuously collects audio data according to the specified parameters, while the noise reduction operation processes the collected audio data in real time. For example, utilize noise reduction algorithms from open-source audio processing libraries (such as FFmpeg) to perform real-time filtering and denoising on the recorded data. By placing these two operations on the same thread, they can share resources within the thread, reducing data transfer and synchronization overhead and improving overall processing efficiency.

[0101] Then, based on the operating system's process management mechanism, a new process is created specifically for performing the recording operation. The method for creating a process varies across operating systems. In Linux, the fork() function can be used to create a child process to perform the recording task; in Windows, the CreateProcess() function can be used for similar functionality. Placing the recording operation in a separate process gives it independent memory space and system resources, isolating it from other processes and reducing the risk of recording failure due to crashes or exceptions in other processes.

[0102] AIDL (Android Interface Definition Language) is an inter-process communication mechanism unique to the Android system. First, define an AIDL interface file, declaring the data types and methods to be passed. For example, define an interface for transmitting audio data, including methods for sending audio data. Implement this AIDL interface in the recording process and pass the audio data captured by the recording through the interface methods. In the receiving process, bind to this AIDL service and obtain the audio data. AIDL automatically handles data serialization and deserialization, ensuring accurate data transmission between different processes.

[0103] Next, create a buffer pool data structure, which can be a queue, linked list, or other suitable storage structure. After the recording process acquires audio data, it sequentially stores it in the buffer pool. The size of the buffer pool can be adjusted based on actual needs and device resources. For example, if the device has ample memory and the recording time is long, a larger buffer pool can be set to store more audio data. If device resources are limited, a smaller buffer pool can be set to ensure efficient resource utilization. The buffer pool can also use a circular caching method. When the buffer pool is full, new data will overwrite the oldest stored data to ensure real-time data.

[0104] Finally, a new thread is created specifically to perform noise reduction. This thread continuously reads audio data from the buffer pool and processes it using a noise reduction algorithm (such as Fourier transform-based spectral analysis or machine learning-based noise reduction). Once noise reduction is complete, the resulting audio data is high-quality and meets the requirements of the recording scenario. By performing noise reduction in a separate thread, complex noise reduction calculations are avoided within the threads currently performing recording and other operations, preventing thread congestion and improving overall system performance.

[0105] In one embodiment, matching the corresponding audio data recovery algorithm based on the device state includes:

[0106] Inputting the device status into a deep neural network model, the device status including network connection quality, remaining storage space, current CPU load rate, and memory idle rate;

[0107] In the hidden layer of the deep neural network model, a structure of alternating multiple convolutional layers and pooling layers is set; the convolutional layer uses convolution kernels of different sizes to extract features of the input device status and capture the correlation between device states at different scales; the pooling layer uses the maximum pooling operation to reduce the dimension of the features extracted by the convolutional layer to obtain key features.

[0108] After multiple convolution and pooling operations, the data is input into the fully connected layer for processing, mapping the processed feature data to the index space of multiple preset audio data recovery algorithms, and outputting the probability value of each recovery algorithm being selected;

[0109] The recovery algorithm with the largest probability value is selected as the corresponding audio data recovery algorithm.

[0110] In this embodiment, device status data, such as network connection quality, remaining storage space, current CPU load rate, and memory idle rate, is first organized and preprocessed. For example, network connection quality may be represented by quantitative indicators such as signal strength and bandwidth; remaining storage space and memory idle rate can be directly presented as a number of bytes or a percentage of total capacity; and the current CPU load rate is a numerical value indicating how busy the CPU is. These data may have different dimensions and value ranges, so they need to be normalized and mapped to a unified interval (e.g., [0, 1]) to facilitate model processing. The processed device status data serves as the model input and is passed to the deep neural network model in the input format specified by the model (e.g., vector form).

[0111] The convolution layer uses convolution kernels of different sizes, which is one of the key innovations of this technology. Convolution kernels of different sizes can capture the correlation between device status data at different scales. Smaller convolution kernels are suitable for capturing local, detailed features, such as the relationship between small fluctuations in network connection quality over a short period of time and instantaneous changes in CPU load; larger convolution kernels are better at capturing global, macro features, such as the long-term correlation between remaining storage space and memory idle rate when the overall network environment is stable. Through the convolution operation, the convolution kernel is slid over the input data, and a weighted sum is performed at each position to generate a feature map. These feature maps contain the device status feature information extracted by convolution, enriching the data expression.

[0112] The pooling layer uses max pooling, which primarily reduces the dimensionality of features extracted by the convolutional layer. During max pooling, the feature map is divided into small regions (such as 2x2 pixel blocks), and the maximum value within each region is selected as the representative value for that region. This significantly reduces the amount of data and the computational complexity of the model without losing too much critical information. Max pooling also offers a certain degree of noise immunity, enhancing the model's robustness to small changes in the input data. For example, when device status data contains subtle noise or fluctuations, max pooling can ignore these unimportant details and retain the most representative features.

[0113] After multiple convolution and pooling operations, the data features are highly extracted and compressed. The fully connected layer integrates these features. Each neuron in the fully connected layer is connected to all neurons in the previous layer, enabling it to fully learn the complex nonlinear relationships between features. The fully connected layer uses a weighted summation of the input features using a weight matrix and a bias vector, and then applies a nonlinear transformation using an activation function (such as the ReLU function) to further integrate and optimize the features.

[0114] The feature data processed by the fully connected layer is mapped to the index space of various preset audio data recovery algorithms. This mapping process is achieved through a series of weight matrix calculations. The weights learned by the model establish a connection between the feature data and different recovery algorithms. Ultimately, the model outputs a probability value for each recovery algorithm being selected. These probabilities reflect the applicability and rationality of each recovery algorithm given the current device state. For example, if the model outputs a high probability value for a complex recovery algorithm based on deep learning, it indicates that the algorithm is more suitable for audio data recovery if the current device has sufficient resources (such as a good network connection, low CPU load, and high memory availability).

[0115] Finally, the model compares the probability values ​​for each recovery algorithm and finds the algorithm with the highest probability. This algorithm is considered the most suitable audio data recovery algorithm for the current device state. For example, if the model outputs probabilities of 0.2, 0.3, and 0.5 for three recovery algorithms based on linear interpolation, machine learning, and deep learning, respectively, the deep learning-based recovery algorithm is selected as the corresponding audio data recovery algorithm. This probability-based selection approach fully leverages the deep neural network model's ability to learn the complex relationship between device state and recovery algorithms, enabling intelligent selection of recovery algorithms and improving the efficiency and quality of audio data recovery.

[0116] In one embodiment, after obtaining the target audio data that meets the playback requirements, the method includes:

[0117] Comparing difference information in multiple dimensions between the audio data in the recording scenario and the target audio data that meets the playback requirements;

[0118] Constructing a data matrix based on the difference information; obtaining device information of the AI ​​device and constructing it into a character matrix; extracting matrix features of multiple dimensions of the data matrix and the character matrix;

[0119] Performing mutation processing on the character matrix based on the data matrix to obtain a mutation matrix;

[0120] A management authority code is generated based on the variation matrix and matrix features of multiple dimensions to perform authority management on the audio data that meets the playback requirements.

[0121] In this embodiment, comparisons are first made along multiple dimensions, such as the audio's time domain dimension, comparing amplitude, duration, and waveform shape; the frequency domain dimension, comparing frequency components, frequency distribution, and energy spectrum; and perceptual dimensions such as audio timbre and sound quality. Digital signal processing algorithms are then used to calculate differences across these dimensions. For example, by calculating the difference in amplitude between two audio signals at the same time point, or the difference in energy within the same frequency interval in a spectrogram, a series of quantified difference data is generated.

[0122] The size of the matrix is ​​determined based on the dimensions and amount of difference information. For example, if M difference data points are obtained from N dimensions, a data matrix with N rows and M columns can be constructed. The difference data for each dimension is sequentially entered into the corresponding rows and columns of the matrix, so that each element in the matrix represents the audio difference information for a specific dimension. This data matrix allows for systematic storage and analysis of audio differences.

[0123] Next, the AI ​​device's relevant information is encoded and converted into a convenient matrix format. Device information, a key factor in generating the authorization code, is combined with the audio difference information to enhance the uniqueness and security of the authorization code. Various AI device information is collected, such as the device model, device ID, hardware configuration parameters (such as CPU model and memory capacity), and software version. This information is encoded, for example, using ASCII or other custom encoding methods to convert character information into numerical values. The size of the character matrix is ​​then determined based on the type and amount of device information. The encoded numerical values ​​are then entered into the matrix according to specific rules to form a character matrix.

[0124] Next, key features are extracted from the two matrices. These features represent the core information of the matrices and are used for subsequent mutation processing and access code generation. This reduces the amount of data while retaining key information, improving processing efficiency and access code accuracy. A variety of feature extraction methods can be used for data matrices and character matrices. For example, principal component analysis (PCA) can be used to reduce the dimensionality of the matrices and extract the principal components as features. Alternatively, the eigenvalues ​​and eigenvectors of the matrices can be calculated and used as matrix features.

[0125] Furthermore, the character matrix is ​​mutated through the data matrix, so that the information of the two matrices is integrated with each other, which further increases the complexity and uniqueness of the permission code generation and improves the security of permission management.

[0126] Specifically, a mutation rule is defined, such as performing an operation on the corresponding elements in the character matrix based on the values ​​of the elements in the data matrix. This can be an arithmetic operation, such as addition or multiplication, or a complex encryption operation. For example, the value of a certain element in the data matrix is ​​used as a key to perform an encryption transformation on the corresponding element in the character matrix. All elements of the character matrix are processed according to this rule to obtain a mutated matrix. This mutated matrix incorporates audio difference information and device information, making it highly unique.

[0127] A unique management permission code is generated using the variation matrix and matrix features. This is used to manage the permissions of audio data that meets playback requirements, ensuring that only authorized devices or users can access and use the audio data. The variation matrix and matrix features of multiple dimensions are combined. For example, the matrix features are input as parameters into a hash function, with the variation matrix serving as the input data for the hash function. The hash function calculates the input data and generates a hash value of a fixed length. This hash value is the management permission code. Other encryption algorithms, such as symmetric or asymmetric encryption algorithms, can also be used to generate permission codes in combination with the variation matrix and matrix features. The generated permission code can be stored locally on the device or on the server to verify the user or device's access rights to the audio data.

[0128] In one embodiment, performing mutation processing on the character matrix based on the data matrix to obtain a mutation matrix includes:

[0129] Performing quantum state encoding processing on the data matrix and the character matrix, mapping the elements in the data matrix and the character matrix to different quantum states of quantum bits, respectively, to obtain a quantum encoding matrix pair;

[0130] Using quantum superposition and entanglement properties, a quantum entanglement operation is performed on the quantum coding matrix pair to generate an entangled quantum matrix;

[0131] Performing a customized transformation on the entangled quantum matrix through a sequence of quantum gate operations to obtain a variant quantum matrix; the sequence of quantum gate operations is generated based on algorithmic rules that change dynamically over time;

[0132] Performing quantum measurement decoding processing on the variation quantum matrix to obtain a variation matrix.

[0133] In this embodiment, matrix data is converted into quantum state representations to facilitate subsequent processing using the properties of quantum computing. Quantum bits possess properties such as superposition and entanglement, which can bring advantages to data processing that classical computing lacks. Each element in the data matrix and character matrix is ​​mapped to a different quantum state of the qubit according to the encoding rules. For example, the numerical value of the element can be mapped to different superposition state coefficients. In this way, each element in the data matrix and character matrix is ​​encoded as the quantum state of a qubit, resulting in two quantum encoding matrices, forming a quantum encoding matrix pair.

[0134] Quantum entanglement establishes a strong correlation between two quantum coding matrices, so that the state change of one matrix will instantly affect the state of the other matrix, thereby increasing the complexity and correlation of the data.

[0135] Quantum entanglement refers to a special correlation between multiple quantum bits that makes their quantum states impossible to describe independently. Quantum entanglement gates (such as CNOT gates) are used to operate on corresponding quantum bits in a quantum coding matrix pair. For example, the quantum bits in corresponding positions in the data matrix and the character matrix can be entangled using a CNOT gate. The CNOT gate takes a control bit and a target bit as input. If the control bit is in the "1" state, the state of the target bit is flipped; if the control bit is in the "0" state, the target bit state remains unchanged. By performing similar entanglement operations on each pair of corresponding quantum bits in the quantum coding matrix pair, the quantum bits in the two matrices are entangled with each other, forming an overall entangled quantum matrix.

[0136] Furthermore, complex transformations are performed on the entangled quantum matrix to further increase the randomness and uniqueness of the data, generating a highly variable quantum matrix and providing enhanced security for the subsequently generated management permission codes. Quantum gates are the basic logical units used to manipulate qubits in quantum computing. Common quantum gates include Pauli gates (such as X-gate, Y-gate, and Z-gate), Hadamard gates, and phase gates.

[0137] Design an algorithmic rule that dynamically changes over time to generate a sequence of quantum gate operations. For example, the current timestamp, the system's random number generator, or other dynamic factors can determine which quantum gates to use and their order. This sequence of quantum gate operations is sequentially applied to the entangled quantum matrix, performing operations on each qubit in the matrix. Each operation changes the quantum state of the qubit. After a series of quantum gate operations, the entangled quantum matrix is ​​transformed into a variant quantum matrix, whose state is highly uncertain and unique.

[0138] The quantum matrix of the quantum state is then converted back to a classical matrix form for subsequent use in generating the management permission code. Quantum measurement is the process of collapsing a quantum state into a classical state. Each qubit in the quantum matrix is ​​measured, and the measurement result causes the qubit to collapse to a "0" or "1" state.

[0139] Reverse decoding is performed based on the measurement results and the previous encoding rules, converting the qubit measurement results into classical numerical values. For example, if the matrix element values ​​were previously mapped to superposition state coefficients, the corresponding matrix element values ​​can now be deduced based on the measured "0" or "1" state, combined with the previous mapping relationship. The measurement and decoding results of all qubits are recombined into a matrix form to obtain the final mutation matrix. This mutation matrix combines the information of the data matrix and the character matrix and undergoes complex quantum processing transformations, which makes it highly secure and unique, and can be used to generate management permission codes.

[0140] In one embodiment, generating a management authority code based on the variation matrix and matrix features of multiple dimensions includes:

[0141] Combining the variation matrix and matrix features of multiple dimensions into a high-dimensional vector, and converting the high-dimensional vector into a polynomial function using a polynomial fitting algorithm;

[0142] Based on the polynomial function, a corresponding two-dimensional curve is drawn on a two-dimensional plane;

[0143] Constructing a three-dimensional surface graph in a three-dimensional space according to the coefficients and degrees of the polynomial function;

[0144] Performing feature extraction on the polynomial function, the two-dimensional curve, and the three-dimensional surface graph, and combining the extracted features into a combined feature vector;

[0145] The combined feature vector is encrypted based on a chaotic encryption algorithm to obtain a ciphertext; and the ciphertext is binary-encoded to obtain the management authority code.

[0146] In this embodiment, the variation matrix is ​​first stretched into a long one-dimensional vector in a specific order (e.g., row by row or column by column). The matrix features across multiple dimensions are also organized into vector form. These vectors are then concatenated to form a high-dimensional vector containing all the information. This high-dimensional vector is then processed using a polynomial fitting algorithm. This algorithm searches for a suitable polynomial that best matches the characteristics of the data represented by the high-dimensional vector, thereby converting the high-dimensional vector into a polynomial function.

[0147] The abstract polynomial function is presented visually, exploring and displaying the data's characteristics from a two-dimensional perspective, providing more information dimensions for the subsequent generation of management permission codes. In a two-dimensional plane coordinate system, a series of evenly distributed or regularly distributed points are selected as the horizontal coordinate values. These horizontal coordinate values ​​are substituted into the previously obtained polynomial function to calculate the corresponding vertical coordinate values. Then, the points corresponding to these horizontal and vertical coordinates are plotted on the plane, and finally these points are connected in sequence to obtain the corresponding curve of this polynomial function on the two-dimensional plane.

[0148] By further leveraging the information contained in the polynomial function and constructing a three-dimensional graph, the dimensionality and complexity of the data are increased, thereby uncovering more unique features and enhancing the security and uniqueness of the management permission code. Specifically, a three-dimensional spatial coordinate system is constructed, and the degree of the polynomial function is used to determine the value of one axis in the coordinate system. The different coefficients of the polynomial function are then used to correspond to the values ​​of the other two axes. Based on different combinations of the coefficients and degree of the polynomial function, a series of points are determined in three-dimensional space. These points are connected to construct a three-dimensional surface graph. The shape, curvature, and other characteristics of this graph contain information about the polynomial function, and also indirectly contain information about the variation matrix and matrix characteristics.

[0149] Extract key, characteristic information from various data presentations (polynomial functions, two-dimensional curves, and three-dimensional surface graphics). This information is then integrated to form a comprehensive feature vector that more comprehensively reflects the characteristics of the original data and provides richer material for generating management permission codes. For polynomial functions, extract attributes that reflect their characteristics, such as coefficients and the highest degree. For two-dimensional curves, extract features such as the curve's turning points, the degree of undulation, and the intersection of the curve and the coordinate axis. For three-dimensional surface graphics, extract features such as the curvature of the surface, the surface's convexity and concavity, and its stretching in different directions. Arrange the features extracted from these three data forms and arrange them in a certain order into a vector. This vector is the combined feature vector.

[0150] The combined feature vector is encrypted and converted into a difficult-to-crack ciphertext form. The final management permission code is then generated through binary encoding to ensure the security of access rights to the audio data. The original information can only be obtained through a specific decryption method, preventing the permission code from being easily stolen or forged.

[0151] The combined eigenvector is encrypted using a chaotic encryption algorithm. This algorithm exploits the characteristics of chaotic systems and performs complex transformations on the combined eigenvector, transforming it into a seemingly random ciphertext. The resulting ciphertext is then binary-encoded, converting it into a binary sequence of 0s and 1s. This binary sequence serves as the final management permission code. When verifying access to audio data, only those possessing the correct decryption method and the corresponding permission code can pass verification and access the audio data.

[0152] In one embodiment, generating a management authority code based on the variation matrix and matrix features of multiple dimensions includes:

[0153] Combining the characters in the variation matrix in sequence to obtain a variation character sequence;

[0154] Simulate the matrix characteristics of each dimension into a curve respectively;

[0155] Connecting the ends of the curves to obtain a combined curve, and superimposing it on the variant character sequence; calculating the spatial relationship between each character in the variant character sequence and the combined curve; and selecting the character whose spatial relationship satisfies a preset condition as the target character;

[0156] The target characters are combined to obtain the management authority code.

[0157] In this embodiment, first, the characters in the variation matrix are sequentially integrated to form a character sequence, in preparation for subsequent association and analysis with the curve. This character sequence contains information about the variation matrix and is one of the basic data for generating the management authority code. To clarify the order of the characters in the variation matrix, the characters in the matrix can usually be extracted one by one according to the row-first or column-first order of the matrix. For example, if the variation matrix is ​​a two-dimensional matrix, starting with the first character in the first row, all characters in the row are extracted in sequence, and then the characters in the second row are extracted, and so on, until the characters of the entire matrix are extracted. The extracted characters are connected in sequence to obtain the variation character sequence.

[0158] Furthermore, abstract matrix features are converted into intuitive curves to facilitate subsequent spatial relationship analysis and feature extraction. Matrix features of different dimensions are visualized through curves to demonstrate their changing patterns and characteristics, providing additional information dimensions for generating management permission codes. For each dimension of matrix features, an appropriate method is selected based on its data characteristics and changing patterns to simulate the feature into a curve. For example, if the matrix feature is a series of values, these values ​​can be used as the ordinates, and sequential numbers or time as the abscissas. Interpolation or other methods can be used to draw a continuous curve. For example, if the matrix feature of a certain dimension is a set of values ​​[2, 4, 6, 8], these values ​​can be mapped to points at abscissas 1, 2, 3, and 4, respectively. Then, linear interpolation or other more complex interpolation methods can be used to connect these points into a curve. Depending on the type of matrix feature, different curve models, such as sine curves and polynomial curves, can be used to better fit and represent feature changes.

[0159] Next, the curves from multiple dimensions are combined into a single overall curve and superimposed on the variant character sequence. By analyzing the spatial relationship between the characters and the curves, characters that meet specific conditions are selected. These characters serve as key elements for generating the management permission code, giving the permission code generation a unique set of rules and complexity. The curves from each dimension obtained in the previous step are connected end to end in a specific order to form a continuous combined curve. For example, if there are two curves A and B, connect the end point of curve A with the starting point of curve B to obtain a combined curve.

[0160] Superimpose the combined curve with the variant character sequence. The superposition here can be understood as displaying the character sequence and the curve simultaneously in a unified space or coordinate system. For example, the character sequence can be placed on a plane, and then the combined curve can be drawn on the same plane, so that the character and the curve have a relative positional relationship in space. Define a method for calculating the spatial relationship between the character and the combined curve, such as calculating the distance from the character to the curve, whether the character is above or below the curve, etc. Preset some conditions, such as the distance from the character to the curve is less than a certain threshold, or the character is in a specific area of ​​the curve, etc. For each character in the variant character sequence, calculate its spatial relationship with the combined curve. When the spatial relationship of a character meets the preset conditions, the character is marked as the target character.

[0161] Finally, the filtered target characters are combined to form the final management permission code. This permission code is generated based on the comprehensive information of the variation matrix and matrix characteristics. It is unique and complex and is used to manage the permissions of audio data that meets the playback requirements. According to the order in which the target characters are filtered out in the variation character sequence, these target characters are connected in sequence to obtain a new character sequence. This character sequence is the management permission code. The above management permission code can be used to verify the user or device's access rights to audio data. Only with the correct management permission code can the corresponding operations on the audio data be performed.

[0162] Reference Figure 2 In another embodiment of the present invention, a system for repairing audio data loss in an AI recording scenario is provided, comprising:

[0163] The acquisition module is used to obtain audio data from AI devices in recording scenarios;

[0164] A verification module, configured to verify the audio data based on the integrity of the timestamp and the check code, and mark the audio segments with missing data;

[0165] An analysis module is used to perform in-depth analysis on the audio clips marked with lost data to determine the specific location and amount of lost data in the audio clips;

[0166] A recovery module is used to obtain the device status of the AI ​​device, match the corresponding audio data recovery algorithm based on the device status, and recover the audio segment containing the lost data to obtain preliminary recovered audio data;

[0167] The optimization module is used to perform quality optimization processing on the initially restored audio data based on spectrum analysis to obtain audio data that meets playback requirements.

[0168] In this embodiment, for the specific implementation of each module in the above system embodiment, please refer to the above method embodiment, which will not be repeated here.

[0169] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, memory, display screen, input device, network interface and database connected via a system bus. The processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above method is implemented.

[0170] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0171] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the above-described method when executed by a processor. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0172] In summary, the method and system for repairing audio data loss in an AI recording scenario provided in an embodiment of the present invention include: obtaining audio data of an AI device in a recording scenario; verifying the audio data based on the integrity of the timestamp and the check code, and marking the audio segment of the lost data; performing in-depth analysis on the audio segment of the marked lost data to determine the specific location of the lost data in the audio segment and the amount of lost data; obtaining the device status of the AI ​​device, matching the corresponding audio data recovery algorithm based on the device status, and performing data recovery on the audio segment where the lost data is located to obtain preliminary recovered audio data; performing quality optimization processing based on spectrum analysis on the preliminary recovered audio data to obtain target audio data that meets the playback requirements. In the present invention, in a recording scenario, it is detected in real time whether there is lost data, and the lost data is repaired in real time, which overcomes the current defect that lost audio data cannot be repaired in real time.

[0173] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware using a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media provided herein and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM.

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

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

Claims

1. A method for repairing audio data loss in an AI recording scenario, characterized in that: The following steps are involved: Obtain audio data from AI devices in recording scenarios; Verifying the audio data based on the integrity of the timestamp and the check code, and marking the audio segments with missing data; Perform in-depth analysis on the audio clips marked with missing data to determine the specific location and amount of missing data in the audio clips; Obtain the device status of the AI ​​device, match the corresponding audio data recovery algorithm based on the device status, and recover the audio segment containing the lost data to obtain preliminary recovered audio data; Performing quality optimization processing based on spectrum analysis on the initially recovered audio data to obtain target audio data that meets playback requirements; Comparing difference information in multiple dimensions between the audio data in the recording scenario and the target audio data that meets the playback requirements; Constructing a data matrix based on the difference information; obtaining device information of the AI ​​device and constructing it into a character matrix; extracting matrix features of multiple dimensions of the data matrix and the character matrix; Performing mutation processing on the character matrix based on the data matrix to obtain a mutation matrix; Generate a management authority code based on the variation matrix and matrix features of multiple dimensions to perform authority management on the audio data that meets the playback requirements; Generating a management authority code based on the variation matrix and matrix features of multiple dimensions includes: Combining the variation matrix and matrix features of multiple dimensions into a high-dimensional vector, and converting the high-dimensional vector into a polynomial function using a polynomial fitting algorithm; Based on the polynomial function, a corresponding two-dimensional curve is drawn on a two-dimensional plane; Constructing a three-dimensional surface graph in a three-dimensional space according to the coefficients and degrees of the polynomial function; Performing feature extraction on the polynomial function, the two-dimensional curve, and the three-dimensional surface graph, and combining the extracted features into a combined feature vector; The combined feature vector is encrypted based on a chaotic encryption algorithm to obtain a ciphertext; and the ciphertext is binary-encoded to obtain the management authority code.

2. The method for repairing audio data loss in an AI recording scenario according to claim 1, characterized in that: Verifying the audio data based on the integrity of the timestamp and the check code includes: Timestamping the audio data at fixed time intervals, dividing the audio data into a plurality of data blocks, and generating a check code for each data block; By comparing the continuity of adjacent timestamps and the correctness of the check code, it is determined whether the audio data is complete. If the timestamp is interrupted or the check code is wrong, the corresponding audio segment is marked as an audio segment with lost data.

3. The method for repairing audio data loss in an AI recording scenario according to claim 1, characterized in that: Perform in-depth analysis on the audio clips marked with missing data to determine the specific location and amount of missing data in the audio clips, including: Using machine learning algorithms, the frequency, amplitude, and phase characteristics of audio clips are extracted, and the characteristic differences between normal audio and audio clips with lost data are identified, thereby determining the specific location and amount of lost data.

4. The method for repairing audio data loss in an AI recording scenario according to claim 1, characterized in that: Perform data recovery on the audio segment where the lost data is located to obtain preliminary recovered audio data, including: The audio data within a preset range before and after the lost data is input into the audio data recovery algorithm, and the audio data recovery algorithm fills or reconstructs the lost part to obtain preliminary recovered audio data.

5. The method for repairing audio data loss in an AI recording scenario according to claim 1, characterized in that: Obtain audio data from AI devices in recording scenarios, including: Start the recording program of the AI ​​device, put the recording and noise reduction operations into the same independent thread for processing, and extract the recording operation into an independent process; transfer data through AIDL to obtain the audio data obtained by recording; The audio data obtained from the recording is stored based on the buffer pool, and another thread is opened to reduce the noise of the audio data in the buffer pool to obtain the audio data in the recording scene.

6. The method for repairing audio data loss in an AI recording scenario according to claim 1, characterized in that: The audio data recovery algorithm corresponding to the device state matching includes: Inputting the device status into a deep neural network model, the device status including network connection quality, remaining storage space, current CPU load rate, and memory idle rate; In the hidden layer of the deep neural network model, a structure of alternating multiple convolutional layers and pooling layers is set; the convolutional layer uses convolution kernels of different sizes to extract features of the input device status and capture the correlation between device states at different scales; the pooling layer uses a maximum pooling operation to reduce the dimension of the features extracted by the convolutional layer to obtain key features; After multiple convolution and pooling operations, the data is input into the fully connected layer for processing, mapping the processed feature data to the index space of multiple preset audio data recovery algorithms, and outputting the probability value of each recovery algorithm being selected; The recovery algorithm with the largest probability value is selected as the corresponding audio data recovery algorithm.

7. The method for repairing audio data loss in an AI recording scenario according to claim 1, characterized in that: Performing mutation processing on the character matrix based on the data matrix to obtain a mutation matrix includes: Performing quantum state encoding processing on the data matrix and the character matrix, mapping the elements in the data matrix and the character matrix to different quantum states of quantum bits, respectively, to obtain a quantum encoding matrix pair; Using quantum superposition and entanglement properties, a quantum entanglement operation is performed on the quantum coding matrix pair to generate an entangled quantum matrix; Performing a customized transformation on the entangled quantum matrix through a sequence of quantum gate operations to obtain a variant quantum matrix; the sequence of quantum gate operations is generated based on algorithmic rules that change dynamically over time; Performing quantum measurement decoding processing on the variation quantum matrix to obtain a variation matrix.

8. A system for repairing audio data loss in AI recording scenarios, characterized by: include: The acquisition module is used to obtain audio data from AI devices in recording scenarios; A verification module, configured to verify the audio data based on the integrity of the timestamp and the check code, and mark the audio segments with missing data; An analysis module is used to perform in-depth analysis on the audio clips marked with lost data to determine the specific location and amount of lost data in the audio clips; A recovery module is used to obtain the device status of the AI ​​device, match the corresponding audio data recovery algorithm based on the device status, and recover the audio segment containing the lost data to obtain preliminary recovered audio data; An optimization module is configured to perform quality optimization processing on the initially recovered audio data based on spectrum analysis to obtain audio data that meets playback requirements; and compare difference information in multiple dimensions between the audio data in the recording scenario and the target audio data that meets playback requirements; Constructing a data matrix based on the difference information; obtaining device information of the AI ​​device and constructing it into a character matrix; extracting matrix features of multiple dimensions of the data matrix and the character matrix; Performing mutation processing on the character matrix based on the data matrix to obtain a mutation matrix; Generate a management authority code based on the variation matrix and matrix features of multiple dimensions to perform authority management on the audio data that meets the playback requirements; Generating a management authority code based on the variation matrix and matrix features of multiple dimensions includes: Combining the variation matrix and matrix features of multiple dimensions into a high-dimensional vector, and converting the high-dimensional vector into a polynomial function using a polynomial fitting algorithm; Based on the polynomial function, a corresponding two-dimensional curve is drawn on a two-dimensional plane; Constructing a three-dimensional surface graph in a three-dimensional space according to the coefficients and degrees of the polynomial function; Performing feature extraction on the polynomial function, the two-dimensional curve, and the three-dimensional surface graph, and combining the extracted features into a combined feature vector; The combined feature vector is encrypted based on a chaotic encryption algorithm to obtain a ciphertext; and the ciphertext is binary-encoded to obtain the management authority code.

Citation Information

Patent Citations

  • Audio packet loss recovery method and device, electronic equipment and storage medium

    CN118155650A

  • Audio frame insertion method, device, equipment, medium and program product

    CN119299739A

  • Method of detecting information break position of multiplexed stream, sound digital broadcast recording apparatus, and recording control method

    US20070147785A1

  • Audio processing of missing audio information

    US20230326468A1