White noise seamless loop playback method and system based on audio frame pre-caching
Through the white noise classification model, the multi-dimensional audio tags are identified and the next frame of data is pre-cachedated, which solves the problem of interruption sense of white noise playback and high cache resource occupancy, achieving seamless loop playback and system efficiency improvement.
Patent Information
- Application Number
- CN202510766373.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-06-10
AI Technical Summary
In the prior art, white noise playback has a sense of interruption, which affects the sleep aid effect, and has a high cache resource occupancy rate, resulting in low system operation efficiency.
The white noise classification model recognizes the multi-dimensional audio tag of the currently played white noise data frame, pre-caches the next frame data with the same label, and directly switches after the previous frame playback is completed, eliminating the sense of playback interruption and optimizing fluency.
It realizes seamless loop of white noise playback, improves user experience, reduces cache resource usage, and improves system operation efficiency.
Smart Images

Figure CN120295601B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method and system for seamless loop playback of white noise based on audio frame pre-caching. Background Art
[0002] White noise can help people relax their body and mind, block out other noise interference in the surrounding environment, create a relatively quiet and uniform sound environment, help improve sleep quality, and help people who have difficulty falling asleep fall asleep faster.
[0003] In related technologies, since audio data needs to be decoded into the sleep aid device before it can be played after playback, it involves a complex process of transmitting audio data from the playback device to the sleep aid device and then decoding it. Factors such as unstable Bluetooth connection and Wi-Fi network congestion will slow down the transmission. The performance of the sleep aid device's decoding chip and the complexity of the algorithm also affect the decoding speed, which breaks the continuity of audio playback. For users who rely on continuous white noise to help them sleep, the waiting time after a period of audio ends will destroy the sleep-aid atmosphere and affect sleep quality. Users who are sensitive to sound changes may even be awakened and find it difficult to fall asleep again.
[0004] In addition, in related technologies, there are time gaps between single audio data in audio connection, which seriously affects the listening experience. White noise should rely on continuous and stable sound to block interference and help users relax, but intermittent sound will interrupt attention, reduce the sleep-aiding and relaxation effects, and easily cause irritability, reducing product satisfaction.
[0005] Therefore, there is an urgent need for a new solution to improve the quality of credit assessment, assist in improving the efficiency of credit assessment, and reduce the risk of credit assessment. Summary of the Invention
[0006] In response to the technical problems existing in the prior art, the present invention provides a method and system for seamless loop playback of white noise based on audio frame pre-caching, which is used to obtain multidimensional audio tags through a white noise classification model, and pre-cache the white noise data frames to be played based on the multidimensional audio tags, thereby eliminating the interruption of white noise playback, optimizing playback fluency, reducing cache resource occupancy, and improving system operation efficiency.
[0007] In a first aspect, an embodiment of the present application provides a method for seamless loop playback of white noise based on audio frame pre-caching, comprising:
[0008] For a first white noise data frame currently being played, identifying a multidimensional audio tag corresponding to the first white noise data frame using a white noise classification model; the multidimensional audio tag includes at least: white noise type, sound intensity level, audio rhythm type, timbre type, and audio scene;
[0009] Based on the multidimensional audio tag, selecting a second white noise data frame to be played from a pre-established candidate audio library, and pre-caching the second white noise data frame; the second white noise data frame and the first white noise data frame have at least one common audio tag;
[0010] The playing mode of the second white noise data frame is set, and the second white noise data frame is played directly after the playing of the first white noise data frame is completed.
[0011] In a second aspect, an embodiment of the present application provides a white noise seamless loop playback system based on audio frame pre-caching, the system comprising the following units:
[0012] an identification unit, configured to identify, for a first white noise data frame currently being played, a multidimensional audio tag corresponding to the first white noise data frame using a white noise classification model; the multidimensional audio tag including at least: white noise type, sound intensity level, audio rhythm type, timbre type, and audio scene;
[0013] a selection unit, configured to select, based on the multidimensional audio tag, a second white noise data frame to be played from a pre-established candidate audio library; the second white noise data frame and the first white noise data frame having at least one common audio tag;
[0014] The playing unit is used to set a playing mode of the second white noise data frame and directly play the second white noise data frame after the first white noise data frame is played.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising:
[0016] at least one processor, memory, and input-output unit;
[0017] The memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute the white noise seamless loop playback method based on audio frame pre-caching of the first aspect.
[0018] In a fourth aspect, a computer-readable storage medium is provided, comprising instructions, which, when executed on a computer, enable the computer to execute the white noise seamless loop playback method based on audio frame pre-caching according to the first aspect.
[0019] The beneficial effect of the present invention is that it provides a method and system for seamless loop playback of white noise based on audio frame pre-caching. In this technical solution, for the first white noise data frame currently being played, the multidimensional audio tag corresponding to the first white noise data frame is identified through a white noise classification model; the multidimensional audio tag includes at least: white noise type, sound intensity level, audio rhythm type, timbre type, and audio scene. Furthermore, based on the multidimensional audio tag, the second white noise data frame to be played is selected from a pre-established candidate audio library; the second white noise data frame and the first white noise data frame have at least one identical audio tag. Finally, the playback mode of the second white noise data frame is set, and the second white noise data frame is played directly after the first white noise data frame is played.
[0020] In the embodiment of the present application, by directly switching to the second frame after the first frame is played, combined with pre-caching technology, the sense of playback interruption is eliminated, the playback fluency is optimized, and a smooth auditory experience is provided to users in scenarios such as sleep aid, meditation, and focused learning, thereby maintaining user immersion. Multi-dimensional audio tags are identified with the help of a white noise classification model, and the next frame with at least one identical tag is selected from the candidate audio library based on the tag to ensure that the content style is consistent and similar, enhance the realism and immersion of the scene, and meet the diverse needs of users and improve satisfaction. In addition, the pre-caching technology only caches relevant audio frames, reduces resource usage, reduces memory and power consumption of mobile devices, improves system operation efficiency, and accurate matching and smooth playback reduce errors and anomalies, enhance system stability, and ensure user experience. In short, multi-dimensional audio tags are obtained through the white noise classification model, and the white noise data frames to be played are pre-cached based on the multi-dimensional audio tags, thereby eliminating the sense of interruption in white noise playback, optimizing playback fluency, and reducing cache resource usage and improving system operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of a method for seamless loop playback of white noise based on audio frame pre-caching according to an embodiment of the present application;
[0022] Figure 2 This is a structural diagram of a white noise seamless loop playback system based on audio frame pre-caching according to an embodiment of the present application;
[0023] Figure 3 This is a schematic structural diagram of an electronic device according to an embodiment of the present application;
[0024] Figure 4 It is a structural diagram of a medium device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0026] An embodiment of the present application provides a method and system for seamless loop playback of white noise based on audio frame pre-caching. In this technical solution, for the first white noise data frame currently being played, the multidimensional audio tag corresponding to the first white noise data frame is identified through a white noise classification model; the multidimensional audio tag includes at least: white noise type, sound intensity level, audio rhythm type, timbre type, and audio scene. Furthermore, based on the multidimensional audio tag, the second white noise data frame to be played is selected from a pre-established candidate audio library, and the second white noise data frame is pre-cached; the second white noise data frame and the first white noise data frame have at least one identical audio tag. Finally, the playback mode of the second white noise data frame is set, and the second white noise data frame is played directly after the first white noise data frame is played.
[0027] In an embodiment of the present application, a multidimensional audio tag is obtained through a white noise classification model, and the white noise data frame to be played is pre-cached based on the multidimensional audio tag, thereby eliminating the interruption of white noise playback, optimizing playback smoothness, reducing cache resource occupancy, and improving system operation efficiency.
[0028] It is particularly important to emphasize that the embodiments of the present application are primarily used for caching and playing the same song. For example, in the case of continuously playing the same song, the first white noise data frame and the second white noise data frame belong to the same song. In this case, by obtaining a multidimensional audio tag through the white noise classification model and pre-caching the white noise data frames belonging to the same song that are about to be played based on the multidimensional audio tag, it is possible to effectively avoid interruptions in white noise playback, eliminate the sense of interruption in white noise playback, and optimize playback fluency.
[0029] The white noise seamless loop playback scheme based on audio frame pre-caching provided in the embodiments of the present application can also be executed by an electronic device, which can be a server, a server cluster, or a cloud server. The electronic device can also be a terminal device such as a mobile phone, a computer, a tablet computer, a wearable device, or a dedicated device (such as a dedicated terminal device with a white noise seamless loop playback system based on audio frame pre-caching, etc.). These electronic devices can also be equipped with the chips introduced in the above embodiments. Alternatively, these electronic devices can also be installed with a service program for executing the white noise seamless loop playback scheme based on audio frame pre-caching.
[0030] Figure 1 A schematic diagram of a method for seamless loop playback of white noise based on audio frame pre-caching provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes the following steps:
[0031] 101. For a first white noise data frame currently being played, identify a multidimensional audio label corresponding to the first white noise data frame using a white noise classification model;
[0032] 102. Select a second white noise data frame to be played from a pre-established candidate audio library based on the multi-dimensional audio tag, and pre-cache the second white noise data frame;
[0033] 103. Set a play mode for the second white noise data frame, and directly play the second white noise data frame after the first white noise data frame is played.
[0034] In the embodiment of the present application, the first white noise data frame refers to the basic unit in the white noise audio data currently being played. The first white noise data frame is the starting point of the entire audio processing process and carries key information for subsequent analysis and matching. It is analyzed by a white noise classification model to identify corresponding multi-dimensional audio tags. These tags include white noise types (such as waves, rain, birdsong, etc.), sound intensity levels (low, medium, high), audio rhythm types (linear changes, periodic changes, random changes, etc.), timbre types (sharp, soft, etc.) and audio scenes (forest, seaside, city, etc.). Based on these tags, the system selects a second white noise data frame with at least one identical audio tag from a pre-established candidate audio library, so that after the first white noise data frame is played, seamless switching playback can be achieved. The feature recognition and analysis of the first white noise data frame plays a vital role in achieving seamless loop playback of white noise, improving audio matching and optimizing system performance.
[0035] It is understandable that, for the case of continuously playing the same song, the first white noise data frame and the second white noise data frame belong to the same song. In this case, the first white noise data frame and the second white noise data frame correspond to the multidimensional audio tags of the same song.
[0036] In the embodiments of the present application, an audio tag is an identifier or metadata used to describe the characteristics and attributes of audio data. It can quantify and classify information of various dimensions of audio to facilitate the recognition, management, retrieval, and processing of audio by computer systems or users. In the above-mentioned technical solution for seamless loop playback of white noise based on audio frame pre-caching, audio tags specifically include the following categories:
[0037] The white noise type is used to distinguish white noise generated by different natural or man-made environments, such as wind, rain, ocean waves, and campfires. It clarifies the basic sound source characteristics of the audio and helps the system and users quickly identify the main content of the audio.
[0038] The sound intensity level reflects the strength of the audio signal, typically measured by volume or sound pressure level, and is often expressed as low, medium, high, or a specific decibel range. This tag helps the system select the appropriate volume for audio playback based on user needs or scenario requirements, avoiding situations where excessively loud or soft audio impacts the user experience.
[0039] The audio rhythm type describes the temporal variation of an audio signal, such as whether it is periodic, how fast the rhythm is, and whether the rhythm changes smoothly or suddenly. For example, a heartbeat may have a stable, periodic rhythm, while the rustling of leaves may have a relatively random rhythm. This tag enables the system to select audio frames with a coherent and harmonious rhythm, ensuring smooth and natural playback.
[0040] The timbre type reflects the unique sonic characteristics of audio, determined by factors such as the audio's harmonic content and waveform envelope, and can range from soft, sharp, bright, or deep. Different timbres can provide users with distinct auditory experiences. This tag allows the system to select audio frames that match the timbre, enhancing the overall quality and coherence of the audio.
[0041] An audio scene summarizes the overall environment or situation simulated or represented by the audio, such as a forest, beach, office, or bedroom. It categorizes audio from a broader perspective, enabling the system to accurately select appropriate audio based on the user's specific scenario or needs, creating an auditory atmosphere that better suits the user's actual needs.
[0042] It is understandable that the classification system of audio tags can be adjusted according to different needs. From the perspective of application scenarios, for example, sleep assistance scenarios, if it is mainly used for sleep assistance products, it may focus more on classifying audio tags according to relevant dimensions of sleep-aiding effects. In addition to the basic types mentioned above, you can also add labels such as "deep sleep aid" to divide audio into different deep sleep aid levels based on professional data such as the impact of audio on human brain waves; or set a "soothing ingredient ratio" label to analyze the proportion of elements in the audio that help calm the mind, such as soft melodies and low-frequency rhythms.
[0043] In the music creation field, audio tag classification will focus more on music theory and creative elements. For example, a "Chord Progression Type" tag will be added to indicate whether the chord progression contained in the audio is a classic canon progression or other special chord connections; a "Melody Development Mode" tag will also be added to indicate whether the melody development techniques used are imitation, reflection, etc. This will help creators quickly locate audio that matches their creative ideas when searching for materials.
[0044] From the perspective of user groups, for professional audio engineers, the classification requirements for audio tags will be more professional and detailed. It may be necessary to add tags related to audio technical parameters such as "audio sampling rate" and "bit depth" so that they can accurately screen out audio materials that meet technical requirements when performing audio editing, mixing, etc.; "dynamic range" tags may also be needed to measure the gap between the strongest and weakest sounds in the audio signal, which is very important for audio post-processing and effect adjustment.
[0045] For ordinary users, who may be more concerned with the emotional attributes of audio and the convenience of usage scenarios, we can add a "mood matching" tag to categorize audio into different emotional categories such as soothing, joyful, and uplifting; and "activity matching" tags, such as sports, gatherings, and study, to help users quickly find suitable audio based on their current activities.
[0046] From a technological perspective, deep learning algorithms can be used to extract and classify audio features in a more complex manner, thereby adding new types of labels. For example, "audio semantic labeling" uses semantic understanding of audio content to identify specific events or scenes contained in the audio, such as "crowd cheering" or "car driving." "Emotional labeling" uses sentiment analysis technology to more accurately determine whether the audio conveys positive, negative, or neutral emotions.
[0047] As new audio formats and encoding methods continue to emerge, it may be necessary to add tags related to these new technologies. For example, for audio files that support spatial audio, it is necessary to add a "Spatial Audio Mode" tag to indicate whether it is a specific spatial audio type such as panoramic sound or surround sound; the "Audio Encoding Type" tag is used to distinguish between MP3, FLAC, and other new encoding formats, so that devices and software can correctly decode and play the audio.
[0048] It is worth noting that the traditional audio classification method may simply divide it into major categories such as music and voice, which is difficult to meet the needs of more in-depth and detailed management of audio content. Multi-dimensional audio tags can establish a more accurate and comprehensive classification system for audio by covering multiple dimensions such as white noise type, sound intensity level, audio rhythm type, timbre type, audio scene, etc., so that each audio can find its accurate position in the complex audio library. When users need to find specific audio, multi-dimensional audio tags allow users to filter and search from multiple dimensions according to their specific needs. For example, a user wants to find a natural environment white noise audio with low sound intensity to help sleep. Through the precise labeling of multi-dimensional audio tags, the system can quickly and accurately match users with audio resources that meet the requirements, greatly improving retrieval efficiency and accuracy.
[0049] By analyzing user listening history and behavior data, combined with multi-dimensional audio tags, the audio platform can gain a deep understanding of user preferences in terms of white noise type, intensity, tempo, timbre, and context. For example, if a user frequently listens to white noise like rain and prefers audio with a low intensity and a consistent tempo, the platform can accurately recommend similar audio content based on these tag characteristics.
[0050] Different users have different audio needs in different scenarios. Multi-dimensional audio tags can help the platform better meet these diverse needs and provide users with personalized audio recommendations. For example, for users who prefer to listen to music with a fast beat and moderate volume while exercising, the platform can recommend music or audio suitable for exercise based on tags such as rhythm type and volume level.
[0051] Users have different audio needs in different life scenarios. The audio scene tags in the multi-dimensional audio tag can help users quickly find audio that suits the current scene. For example, when a user is in a meditation and relaxation scene, by selecting the audio scene tag related to "Meditation", they can quickly obtain a series of audio suitable for meditation, such as natural wind and flowing water, creating an atmosphere that is more suitable for the scene and enhancing the user's experience in that scene.
[0052] Users can use multi-dimensional audio tags to customize their listening experience based on their preferences for sound intensity, timbre, and other dimensions. For example, users who prefer soft tones can filter out audio with soft tones and adjust the sound intensity to a comfortable range for a more satisfying listening experience.
[0053] For audio creators, multi-dimensional audio tags can serve as a reference for their creations. By analyzing the tag features of different types of audio, creators can understand the characteristics of popular audio in the market and draw on the design ideas of excellent works in terms of white noise type, rhythm, timbre, etc. to create audio works that better meet user needs. For example, if a creator wants to create an audio to help them sleep, they can refer to the common white noise types, appropriate sound intensity and rhythm tags in existing sleep-aiding audio to carry out targeted creation.
[0054] In the field of audio research, multidimensional audio tags provide researchers with a rich set of data. By analyzing large amounts of audio tag data, researchers can study the distribution of audio features across different dimensions and user preferences for different audio features. For example, by analyzing the timbre preferences of users of different age groups, we can understand the relationship between audio perception and age, providing strong support for research in fields such as audio psychology and acoustics.
[0055] As an optional embodiment, in 101, identifying the multidimensional audio label corresponding to the first white noise data frame by using a white noise classification model can be implemented as follows:
[0056] Extracting a first white noise data frame feature corresponding to the first white noise data frame;
[0057] Obtaining candidate audio classification information corresponding to the first white noise data frame feature through a multi-branch perception layer; each branch perception layer in the multi-branch perception layer is used to extract corresponding key feature information from the first white noise data frame feature, and obtain corresponding candidate audio classification information based on the extracted key feature information; each branch perception layer is obtained based on a corresponding classification logic setting;
[0058] The candidate audio classification information corresponding to the first white noise data frame feature is converted into a corresponding multi-dimensional audio label.
[0059] In this embodiment of the present application, the second white noise data frame and the first white noise data frame have at least one common audio tag. That is, when audio analysis and annotation are performed on the two white noise data frames, their tag contents are consistent in one or more dimensions of the multidimensional audio tag.
[0060] It is worth noting that the embodiment of the present application is mainly aimed at the situation of continuously playing the same song. In this case, the first white noise data frame and the second white noise data frame correspond to the multi-dimensional audio tags of the same song.
[0061] For example, a multidimensional audio label includes multiple dimensions such as white noise type, sound intensity level, audio rhythm type, timbre type, and audio scene. For example, the multidimensional audio label of the first white noise data frame is {white noise type: rain, sound intensity level: medium intensity, audio rhythm type: uniform speed, timbre type: soft, audio scene: indoor}, and the multidimensional audio label of the second white noise data frame is {white noise type: rain, sound intensity level: high intensity, audio rhythm type: variable speed, timbre type: crisp, audio scene: outdoor}. In this case, they have the same audio label "rain" in the dimension "white noise type".
[0062] In this way, the two white noise data frames have similar audio features in some respect. For example, the same white noise type means that they belong to the same category in terms of the essential properties of the sound, and may both simulate the same sound phenomenon in a natural environment. In audio processing and analysis, the same audio tag can be used as a basis for determining whether two audio data frames have a certain connection or similarity. For example, in an audio retrieval system, if a user searches for "rain sound" white noise, the first and second white noise data frames with the same audio tag "rain sound" may both be retrieved as related results. For audio data frames with uncertain or difficult-to-accurate audio tags, they can be compared with other data frames with known audio tags. If at least one identical audio tag is found, the other tag information of the known data frames can be used to assist in analyzing and improving the tagging of the current data frame. For example, if the audio scene tagging of the second white noise data frame is more accurate, while the audio scene tagging of the first white noise data frame is less certain, but they share the same white noise type tag, the audio scene of the second white noise data frame can be used to further determine the audio scene of the first white noise data frame.
[0063] In actual applications, when building an audio database, by identifying the same audio tags between different audio data frames, the audio data can be classified, stored, and managed to facilitate subsequent queries and calls. Based on the user's preference for audio data frames with certain audio tags, other audio data frames with the same or similar audio tags are recommended. For example, if the user likes the "rain sound" white noise type of the first white noise data frame, the system can recommend the second white noise data frame with the "rain sound" tag or other similar audio data. When developing and evaluating audio processing algorithms, different data frames with the same audio tags are used to test the accuracy and stability of the algorithm. If the algorithm can obtain accurate processing results for different data frames with the same audio tags, it means that the algorithm has good generalization ability.
[0064] Specifically, in the optional embodiment of step 101 above, various signal processing and feature extraction methods can be used for the first white noise data frame, such as short-time Fourier transform (STFT), to convert the time-domain white noise data into the frequency domain and obtain its spectral characteristics, including frequency distribution and energy distribution. Mel-frequency cepstral coefficients (MFCCs) can also be calculated, which simulate the human ear's perception of sound frequency and extract features that are more consistent with human auditory perception. At the same time, time-domain features such as zero-crossing rate and energy entropy can also be extracted to comprehensively describe the characteristics of the first white noise data frame.
[0065] Multiple branch perception layers are set up based on the key feature information to be extracted and the classification logic to be used. For example, to extract white noise type features, a branch perception layer can be set up, and its classification logic can be based on the spectral characteristics of different white noises. For example, the spectrum of the sound of ocean waves has a specific energy distribution in certain frequency bands, which is different from other white noises such as rain. For sound intensity levels, another branch perception layer can be set up, and its classification logic can be based on the energy level of the audio to divide it into different intensity levels.
[0066] For audio rhythm types, the branch perception layer can determine the rhythm type by analyzing the periodicity, beat and other characteristics of the audio signal. For example, a uniform rhythm has a relatively stable periodic characteristic, while a gradual rhythm has a gradually changing periodic characteristic. For timbre types, the branch perception layer can judge based on the harmonic structure, resonance peaks and other characteristics of the spectrum. For example, a soft timbre has relatively few high-frequency components and a relatively smooth harmonic structure. For audio scenes, the classification logic of the branch perception layer can be set according to the specific environmental characteristic sounds contained in the audio. For example, indoor scenes may contain some sound characteristics of electrical appliances running, while outdoor forest scenes have rich sound characteristics such as birdsong and insects.
[0067] After receiving the features of the first white noise data frame, each branch perception layer processes it according to its own classification logic. For example, the white noise type branch analyzes spectral characteristics and compares them with established feature templates for various white noise types. It determines the most likely type of white noise for the first white noise data frame and derives the corresponding candidate audio classification information, such as rain-like white noise.
[0068] The sound intensity level branch perception layer calculates the energy value of the audio, compares it with the preset energy thresholds of different intensity levels, and determines candidate information for its sound intensity level, such as low intensity, medium intensity, or high intensity. The audio rhythm type branch perception layer determines candidate information such as whether its rhythm type is uniform, gradual, or random through periodic analysis of the audio signal. The timbre type branch perception layer determines candidate information such as soft, sharp, or mellow timbre based on characteristics such as the harmonics of the spectrum. The audio scene branch perception layer determines candidate information such as indoor scene, outdoor scene, or special scene based on the environmental characteristic sounds.
[0069] The candidate audio classification information obtained by each branch perception layer is integrated and converted into a multidimensional audio label. For example, if the white noise type branch determines that it is the sound of waves, the sound intensity branch determines that it is medium intensity, the audio rhythm branch determines that it is uniform speed, the timbre type branch determines that it is soft, and the audio scene branch determines that it is an outdoor scene, then the final converted multidimensional audio label can be expressed as: {white noise type: ocean wave sound, sound intensity level: medium intensity, audio rhythm type: uniform speed, timbre type: soft, audio scene: outdoor scene}.
[0070] Extract features from the second white noise data frame using the same feature extraction method as the first white noise data frame to obtain features from the second white noise data frame. Then, input the features from the second white noise data frame into the same multi-branch perception layer to obtain candidate audio classification information.
[0071] Comparing the candidate audio classification information obtained by the first and second white noise data frames at each branch perception layer, since they share at least one common audio label, the classification results on some branches should be consistent. For example, if they are known to have the same white noise type, then the results obtained by the white noise type branch perception layer should all be the same type judgment, such as ocean waves.
[0072] Based on the same audio label settings, the multi-dimensional audio labels of the first white noise data frame can be optimized and calibrated. If the classification result of the second white noise data frame on a certain branch is more accurate or reliable (for example, due to better audio quality of the second white noise data frame), the result of the second white noise data frame on that branch can be used to modify the candidate audio classification information of the corresponding branch of the first white noise data frame.
[0073] For example, if the second white noise data frame is determined to have a sound intensity level of "medium to weak" through more precise analysis, and the first white noise data frame was originally judged to be simply "medium intensity", then based on the same audio label relationship between the two, the sound intensity level candidate information of the first white noise data frame can be optimized to "medium to weak", thereby making the multi-dimensional audio label of the first white noise data frame more accurate and complete.
[0074] Further optionally, in 101, obtaining candidate audio classification information corresponding to the first white noise data frame feature through a multi-branch perception layer includes:
[0075] Inputting the first white noise data frame feature into a classification target layer to identify the type of white noise in the first white noise data frame feature;
[0076] Based on the identified white noise type, adaptively configure the branch perception layer type involved in the corresponding multi-branch perception layer;
[0077] Call the corresponding type of multi-branch perception layer to identify the audio change features corresponding to different frequency bands, different time intervals, and different change waveforms in the first white noise data frame feature to obtain candidate audio classification information corresponding to the first white noise data frame feature.
[0078] Specifically, white noise type is a key characteristic of audio. Different types of white noise, such as wind, rain, and ocean waves, have unique acoustic properties. Accurately identifying white noise types provides a foundation for subsequent audio processing and analysis, as different types of white noise may also exhibit distinct patterns in other characteristic dimensions.
[0079] The classification target layer is typically built based on a machine learning or deep learning model. For example, a convolutional neural network (CNN) can be used. Its convolutional layers automatically extract local patterns in audio features, while its pooling layers reduce the dimensionality of these features to retain key information. By training on a large amount of audio data with known white noise types, the model can learn the characteristic patterns of different types of white noise. The features of the first white noise data frame are input to the trained model, and the model outputs a prediction of the white noise type for that data frame. For example, let's assume that the features of the first white noise data frame input are a preprocessed spectrogram. The CNN model uses convolution operations to extract features from the spectrogram, such as frequency distribution and energy concentration areas. After multiple layers of convolution and pooling, the fully connected layers map these features to different white noise types. A softmax function is used to output the probability of each category (e.g., wind, rain, etc.). The category with the highest probability is the identified white noise type.
[0080] Different types of white noise exhibit distinct characteristics across frequency bands, time intervals, and waveforms. For example, the sound of rain may contain more detailed information in high-frequency bands, as raindrops impacting surfaces produce richer high-frequency sounds. Meanwhile, the sound of ocean waves may possess greater energy in low-frequency bands, manifesting as a low-frequency roar. Therefore, adaptively adjusting the branch types of the multi-branch perception layer based on the identified white noise type allows for more targeted extraction of key features.
[0081] If the identified white noise type is rain, due to its wide frequency range and rich high-frequency components, more branch perception layers focusing on high-frequency bands may be configured. These branch perception layers can use specific filters or convolution kernels to highlight high-frequency features. Furthermore, considering that rain sounds may be intermittent in time, branch perception layers specifically analyzing time series interval characteristics will be configured to capture information such as the intervals and rhythm of falling raindrops. Regarding changing waveforms, the sound waveform of falling raindrops may have a certain degree of periodicity or randomness, and the corresponding branch perception layers can analyze these waveform variations. If the identified sound is ocean waves, given its low-frequency characteristics, branch perception layers sensitive to low-frequency bands will be configured, as well as a time series analysis branch perception layer capable of capturing the periodic changes in ocean sound over long time scales (such as the rising and falling rhythm of the waves).
[0082] When identifying features in different frequency bands, each branch perception layer analyzes a specific frequency band. For example, the high-frequency branch perception layer uses a bandpass filter or a specific convolution kernel to focus on the audio change characteristics in the high-frequency band. It calculates features such as energy distribution and frequency peaks within the high-frequency band. Assuming that the audio data is converted to the frequency domain through a fast Fourier transform (FFT), the high-frequency branch perception layer performs a convolution operation on the spectrum of the high-frequency part to extract high-frequency feature patterns. These feature patterns can reflect the detailed information of white noise in the high-frequency band, such as the high-frequency sound characteristics produced by splashing raindrops. By analyzing and learning these features, the branch perception layer can determine the type of white noise characteristics in the high-frequency band. For example, rich and sharp high-frequency components may correspond to the sound characteristics of raindrops hitting hard surfaces.
[0083] When identifying features across different time intervals, the perception layer of the temporal analysis branch focuses on changes in the audio within different time intervals. It divides the audio data into multiple intervals in chronological order and analyzes the audio features within each interval, such as energy changes and frequency changes. For example, for rain sounds, it analyzes the changes in audio energy within each raindrop's falling interval, as well as the changes in the frequency of raindrops falling over a period of time. By extracting and analyzing these temporal features, it is possible to determine the rhythm type of the audio, such as whether the raindrops have a uniform rhythm or a rhythm that varies in speed.
[0084] When identifying the characteristics of varying waveforms, the branch perception layer responsible for analyzing the changing waveform can use time-frequency analysis methods such as wavelet transforms to convert the audio signal into a time-frequency plot, observing how the waveform changes over time and frequency. For example, the waveform of ocean waves may exhibit periodic fluctuations. This branch perception layer identifies the characteristic patterns of ocean waves by analyzing characteristics such as the period and amplitude of the waveform. For example, the waveform's autocorrelation function can be calculated to determine its periodicity, while the peaks and valleys of the waveform can be analyzed to determine the intensity of the waves.
[0085] Each branch perception layer integrates the extracted features of different frequency bands, time series intervals, and changing waveforms to form candidate audio classification information. This information comprehensively reflects the characteristics of white noise in multiple dimensions. For example, the characteristics of the high-frequency band indicate the sharpness of the sound, the time series characteristics reflect the regularity of the rhythm, and the changing waveform characteristics reflect the dynamic change pattern of the sound. This information can be further used to determine other multi-dimensional audio labels such as the sound intensity level, timbre type, audio scene, etc. of white noise, or directly used as a classification basis to provide a reference for the subsequent selection of the second white noise data frame from the candidate audio library.
[0086] Further, optionally, after extracting the first white noise data frame feature corresponding to the first white noise data frame in 101, an interference noise feature matrix in the first white noise data frame may also be extracted; the interference noise elements in the interference noise feature matrix are expressed as follows:
[0087] ;
[0088] Among them, among them, Represents the first white noise data frame feature The corresponding interference noise element at the t-th time step is, and for The dynamic expansion rate in the interference noise characteristic matrix, and for The dynamic step size in the interference noise characteristic matrix, and is the interference noise analysis dimension index, and is the first white noise data frame feature The output coordinate values of and for exist Furthermore, in step 101, the interference noise feature matrix is fused with the first white noise data frame feature, and the fusion result is input into the multi-branch perception layer to increase the robustness of the first white noise data frame feature processing process.
[0089] In the above steps, the interference noise feature matrix is fused with the first white noise data frame features to enable the model to simultaneously consider the interference noise information present when processing the white noise data frame features. In actual audio data, interference noise is inevitable. By explicitly extracting the interference noise features and fusing them with the white noise features, the model can better learn the true characteristics of white noise and avoid being misled by interference noise. This allows the model to more accurately identify and process white noise data in various complex audio environments and varying degrees of interference, improving the model's stability and accuracy, thereby increasing the robustness of the processing process.
[0090] For example, when identifying white noise in rain, if there's interfering noise like wind, the model might misidentify certain wind noise features as rain noise without considering the interfering noise feature matrix, leading to incorrect recognition. However, by integrating the interfering noise feature matrix, the model can accurately distinguish wind noise as interfering noise and more accurately extract the features of rain noise, thereby improving the accuracy of white noise identification.
[0091] The intensity and characteristics of interfering noise may vary in different audio environments. For example, white noise experiences different levels of interfering noise indoors and outdoors. By integrating the interfering noise feature matrix, the model can better adapt to these changes, preventing significant deviations in the extraction of white noise features due to interfering noise variations. This ensures that the model maintains relatively stable performance across various audio environments, enhancing its stability.
[0092] After training with the interference noise feature matrix, the model can also perform better in extracting and processing white noise features from new audio data it has never seen before. For example, if the training data only contains some types of interference noise, but a new type of interference noise is encountered in real-world applications, the model, having already learned how to process the relationship between interference noise and white noise, can more effectively extract white noise features from the new data, improving the model's generalization ability and making it more applicable to audio processing tasks in a variety of real-world scenarios.
[0093] Further optionally, after extracting the first white noise data frame feature corresponding to the first white noise data frame in 101, the real-time delay information, real-time network fluctuation information, and real-time network environment status corresponding to the playback of the first white noise data frame can also be obtained. Furthermore, based on the real-time delay information, real-time network fluctuation information, and real-time network environment status, the predicted network environment information when the first white noise data frame is played to a preset time period is predicted; wherein the preset time period at least includes: a preset duration before the end of the first white noise data frame. Then, based on the predicted network environment information, the adaptability between the predicted network environment information and the memory resources corresponding to the preloaded area in the playback device is evaluated. Finally, based on the adaptability, the network transition type corresponding to the first white noise data frame is determined; the network transition type is used to indicate the network preload status before connecting to the second white noise data frame.
[0094] For example, suppose you are using an online white noise playback application, and the first white noise data frame currently being played is an audio clip simulating a forest environment. Through the network monitoring module within the application, the real-time delay information obtained when the first white noise data frame is currently being played is 50 milliseconds. The real-time network fluctuation information shows that the network bandwidth has fluctuated between 1 and 1.2 Mbps in the past 10 seconds, and the real-time network environment status indicates that it is currently in a 4G network environment with a signal strength of 3 bars. Using a prediction model based on historical data and a machine learning algorithm, the predicted network environment information 10 seconds (preset duration) before the end of the first white noise data frame is predicted based on the above real-time information. For example, the prediction result shows that 10 seconds before the end of the first white noise data frame, the network delay will increase to 80 milliseconds, the network bandwidth may drop to 0.8 Mbps, the network environment will still be a 4G network, but the signal strength may drop to 2 bars.
[0095] Furthermore, the preload area memory resources of the playback device are set to cache 10 seconds of audio data at a 1Mbps bandwidth to ensure smooth playback. Based on the predicted network environment information, the amount of audio data for 10 seconds at a 0.8Mbps bandwidth is less than the preload area memory capacity. The calculated adaptability is high, assuming an adaptability assessment of 80% (out of a maximum score of 100%).
[0096] Finally, based on the adaptation degree of 80%, the network transition type is determined to be "smooth transition", which means that before connecting to the second white noise data frame, the network preloading state is relatively stable and there are sufficient memory resources to preload the second white noise data frame to ensure the continuity of playback.
[0097] As can be seen from the above example, real-time latency information can be obtained by measuring the time interval for audio data to be transmitted from the server to the playback device; real-time network fluctuation information can be obtained by monitoring changes in network bandwidth within a certain time window; the real-time network environment status can be determined by the device's network connection status detection module, such as determining whether it is Wi-Fi, 4G, 5G, etc., and the corresponding signal strength.
[0098] Network environment information can be predicted using time series analysis or machine learning algorithms. For example, historical network data (including network latency, bandwidth, network type, and signal strength over different time periods) can be used to build a prediction model. Common algorithms include the Autoregressive Integrated Moving Average (ARIMA) model for time series latency and bandwidth prediction. For network environment status (such as network type and signal strength), rule-based prediction or simple machine learning classification algorithms can be used to predict current and recent trends in the network environment. These models learn from patterns in historical data to estimate the network environment for a preset time period in the future.
[0099] Furthermore, the memory resources corresponding to the preloaded area have certain capacity limitations, which are related to the transmission rate and duration of the audio data. Based on the predicted network environment information, the amount of audio data that needs to be transmitted within a preset time period can be calculated. For example, given the predicted network bandwidth, the amount of data that can be transmitted within the preset duration can be calculated, and then compared with the amount of data that can be accommodated by the memory resources in the preloaded area to determine the degree of adaptability. The adaptability assessment can use a simple proportional calculation (such as predicted transmission data volume / preloaded area capacity), or consider more complex factors such as data transmission stability, error range, etc. for weighted calculation.
[0100] In this way, different thresholds can be set based on the adaptability to determine the type of network transition. For example, when the adaptability is higher than 70%, the network transition type is considered to be "smooth transition," indicating that the network preloading status is good and the second white noise data frame can be preloaded smoothly. When the adaptability is between 40% and 70%, it may be determined to be "transition requiring optimization," meaning that some optimization measures need to be taken, such as adjusting the preloading strategy or reducing audio quality. When the adaptability is lower than 40%, it is determined to be "unstable transition," and playback may need to be paused or the user may be prompted that the network is in poor condition.
[0101] By predicting network environment information in advance and evaluating its compatibility with memory resources, the above steps can predict in advance whether the network preloading status is good when switching to the second white noise data frame during playback of the first white noise data frame. If the network environment is predicted to deteriorate but still within the optimizable range, the preloading strategy can be adjusted in advance, such as starting to preload the second white noise data frame in advance or caching more data when network conditions are good. This reduces lag or buffering caused by network issues during the switch and improves playback smoothness. This prevents sudden playback interruptions or prolonged buffering due to network issues, making the entire white noise playback process more consistent and comfortable. This smooth playback experience is particularly effective for users who require extended white noise playback to aid sleep, meditation, or focused work. This effectively reduces external distractions and improves user satisfaction with the application. Based on the predicted network environment information and compatibility, the memory resources of the playback device are rationally allocated and utilized. This avoids excessive preloading during poor network conditions, which wastes memory resources, or insufficient preloading during good network conditions, which affects playback smoothness. This effectively coordinates memory and network resources and improves resource utilization efficiency.
[0102] As an optional embodiment, in 102, based on the multi-dimensional audio tag, selecting a second white noise data frame to be played from a pre-established candidate audio library includes:
[0103] A virtual playback scene corresponding to the first white noise data frame is constructed based on the multidimensional audio tag; according to the nodes corresponding to each audio tag in the virtual playback scene, a candidate white noise data frame having at least one identical node is selected from the candidate audio library; an arrangement of the nodes corresponding to each audio tag in the virtual playback scene is determined based on the attributes of the white noise data frame; and the second white noise data frame is determined from the candidate white noise data frames based on user preference data.
[0104] For example, assume that the multi-dimensional audio tags of the first white noise data frame are: {white noise type: ocean wave sound, sound intensity level: medium intensity, audio rhythm type: uniform speed, timbre type: soft, audio scene: seaside}. A virtual playback scene is constructed based on these audio tags. For example, with the "seaside" audio scene as the core, the "ocean wave sound" white noise type is developed around this scene, and the "medium intensity" sound intensity level, "uniform speed" audio rhythm type, and "soft" timbre type are used as attribute nodes of the ocean wave sound in this scene. One can imagine a virtual seaside scene where the waves rise and fall with medium intensity, uniform speed, and soft sound.
[0105] The candidate audio library stores a large number of white noise data frames with various audio labels. Based on the nodes corresponding to each audio label in the virtual playback scene, the candidate audio library is searched for candidate white noise data frames with at least one identical node. For example, a data frame in the candidate audio library is labeled {white noise type: ocean wave sound, sound intensity level: high intensity, audio rhythm type: variable speed, timbre type: crisp, audio scene: seaside in a storm}. Because its white noise type is the same as the first white noise data frame (both are ocean waves), this data frame is selected as a candidate white noise data frame. Suppose there are other data frames, such as one labeled {white noise type: wind sound, sound intensity level: medium intensity, audio rhythm type: uniform speed, timbre type: sharp, audio scene: mountaintop}. Because its sound intensity level and audio rhythm type share the same nodes as the first white noise data frame, it is also selected as a candidate white noise data frame.
[0106] Assume that user preference data indicates that the user prefers white noise with moderate sound intensity and a steady rhythm. Among the candidate white noise data frames, the second data frame (sound intensity level: medium intensity, audio rhythm type: uniform) better matches the user's preference, so it is determined as the second white noise data frame.
[0107] As can be seen from the above examples, during the construction of the virtual playback scene, multi-dimensional audio tags provide rich audio feature description information. The construction of the virtual playback scene by combining these tags is based on the correlation between audio tags. For example, a specific audio scene is usually closely related to a specific type of white noise, sound intensity, etc. Taking the "seaside" scene as an example, one will naturally think of the white noise type of the sound of waves, and in this scene, the sound intensity, rhythm, timbre, etc. will also have corresponding common attributes. This construction method transforms abstract audio tags into a more intuitive and relevant virtual scene, which facilitates the subsequent scene-based screening of data frames.
[0108] Furthermore, each white noise data frame in the candidate audio library has its own audio tag. By comparing the nodes corresponding to the audio tags in the virtual playback scene with the audio tags of the data frames in the candidate audio library, data frames with at least one identical node are selected as candidates. This is based on the assumption that data frames with the same audio tag nodes are similar in some aspects. Even if other tags are different, they are consistent in at least one key feature. This provides a larger range of options for the subsequent selection of a suitable second white noise data frame.
[0109] User preference data reflects the user's preference for different audio tags. Among the candidate white noise data frames, the user preference data is analyzed to select the data frame that best matches the user's preference as the second white noise data frame. For example, if the user frequently selects white noise with medium intensity, then among the candidate data frames, data frames with the medium intensity tag are more likely to be selected. This ensures that the selected second white noise data frame better meets the user's personalized needs.
[0110] Thus, by constructing a virtual playback scene and selecting candidate white noise data frames based on the audio tag nodes in the scene, the feature similarities between audio data frames can be more comprehensively considered. Compared with selection based solely on individual audio tags, this method can comprehensively screen from multiple dimensions, improving the overall feature matching between the selected white noise data frame and the first white noise data frame, thereby providing users with a more coherent and more expected audio experience. Determining the second white noise data frame from the candidate white noise data frame based on user preference data fully considers the user's personalized needs. Different users have different preferences for sound intensity, rhythm, timbre, etc. This method can meet the user's personalized choices and improve user satisfaction and loyalty to the audio playback service. The above steps can fully utilize the data resources in the candidate audio library. Through the screening mechanism based on virtual playback scenes and user preferences, each data frame in the candidate audio library has the opportunity to be selected based on its audio tag features, avoiding some data frames from being idle for a long time due to a single-dimensional screening standard, and improving the utilization rate of the entire audio library resources.
[0111] Furthermore, virtual playback scenes can be optimized across multiple dimensions, including richer scene details, enhanced user interaction, and intelligent dynamic adjustments. In addition to existing tags like white noise type and sound intensity level, further audio tags can be added, such as the audio's spatial location (indicating the sound's origin from the left front, front, or other directions) and the audio's reverberation (simulating reverberation in different spaces like caves and rooms), making the virtual playback scene more three-dimensional and realistic. Consider integrating visual elements to match the virtual playback scene with corresponding static images or dynamic videos. For example, while playing white noise like waves, a video of a seaside scene could be displayed simultaneously. Olfactory elements could also be integrated by connecting smart devices to aromatherapy devices, releasing scents that match the scene, such as a faint fishy aroma in a seaside scene, comprehensively enhancing the user's sense of immersion. Providing users with more customization capabilities allows them to freely combine audio tags to create unique virtual playback scenes based on their preferences. For example, users can customize the intensity and rhythm of the waves and add other sound effects like seagulls to create their own unique seaside virtual scene. Develop real-time interactive features that allow users to interact with the virtual scene in real time. For example, users can use voice commands to increase or decrease the sound of waves in the virtual scene, or switch the sound effect from waves to rain.
[0112] Optionally, machine learning algorithms can be used to analyze user behavior data on virtual playback scenes, such as the scene types and dwell time selected by users at different times and in different environments, to automatically adjust the parameters of the virtual playback scene. For example, if it is found that users tend to choose white noise scenes with lower sound intensity at night, the system can automatically reduce the sound intensity of the scene at night. Combined with sensor data from smart devices, such as light sensors and temperature sensors, the virtual playback scene can be adaptively adjusted according to the actual environment in which the user is located. For example, when the light becomes brighter, the audio rhythm in the virtual playback scene can be appropriately accelerated to create a more energetic atmosphere; when the temperature drops, the sound effects can appropriately add some elements such as wind sounds to make the scene more in line with the actual feeling.
[0113] When switching between different virtual playback scenes, smooth transition technology is used to avoid sudden changes in audio and visual elements that may cause discomfort to users. For example, when switching from a seaside scene to a forest scene, the sound of waves can gradually weaken, while the sound of birdsong in the forest and other sound effects gradually increase to achieve a natural transition. Analyze the correlation between different virtual playback scenes, and optimize the order and method of scene switching based on user usage habits and scene logic. For example, users often switch from seaside scenes to beach bonfire scenes. The system can make the switching between these two scenes more convenient and natural, and even add some transitional sound effects and images during the switching process, such as the sound of waves gradually turning into the sound of a burning bonfire, and the seaside scene gradually transitioning to the bonfire scene.
[0114] In 102, the second white noise data frame is pre-cached. In 103, a playback mode of the second white noise data frame is set.
[0115] Specifically, pre-caching involves retrieving the second white noise data frame to be played from a storage device or network and storing it in a cache space such as memory while the first white noise data frame is playing. This allows the data to be quickly read directly from the cache when the second white noise data frame is needed, without having to temporarily retrieve it from a slower storage medium or network. This significantly reduces playback latency and avoids lag.
[0116] Specifically, in step 102, the timing for pre-caching and the amount of data to be pre-cached can be determined based on pre-set playback rules or playback configurations. For example, the appropriate pre-caching timing and amount can be calculated in advance based on factors such as the playback progress of the first white noise data frame, network conditions, and device performance. Generally, pre-caching of the second white noise data frame will begin when a certain percentage (e.g., 80%) of the first white noise data frame has been played, ensuring that the second frame is ready for immediate playback when the first frame finishes playing.
[0117] For example, when playing the same song continuously, pre-caching the second white noise data frame is mainly to ensure smooth playback and avoid lag. Further optionally, a buffer (such as a queue) can be used to store the pre-cached data frames. In this way, the data frames can be managed according to the first-in-first-out (FIFO) principle to ensure that the data frames are played in sequence. When the first white noise data frame is played, the position of the next second white noise data frame to be cached is calculated based on the total number of frames of the song and the current playback position. For example, based on the network environment and the device cache situation, the length of the data frame to be cached in the future time period is dynamically configured. For example, a fixed-length caching strategy can be adopted, such as caching the next 10 data frames.
[0118] It is worth noting that in order not to affect the playback of the current data frame, the second white noise data frame can be read from the candidate audio library using asynchronous loading and added to the buffer.
[0119] For example, suppose a user is using a white noise player app to listen to the sound of rain (the first white noise data frame). Based on pre-set rules, when the rain sound reaches 20% of its duration, the app begins to retrieve the next segment of bird song (the second white noise data frame) from the server via the network in the background and stores it in the device's cache. If the network conditions are good, the bird song will have been completely pre-cached in the cache before the rain sound ends. When the bird song is needed, it can be directly read from the cache for playback, achieving a seamless transition.
[0120] This pre-caching effectively avoids playback interruptions or freezes caused by data retrieval delays, providing users with a smoother audio playback experience. Users no longer have to wait for data to load, and can transition more naturally from one white noise segment to the next, making the entire audio playback process more coherent and improving user satisfaction and engagement with the app.
[0121] In the above steps, different users have different preferences and needs for the playback of white noise. Setting the playback mode is to allow users to customize the playback behavior of the second white noise data frame according to their preferences. For example, various audio parameters can be set, such as volume, playback speed, channel balance, etc. By adjusting these parameters, the audio playback effect can be changed to adapt to different scenarios and user needs. A variety of playback modes are provided for users to choose from, such as single loop, sequential playback, random playback, etc. Single loop allows users to focus on a certain section of white noise to achieve a specific relaxation or sleep-inducing effect; sequential playback is suitable for scenarios with a certain order of audio content; random playback can bring more freshness and diversity to users.
[0122] For example, if a user uses a white noise app to help them sleep before bed, they can set the volume of the second white noise data frame (such as the sound of running water) to 30% to create a gentle sleeping atmosphere. At the same time, they can select single-track loop mode to play the running water sound continuously, helping them to relax and fall asleep. Furthermore, users can adjust the channel balance based on their headphones or audio equipment to make the sound more three-dimensional and comfortable.
[0123] This allows users to personalize the playback of the second white noise data frame based on their preferences and actual needs, better meeting the needs of different users in different scenarios. Providing a rich set of playback mode settings allows users to more actively participate in the audio playback process, increasing the interactivity between users and the application, and increasing user interest and usage frequency.
[0124] As an optional embodiment, in 103, the real-time playback environment state is obtained, and a preloading strategy is configured based on the real-time playback environment state, the timbre type and audio scene of the second white noise data frame; based on the preloading strategy, the playback mode of the second white noise data frame is set.
[0125] In an embodiment of the present application, the playback method includes at least: the preloaded frame number of the second white noise data frame, the preloaded sound intensity level, the preloaded audio rhythm type, the preloaded timbre type, and the audio transition effect between the second white noise data frame and the first white noise data frame.
[0126] When playing the same song continuously, setting the playing mode of the second white noise data frame is mainly for achieving seamless loop playback.
[0127] In an optional embodiment of step 103, playback parameters of the second white noise data frame, such as volume and channel, are set to ensure consistency with the playback parameters of the first white noise data frame to achieve a seamless transition. After the first white noise data frame is played, the second white noise data frame is immediately retrieved from the buffer and played to ensure playback continuity. When the last data frame of the song is played, the playback position is reset to the first data frame of the song to achieve loop playback.
[0128] Specifically, in step 103, the real-time playback environment status is obtained, including factors such as the ambient noise level, device power, and network stability. For example, in a noisy environment, the sound intensity level of white noise may need to be increased to ensure that the user can hear it clearly; if the device power is low, in order to save power, the number of preloaded frames may be appropriately reduced or the preloaded sound intensity level may be adjusted. Network stability will affect the method and timing of preloading. When the network is unstable, the number of preloaded frames may need to be increased to prevent playback from being stuck.
[0129] Different sound types have different requirements for preloading and playback. For example, gentle wind noise might require more subtle audio transitions to create a natural and smooth feel, while rushing water noise might require a higher preload intensity level to highlight its characteristics. Configuring preloading strategies and setting playback methods based on the characteristics of the sound type can better demonstrate the effects of each sound.
[0130] The audio scene determines the overall atmosphere and needs. If the audio scene is used to help with sleep, the preloaded audio rhythm type may choose a slow and steady rhythm, and the preloaded timbre type will tend to be soft and soothing sounds, such as the sound of waves or rain. The audio transition effect will be set very smoothly to avoid abrupt sound changes that affect the user's sleep. If the audio scene is used for focused work, relatively monotonous but regular white noise may be selected, such as the sound of a fan or air conditioner. The preload strategy will focus on ensuring the continuity and stability of the sound.
[0131] Scene 1: Office environment
[0132] Assume that the office environment has a certain amount of background noise, the network is stable, and the device has sufficient battery. Assume that keyboard tapping is selected as the timbre type of the second white noise data frame to simulate the natural sounds of the office, helping users better integrate into the work environment and improve their concentration. Assuming that the user is in a focused work scenario, based on the above assumptions, the preloaded frame number is set to a moderate level to ensure sound continuity; the preloaded sound intensity level is slightly higher than the office background noise, so that the keyboard tapping sound is clearly audible but not too abrupt; the preloaded audio rhythm type is similar to the normal keyboard typing rhythm and has a certain regularity; the preloaded timbre type is the keyboard tapping sound itself; and the audio transition effect is set to a gradual transition, smoothly transitioning from the first white noise data frame to the keyboard tapping sound, making the user feel natural and smooth.
[0133] Scene 2: Outdoor camping environment
[0134] Assume the real-time playback environment: the outdoor noise level is complex, including insects and wind, the network signal is weak, and the device battery level is average. Assume the timbre type of the second white noise data frame is the crackling sound of a campfire, enhancing the camping atmosphere. Assume the audio scene is an outdoor leisure scene. Based on the above assumptions, due to the weak network signal, the number of preloaded frames is appropriately increased to prevent playback interruptions. The preloaded sound intensity level is adjusted based on the surrounding noise level, highlighting the campfire sound while not overpowering other natural sounds. The preloaded audio rhythm type simulates the rhythm of a real campfire, with a certain degree of randomness and variation. The preloaded timbre type is the sound of a campfire. The audio transition effect is set to natural fusion, allowing the campfire sound to blend better with the first white noise data frame and the surrounding natural sounds, creating a realistic outdoor camping atmosphere.
[0135] Therefore, by configuring the preloading strategy and setting the playback mode according to the real-time playback environment status, timbre type, and audio scene, users can be more immersed in the scene created by the audio, better integrating into the user's immersion and experience. By reasonably setting the number of preloaded frames, sound intensity level, audio rhythm type, timbre type, and audio transition effects, the playback of white noise can be ensured to be smoother and more natural, avoiding problems such as stuttering and abruptness, and improving the audio playback quality. This method can be dynamically adjusted according to different environments and user needs, making the white noise playback system more adaptable and flexible, able to meet the needs of users in various scenarios and improve user satisfaction.
[0136] In the embodiment of the present application, on the first aspect, the second white noise data frame is played directly after the first white noise data frame is played, so as to ensure the continuity of the audio playback, avoid the problems such as pauses and freezes that may occur in the traditional playback method, and provide the user with a smooth listening experience. For example, in a sleep-aiding scenario, the user can continue to immerse himself in a stable white noise environment and will not be awakened or disturbed by the interruption of playback. Through the pre-caching technology, the second white noise data frame to be played is prepared in advance, so that the playback switching process is fast and without delay. This can ensure that the user's concentration is not disturbed in some scenarios with high real-time requirements, such as meditation, focused learning, etc., so that the user is always in the specific atmosphere created by white noise.
[0137] Secondly, the white noise classification model is used to identify the multi-dimensional audio tags corresponding to the first white noise data frame, including white noise type, sound intensity level, audio rhythm type, timbre type, audio scene, etc., and based on these tags, the second white noise data frame to be played is selected from the candidate audio library, and the two have at least one identical audio tag. This ensures that the selected audio frames are consistent and similar in content and style. For example, in the white noise playback that simulates a forest environment, it can ensure that the subsequently played audio frames also contain similar elements such as birdsong and rustling leaves, enhancing the realism and immersion of the scene. Multi-dimensional audio tags cover multiple dimensions and can adapt to different users' preferences for different types of white noise. For example, for users who like the gentle sound of ocean waves to help them sleep, the system will accurately match similar ocean sound audio frames based on tags such as sound intensity level and white noise type to meet the user's personalized needs and improve the user's satisfaction with the audio content.
[0138] Thirdly, the pre-caching technology only caches the second white noise data frame related to the currently playing audio frame, avoiding a large amount of unnecessary audio data storage and loading, reducing system resource usage, and improving system operation efficiency. For example, on mobile devices, it can reduce memory and power consumption, extending device battery life. Through precise audio frame matching and smooth playback process, it reduces possible errors and abnormalities during playback, and improves the stability and reliability of the system. In scenarios where white noise is played for a long time, the system can continue to operate stably without frequent error correction or restart, ensuring the user experience.
[0139] In summary, by switching directly to the second frame after the first frame is played, combined with pre-caching technology, the sense of playback interruption is eliminated, the playback smoothness is optimized, and a smooth listening experience is provided to users in scenarios such as sleep aid, meditation, and focused learning, maintaining user immersion. With the help of a white noise classification model to identify multi-dimensional audio tags, the next frame with at least one identical tag is selected from the candidate audio library based on the tag to ensure that the content style is consistent and similar, enhance the realism and immersion of the scene, and meet the diverse needs of users to improve satisfaction. In addition, the pre-caching technology only caches relevant audio frames, reducing resource usage, reducing memory and power consumption of mobile devices, and improving system operation efficiency. Accurate matching and smooth playback reduce errors and anomalies, enhance system stability, and ensure user experience.
[0140] Figure 2 A schematic diagram of the structure of a white noise seamless loop playback system based on audio frame pre-caching provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the system includes the following steps:
[0141] an identification unit, configured to identify, for a first white noise data frame currently being played, a multidimensional audio tag corresponding to the first white noise data frame using a white noise classification model; the multidimensional audio tag including at least: white noise type, sound intensity level, audio rhythm type, timbre type, and audio scene;
[0142] a selection unit, configured to select, based on the multidimensional audio tag, a second white noise data frame to be played from a pre-established candidate audio library; the second white noise data frame and the first white noise data frame having at least one common audio tag;
[0143] The playing unit is used to set a playing mode of the second white noise data frame and directly play the second white noise data frame after the first white noise data frame is played.
[0144] Further optionally, the identification unit identifies the multidimensional audio label corresponding to the first white noise data frame through a white noise classification model, specifically for:
[0145] Extracting a first white noise data frame feature corresponding to the first white noise data frame;
[0146] Obtaining candidate audio classification information corresponding to the first white noise data frame feature through a multi-branch perception layer; each branch perception layer in the multi-branch perception layer is used to extract corresponding key feature information from the first white noise data frame feature, and obtain corresponding candidate audio classification information based on the extracted key feature information; each branch perception layer is obtained based on a corresponding classification logic setting;
[0147] The candidate audio classification information corresponding to the first white noise data frame feature is converted into a corresponding multi-dimensional audio label.
[0148] Further optionally, the recognition unit obtains candidate audio classification information corresponding to the first white noise data frame feature through a multi-branch perception layer, specifically for:
[0149] Inputting the first white noise data frame feature into a classification target layer to identify the type of white noise in the first white noise data frame feature;
[0150] Based on the identified white noise type, adaptively configure the branch perception layer type involved in the corresponding multi-branch perception layer;
[0151] Call the corresponding type of multi-branch perception layer to identify the audio change features corresponding to different frequency bands, different time intervals, and different change waveforms in the first white noise data frame feature to obtain candidate audio classification information corresponding to the first white noise data frame feature.
[0152] Further optionally, after extracting the first white noise data frame feature corresponding to the first white noise data frame, the recognition unit is further configured to:
[0153] Extracting an interference noise characteristic matrix from the first white noise data frame; the interference noise elements in the interference noise characteristic matrix are expressed as follows:
[0154] ;
[0155] in, Represents the first white noise data frame feature The corresponding interference noise element at the t-th time step is, and for The dynamic expansion rate in the interference noise characteristic matrix, and for The dynamic step size in the interference noise characteristic matrix, and is the interference noise analysis dimension index, and is the first white noise data frame feature The output coordinate values of and for exist The characteristic components of interference noise elements in dimensions;
[0156] The interference noise feature matrix is fused with the first white noise data frame feature, and the fusion result is input into the multi-branch perception layer to increase the robustness of the first white noise data frame feature processing process.
[0157] Further optionally, after extracting the first white noise data frame feature corresponding to the first white noise data frame, the identification unit is further configured to:
[0158] Obtaining real-time delay information, real-time network fluctuation information, and real-time network environment status corresponding to the playback of the first white noise data frame;
[0159] Based on the real-time delay information, the real-time network fluctuation information, and the real-time network environment status, predict the predicted network environment information when the first white noise data frame is played to a preset time period; wherein the preset time period at least includes: a preset duration before the end of the first white noise data frame;
[0160] evaluating, based on the predicted network environment information, a degree of compatibility between the predicted network environment information and memory resources corresponding to the preloaded area in the playback device;
[0161] A network transition type corresponding to the first white noise data frame is determined based on the adaptability; the network transition type is used to indicate a network preloading state before connecting to the second white noise data frame.
[0162] Further optionally, the selection unit selects a second white noise data frame to be played from a pre-established candidate audio library based on the multi-dimensional audio tag, specifically for:
[0163] Constructing a virtual playback scene corresponding to the first white noise data frame based on the multi-dimensional audio tag;
[0164] According to the nodes corresponding to the audio tags in the virtual playback scene, a candidate white noise data frame having at least one identical node is selected from the candidate audio library; the arrangement of the nodes corresponding to the audio tags in the virtual playback scene is determined based on the attributes of the white noise data frame;
[0165] The second white noise data frame is determined from candidate white noise data frames based on user preference data.
[0166] Further optionally, the selection unit sets a playback mode of the second white noise data frame, specifically for: obtaining a real-time playback environment state, and configuring a preloading strategy based on the real-time playback environment state, the timbre type and audio scene of the second white noise data frame;
[0167] Based on the preloading strategy, a playback mode of the second white noise data frame is set; the playback mode includes at least: the preloaded frame number of the second white noise data frame, the preloaded sound intensity level, the preloaded audio rhythm type, the preloaded timbre type, and the audio transition effect between the second white noise data frame and the first white noise data frame.
[0168] See also Figure 3 , Figure 3 This is a schematic diagram of an embodiment of an electronic device provided in an embodiment of the present application. Figure 3 As shown, an embodiment of the present application provides an electronic device 500, including a memory 510, a processor 520, and a software program 511 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the software program 511, the aforementioned embodiment is implemented.
[0169] See also Figure 4 , Figure 4 This is a schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present application. Figure 4 As shown, this embodiment provides a computer-readable storage medium 600 on which a computer program 611 is stored. When the computer program 611 is executed by a processor, the aforementioned embodiment is implemented.
[0170] It should be noted that, in the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0171] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0172] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The present invention is a block or a plurality of blocks of a function specified in the steps. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for seamless loop playback of white noise based on audio frame pre-caching, characterized in that: The method at least comprises: For a first white noise data frame currently being played, identifying a multidimensional audio tag corresponding to the first white noise data frame using a white noise classification model; the multidimensional audio tag includes at least: white noise type, sound intensity level, audio rhythm type, timbre type, and audio scene; Based on the multi-dimensional audio tag, selecting a second white noise data frame to be played from a pre-established candidate audio library; the second white noise data frame and the first white noise data frame have at least one common audio tag; Setting a playback mode for the second white noise data frame, and directly playing the second white noise data frame after the first white noise data frame is played; The identifying the multidimensional audio label corresponding to the first white noise data frame by using a white noise classification model includes: Extracting a first white noise data frame feature corresponding to the first white noise data frame; Extracting an interference noise characteristic matrix from the first white noise data frame; the interference noise elements in the interference noise characteristic matrix are expressed as follows: ; in, Represents the first white noise data frame feature The corresponding interference noise element at the t-th time step is, and for The dynamic expansion rate in the interference noise characteristic matrix, and for The dynamic step size in the interference noise characteristic matrix, and is the interference noise analysis dimension index, and is the first white noise data frame feature The output coordinate values of and for exist The characteristic components of interference noise elements in dimensions; Fusing the interference noise feature matrix with the first white noise data frame feature, and inputting the fusion result into a multi-branch perception layer to increase the robustness of the first white noise data frame feature processing process; Obtaining real-time delay information, real-time network fluctuation information, and real-time network environment status corresponding to the playback of the first white noise data frame; Based on the real-time delay information, the real-time network fluctuation information, and the real-time network environment status, predict the predicted network environment information when the first white noise data frame is played to a preset time period; wherein the preset time period at least includes: a preset duration before the end of the first white noise data frame; evaluating, based on the predicted network environment information, a degree of compatibility between the predicted network environment information and memory resources corresponding to the preloaded area in the playback device; Determining a network transition type corresponding to the first white noise data frame based on the adaptability; the network transition type is used to indicate a network preloading state before connecting to the second white noise data frame; Obtaining candidate audio classification information corresponding to the first white noise data frame feature through a multi-branch perception layer; each branch perception layer in the multi-branch perception layer is used to extract corresponding key feature information from the first white noise data frame feature, and obtain corresponding candidate audio classification information based on the extracted key feature information; each branch perception layer is obtained based on a corresponding classification logic setting; The candidate audio classification information corresponding to the first white noise data frame feature is converted into a corresponding multi-dimensional audio label.
2. The method for seamlessly looping white noise playback based on audio frame pre-caching according to claim 1, characterized in that: The acquiring, through the multi-branch perception layer, candidate audio classification information corresponding to the first white noise data frame feature includes: Inputting the first white noise data frame feature into a classification target layer to identify the type of white noise in the first white noise data frame feature; Based on the identified white noise type, adaptively configure the branch perception layer type involved in the corresponding multi-branch perception layer; Call the corresponding type of multi-branch perception layer to identify the audio change features corresponding to different frequency bands, different time intervals, and different change waveforms in the first white noise data frame feature to obtain candidate audio classification information corresponding to the first white noise data frame feature.
3. The method for seamlessly looping white noise playback based on audio frame pre-caching according to claim 1, wherein: The step of selecting a second white noise data frame to be played from a pre-established candidate audio library based on the multi-dimensional audio tag includes: Constructing a virtual playback scene corresponding to the first white noise data frame based on the multi-dimensional audio tag; According to the nodes corresponding to the audio tags in the virtual playback scene, a candidate white noise data frame having at least one identical node is selected from the candidate audio library; the arrangement of the nodes corresponding to the audio tags in the virtual playback scene is determined based on the attributes of the white noise data frame; The second white noise data frame is determined from candidate white noise data frames based on user preference data.
4. The method for seamlessly looping white noise playback based on audio frame pre-caching according to claim 1, wherein: The setting of the playback mode of the second white noise data frame includes: Acquire a real-time playback environment state, and configure a preloading strategy based on the real-time playback environment state, the timbre type of the second white noise data frame, and the audio scene; Based on the preloading strategy, a playback mode of the second white noise data frame is set; the playback mode includes at least: the preloaded frame number of the second white noise data frame, the preloaded sound intensity level, the preloaded audio rhythm type, the preloaded timbre type, and the audio transition effect between the second white noise data frame and the first white noise data frame.
5. A white noise seamless loop playback system based on audio frame pre-caching, characterized in that: The system comprises at least the following units: an identification unit, configured to identify, for a first white noise data frame currently being played, a multidimensional audio tag corresponding to the first white noise data frame using a white noise classification model; The multi-dimensional audio tag includes at least: white noise type, sound intensity level, audio rhythm type, timbre type, and audio scene; a selection unit, configured to select, based on the multidimensional audio tag, a second white noise data frame to be played from a pre-established candidate audio library; the second white noise data frame and the first white noise data frame having at least one common audio tag; a playing unit, configured to set a playing mode for the second white noise data frame and directly play the second white noise data frame after the first white noise data frame is played; The identifying the multidimensional audio label corresponding to the first white noise data frame by using a white noise classification model includes: Extracting a first white noise data frame feature corresponding to the first white noise data frame; Extracting an interference noise characteristic matrix from the first white noise data frame; the interference noise elements in the interference noise characteristic matrix are expressed as follows: ; in, Represents the first white noise data frame feature The corresponding interference noise element at the t-th time step is, and for The dynamic expansion rate in the interference noise characteristic matrix, and for The dynamic step size in the interference noise characteristic matrix, and is the interference noise analysis dimension index, and is the first white noise data frame feature The output coordinate values of and for exist The characteristic components of interference noise elements in dimensions; Fusing the interference noise feature matrix with the first white noise data frame feature, and inputting the fusion result into a multi-branch perception layer to increase the robustness of the first white noise data frame feature processing process; Obtaining real-time delay information, real-time network fluctuation information, and real-time network environment status corresponding to the playback of the first white noise data frame; Based on the real-time delay information, the real-time network fluctuation information, and the real-time network environment status, predict the predicted network environment information when the first white noise data frame is played to a preset time period; wherein the preset time period at least includes: a preset duration before the end of the first white noise data frame; evaluating, based on the predicted network environment information, a degree of compatibility between the predicted network environment information and memory resources corresponding to the preloaded area in the playback device; Determining a network transition type corresponding to the first white noise data frame based on the adaptability; the network transition type is used to indicate a network preloading state before connecting to the second white noise data frame; Obtaining candidate audio classification information corresponding to the first white noise data frame feature through a multi-branch perception layer; each branch perception layer in the multi-branch perception layer is used to extract corresponding key feature information from the first white noise data frame feature, and obtain corresponding candidate audio classification information based on the extracted key feature information; each branch perception layer is obtained based on a corresponding classification logic setting; The candidate audio classification information corresponding to the first white noise data frame feature is converted into a corresponding multi-dimensional audio label.
6. An electronic device, characterized in that: including a memory for storing a computer software program; A processor is used to read and execute the computer software program, thereby implementing the white noise seamless loop playback method based on audio frame pre-caching as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium, characterized in that The storage medium stores a computer software program, which, when executed by a processor, implements the white noise seamless loop playback method based on audio frame pre-caching according to any one of claims 1 to 4.
Citation Information
Patent Citations
White noise playing system and portable sound equipment
CN106792297A
Vehicle-mounted audio playing method and device, equipment and storage medium
CN117827141A