Audio configuration change management method, system and device and storage medium

By registering audio context information and building configuration change information when the audio scene is triggered, the problem of cumbersome and complex audio configuration change process is solved, efficient and unified configuration management of audio scenes is achieved, and user experience is optimized.

CN119512494APending Publication Date: 2025-02-25BIGO TECH PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411522556.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In multiple audio usage scenarios, the audio status is prone to conflict, resulting in the audio performance not meeting expectations, poor user experience, and it is difficult for the existing technology to effectively manage audio configuration changes, especially when there are many audio scenarios, the configuration management process is cumbersome and complicated, and the code High maintenance costs.

Method used

When an audio scene trigger is detected, the audio context information is registered and written to the audio queue, the audio configuration change information is constructed, the audio configuration change information is compared with the currently running audio scene, and the audio queue is updated to realize the configuration change management of the audio scene.

Benefits of technology

It realizes efficient and unified configuration change management of various audio scenarios within the application, simplifies the audio configuration process, avoids audio configuration conflicts, and optimizes the user's audio usage experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512494A_ABST
    Figure CN119512494A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an audio configuration change management method, system and device and a storage medium. According to the technical scheme provided by the embodiment of the invention, under the condition of detecting that the first audio scene is triggered, the audio context information is registered based on the first audio scene, and the audio context information is written into the audio queue according to the set priority sequence; constructing audio configuration change information based on the first audio scene, comparing audio configuration information of a currently running second audio scene based on the audio configuration change information, and outputting a configuration comparison result; and when it is determined that the audio configuration of the first audio scene is changed successfully according to the configuration comparison result, updating the first audio scene to the currently running audio scene based on the audio queue. By means of the technical means, efficient and unified configuration change management of various audio scenes in the application can be achieved, the audio configuration change process is simplified, meanwhile, audio configuration conflicts are avoided, and the audio use experience of a user is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to an audio configuration change management method, system, device and storage medium. Background Art

[0002] At present, when there are multiple audio usage scenarios in an application, audio state conflicts are likely to occur, resulting in audio performance that does not meet expectations and causing a bad experience for users. For example, if you are currently on a call, the user minimizes the call and watches a video or plays a voice message. At this time, the application will modify the configuration type of the system audio, changing the audio configuration from supporting simultaneous playback and recording to supporting playback-only scenarios. Different types of audio configuration preemption in different audio consumption scenarios at the same time will result in the audio currently being able to only play but not record, resulting in abnormal call scenarios. For this reason, the code logic of the above two audio usage scenarios is usually set to be mutually exclusive. For example, in a call scenario, it is prohibited to modify the scene configuration to play music, so as to ensure the audio experience of users under audio configuration conflicts.

[0003] However, simply configuring the mutually exclusive relationship between two audio scenes is difficult to adapt to the audio configuration management of a large number of audio scenes. When there are many audio scenes, it is necessary to handle configurations such as preemption, recovery, or interception between each two scenes. The whole process is cumbersome and complicated, and the code maintenance cost is relatively high. Summary of the invention

[0004] The embodiments of the present application provide an audio configuration change management method, system, device and storage medium, which can perform unified configuration change management for various audio scenarios within an application, simplify the audio configuration process, and solve the technical problem of the cumbersome and complex audio configuration change process.

[0005] In a first aspect, an embodiment of the present application provides an audio configuration change management method, comprising:

[0006] When a trigger of a first audio scene is detected, audio context information is registered based on the first audio scene, and the audio context information is written into an audio queue in a set priority order, wherein the audio context information is used to record a configuration state change of the first audio scene, and the audio queue is used to maintain various audio scenes triggered by the user, wherein the audio scenes include an audio playback scene, an audio recording scene, and an audio playback and recording scene;

[0007] Constructing audio configuration change information based on the first audio scene, comparing audio configuration information of the currently running second audio scene based on the audio configuration change information, and outputting a configuration comparison result;

[0008] When it is determined according to the configuration comparison result that the audio configuration of the first audio scene is changed successfully, the first audio scene is updated to the currently running audio scene based on the audio queue.

[0009] In a second aspect, an embodiment of the present application provides an audio configuration change management system, including:

[0010] A trigger module is configured to register audio context information based on the first audio scene when detecting a trigger of the first audio scene, and write the audio context information into an audio queue in a set priority order, wherein the audio context information is used to record a configuration state change of the first audio scene, and the audio queue is used to maintain various audio scenes triggered by the user, wherein the audio scenes include an audio playback scene, an audio recording scene, and an audio playback and recording scene;

[0011] A comparison module, configured to construct audio configuration change information based on the first audio scene, compare the audio configuration information of the currently running second audio scene based on the audio configuration change information, and output a configuration comparison result;

[0012] The updating module is configured to update the first audio scene to the currently running audio scene based on the audio queue when it is determined according to the configuration comparison result that the audio configuration of the first audio scene is changed successfully.

[0013] In a third aspect, an embodiment of the present application provides an audio configuration change management device, including:

[0014] memory and one or more processors;

[0015] The memory is configured to store one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the audio configuration change management method as described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, the audio configuration change management method as described in the first aspect is configured to be executed.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the audio configuration change management method as described in the first aspect.

[0019] In the embodiment of the present application, when the first audio scene is detected to be triggered, the audio context information is registered based on the first audio scene, and the audio context information is written into the audio queue in a set priority order. The audio context information is used to record the configuration status changes of the first audio scene. The audio queue is used to maintain various audio scenes triggered by the user, and the audio scenes include audio playback scenes, audio recording scenes, and audio playback and recording scenes; audio configuration change information is constructed based on the first audio scene, and the audio configuration information of the currently running second audio scene is compared based on the audio configuration change information, and the configuration comparison result is output; when it is determined that the audio configuration change of the first audio scene is successful according to the configuration comparison result, the first audio scene is updated to the currently running audio scene based on the audio queue. By adopting the above-mentioned technical means, the configuration status changes of the audio scene are recorded by registering the audio context information, and the currently running audio scene is updated by constructing and comparing the audio configuration change information, so that efficient and unified configuration change management of various audio scenes within the application can be achieved, the audio configuration change process can be simplified, while avoiding audio configuration conflicts and optimizing the user's audio usage experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of an audio configuration change management method provided by an embodiment of the present application;

[0021] Figure 2 is a management flow chart of an audio queue in an embodiment of the present application;

[0022] Figure 3 is a flowchart of audio configuration change comparison in an embodiment of the present application;

[0023] Figure 4 is a flowchart of audio scene update in an embodiment of the present application;

[0024] Figure 5 It is a structural diagram of an audio configuration change management system provided by an embodiment of the present application;

[0025] Figure 6 It is a structural diagram of an audio configuration change management device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0027] The audio configuration change management method provided in this application aims to record the configuration status changes of audio scenes by registering audio context information, and update the currently running audio scenes by constructing and comparing audio configuration change information, so as to achieve efficient and unified configuration change management of various audio scenes within the application.

[0028] In application development scenarios, a normal audio state is a necessary condition for maintaining the user's audio experience. If there are multiple audio usage scenarios in an application, but there is no unified audio management logic, audio state conflicts are likely to occur, resulting in audio performance that does not meet expectations and a poor user experience. For example, an application can provide different audio usage scenarios such as calls, voice messages, video browsing, music playback, and live broadcasts. Taking the above scenarios as an example, audio usage can be divided into the following three types according to their characteristics:

[0029] 1. Support scenarios where playback and recording can be performed simultaneously, such as calls and live broadcasts;

[0030] 2. Only supports playback scenarios, such as video browsing and voice playback;

[0031] 3. Only supports recording scenarios, such as voice message recording.

[0032] The above three types of audio scene settings are independent and mutually exclusive.

[0033] If the user is currently on a call, he or she minimizes the call interface to go to other business scenarios in the application. For example, the user intends to watch a video or play a voice message. At this time, the application will modify the configuration type of the system audio from the scenario that supports simultaneous playback and recording to the scenario that only supports playback. The situation where different types of audio configurations are preempted in different audio consumption scenarios at the same time is called an audio configuration conflict. The audio configuration conflict will cause the audio to only be played but not recorded, resulting in abnormal call scenarios. When other scenarios complete the consumption of system audio, if the original audio configuration is not restored, the call scenario will remain abnormal. Similarly, in the above three different types of audio configurations, any two combinations will cause audio preemption. Therefore, a mechanism is needed to manage changes in audio configuration. In the device operating system, the system provides an audio conflict management mechanism between different applications. However, audio conflicts that occur within an application need to be managed by the application developer.

[0034] To this end, usually after the audio scene that only supports playback is used up, the previous scene is actively helped to restore to a scene that supports simultaneous playback and recording, so as to help the call scene recover. That is, scene 2 preempts the audio configuration of scene 1. After the audio of scene 2 is used up, the audio configuration of scene 1 is actively restored, which is equivalent to adding code logic to scene 2 to maintain scene 1.

[0035] In addition, in the call scenario, users are not allowed to watch videos. That is, when the scenario supports simultaneous playback and recording, it is not allowed to change to a scenario that only supports playback. That is, scenario 1 does not allow scenario 2 to modify the audio configuration. This is equivalent to adding code logic mutual exclusion between scenario 1 and scenario 2.

[0036] At that time, simply adding code logic between each audio scene to manage audio configuration changes was only applicable to situations where there were relatively few audio scenes. Assuming there were n different audio usage scenarios, and each two scenarios needed to handle preemption, recovery, or interception, a total of C2 n When there are many scenarios, code maintenance is very difficult. In addition, when using audio in business scenarios, a third-party SDK (such as an advertising SDK) may modify the audio configuration, causing the audio configuration of the original scenario to be abnormal, giving users a poor audio experience. These changes are based on the code logic inside the SDK, resulting in changes to the audio configuration that are not perceived by the relevant business scenarios.

[0037] Based on the above problems, it may cause the audio to be abnormal when the user switches to other scenes by minimizing the function during a call and clicks to play music; when a call is received during music playing, the music does not resume playing after the call ends; when the user switches to the voice room by minimizing the function to browse the video list, the voice room sound does not resume normally after the user exits the video list; when the user switches to the radio station by minimizing the function to browse the video list, the radio station sound does not resume normally after the user exits the video list, etc. Based on this, an audio configuration change management method of an embodiment of the present application is provided to perform unified configuration change management for various audio scenes within the application, simplify the audio configuration process, and solve the technical problem of the cumbersome and complex audio configuration change process.

[0038] Example:

[0039] Figure 1 A flowchart of an audio configuration change management method provided in an embodiment of the present application is given. The audio configuration change management method provided in this embodiment can be executed by an audio configuration change management device. The audio configuration change management device can be implemented by software and / or hardware. The audio configuration change management device can be composed of two or more physical entities, or can be composed of one physical entity. Generally speaking, the audio configuration change management device can be a terminal device such as a computer, a mobile phone, or a tablet.

[0040] The following description is made by taking the audio configuration change management device as an example of the main body for executing the audio configuration change management method. Figure 1 , the audio configuration change management method specifically includes:

[0041] S110: When a first audio scene is detected to be triggered, audio context information is registered based on the first audio scene, and the audio context information is written into an audio queue in a set priority order, where the audio context information is used to record configuration status changes of the first audio scene. The audio queue is used to maintain various audio scenes triggered by the user, where the audio scenes include audio playback scenes, audio recording scenes, and audio playback and recording scenes.

[0042] When performing audio configuration change management, this application realizes unified management of various audio scenarios by performing audio context registration, audio change monitoring and audio change management.

[0043] Among them, refer to Figure 2, when using various audio scenes of the application, the audio scenes triggered by the user are detected in real time, and the currently detected audio scene is defined as the first audio scene. When the first audio scene (such as call, video playback, voice message recording, etc.) is detected to be triggered, the audio context information of the scene is immediately registered. This information records the configuration status changes of the scene in detail. The configuration status changes may include the audio scene type, that is, scenes that support simultaneous playback and recording, scenes that only support playback, or scenes that only support playback. Configuration status changes may also include the usage status of the current audio scene, such as activation or stop. According to actual recording needs, the configuration status change information can be set adaptively. Then, this information is written into the audio queue in the set priority order, and the audio scene with the highest priority is at the forefront. The priority can be set according to factors such as the importance of the audio scene and user experience requirements to ensure that key scenes are processed first.

[0044] Specifically, when registering the audio context, the context registration is performed through the audio scene corresponding to the first audio scene, the context of the audio scene change, and the source tracking of the audio change. The audio scene only needs to register to monitor whether the audio of its own scene is preempted, and the recovery notification after preemption. This is conducive to the maintenance of code logic and reduces the maintenance cost of cross-scenes. Each audio scene only needs to care about whether its own audio is preempted and whether it is restored.

[0045] For example, UNQAudioScene is defined as an audio scene category enumeration, and its intrinsic type is a string. For example:

[0046] UNQAudioSceneCall: means the call scene;

[0047] UNQAudioSceneMusic: means music scene.

[0048] Define UNQAudioContext as the context for audio scene changes. Its properties include:

[0049] UNQAudioScene: used to distinguish different audio usage scenarios;

[0050] occupiedBeganCallback: callback notification when the audio is occupied. When the callback is triggered, it means that the current audio scene is occupied.

[0051] occupiedEndCallback: callback notification for resuming audio after being occupied. When the callback is triggered, it means that the current audio scene is restored, that is, the audio operation is restored, such as resuming music playback or resuming video playback.

[0052] Define UNQAudioTracingScope for audio change source tracking, and its properties are as follows:

[0053] UNQAudioScene: Audio scene used to configure changes.

[0054] Wrap the code that updates the audio change monitoring result with audio change source tracking information to track the code that updates the audio configuration.

[0055] The calling method of the context of audio scene change is as follows:

[0056] beginContext: When called, it indicates that the current scene starts using audio (successfully registered the context);

[0057] endContext: When called, it indicates that the current scene ends using audio (cancels the context registration).

[0058] Based on the above predefined information, the audio context registration process is as follows:

[0059] (1) Added the new audio scene usage category UNQAudioScene. For example, UNQAudioSceneMusic represents a music playback scene.

[0060] (2) Initialize UNQAudioContext according to the audio scene category, and set the callback notification occupiedBeganCallback when the audio is occupied and the callback notification occupiedEndCallback when the audio is resumed after being occupied as needed. For example, use the music playback scene UNQAudioSceneMusic to initialize the context UNQAudioContext for audio scene changes, indicating that the music playback scene is about to enter. For the callback notification occupiedBeganCallback when the audio is occupied, set it to stop playing music, indicating that the audio is occupied and the music is actively stopped. For the callback notification occupiedEndCallback when the audio is resumed after being occupied, set it to resume playing music, indicating that the audio is resumed after being occupied and the music is actively resumed.

[0061] (3) When entering the music playback scene, call the beginContext method of the audio scene change context UNQAudioContext, which indicates that the current scene starts using audio.

[0062] (4) When leaving the music playback scene, call the endContext method of the context UNQAudioContext of the audio scene change, which indicates that the current scene ends using audio.

[0063] S120: Construct audio configuration change information based on the first audio scene, compare audio configuration information of the currently running second audio scene based on the audio configuration change information, and output a configuration comparison result.

[0064] Furthermore, after the first audio scene is triggered and the context registration is completed, the audio configuration change information of the current first audio scene is obtained by monitoring the audio changes, and then the currently running audio scene is updated according to the audio configuration change information of the first audio scene. The currently running audio scene is defined as the second audio scene. When the first audio scene is triggered, it is only necessary to compare the audio configuration information of the currently running second audio scene with the audio configuration change information of the first audio scene to determine whether to update the current audio scene, pause the second audio scene, and update the current audio scene to the first audio scene.

[0065] The main function of audio change monitoring is to sense when the audio configuration is about to change. Configuration change monitoring is mainly used as a pre-step for audio change management. When the audio scene change is about to occur, based on the audio scene UNQAudioScene of the first audio scene and the source tracking of the audio change UNQAudioTracingScope, a unified encapsulation of the audio change configuration UNQAudioConfig is generated to perform audio change management as audio configuration change information.

[0066] By monitoring audio changes, you can sense when all audio changes are about to occur, manage audio changes uniformly at that time, and thus achieve unified management of changed audio. By managing and configuring the audio behavior of applications through the audio change monitoring module AVAudioSession, you can control the application to set the audio session category (such as playback, recording, etc.). Through the change interface provided by the Hook (hook function) audio change monitoring module AVAudioSession, you can monitor changes in business layer operations.

[0067] Based on the above Hook interface, this application sets a total of 5 configuration types for audio configuration modification. Each audio configuration change is a random combination of the following 5 items, which is defined as the audio configuration change combination UNQAudioModify in the present invention:

[0068] AVAudioSessionCategory, used to define the category of the audio session;

[0069] AVAudioSessionCategoryOptions, customize the behavior of the audio session;

[0070] AVAudioSessionMode, used to specify the mode of the audio session;

[0071] AVAudioSessionRouteSharingPolicy, used to define the routing sharing policy of the audio session;

[0072] Activate or deactivate AVAudioSession;

[0073] Based on the above Hook steps, the audio change monitoring module AVAudioSession can get a response before modifying the audio configuration, and decide whether to intercept the modification of the audio configuration. Among them, the audio configuration change combination UNQAudioModify obtained by the Hook step is defined as the unified encapsulation UNQAudioConfig of the audio update configuration, that is, the audio configuration change information. The unified encapsulation UNQAudioConfig of the audio update configuration contains the following two properties:

[0074] UNQAudioModify: Changes a random combination of the five audio configuration options.

[0075] UNQAudioScene: The UNQAudioTracingScope audio change source tracking in the audio context registration wraps the code for modifying the audio change monitoring module AVAudioSession. At this time, you can get which audio scene UNQAudioScene modified the audio configuration.

[0076] Based on the unified encapsulation UNQAudioConfig of audio update configuration, audio change monitoring can be realized. When the audio configuration changes, the audio scene UNQAudioScene is used to determine which scene has changed the audio, and then the audio configuration change combination UNQAudioModify is used to determine the content to be updated in the current audio configuration.

[0077] Furthermore, based on the audio configuration change information of the first audio scene (ie, the unified encapsulation UNQAudioConfig of the audio update configuration), the present application compares it with the audio configuration information of the currently running second audio scene to determine whether to change the currently running audio scene.

[0078] Optionally, refer to Figure 3 , comparing the audio configuration information of the currently running second audio scene based on the audio configuration change information, and outputting the configuration comparison result, including:

[0079] S1201, performing a redundant comparison of configuration information based on the audio configuration change information and the audio configuration information of the currently running second audio scene to obtain a redundant configuration comparison result;

[0080] S1202: performing conflict preemption ratio matching of audio scenes based on the audio configuration change information and the audio configuration information of the currently running second audio scene to obtain a conflict preemption ratio matching result;

[0081] S1203: Output a configuration comparison result according to the redundant configuration comparison result and the conflict preemption ratio comparison result.

[0082] By comparing the audio configuration change information with the audio configuration information of the currently running second audio scene, it is determined whether there is redundant repeated configuration and preemption conflict. It is understandable that if the audio configuration change information is repeated with the audio configuration information of the currently running second audio scene, it means that the first audio scene has been changed and does not need to be changed again. If there is no conflict between the first audio scene and the second audio scene, the second audio scene will still be used as the currently running audio scene. The audio scene is changed only when there is no redundant repeated configuration between the two and the preemption conflict of the first audio scene is legal.

[0083] Reference Figure 4 When the audio configuration changes in the business scenario, the timing before the change is obtained through the audio change monitoring module AVAudioSession, and the audio scene UNQAudioScene and the source tracking of the audio change UNQAudioTracingScope are used to generate the unified encapsulation of the audio change configuration UNQAudioConfig, which is used as the input of the audio change management. In the configuration change management, it is determined whether there is a conflict and whether the change is legal. If the change is legal, the comparison is passed, and the audio scene is updated in the audio change management.

[0084] Based on the implemented audio context registration and audio change monitoring, a unified encapsulation of audio change configuration UNQAudioConfig is obtained before the audio configuration is updated. Through the audio scene UNQAudioScene configured in the audio configuration change information and the audio configuration change combination UNQAudioModify, it is determined which scene triggered the audio change and what specific changes occurred. At this time, the audio change management can verify the current audio configuration and the configuration that needs to be changed to determine whether the change is legal, whether there will be an audio preemption conflict with other scenes, whether it is a redundant configuration, whether it is abnormal, etc. If it is illegal, the audio configuration change is intercepted. If the comparison passes and audio preemption occurs, the registered scene audio is notified that it is preempted. Based on the above management process, a unified management framework for audio scenes is implemented.

[0085] Among them, for redundant configuration detection, the audio configuration information of the second audio scene is compared by the audio configuration change combination UNQAudioModify in the unified encapsulation UNQAudioConfig of the audio change configuration, and the modified content of the audio configuration of the first audio scene can be determined. The audio configuration status of the current second audio scene can be obtained through the audio change monitoring AVAudioSesion. By comparing the configuration items that need to be modified this time by the audio configuration change combination UNQAudioModify and the status of the audio configuration of the second audio scene, it can be determined whether the current configuration update is redundant and repeated. If it is repeated, the update is intercepted to reduce the frequent calls to the audio change monitoring module AVAudioSesion.

[0086] For the conflict preemption ratio pairing, the conflict preemption ratio pairing of the audio scene is performed based on the audio configuration change information and the audio configuration information of the currently running second audio scene to obtain the conflict preemption ratio pairing result, including:

[0087] Based on the audio configuration change information and the audio configuration information of the currently running second audio scene, it is determined that the first audio scene is different from the second audio scene, and the first audio scene matches the first audio scene of the audio queue, and it is determined that a conflict preemption occurs in the currently running audio scene, and the corresponding conflict preemption ratio comparison result is output.

[0088] If the audio scene UNQAudioScene of the unified encapsulation UNQAudioConfig of the audio change configuration is different from the audio scene UNQAudioContext of the audio scene change context of the second scene currently running by the audio change management UNQAudioSessionController, then it is considered that the audio configuration does not occur in the same usage scenario. Then further judge:

[0089] If the unified encapsulation UNQAudioConfig of the audio change configuration is equal to the audio scene UNQAudioScene of the context UNQAudioContext of the first audio scene change in the audio queue, the change is considered legal. Otherwise, the audio configuration change is considered illegal and the change is intercepted.

[0090] Optionally, after constructing the audio configuration change information based on the first audio scene, the method further includes:

[0091] An abnormal change detection of a setting rule is performed on the first audio scene, and when an abnormal change is detected, the configuration change of the first audio scene is intercepted.

[0092] By intercepting some abnormal configuration changes, we can avoid abnormal audio experience for users. For example, when the audio scene is abnormally changed to only support playback in a scene that supports both recording and playback, it is easy to affect the user experience. For example, during a call, the audio can be recorded and played at the same time, but it is changed to only support playback by code elsewhere. At this time, the audio cannot be recorded, resulting in abnormal audio recording. At this time, according to the set abnormal detection rules, the above abnormal configuration changes are detected and intercepted.

[0093] S130: When it is determined according to the configuration comparison result that the audio configuration of the first audio scene is changed successfully, update the first audio scene to a currently running audio scene based on the audio queue.

[0094] Finally, based on the above audio preemption conflict comparison, redundant configuration comparison, and abnormality detection, if the comparison is determined to be passed according to the configuration comparison result, the audio configuration change of the first audio scene is determined to be successful. At this time, the audio change management UNQAudioSessionController updates the audio scene change context UNQAudioContext of the current first audio scene to the first one in the audio queue, which serves as the judgment basis for subsequent other configuration changes. Then, the first audio scene is updated to the currently running audio scene, thereby completing the configuration change of the audio scene.

[0095] Optionally, after determining that a conflict occurs in the currently running audio scene, the method further includes:

[0096] A first callback notification of the second audio scene is triggered, and the running of the second audio scene is paused based on the first callback notification.

[0097] In the audio queue, if the original audio scene change context UNQAudioContext is not empty, audio preemption occurs. At this time, by calling the first callback notification of the preempted audio scene change context UNQAudioContext, that is, the callback notification occupiedBeganCallback when the audio is occupied, the preempted audio scene (that is, the second audio scene) is notified to suspend operation.

[0098] Optionally, after updating the first audio scene to the currently running audio scene based on the audio queue, the method further includes:

[0099] In response to the closing operation of the first audio scene, the context information of the first audio scene is deleted, and the first audio scene is removed from the audio queue to end the running of the first audio scene.

[0100] After pausing the second audio scene based on the callback notification, it also includes:

[0101] When it is detected that the first audio scene ends running, a second callback notification of the second audio scene is triggered, and the running of the second audio scene is resumed based on the second callback notification.

[0102] It is understandable that for audio queues, when an audio scene is triggered to register an audio context, if the corresponding audio scene UNQAudioScene has the highest priority, it is inserted into the first position in the queue. Otherwise, it is inserted in order of priority. For example, the scene priorities are as follows: call, watch video, play music. The current queue is: call, music play. When the "watch video" context is registered, the corresponding queue is changed to: call, watch video, play music.

[0103] When the audio context registration is canceled, the endContext (cancel context registration) method of the context UNQAudioContext of the audio scene change is called. The context information corresponding to the first audio scene will be removed from the audio queue, and the first remaining audio scene in the queue will become the currently running audio scene. At this time, if the new audio scene has been preempted, the second callback notification, that is, the callback notification occupiedEndCallback for resuming the audio after it is occupied, will be used to send a notification callback, and the operation of the preempted audio scene will be resumed based on the second callback notification.

[0104] Exemplarily, the scene priorities are as follows: call, video watching, music playing. During the current music playing, the queue is: music playing. When a call comes in, the UNQAudioContext queue is updated to: call, music playing. At this time, the music playing is occupied, and a notification callback is sent through the occupiedBeganCallback property of the callback notification when the audio is occupied. The music playing scene pauses after processing the callback notification. After the call ends, the audio queue removes the call scene, and the queue is updated to: music playing. Since the music playing is preempted, when resuming to the currently running audio scene, it is necessary to send a notification callback through the occupiedEndCallback property of the callback notification that is restored after the audio is occupied. The music playing scene resumes playing after processing the callback notification, thereby completing efficient and unified configuration change management of audio scenes.

[0105] By uniformly managing audio preemption and audio recovery when audio conflicts occur, the maintenance cost of code logic is improved, and the user experience when audio conflicts occur is improved. Centrally manage abnormal configurations of intercepted audio to enhance user audio experience. Based on the audio configuration change management method of the present application, it is possible to use the minimize function to go to other scenes during a call, click to play music, and the audio remains normal; receive a call during music playback, and resume music playback after the call ends; use the minimize function to browse the video list in the voice room, and after exiting the video list, the sound in the voice room is restored to normal; use the minimize function to browse the video list during radio playback, and after exiting the video list, the radio sound is restored to normal, etc.

[0106] In the above, when the first audio scene is detected to be triggered, the audio context information is registered based on the first audio scene, and the audio context information is written into the audio queue in the set priority order. The audio context information is used to record the configuration status change of the first audio scene. The audio queue is used to maintain various audio scenes triggered by the user, and the audio scenes include audio playback scenes, audio recording scenes, and audio playback and recording scenes; audio configuration change information is constructed based on the first audio scene, and the audio configuration information of the currently running second audio scene is compared based on the audio configuration change information, and the configuration comparison result is output; when it is determined that the audio configuration change of the first audio scene is successful according to the configuration comparison result, the first audio scene is updated to the currently running audio scene based on the audio queue. By adopting the above technical means, the configuration status change of the audio scene is recorded by registering the audio context information, and the currently running audio scene is updated by constructing and comparing the audio configuration change information, so as to realize efficient and unified configuration change management of various audio scenes within the application, simplify the audio configuration change process, avoid audio configuration conflicts, and optimize the user's audio experience.

[0107] Based on the above embodiments, Figure 5 This is a schematic diagram of the structure of an audio configuration change management system provided by this application. Figure 5 The audio configuration change management system provided in this embodiment specifically includes: a trigger module 21, a comparison module 22 and an update module 23.

[0108] The trigger module 21 is configured to register audio context information based on the first audio scene when detecting a trigger of the first audio scene, and write the audio context information into the audio queue in a set priority order, wherein the audio context information is used to record the configuration state change of the first audio scene, and the audio queue is used to maintain various audio scenes triggered by the user, and the audio scenes include audio playback scenes, audio recording scenes, and audio playback and recording scenes;

[0109] The comparison module 22 is configured to construct audio configuration change information based on the first audio scene, compare the audio configuration information of the currently running second audio scene based on the audio configuration change information, and output the configuration comparison result;

[0110] The updating module 23 is configured to update the first audio scene to the currently running audio scene based on the audio queue when it is determined according to the configuration comparison result that the audio configuration of the first audio scene is changed successfully.

[0111] Specifically, the audio configuration information of the currently running second audio scene is compared based on the audio configuration change information, and a configuration comparison result is output, including:

[0112] Performing a redundant comparison of the configuration information based on the audio configuration change information and the audio configuration information of the currently running second audio scene to obtain a redundant configuration comparison result;

[0113] Based on the audio configuration change information and the audio configuration information of the currently running second audio scene, a conflict preemption ratio comparison of the audio scene is performed to obtain a conflict preemption ratio comparison result;

[0114] The configuration comparison result is output according to the redundant configuration comparison result and the conflict preemption ratio comparison result.

[0115] Based on the audio configuration change information and the audio configuration information of the currently running second audio scene, a conflict preemption ratio comparison of the audio scene is performed to obtain a conflict preemption ratio comparison result, including:

[0116] Based on the audio configuration change information and the audio configuration information of the currently running second audio scene, it is determined that the first audio scene is different from the second audio scene, and the first audio scene matches the first audio scene of the audio queue, and it is determined that a conflict preemption occurs in the currently running audio scene, and the corresponding conflict preemption ratio comparison result is output.

[0117] Specifically, after determining that a conflict occurs in the currently running audio scene, the method further includes:

[0118] A first callback notification of the second audio scene is triggered, and the running of the second audio scene is paused based on the first callback notification.

[0119] After pausing the second audio scene based on the callback notification, it also includes:

[0120] When it is detected that the first audio scene ends running, a second callback notification of the second audio scene is triggered, and the running of the second audio scene is resumed based on the second callback notification.

[0121] After constructing the audio configuration change information based on the first audio scene, the method further includes:

[0122] An abnormal change detection of a setting rule is performed on the first audio scene, and when an abnormal change is detected, the configuration change of the first audio scene is intercepted.

[0123] Specifically, after updating the first audio scene to the currently running audio scene based on the audio queue, the method further includes:

[0124] In response to the closing operation of the first audio scene, the context information of the first audio scene is deleted, and the first audio scene is removed from the audio queue to end the running of the first audio scene.

[0125] In the above, when the first audio scene is detected to be triggered, the audio context information is registered based on the first audio scene, and the audio context information is written into the audio queue in the set priority order. The audio context information is used to record the configuration status change of the first audio scene. The audio queue is used to maintain various audio scenes triggered by the user, and the audio scenes include audio playback scenes, audio recording scenes, and audio playback and recording scenes; audio configuration change information is constructed based on the first audio scene, and the audio configuration information of the currently running second audio scene is compared based on the audio configuration change information, and the configuration comparison result is output; when it is determined that the audio configuration change of the first audio scene is successful according to the configuration comparison result, the first audio scene is updated to the currently running audio scene based on the audio queue. By adopting the above technical means, the configuration status change of the audio scene is recorded by registering the audio context information, and the currently running audio scene is updated by constructing and comparing the audio configuration change information, so as to realize efficient and unified configuration change management of various audio scenes within the application, simplify the audio configuration change process, avoid audio configuration conflicts, and optimize the user's audio experience.

[0126] The audio configuration change management system provided in the embodiment of the present application can be configured to execute the audio configuration change management method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0127] Based on the above practical example, the present application embodiment also provides an audio configuration change management device, referring to Figure 6, the audio configuration change management device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The memory, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the audio configuration change management method described in any embodiment of the present application (for example, the trigger module, comparison module and update module in the audio configuration change management system). The communication module is configured to perform data transmission. The processor executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizes the above-mentioned audio configuration change management method. The input device can be configured to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device may include a display device such as a display screen. The audio configuration change management device provided above can be configured to execute the audio configuration change management method provided in the above-mentioned embodiment, and has corresponding functions and beneficial effects.

[0128] On the basis of the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to execute an audio configuration change management method when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the computer-executable instructions of the computer-readable storage medium provided in the embodiments of the present application are not limited to the audio configuration change management method described above, and may also execute related operations in the audio configuration change management method provided in any embodiment of the present application.

[0129] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, and includes a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the audio configuration change management method described in each embodiment of the present application.

Claims

1. A method for managing audio configuration changes, characterized in that: include: When a first audio scene is detected to be triggered, audio context information is registered based on the first audio scene, and the audio context information is written into an audio queue in a set priority order, wherein the audio context information is used to record a configuration state change of the first audio scene, and the audio queue is used to maintain various audio scenes triggered by the user, wherein the audio scenes include an audio playback scene, an audio recording scene, and an audio playback and recording scene; constructing audio configuration change information based on the first audio scene, comparing audio configuration information of the currently running second audio scene based on the audio configuration change information, and outputting a configuration comparison result; If it is determined according to the configuration comparison result that the audio configuration of the first audio scene is changed successfully, the first audio scene is updated to a currently running audio scene based on the audio queue.

2. The audio configuration change management method according to claim 1, characterized in that: The comparing the audio configuration information of the currently running second audio scene based on the audio configuration change information and outputting the configuration comparison result includes: Performing a redundant comparison of configuration information based on the audio configuration change information and the audio configuration information of the currently running second audio scene to obtain a redundant configuration comparison result; Perform conflict preemption ratio matching of the audio scene based on the audio configuration change information and the audio configuration information of the currently running second audio scene to obtain a conflict preemption ratio matching result; A configuration comparison result is output according to the redundant configuration comparison result and the conflict preemption ratio comparison result.

3. The audio configuration change management method according to claim 2, characterized in that: The performing conflict preemption ratio matching of the audio scene based on the audio configuration change information and the audio configuration information of the currently running second audio scene to obtain the conflict preemption ratio matching result includes: Based on the audio configuration change information and the audio configuration information of the currently running second audio scene, it is determined that the first audio scene is different from the second audio scene, and the first audio scene matches the first audio scene of the audio queue, it is determined that a conflict preemption occurs in the currently running audio scene, and a corresponding conflict preemption ratio comparison result is output.

4. The audio configuration change management method according to claim 3, characterized in that: After determining that a conflict occurs in the currently running audio scene, the method further includes: A first callback notification of the second audio scene is triggered, and the running of the second audio scene is paused based on the first callback notification.

5. The audio configuration change management method according to claim 4, characterized in that: After pausing the running of the second audio scene based on the callback notification, the method further includes: When it is detected that the first audio scene ends running, a second callback notification of the second audio scene is triggered, and the running of the second audio scene is resumed based on the second callback notification.

6. The audio configuration change management method according to any one of claims 1 to 5, characterized in that: After constructing the audio configuration change information based on the first audio scene, the method further includes: An abnormal change detection of a setting rule is performed on the first audio scene, and when an abnormal change is detected, the configuration change of the first audio scene is intercepted.

7. The audio configuration change management method according to any one of claims 1 to 5, characterized in that: After updating the first audio scene to the currently running audio scene based on the audio queue, the method further includes: In response to a closing operation of the first audio scene, context information of the first audio scene is deleted, and the first audio scene is removed from the audio queue to end the operation of the first audio scene.

8. The audio configuration change management method according to any one of claims 1 to 5, characterized in that: The constructing audio configuration change information based on the first audio scene includes: The first audio scene is constructed based on the audio session category, the set audio session behavior, the audio session mode, the routing policy and the running status information of the first audio scene, and the audio configuration change information is uniformly encapsulated.

9. An audio configuration change management system, characterized in that: include: A trigger module is configured to register audio context information based on the first audio scene when a trigger is detected, and write the audio context information into an audio queue according to a set priority order, wherein the audio context information is used to record a configuration state change of the first audio scene, and the audio queue is used to maintain various audio scenes triggered by the user, wherein the audio scenes include an audio playback scene, an audio recording scene, and an audio playback and recording scene; a comparison module configured to construct audio configuration change information based on the first audio scene, compare the audio configuration information of the currently running second audio scene based on the audio configuration change information, and output a configuration comparison result; The updating module is configured to update the first audio scene to a currently running audio scene based on the audio queue when it is determined according to the configuration comparison result that the audio configuration of the first audio scene is changed successfully.

10. An audio configuration change management device, characterized in that: include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the audio configuration change management method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, the computer-executable instructions are configured to execute the audio configuration change management method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the audio configuration change management method according to any one of claims 1 to 8.