Audio playing method and device with contexts kept continuous, equipment and storage medium

By introducing an audio context model into the audio playback device, the playback interruption and repetition problems caused by multi-source switching are solved, and the continuity and intelligent control of audio playback are achieved, improving the user experience.

CN120407845AInactive Publication Date: 2025-08-01LINKPLAY TECHNOLOGY INC NANJING

Patent Information

Application Number
CN202510928507.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-08-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing multi-source switching control scheme results in interruption and repeated playback of audio, which has poor user experience.

Method used

When a new audio source switching event is detected, the audio context model that complies with the preset rules from the playback record database is analyzed to extract playback status information and sound effect configuration information, and adjust the target playback device to achieve continuous playback.

Benefits of technology

It realizes seamless continuous playback after multi-source switching, improves user experience, reduces manual intervention, and enhances the intelligence and humanization of the product.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407845A_ABST
    Figure CN120407845A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of audio playing, and discloses an audio playing method and device capable of keeping contexts continuous, equipment and a storage medium. Matching an audio context model conforming to a preset rule from a playing record database; analyzing the audio context model, and extracting audio playing state information and sound effect configuration information recorded in the audio context model; and adjusting the sound effect of the target playing device, and controlling audio playing according to the audio playing state information. Through the playing control mode, switching playing of multiple sound sources can be achieved, continuous playing after switching can also be achieved, and the problems that audio playing repetition is high after traditional switching, and the user experience feeling is reduced are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of audio playback, and particularly to an audio playback method, device, equipment and storage medium with continuous context preservation. Background Art

[0002] With the popularization of multi-source fusion devices, modern audio systems often need to seamlessly switch between multiple sound sources, such as Bluetooth, local files, streaming services, internet radio, etc. However, the existing switching control between multiple sound sources mainly realizes the switching playback by disconnecting the currently connected sound source and then connecting the newly connected sound source, and after the switching, the configuration of the played audio and sound effects needs to be initialized, and continuous playback cannot be performed. Such a control scheme causes users to continuously listen to the audio that has been heard, and if continuous listening is required, manual selection is needed, which greatly reduces the user experience. Summary of the Invention

[0003] This application provides an audio playback method, device, equipment and storage medium with continuous context preservation to solve the problem that the existing multi-source switching scheme causes the repeated playback of the played audio.

[0004] The first aspect of this application provides an audio playback method with continuous context preservation, including: When detecting a new sound source switching event, matching an audio context model that meets the preset rules from the playback record database based on the new sound source; Parsing the audio context model and extracting the recorded audio playback status information and sound effect configuration information therein; Adjusting the sound effects of the target playback device based on the audio configuration information and controlling the audio playback according to the audio playback status information.

[0005] In a feasible implementation manner, before matching the context model that meets the preset rules from the playback record database based on the new sound source when detecting the new sound source switching event, it further includes: Real-time collecting the audio information, sound effect configuration and sound source type currently played by the target playback device; Constructing a corresponding audio context model based on the audio information, the sound effect configuration and the sound source type.

[0006] In a feasible implementation manner, the real-time collecting the audio information, sound effect configuration and sound source type currently played by the target playback device includes: Collecting the target audio currently played by the target playback device, as well as the playback progress and sound quality of the target audio; Collecting the volume, sound effect mode of the target playback device when playing the target audio, and the sound effect setting parameters in the sound effect mode. Determine the current playing sound source type based on the audio input interface of the target playback device, and determine the identification information of the sound source type.

[0007] In a feasible implementation manner, constructing a corresponding audio context model based on the audio information, the sound effect configuration, and the sound source type includes: Introduce a lightweight persistence module, write the audio information, the sound effect configuration, and the sound source type into corresponding fields in a preset model data structure, and generate a corresponding audio context model.

[0008] In a feasible implementation manner, the introducing a lightweight persistence module, writing the audio information, the sound effect configuration, and the sound source type into corresponding fields in a preset model data structure, and generating a corresponding audio context model includes: Extract the parameters and field names in the sound effect configuration and the identification information in the sound source type respectively; Match the field names with the audio configuration field names in the preset model data structure, and write them into corresponding fields based on the matching results; Write the identification information into the field of the sound source type in the model data structure to obtain a context data string; [[ID=1...]] Use the introduced lightweight persistence module to convert the model data structure with the written parameters and identification information into an audio context model.

[0009] In a feasible implementation manner, after detecting a new sound source switching event, it further includes: Collect the audio playback status information and sound effect configuration information of the target audio played by the target playback device before switching when the new sound source switching event is triggered, construct a new audio context model, and update the audio context model of the corresponding sound source type in the playback record database based on the cache update policy.

[0010] In a feasible implementation manner, the matching a corresponding audio context model that meets the preset rules from the playback record database based on the new sound source includes: Switch the target playback device to the playback channel of the new sound source, and initialize the playback channel for connection; Query whether there is a corresponding audio context model in the playback record database based on the identification information of the new sound source; If there is a corresponding audio context model, determine whether there is a valid target context model based on the most recent time screening rule.

[0011] In a feasible implementation manner, the matching of the audio context model that conforms to the preset rules from the playback record database based on the new sound source further includes: If there is no context model corresponding to the audio, match the audio context model with a similar sound source type from the playback record database based on the principle of most recently used; Or, Based on the fallback policy, fallback to the original audio for playback and prompt the fallback.

[0012] In a feasible implementation manner, the adjustment of the sound effect of the target playback device based on the audio configuration information includes: Detect whether there is a touch operation for sound effect configuration on the control interface of the target playback device; If it exists, adjust the sound effect output of the target audio device based on the touch operation; If it does not exist, adjust the volume, EQ settings, and sound effect mode in the target playback device based on the sound effect configuration information.

[0013] In a feasible implementation manner, the control of audio playback according to the audio playback status information includes: Based on the audio playback status information, control the target playback device to resume to the previous playback progress; If resuming the playback progress is unavailable, initialize the playback progress of the target audio based on the default settings in the target playback device and play.

[0014] In a feasible implementation manner, when detecting no new sound source switching event, the method further includes: Judge whether the update time of the audio context model has arrived; If it has arrived, collect the audio information, sound effect configuration, and sound source type currently played by the target playback device, and construct a new audio context model to update the record playback database.

[0015] The second aspect of the present application provides an audio playback device with continuous context preservation, including: A matching module, configured to match an audio context model that conforms to preset rules from a playback record database based on the new sound source when detecting a new sound source switching event; An analysis module, configured to analyze the audio context model and extract the audio playback status information and sound effect configuration information recorded therein; A playback module, configured to adjust the sound effect of the target playback device based on the audio configuration information and control the audio playback according to the audio playback status information.

[0016] A third aspect of the present application provides an audio device, including: a memory and at least one processor, where instructions are stored in the memory; the at least one processor calls the instructions in the memory to enable the audio device to execute the above audio playback method with continuous context.

[0017] A fourth aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When it runs on a computer, it enables the computer to execute the above audio playback method with continuous context.

[0018] In the technical solution provided by the present application, by introducing an audio context model for recording audio playback, and when a new sound source switching event is detected, an audio context model that meets preset rules is matched from the playback record database; the audio context model is parsed to extract the recorded audio playback status information and sound effect configuration information; the sound effects of the target playback device are adjusted, and the audio playback is controlled according to the audio playback status information. Through such a playback control method, the present application can not only achieve the switching playback of multiple sound sources, but also achieve continuous playback after switching, avoiding the problems of high repetition of audio playback after traditional switching and reducing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of an embodiment of the audio playback method with continuous context in an embodiment of the present application; Figure 2 It is a schematic diagram of another embodiment of the audio playback method with continuous context in an embodiment of the present application; Figure 3 It is a schematic diagram of an embodiment of the audio playback device with continuous context in an embodiment of the present application; Figure 4 It is a schematic diagram of another embodiment of the audio playback device with continuous context in an embodiment of the present application; Figure 5 It is a schematic diagram of an embodiment of the audio device in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] The embodiments of the present application provide an audio playback method, device, device and storage medium with continuous context. By introducing a continuous playback mechanism based on context preservation, when the user switches the sound source, the current playback process is no longer interrupted, and the device / system can automatically record and resume playback, such as restoring parameters such as playback progress, volume, and playback mode, greatly improving the continuity experience.

[0021] Furthermore, by recording and automatically restoring the sound source context model, the continuous playback control is realized without manual intervention by the user, thereby enhancing the intelligence and user-friendliness of the product. And this method is applicable to devices in scenarios such as smart speakers, in-vehicle entertainment systems, and home theaters, which can significantly enhance the product competitiveness and user satisfaction.

[0022] The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described here can be implemented in an order different from that illustrated or described here. In addition, the term "comprising" or "having" and any variation thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0023] It can be understood that the execution subject of this application can be an audio playback device that maintains continuous context, or it can also be a terminal, a device, or audio playback software or a server. Specifically, it is not limited here. In this embodiment of the application, an audio device is used as an example of the execution subject for illustration. An audio playback software is installed on the audio device, and the audio software can complete data caching or model establishment locally on the audio device / server to prepare for subsequent sound source switching and playback. The audio playback device is any one of at least one type of device, including but not limited to: smart speakers, Bluetooth headsets, in-vehicle entertainment systems, smart TVs, etc.

[0024] For ease of understanding, the specific process of this embodiment of the application will be described below. Please refer to Figure 1 , an embodiment of the audio playback method for maintaining continuous context in this embodiment of the application includes: 101. When a new sound source switching event is detected, match an audio context model that meets the preset rules from the playback record database based on the new sound source.

[0025] In this embodiment, for detecting a new sound source switching event, specifically, it is to detect the sound source switching action in the audio playback device and match the sound source switching action with the sound source currently played by the audio playback device to determine whether a new sound source is switched.

[0026] In practical applications, an audio playback software is installed on an audio playback device. By introducing an event monitoring module on the audio playback device and binding it to the UI interface and audio interface input of the audio playback device, when the audio playback device starts playing audio, the event monitoring module monitors in real time the trigger actions of each control on the UI interface and the trigger of the audio interface input, and determines whether there is a new sound source switching event based on the monitoring results.

[0027] In this embodiment, when the audio playback device detects that a user or the device triggers a new sound source switching event, for example, switches to a new sound source through a UI click, a voice command, or the access of an external device, the system in the audio playback device will start the sound source switching process. At this time, by detecting the new sound source switching event, the system starts to save the audio context information of the sound source currently played by the audio playback device and prepares to switch to the new sound source.

[0028] After switching to the new sound source, the system matches an audio context model that meets the preset rules from the local of the audio playback device or the playback record database of the server. It should be noted that the preset rules here can be understood as effective screening conditions for the audio context models of the same sound source. Specifically, it can be a time interval, that is, the time length from the switching time point.

[0029] When matching, specifically, using the new sound source or the source nature of the new sound source as an index, an audio context model with the same sound source type is matched from the playback record database, and then one is selected from the matched audio context models using the preset rules as the final audio context model.

[0030] 102. Analyze the audio context model and extract the audio playback status information and sound effect configuration information recorded therein.

[0031] In this embodiment, when analyzing the audio context model, first, the legality of the audio context model is verified, for example, by calculating and verifying through the model name and the preset name anti-counterfeiting rules, and then after the verification passes, decryption and extraction are performed based on the fields of the model data structure to obtain the audio playback status information and sound effect configuration information.

[0032] In another implementation manner, fast parsing can be achieved through the method of a field mapping and conversion mechanism. Specifically, by coding the audio context model, and then mapping each field in the model code obtained by coding to a field mapping table to achieve the extraction of the audio playback status information and sound effect configuration information.

[0033] 103. Adjust the sound effects of the target playback device based on the audio configuration information and control the audio playback according to the audio playback status information.

[0034] In this embodiment, the audio configuration information includes parameters such as volume, EQ settings, and sound effect modes. Based on these parameters, the sound effect parameters of the target audio playback device are adjusted one by one. It can be understood that the corresponding audio playback software is first determined based on the audio source, for example, by the call relationship between the input interface of the audio source and the audio playback software. After determination, the sound effect output panel of the audio playback software is called up and automatically adjusted based on parameters such as volume, EQ settings, and sound effect modes.

[0035] Further, after adjusting the sound effects, the audio is controlled and played based on the audio playback status information. The audio playback status information includes the audio name, the time point where the last playback stopped, and the playback mode, etc. Specifically, first, the audio is retrieved based on the audio name, then the retrieved audio is adjusted to the time point where the last playback stopped, and at the same time, subsequent audio playback control is performed according to the corresponding playback mode.

[0036] In the embodiment of the present application, a sound source context model is introduced to record the playback records of each sound source. When subsequent playback switching is required, the model can be directly retrieved to achieve continuous playback. Based on the persistence and rapid recovery of the state during sound source switching, a seamless playback experience is provided.

[0037] Please refer to Figure 2 , another embodiment of the method for continuous audio playback with context preservation in the embodiment of the present application includes: 201. Real-time collect the audio information, sound effect configuration, and sound source type currently played by the target playback device.

[0038] It can be understood that by introducing a monitoring module in the target playback device dedicated to monitoring and recording audio playback software, and then associating the monitoring module with each audio playback software in the device. For example, the monitoring module can be set as a music control plugin. After first starting the music control plugin, each audio playback software is added to the plugin to achieve switching monitoring of each audio playback software.

[0039] After selecting an audio playback software to play audio, the plugin regularly collects the audio information, audio configuration, and sound source type on the currently running audio playback software according to the pre-set audio context model update rules.

[0040] Specifically, the target audio currently played by the target playback device, as well as the playback progress and sound quality of the target audio, are monitored and collected in real time through the above-mentioned audio playback software. The volume, sound effect mode of the target playback device playing the target audio, and the sound effect setting parameters under the sound effect mode are collected. Based on the audio input interface of the target playback device, the currently played sound source type is determined, and the identification information of the sound source type is determined.

[0041] In practical applications, the audio information includes the name of the audio, the singer, the version, and even information such as the current playback position, playback mode (sequential, random, single-loop), and playlist index. The audio configuration refers to the volume, EQ settings (bass, midrange, treble, surround sound field), and sound effect mode of the audio playback device running the audio playback software.

[0042] The audio source type can be specifically divided according to the nature of the source, such as: local audio sources (such as USB flash drives, local hard drives, SD cards), network audio sources (such as DLNA, AirPlay, Spotify Connect, etc.), Bluetooth audio sources (such as mobile phones, headphone casting), and external input audio sources (such as AUX, HDMI ARC).

[0043] For example, if the currently playing audio source is local, and when playing an MP3 file from the local audio source to 1:43 seconds, it switches to a Bluetooth audio source, the plugin will record the playback time point (103 seconds), the current volume is 60%, the mode is random, and the EQ is in the "theater" mode.

[0044] 202. Build a corresponding audio context model based on the audio information, sound effect configuration, and audio source type.

[0045] In this step, by introducing a lightweight persistence module, write the audio information, the sound effect configuration, and the audio source type into the corresponding fields of a preset model data structure to generate a corresponding audio context model.

[0046] Specifically, extract the parameters and field names in the sound effect configuration, and the identification information in the audio source type; match the field names with the audio configuration field names in the preset model data structure, and write them into the corresponding fields based on the matching results; write the identification information into the field of the audio source type in the model data structure to obtain a context data string; use the introduced lightweight persistence module to convert the model data structure with the written parameters and identification information into an audio context model.

[0047] It can be understood that when building the audio context model of the audio currently played on the target audio playback device, a model data structure with a multi-source context storage structure is customized to record information, and then it is converted to obtain the audio context model.

[0048] In practical applications, this model data structure can be a JSON structure. For example, when playing an MP3 file from a local audio source to 1:43 seconds and then switching to a Bluetooth audio source, the plugin will record the playback time point (such as 103 seconds), the current volume is 60%, the mode is random, and the EQ is in the "theater" mode. Based on the above recorded parameters, the constructed audio context model is as follows: ```json { "source_type": "local", "context": { "timestamp": 103, "volume_level": 60, "mode": "shuffle", "EQ": "cinema", "playlist_index": 5 }, "last_updated": "20250512T14:55:00" } In this embodiment, after the audio context model is constructed, it further includes setting an expiration time for the audio context model, and then saving the audio context model in the local cache or SQLite database. The key fields carry timestamps and are used to determine validity when switching and restoring.

[0049] 203. When a new sound source switching event is detected, match an audio context model that conforms to a preset rule from the playback record database based on the new sound source.

[0050] In this step, for the detection of the new sound source switching event, specifically, it is implemented by listening through the above-set music control plugin. The listening events can specifically include: The user manually switches the sound source, such as by clicking on the UI, voice command, remote control operation, etc. to achieve the switch; The sound source is automatically disconnected, such as the Bluetooth signal is interrupted; A new sound source is automatically connected, such as a mobile phone is inserted into the AUX cable; After a new sound source switching event is detected, it further includes: calling the lightweight persistence module in combination with the context persistence interface, constructing the context of the current sound source into an audio context model, and writing and updating it to the playback record database for caching.

[0051] For example, when the user switches the Bluetooth sound source to the local sound source through the App, the system immediately executes the "writeContext('bluetooth')" operation, records the context information of the audio played via Bluetooth, seals and constructs the corresponding audio context model, and writes and updates it to the playback record database to update the audio context model under the Bluetooth sound source.

[0052] Furthermore, to ensure the real-time performance and consistency of the context data, it can be specifically achieved by setting the following cache update policy: Timing synchronization: Synchronize the current context data at regular intervals (e.g., every 10 seconds).

[0053] Save before audio source switching: When the system triggers an audio source switch, automatically save the current context to persistent storage.

[0054] Update when paused or stopped: Whenever the user pauses or stops playback, the system automatically updates the context data.

[0055] Update before power-off: The system saves the context of the current audio source before power-off (e.g., triggered by a UPS signal) to prevent data loss.

[0056] For example, the user plays music from an SD card in the car, sets the volume to 45%, and plays the 4th song. After 10 seconds, the system automatically updates and saves the context data of the current audio source to ensure that the user can resume playback when switching audio sources.

[0057] Furthermore, after completing the above updates, perform the matching of the audio context model of the new audio source. Specifically, switch the target playback device to the playback channel of the new audio source and initialize the playback channel for connection; query the playback record database based on the identification information of the new audio source to check if there is a corresponding audio context model; if there is a corresponding audio context model, then judge whether there is a valid target context model based on the recent time screening rule.

[0058] In practical applications, when effectively judging the matched audio context model, specifically calculate the time difference between the recording time of each audio context model and the current time, and then compare the time difference with the defined time threshold for effectiveness, so as to select a valid model for subsequent control.

[0059] Specifically, if there are multiple valid models, select one based on the recent time screening rule, and then perform the subsequent steps.

[0060] In another feasible implementation, judging whether there is a valid target context model based on the recent time screening rule can also be achieved by combining the context model effectiveness evaluation and cache optimization algorithm with the recent time screening rule. Specifically, first obtain the comprehensive effectiveness score, time freshness factor, usage frequency factor, recovery quality factor, and device compatibility factor of each context model, and then make a judgment based on the information obtained above.

[0061] It can be understood that the formula for the context model effectiveness evaluation and cache optimization algorithm is as follows: V(Ci) = w1·T(Ci) + w2·F(Ci) + w3·Q(Ci) + w4·D(Ci); Where: T(Ci) = e^(-(tcurrent - tlast) / θ); F(Ci) = log(1 + usage_count) / log(1 + max_usage); Q(Ci) = (success_restore + 1) / (total_restore + 2); D(Ci) = 1 - |device_current - device_original| / device_max_diff; V(Ci) represents the comprehensive effectiveness score of the context model Ci; T(Ci) represents the time freshness factor; F(Ci) represents the usage frequency factor; Q(Ci) represents the recovery quality factor; D(Ci) represents the device compatibility factor; tcurrent, tlast represent the current time and the last usage time; θ represents the time decay parameter; w1, w2, w3, w4 represent the weight coefficients.

[0062] Exemplarily, the system discovers that there are 3 historical contexts for the Bluetooth sound source: Model A: 2 hours ago, used 20 times, successfully restored 18 times, V(A)=0.92; Model B: 1 day ago, used 8 times, successfully restored 6 times, V(B)=0.73; Model C: 1 week ago, used 2 times, successfully restored 1 time, V(C)=0.31. The system selects Model A as the restoration benchmark.

[0063] To make a judgment through the above algorithm, it is necessary to establish a scientific context model quality evaluation system to optimize the storage space utilization rate, automatically clean up low-value models, thereby improving the success rate of context restoration and user satisfaction, and implementing an adaptive cache management strategy.

[0064] In another feasible implementation, if there is no corresponding context model for the audio in the matching play record database, then match the audio context model with a similar sound source type from the play record database based on the principle of recent use; or, based on the fallback strategy, fallback to the original audio for playback and prompt the fallback.

[0065] It should be noted that the matching of the audio context model with similar sound source types from the playback record database based on the principle of most recently used is specifically achieved by combining a similarity matching algorithm with the principle of most recently used. The similarity matching algorithm is as follows: S(Ci, Cnew) = α·Ssource(Ci, Cnew) + β·Saudio(Ci, Cnew) + γ·Sconfig(Ci, Cnew); Among them, S(Ci, Cnew) represents the similarity score between the context model Ci and the new sound source Cnew; Ssource(Ci, Cnew) represents the sound source type similarity, and its value range is 0 - 1; Saudio(Ci, Cnew) represents the audio feature similarity, and its value range is 0 - 1; Sconfig(Ci, Cnew) represents the sound effect configuration similarity, and its value range is 0 - 1; α, β, γ represent weight coefficients, and α + β + γ = 1.

[0066] Exemplarily, when the user switches from a Bluetooth sound source to a network sound source but the network sound source has no historical record, the system calculates the similarity of all existing context models. Assuming that the similarity of the local sound source is 0.85 and the AUX sound source is 0.72, then the context of the local sound source is selected as a reference.

[0067] By using the above - provided matching algorithm to match the audio context model, not only the accuracy of the switching experience when there is no historical record is improved, but also the frequency of the user manually adjusting the sound effect settings is reduced, realizing intelligent sound source adaptation.

[0068] In this embodiment, when controlling the playback by adopting the "principle of most recently used" and the "fallback strategy", it specifically includes: Playback position setting: If the new sound source does not support jumping to the playback position, the system will skip this parameter.

[0069] EQ setting: If the new sound source cannot apply the previous EQ setting, the system will adopt the default configuration.

[0070] Volume conversion setting: Through the volume mapping table, the system converts the volume level of the current sound source to the volume range supported by the new sound source.

[0071] 204. Adjust the sound effect of the target playback device based on the audio configuration information, and control the audio playback according to the audio playback status information.

[0072] In this embodiment, first, it is detected whether there is a touch operation for sound effect configuration on the control interface of the target playback device; if so, the sound effect output of the target audio device is adjusted based on the touch operation; if not, the volume, EQ settings and sound effect mode in the target playback device are adjusted based on the sound effect configuration information.

[0073] Then, based on the audio playback status information, the target playback device is controlled to resume to the last playback progress; if resuming the playback progress is not available, the playback progress of the target audio is initialized based on the default settings in the target playback device and played.

[0074] Specifically, when adjusting the volume, EQ settings, and sound effect mode in the target playback device, this can be achieved by calling a dynamic sound effect parameter adaptive adjustment algorithm. The formula of the algorithm is as follows: Pi_adjusted = Pi_original · f(Δt, Ufreq, Hcontext); Among them, f(Δt, Ufreq, Hcontext) = (1 + λ·e^(-Δt / τ)) · (1 + μ·Ufreq)· Hcontext; Pi_adjusted represents the adjusted i-th sound effect parameter; Pi_original represents the original sound effect parameter value; Δt represents the time interval since the last use of the sound source; Ufreq indicates the frequency of users using the audio source; Hcontext represents the historical context confidence factor, which ranges from 0 to 1; λ, μ represent the adjustment intensity coefficients; τ represents the time decay constant.

[0075] For example, if a user used a Bluetooth audio source with the volume set to 80% three days ago, with high usage frequency (Ufreq = 0.8) and high historical records reliability (Hcontext = 0.9), the algorithm would adjust the volume to approximately 82%, slightly higher than the original setting, to accommodate the user's changing habits.

[0076] By using the above-provided algorithm to adjust the volume, EQ settings, and sound effect mode in the target playback device, not only can intelligent fine-tuning of sound effect parameters be achieved, but the time evolution of user usage habits is also taken into account, thereby improving the accuracy of the personalized experience.

[0077] In another feasible implementation, to enhance the user experience, during the process of adjusting the sound effects of the target playback device based on the audio configuration information and controlling the audio playback according to the audio playback status information, it also includes implementing control based on the user's settings for resuming playback. Specifically, there are two settings: Auto-resume mode: The system defaults to automatically resuming the previous playback state when switching, without user intervention.

[0078] Prompt confirmation mode: The system prompts the user through a UI pop-up window whether to resume the previous playback state. For example: "Do you want to resume the previous playback state at 1:43, volume 60%, shuffle play?" After the user clicks "Confirm", the system immediately resumes playback.

[0079] 205. When detecting no new sound source switching event, determine whether the update time of the audio context model has arrived.

[0080] 206. If it has arrived, collect the audio information, sound effect configuration, and sound source type currently played by the target playback device, and construct a new audio context model to update and record the playback database.

[0081] In this embodiment, the caching of the above-mentioned audio context model is specifically bound to the user account, and the user account can be logged in on different audio playback devices. There may be compatibility issues between the audio information recorded by the previous device and the new device. For this reason, before resuming playback, this application also includes: Determine whether the audio information in the audio context model is compatible with the target audio playback device. If it is not compatible, then revert to the previous sound source for playback, or prompt the user to switch to other sound sources.

[0082] Specifically, the incompatible situations include but are not limited to the following: Sound source format incompatibility: When the new sound source does not support the current format, the system will prompt the user and revert to the previous sound source.

[0083] Driver initialization failure: If the driver of the new sound source fails to load, the system will notify the user and try to restore the original sound source.

[0084] Cache loss: If the context cache is lost or damaged, the system will restore to the default state, or prompt the user to manually reset.

[0085] In another embodiment, for the recorded audio context model, it also includes responding to the user's touch operation on the interface to clean the record. Specifically, when switching the incompatible prompt, the user can trigger the manual reset function of "Clear Context" on the interface, allowing the user to clear the context data of a certain sound source or all sound sources and restore to the default settings.

[0086] In the embodiments of the present application, a sound source context model is introduced for resuming playback when switching sound sources. Specifically, based on key parameters such as playback position, volume level, playback mode, and EQ settings included in the audio context model, playback is automatically resumed, achieving continuous playback with seamless switching and avoiding repeated playback from the beginning when switching.

[0087] Meanwhile, the designed sound source context model is a lightweight persistent storage structure, which can quickly activate and load a new sound source and restore the previous playback state, realizing a seamless switching experience of "what you see is what you get".

[0088] The above describes the method for continuous audio playback with context preservation in the embodiments of the present application. Next, the device for continuous audio playback with context preservation in the embodiments of the present application will be described. Please refer to Figure 3 and 4 , the embodiments of the device for continuous audio playback with context preservation in the embodiments of the present application include: A matching module 310, configured to match an audio context model that conforms to a preset rule from a playback record database based on the new sound source when detecting a new sound source switching event; A parsing module 320, configured to parse the audio context model and extract the audio playback state information and sound effect configuration information recorded therein; A playback module 330, configured to adjust the sound effects of a target playback device based on the audio configuration information and control the audio playback according to the audio playback state information.

[0089] Optionally, the audio playback device further includes: a model construction module 340, configured to: Real-time collect the audio information, sound effect configuration, and sound source type currently played by the target playback device; Construct a corresponding audio context model based on the audio information, the sound effect configuration, and the sound source type.

[0090] Optionally, the model construction module 340 includes: a collection unit 341, configured to: Collect the target audio currently played by the target playback device, as well as the playback progress and sound quality of the target audio; Collect the volume, sound effect mode of the target playback device when playing the target audio, and the sound effect setting parameters in the sound effect mode; Determine the currently played sound source type based on the audio input interface of the target playback device and determine the identification information of the sound source type.

[0091] Optionally, the model construction module 340 includes: a model construction unit 342, configured to: Introduce a lightweight persistence module, write the audio information, the sound effect configuration, and the sound source type into the corresponding fields in a preset model data structure, and generate a corresponding audio context model.

[0092] Optionally, the model construction unit 342 is specifically configured to: Extract the parameters and field names in the sound effect configuration and the identification information in the sound source type respectively; Match the field names with the audio configuration field names in the preset model data structure, and write them into the corresponding fields based on the matching results; Write the identification information into the field of the sound source type in the model data structure to obtain a context data string; Use the introduced lightweight persistence module to convert the model data structure with the written parameters and identification information into an audio context model.

[0093] Optionally, the audio playback device further includes: a cache update module 350, configured to: When the new sound source switching event is triggered, acquire the audio playback status information and the sound effect configuration information of the target audio played by the target playback device before switching, construct a new audio context model, and update the audio context model of the corresponding sound source type in the playback record database based on the cache update policy.

[0094] Optionally, the matching module 310 includes: An initialization unit 311, configured to switch the target playback device to the playback channel of the new sound source and initialize the connection of the playback channel; A query unit 312, configured to query whether there is a corresponding audio context model in the playback record database based on the identification information of the new sound source; A screening unit 313, configured to, if there is a corresponding audio context model, determine whether there is a valid target context model based on the recent time screening rule.

[0095] Optionally, the screening unit 313 is further configured to: If there is no corresponding audio context model, match an audio context model with a similar sound source type from the playback record database based on the principle of recent use; or, return to the original audio for playback based on the fallback policy and prompt the fallback.

[0096] Optionally, the playback module 330 includes: A detection unit 331, configured to detect whether there is a touch operation for sound effect configuration on the control interface of the target playback device; An adjustment unit 332, configured to adjust the sound effect output of the target audio device based on the touch operation when detecting a touch operation with a sound effect configuration; and adjust the volume, EQ setting, and sound effect mode in the target playback device based on the sound effect configuration information when detecting a touch operation without a sound effect configuration.

[0097] Optionally, the playback module 330 further includes: a playback unit 333, configured to: Control the target playback device to resume the last playback progress based on the audio playback status information; If resuming the playback progress is unavailable, initialize the playback progress of the target audio based on the default settings in the target playback device and play.

[0098] Optionally, the cache update module 350 is further configured to: Determine whether the update time of the audio context model has arrived; If it has arrived, collect the audio information, sound effect configuration, and sound source type currently played by the target playback device, and construct a new audio context model to update and record the playback database.

[0099] In the embodiments of the present application, by introducing an audio context model for recording audio playback, and when detecting a new sound source switching event, matching an audio context model that conforms to a preset rule from the playback record database; parsing the audio context model, extracting the audio playback status information and sound effect configuration information recorded therein; adjusting the sound effect of the target playback device, and controlling the audio playback according to the audio playback status information. Through such a playback control method, the present application can not only realize the switching playback of multiple sound sources, but also realize continuous playback after switching, avoiding the problem of high repetition of audio playback after traditional switching and reducing the user experience.

[0100] Above Figure 3 And Figure 4 The context-preserving continuous audio playback device in the embodiments of the present application has been described in detail from the perspective of modular functional entities. Below, the audio device in the embodiments of the present application will be described in detail from the perspective of hardware processing.

[0101] See Figure 5 As shown, the audio device includes a processor 500 and a memory 501. The memory 501 stores machine-executable instructions that can be executed by the processor 500. The processor 500 executes the machine-executable instructions to implement the above context-preserving continuous audio playback method.

[0102] Further, Figure 5 The audio device shown further includes a bus 502 and a communication interface 503. The processor 500, the communication interface 503, and the memory 501 are connected through the bus 502.

[0103] Among them, the memory 501 may include high-speed random access memory (Random Access Memory, RAM), and may also include non-volatile memory, for example, at least one disk memory. The communication connection between this system network element and at least one other network element is realized through at least one communication interface 503 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 502 can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 5 only a bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0104] The processor 500 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in hardware or instructions in software form in the processor 500. The above-mentioned processor 500 can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present disclosure can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. This storage medium is located in the memory 501, and the processor 500 reads the information in the memory 501 and combines its hardware to complete the method steps of the foregoing embodiments.

[0105] The present application also provides an audio device. The computer device includes a memory and a processor. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor is caused to execute the steps of the audio playback method for maintaining continuous context in the above-described embodiments.

[0106] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer, the computer is caused to execute the steps of the audio playback method for maintaining continuous context.

[0107] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0109] As described above, the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims

1. A method for continuous audio playback while maintaining context, characterized in that, The audio playback method includes: When a new sound source switching event is detected, match an audio context model that meets the preset rules from the playback record database based on the new sound source; Parse the audio context model and extract the audio playback status information and sound effect configuration information recorded therein; Adjust the sound effects of the target playback device based on the audio configuration information and control the audio playback according to the audio playback status information.

2. The audio playback method according to claim 1, wherein Before matching the context model that meets the preset rules from the playback record database based on the new sound source when the new sound source switching event is detected, it further includes: Real-time collect the audio information, sound effect configuration, and sound source type currently played by the target playback device; Based on the audio information, the sound effect configuration, and the sound source type, construct a corresponding audio context model.

3. The audio playing method according to claim 2, wherein The real-time collection of the audio information, sound effect configuration, and sound source type currently played by the target playback device includes: Collect the target audio currently played by the target playback device, as well as the playback progress and sound quality of the target audio; Collect the volume, sound effect mode of the target playback device playing the target audio, and the sound effect setting parameters in the sound effect mode; Determine the currently played sound source type based on the audio input interface of the target playback device and determine the identification information of the sound source type.

4. The audio playback method according to claim 2, characterized in that, The constructing a corresponding audio context model based on the audio information, the sound effect configuration, and the sound source type includes: Introduce a lightweight persistence module, write the audio information, the sound effect configuration, and the sound source type into the corresponding fields of a preset model data structure, and generate a corresponding audio context model.

5. The audio playing method according to claim 4, wherein The introducing a lightweight persistence module, writing the audio information, the sound effect configuration, and the sound source type into the corresponding fields of a preset model data structure, and generating a corresponding audio context model includes: Extract the parameters and field names in the sound effect configuration and the identification information in the sound source type respectively; Match the field names with the audio configuration field names in the preset model data structure and write them into the corresponding fields based on the matching results; Write the identification information into the field of the sound source type in the model data structure to obtain a context data string; Use the introduced lightweight persistence module to convert the model data structure written with parameters and identification information into an audio context model.

6. The audio playback method according to claim 1, wherein After detecting the new sound source switching event, it further includes: When the new sound source switching event is triggered, collect the audio playback status information and sound effect configuration information of the target audio played by the target playback device before switching, construct a new audio context model, and update the audio context model of the corresponding sound source type in the playback record database based on the cache update policy.

7. The audio playback method according to any one of claims 1-6, characterized in that The matching an audio context model that meets the preset rules from the playback record database based on the new sound source includes: Switch the target playback device to the playback channel of the new sound source and initialize the playback channel for connection; Query whether there is a corresponding audio context model in the playback record database based on the identification information of the new sound source; If there is a corresponding audio context model, it is determined whether there is a valid target context model based on the recent time screening rule.

8. The audio playing method according to claim 7, wherein The matching of the audio context model that conforms to the preset rule from the playback record database based on the new sound source further includes: If there is no context model corresponding to the audio, an audio context model with a similar sound source type is matched from the playback record database based on the principle of recent use; Or, Based on the return strategy, it returns to the original audio for playback and prompts the return.

9. The audio playback method according to claim 7, wherein The adjustment of the sound effect of the target playback device based on the audio configuration information includes: Detecting whether there is a touch operation for sound effect configuration on the control interface of the target playback device; If so, the sound effect output of the target audio device is adjusted based on the touch operation; If not, based on the sound effect configuration information, the volume, EQ settings, and sound effect mode in the target playback device are adjusted.

10. The audio playing method according to claim 9, wherein The control of audio playback according to the audio playback status information includes: Based on the audio playback status information, controlling the target playback device to resume to the previous playback progress; If resuming the playback progress is unavailable, the playback progress of the target audio is initialized based on the default settings in the target playback device and played.

11. The audio playback method according to any one of claims 1-6, characterized in that, When no new sound source switching event is detected, the method further includes: Judging whether the update time of the audio context model has arrived; If it has arrived, the audio information, sound effect configuration, and sound source type currently played by the target playback device are collected, and a new audio context model is constructed to update the record playback database.

12. An audio playback device with continuous context preservation, characterized in that, The audio playback device includes: A matching module, configured to, when a new sound source switching event is detected, match an audio context model that conforms to the preset rule from the playback record database based on the new sound source; An analysis module, configured to analyze the audio context model and extract the audio playback status information and sound effect configuration information recorded therein; A playback module, configured to adjust the sound effect of the target playback device based on the audio configuration information and control the audio playback according to the audio playback status information.

13. An audio device, characterized in that, The audio device includes: a memory and at least one processor, and instructions are stored in the memory; The at least one processor invokes the instructions in the memory to enable the audio device to execute the audio playback method with continuous context as described in any one of claims 1-11.

14. A computer-readable storage medium having instructions stored thereon, characterized in that, When the instructions are executed by the processor, the audio playback method with continuous context as described in any one of claims 1-11 is implemented.

Citation Information

Patent Citations

  • Volume control method and device

    CN106201426A

  • Audio data continuous playing method and device

    CN108846054A

  • Acoustic model generation device, speech translation device and acoustic model generation method

    JP2012073280A

Cited By

  • Automatic audio playing recovery method and device, equipment and storage medium

    CN121300738A