A volume control method and device of an audio control system and a storage medium
By acquiring the target input volume value and volume threshold boundary of the audio control system for amplitude limiting and configuring gain parsing rules, the problems of low volume gain configuration accuracy and poor adaptability of audio playback terminals are solved, achieving accurate matching and stable output of volume control.
Patent Information
- Application Number
- CN202611391910.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-24
AI Technical Summary
The volume gain configuration of existing audio playback terminals has low accuracy and poor adaptability, resulting in inaccurate volume control.
By acquiring the target input volume value and volume threshold boundary of the audio control system, boundary limiting processing is performed to generate the limited volume value. Based on the preset gain parsing rules, the level is determined and the gain is configured to generate the target gain value. The volume control command is then generated and sent to the audio control system.
It achieves precise matching of volume configuration, avoids playback abnormalities caused by parameter exceeding limits, improves the accuracy and consistency of volume gain configuration, and adapts to the volume threshold specifications of different hardware platforms.
Smart Images

Figure CN123163545A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio signal processing technology, and in particular to a volume control method, device, and storage medium for an audio control system. Background Technology
[0002] Audio playback terminals are widely used in scenarios such as emergency broadcasting. The terminal drives the speaker to complete audio playback through a processor, audio decoding module, audio output (AO) module, and power amplifier unit.
[0003] Existing terminals typically use manually compiled experience-based level tables to look up the decibel gain, and then call the audio driver volume configuration interface to complete the volume setting, thereby controlling the audio playback volume.
[0004] Existing technologies rely on manual experience to look up tables to configure decibel gain, resulting in poor accuracy and adaptability of volume gain configuration. Summary of the Invention
[0005] This invention provides a volume control method, device, and storage medium for an audio control system, which solves the technical problems of low volume gain configuration accuracy and poor adaptability in existing systems.
[0006] In a first aspect, the present invention provides a volume control method for an audio control system, comprising:
[0007] Obtain the target input volume value and volume threshold boundary of the audio control system;
[0008] Based on the volume threshold boundary, the target input volume value is subjected to boundary limiting processing to generate a limited volume value;
[0009] If a non-smooth adjustment command is received, the volume value after limiting is processed for level discrimination and gain configuration according to the preset gain parsing rules to generate a target gain value.
[0010] Based on the target gain value, a volume control command is generated and sent to the audio control system;
[0011] The audio control system outputs an audio playback volume that matches the target gain value.
[0012] In some embodiments, it also includes:
[0013] If no non-smooth adjustment command is received, the current effective volume value of the audio control system is compared with the volume value after limiting to generate a volume adjustment direction;
[0014] If the volume adjustment direction is not "no adjustment", then based on the current effective volume value, the limited volume value, and the volume adjustment direction, volume step processing is performed to generate a smooth transition volume value sequence.
[0015] Based on the preset total duration of smooth adjustment and the number of volume values in the smooth transition volume value sequence, the execution time interval between adjacent smooth transition volume values in the smooth transition volume value sequence is determined.
[0016] Based on the receiving time of the target input volume value and the execution time interval, the target execution time of each smooth transition volume value in the smooth transition volume value sequence is determined;
[0017] According to the preset gain analysis rules, the smooth transition volume values are processed for level discrimination and gain configuration to generate the transition gain values of each smooth transition volume value.
[0018] Based on the target execution time and transition gain value of each smooth transition volume value, a transition gain time series is generated;
[0019] Based on the transition gain time sequence, a timing volume drive command is generated and sent to the audio control system.
[0020] The audio control system outputs an audio playback volume that matches the corresponding transition gain value at each of the target execution times.
[0021] In some embodiments, the step of comparing the currently active volume value of the audio control system with the volume value after limiting to generate a volume adjustment direction includes:
[0022] Compare the current effective volume value of the audio control system with the volume value after limiting;
[0023] If the current effective volume value is greater than the volume value after the limit is set, then the volume adjustment direction is determined to be volume down;
[0024] If the current effective volume value is less than the volume value after the limit is set, then the volume adjustment direction is determined to be volume up;
[0025] If the current effective volume value is equal to the volume value after limiting, then the volume adjustment direction is determined to be no adjustment.
[0026] In some embodiments, it also includes:
[0027] If the volume adjustment direction is not adjusted, then the volume control matching the volume value after the limit is stopped.
[0028] In some embodiments, the step of performing volume stepping processing based on the currently effective volume value, the limited volume value, and the volume adjustment direction to generate a smooth transition volume value sequence includes:
[0029] Use the currently active volume value as the current smooth transition value;
[0030] According to the preset mapping rules, match the target overlay orientation mark and the target sorting orientation mark for the volume adjustment direction;
[0031] Add the current smooth transition value to the transition volume set;
[0032] The current smooth transition value is matched with the preset adjustment range by superimposing the values of the target superposition orientation mark to generate the target transition volume;
[0033] Add the target transition volume to the transition volume set;
[0034] If the target transition volume is not equal to the limited volume value, then the target transition volume is used as the new current smooth transition value, and the process jumps to the step of matching the current smooth transition value with the target superposition orientation mark value to generate the target transition volume, until the target transition volume is equal to the limited volume value.
[0035] If the target transition volume is equal to the limited volume value, then all volume elements in the transition volume set are sorted according to the volume value to match the target sorting orientation mark, thereby generating the smooth transition volume value sequence.
[0036] In some embodiments, determining the target execution time of each smooth transition volume value in the smooth transition volume value sequence based on the reception time of the target input volume value and the execution time interval includes:
[0037] The moment when the target input volume value is received is taken as the target execution moment of the first smooth transition volume value in the smooth transition volume value sequence.
[0038] The first smooth transition volume value in the smooth transition volume value sequence is taken as the current smooth transition volume value;
[0039] The target execution time of the current smooth transition volume value is superimposed with the execution time interval to generate the next execution time;
[0040] If the current smooth transition volume value is not at the end of the smooth transition volume value sequence, then the next execution time is taken as the target execution time of the next smooth transition volume value in the smooth transition volume value sequence, and the next smooth transition volume value is taken as the new current smooth transition volume value.
[0041] The process jumps to the step of superimposing the target execution time of the current smooth transition volume value with the execution time interval to generate the next execution time, until the current smooth transition volume value is at the end of the smooth transition volume value sequence.
[0042] In some embodiments, the step of performing boundary limiting processing on the target input volume value based on the volume threshold boundary to generate a limited volume value includes:
[0043] Extract the upper and lower limits of the volume threshold from the volume threshold boundaries;
[0044] If the target input volume value is between the lower limit of the volume threshold and the upper limit of the volume threshold, then the target input volume value is used as the volume value after limiting.
[0045] If the target input volume value is greater than the upper limit of the volume threshold, then the upper limit of the volume threshold is used as the volume value after limiting.
[0046] If the target input volume value is less than the lower limit of the volume threshold, then the lower limit of the volume threshold is used as the volume value after limiting.
[0047] In some embodiments, the step of performing level discrimination and gain configuration processing on the limited volume value according to a preset gain resolution rule to generate a target gain value includes:
[0048] According to the preset level discrimination rules, match the target volume level of the limited volume value;
[0049] The limited volume value is input into the pre-built volume mapping model associated with the target volume level, and gain parsing processing is performed to generate the target gain value.
[0050] Secondly, the present invention provides a volume control device for an audio control system, comprising:
[0051] The parameter acquisition module is used to acquire the target input volume value and volume threshold boundary of the audio control system.
[0052] The boundary limiting module is used to perform boundary limiting processing on the target input volume value based on the volume threshold boundary, and generate a limited volume value.
[0053] The gain analysis module is used to perform level discrimination and gain configuration processing on the limited volume value according to the preset gain analysis rules if a non-smooth adjustment command is received, and generate a target gain value.
[0054] The volume output module is used to generate a volume control command based on the target gain value and send it to the audio control system, so that the audio control system outputs an audio playback volume that matches the target gain value.
[0055] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the volume control method of the above-mentioned audio control system.
[0056] As can be seen from the above technical solutions, the present invention has the following advantages: The present invention provides a volume control method, device, and storage medium for an audio control system. It obtains the target input volume value and volume threshold boundary of the audio control system, performs boundary limiting processing on the target input volume value based on the volume threshold boundary, and generates a limited volume value, thus avoiding the abnormal problem of volume parameters exceeding the hardware range. Through preset gain resolution rules, it performs level discrimination and gain configuration processing on the limited volume value to generate a target gain value, achieving standardized gain resolution and improving the accuracy of volume configuration. Based on the target gain value, it generates a volume control command and sends it to the audio control system. The audio control system outputs an audio playback volume matching the target gain value, achieving a standardized playback volume output with precise gain matching. The present invention effectively avoids playback abnormalities caused by parameter exceeding limits through pre-set volume boundary limiting. It completes level discrimination and gain configuration based on standardized gain resolution rules, overcoming the limitations of manual calibration and significantly improving the accuracy and consistency of volume gain configuration. Simultaneously, it adapts to the volume threshold specifications of different hardware platforms, effectively improving the shortcomings of traditional solutions such as poor adaptability and inaccurate gain output. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A flowchart illustrating a volume control method for an audio control system provided in an embodiment of the present invention;
[0059] Figure 2 This is a flowchart of the volume uniform mapping control in an embodiment of the present invention;
[0060] Figure 3 This is a schematic diagram of the audio volume control link in an embodiment of the present invention;
[0061] Figure 4 A schematic diagram of the structure of a volume control device for an audio control system provided in an embodiment of the present invention;
[0062] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0063] This invention provides a volume control method, device, and storage medium for an audio control system, which addresses the technical problems of low volume gain configuration accuracy and poor adaptability in existing systems.
[0064] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0065] Please see Figure 1 , Figure 1 An optional flowchart of a volume control method for an audio control system provided in an embodiment of the present invention includes steps 101 to 105.
[0066] Step 101: Obtain the target input volume value and volume threshold boundary of the audio control system;
[0067] The target input volume value is the volume control parameter issued by the upper-level scheduling platform or local control terminal of the audio control system. It adopts the industry-standard integer range of 0 to 100 to represent the user-set volume level. It is used for interface display, parameter storage and remote command transmission, and is the original input control quantity for this volume adjustment.
[0068] The volume threshold boundary is the effective gain value boundary parameter defined by the audio playback terminal hardware driver. It includes the lower threshold and the upper threshold, corresponding to the decibel gain range that the audio output (AO) module can recognize and drive normally.
[0069] Audio control system: An embedded audio terminal device integrating network communication, audio decoding, audio output, power amplification and main control processing unit, which serves as the controlled execution end of this solution, is used to receive volume control commands issued by the upper control device and complete the output execution of audio playback volume.
[0070] Step 101 is used to accurately obtain control parameters and hardware boundary parameters, providing valid input parameters for subsequent limiting processing, gain analysis, and volume adjustment. The specific execution flow is as follows:
[0071] First, continuously monitor the remote commands from the upper-level scheduling platform and the local adjustment commands from the local control terminal, capture the volume adjustment tasks to be executed in real time, and synchronously parse the volume control field carried in the command message corresponding to the volume adjustment task to extract the original target input volume value.
[0072] Secondly, the underlying hardware driver interface is called to read the hardware configuration parameters that are fixed locally in the audio control system, retrieve the fixed parameter range preset by the audio driver of the audio control system, obtain the volume threshold boundary that is compatible with the hardware specifications of the audio control system, and determine the legal volume value range corresponding to this volume adjustment. This volume value range is used for subsequent parameter boundary limiting processing, so that subsequent parameter processing conforms to the adaptation specifications of the hardware driver interface.
[0073] Finally, the acquired target input volume value and volume threshold boundary are pre-validated to ensure parameter integrity and completeness, thus completing the parameter acquisition process.
[0074] Step 102: Based on the volume threshold boundary, perform boundary limiting processing on the target input volume value to generate the limited volume value;
[0075] Optionally, step 102 includes the following sub-steps:
[0076] Extract the upper and lower limits of the volume threshold;
[0077] If the target input volume value is between the lower limit and the upper limit of the volume threshold, then the target input volume value will be used as the volume value after limiting.
[0078] If the target input volume value is greater than the upper limit of the volume threshold, then the upper limit of the volume threshold will be used as the volume value after limiting.
[0079] If the target input volume value is less than the lower limit of the volume threshold, then the lower limit of the volume threshold will be used as the volume value after limiting.
[0080] Boundary limiting processing refers to parameter correction processing that constrains the input target volume parameter by range. By determining the range, parameters that exceed the legal range are truncated to the corresponding boundary value, ensuring that the output parameter is always within the valid value range that the audio control system can recognize, and avoiding playback abnormalities caused by parameters exceeding the limit.
[0081] The volume value after limiting refers to the compliant volume parameter output after boundary limiting processing. It is the direct input parameter for subsequent volume adjustment direction recognition, gain configuration and volume control command generation, and its value matches the volume threshold boundary range.
[0082] Optionally, step 102 is the parameter correction stage of the audio volume control process, used to perform range constraint and legality correction on the target input volume value, eliminate out-of-limit input parameters, and output a compliant limited volume value, providing valid input for subsequent volume adjustment direction recognition and gain analysis. The specific execution process is as follows:
[0083] First, extract the upper and lower limits of the volume threshold contained in the volume threshold boundary to clarify the two endpoints of the legal range for this limiting process and complete the initialization of the limiting reference parameters;
[0084] Subsequently, the target input volume value is compared with the upper and lower limits of the volume threshold to determine the range, and the corresponding limiting logic is executed:
[0085] If the target input volume value is greater than or equal to the lower limit of the volume threshold and less than or equal to the upper limit of the volume threshold, the parameter is deemed valid and the target input volume value is directly used as the volume value after limiting.
[0086] If the target input volume value is greater than the upper limit of the volume threshold, it is determined that the parameter overflows and the upper limit of the volume threshold is used as the volume value after limiting.
[0087] If the target input volume value is less than the lower limit of the volume threshold, the parameter is determined to be underflowed, and the lower limit of the volume threshold is used as the volume value after limiting.
[0088] For example, assuming the host control device runs a control application based on the SSD202D processor, and the controlled end is an audio control system equipped with a matching audio driver; the target input volume value and volume threshold boundary have been obtained in step 101, wherein the lower limit of the volume threshold is 0 and the upper limit of the volume threshold is 100, corresponding to the full range of legal volume values from 0 to 100.
[0089] Assuming the target input volume value obtained by the upper control device is 45, after interval comparison, 45 is within the threshold range of 0 and 100. The control application determines that the parameter is valid and directly uses 45 as the volume value after limiting.
[0090] Assuming the target input volume value obtained by the upper control device is 108, after interval comparison, 108 is greater than the upper limit of the volume threshold of 100. The control application executes the upper limit truncation logic and uses the upper limit of the volume threshold of 100 as the volume value after limiting.
[0091] Assuming the target input volume value obtained by the upper control device is -3, after interval comparison, -3 is less than the lower limit of the volume threshold 0. The control application executes the lower limit truncation logic and uses the lower limit of the volume threshold 0 as the volume value after limiting.
[0092] By using boundary limiting processing, the input parameters are always kept within the legal range that the audio control system can recognize, thus avoiding problems such as audio playback distortion and drive abnormalities caused by exceeding the limit parameters from the source.
[0093] Step 103: If a non-smooth adjustment command is received, the volume value after limiting is processed by level discrimination and gain configuration according to the preset gain analysis rules to generate the target gain value.
[0094] Optionally, step 103 includes the following sub-steps:
[0095] According to the preset level discrimination rules, match the target volume level of the limited volume value;
[0096] The limited volume value is input into the pre-built volume mapping model associated with the target volume level, and gain parsing processing is performed to generate the target gain value.
[0097] Non-smooth adjustment commands refer to control commands that directly specify the target volume level for abrupt adjustment (such as an adjustment command issued by the upper-level scheduling platform that jumps directly from volume 0 to volume 50). This is different from smooth adjustment commands that continuously and gradually change the volume. This step is used to respond to this type of command and complete gain analysis.
[0098] Level determination refers to determining the range to which the volume value belongs after limiting, and identifying the target volume level of the volume value after limiting. For example, the volume value after limiting can be determined as either the mute level or the normal playback level.
[0099] The target volume level refers to the volume working level divided based on the volume value after limiting. For example, it includes the mute level (corresponding to the mute segment, the volume value after limiting is 0) and the normal playback level (corresponding to the normal playback segment, the volume value after limiting is 1~100).
[0100] The volume mapping model refers to a pre-built gain conversion model used to convert the limited volume value into a decibel gain parameter that the audio driver interface can recognize. It includes the mute level mapping rules, the floating-point conversion formula for the normal playback level, and the integer rounding rules.
[0101] The floating-point target gain value is expressed in decibels (dB). It is the theoretical decibel gain value output by the volume mapping model before integerization and is used for subsequent integer-based limiting calculations.
[0102] The target gain value is expressed in decibels (dB). It is the final decibel parameter output by the volume mapping model after integer limiting. It is the direct input parameter for calling the audio driver interface and is used for hardware gain configuration of the audio control system.
[0103] MI_AO_SetVolume refers to an audio output volume setting interface, which is an application programming interface provided by the underlying audio control system for writing target gain values to the audio driver to complete the hardware-side volume gain configuration.
[0104] PCM data (Pulse Code Modulation Audio Sample Data) refers to the raw digital audio samples used by an audio control system for audio playback.
[0105] Specifically, in the scenario of receiving a non-smooth adjustment command, step 103 performs level discrimination and gain configuration processing on the limited volume value to generate a target gain value G. i This provides valid input parameters for the volume interface calls of the audio control system. The specific execution flow is as follows:
[0106] First, the upper-level control device performs level discrimination and matches the target volume level corresponding to the volume value after limiting. For example, it is assumed that there are mute level and normal playback level. The volume corresponding to the mute level is 0, and the volume range matched for the normal playback level is 1~100. If the volume value after limiting is 0, it is matched as mute level; if the volume value after limiting is 1~100, it is matched as normal playback level.
[0107] Subsequently, the host control device inputs the limited volume value into the volume mapping model associated with the corresponding target volume level and performs gain analysis processing:
[0108] When matched to the mute mode, the target gain value G will be... i Set the interface gain to the preset lower limit (e.g., -60dB) and enter mute mode:
[0109] If the audio control system has an independent mute control function, then hardware mute will be enabled simultaneously.
[0110] If the audio control system does not have an independent mute control function, then stop writing valid PCM data to the audio output module, or write zero-value audio samples, so that there is no audible audio output.
[0111] When the match is the normal playback level, substitute the limited volume value V into the floating-point conversion formula of the volume mapping model to calculate the floating-point target gain value:
[0112] G f =G min +K·((V-V base ) / N step );
[0113] N step =V max -V base ;
[0114] Among them, G f G is a floating-point target gain value in dB, representing the theoretical decibel gain of the volume mapping model output before integer rounding. min V represents the lower limit of the interface gain, indicating the minimum gain parameter that the audio control system's driver interface can accept; K represents the total gain span of the target volume level, corresponding to the total gain change (in dB); base The preset reference volume for the target volume level, i.e., the starting volume scale; V max The preset maximum volume scale for the target volume level; N step The total number of scale intervals for the target volume level represents the total number of intervals formed by adjacent volume scale points from the preset base volume to the preset maximum volume scale.
[0115] Then, based on the rounding compensation strategy, integer operations are directly performed on the limited volume value V to obtain the target gain value G, which is an integer type and can be directly used for the hardware interface. i This integer operation represents the floating-point target gain G. f An equivalent integer implementation, used to avoid the overhead of floating-point operations:
[0116] G i =G min +floor((K·(V-V base )+O round ) / N step );
[0117] Among them, O round `floor()` is the rounding offset, used as a compensation offset parameter to achieve rounding to the nearest integer during integer division operations; `floor()` is the floor function, used to perform floor rounding on the result of the operation within the parentheses and output the integer result.
[0118] The theoretical gain step size satisfies:
[0119] ΔG=K / N step ;
[0120] The ratio of the linear amplitudes of the audio signals corresponding to adjacent volume scales satisfies:
[0121] A(V n+1 ) / A(V n )=10 (ΔG / CA) ;
[0122] Among them, V nLet n be the nth volume scale in the target volume level, represented as an integer, with a value range of [V]. base V max ];A(V n ) is V n The linear amplitude of the audio signal; C A This is the field quantity decibel conversion factor; used for the conversion between signal amplitude and decibels, and is usually taken as 20; the linear amplitude ratio of this audio signal is a fixed constant, and the audio signal amplitude changes by a fixed proportion for each increase in volume scale.
[0123] For example, this embodiment runs on a host control device equipped with an SSD202D processor, and the controlled object is an audio control system; the input is the limited volume value, and a non-smooth adjustment command is received from the upper-level scheduling platform, with a preset gain lower limit G. min = -60dB, Interface gain limit G max =10dB.
[0124] The first adjustment task: The upper-level scheduling platform sends a target volume value V=50. After boundary limiting, the volume value obtained is 50, which is matched to the normal playback level. The normal playback level corresponds to V... base =1 and V max =100, input the target volume value into the pre-built volume mapping model associated with the normal playback level to perform integer gain calculation:
[0125] G i =-60+floor((70×(50-1)+49) / 99)=-25dB;
[0126] The second adjustment task: The upper-level scheduling platform sends a target volume value V=90. After boundary limiting, the volume value after limiting is obtained as 90, which is matched with the normal playback level. The target volume value 90 is then input into the pre-built volume mapping model associated with the normal playback level to perform integer gain calculation.
[0127] G i =-60+floor((70×(90-1)+49) / 99)=3dB;
[0128] Continue sending the target volume value V=100, matching it to the normal playback level, and calculate the output G. i =10dB, this value is related to the upper limit of interface gain G. max The parameters remained consistent, and no overflow occurred.
[0129] The third adjustment task: The upper-level scheduling platform sends a target volume value V=120. After boundary limiting, the volume value is reduced to 100, which is matched to the normal playback level. Then, gain is obtained by performing gain analysis through a pre-built volume mapping model. i=10dB.
[0130] The fourth adjustment task: The upper-level scheduling platform sends a target volume value V=-5. After boundary limiting, the volume value after limiting is 0, which is matched to the mute setting. The target gain value is directly determined to be -60dB, which is equal to the preset lower gain limit G. min .
[0131] In some embodiments, refer to Figure 2 , Figure 2 This is an optional flowchart of volume uniform mapping control in an embodiment of the present invention, wherein, Figure 2 This demonstrates the complete processing chain when a non-smooth adjustment mode command is received, from receiving the target input volume value V to calling the audio output interface to complete gain configuration. The process sequentially executes the target volume value V boundary limiting processing and level determination; when V=0, it is determined to be a mute level and the target gain value is directly determined to be −60dB (preset lower gain limit), and it enters the mute state; when it is determined to be a normal playback level, it completes the floating-point target gain calculation and integer-based limiting to obtain the target gain value G. i Based on the target gain value G i The volume control command is generated and then the MI_AO_SetVolume interface inside the audio control system is called to pass the volume control command to the audio control system.
[0132] In some embodiments, the interface gain is limited to an integer range of -60dB to 10dB. Counting by integers, 10 - (-60) + 1 = 71 distinct integer dB values can be obtained. Assuming there are a total of 100 non-zero volume scales, which is greater than the 71 valid integer gain levels that the interface can output, some adjacent non-zero volume scales will map to the same interface gain. The pre-built volume mapping model evenly distributes these repeated mapping points across the entire range, avoiding the concentration of repeated mappings in local intervals. This embodiment uses the integer gain calculation formula to instantiate and express this volume mapping model. The calculated correspondence between non-zero volume scales and target gain values is shown in Table 1.
[0133] Table 1. Mapping Relationship between Non-zero Volume Scale and Target Gain Value
[0134]
[0135] Table 1 lists only a portion of the sampling points as exemplary mappings. The target gain values corresponding to each target input volume at each sampling point in Table 1 are unique. When calculating by traversing all non-zero volume scales from 1 to 100, multiple different non-zero volume scales may map to the same interface dB gain (target gain value), and these repeated mapping points are evenly distributed along the range. The calculated target gain value is output to the audio control system. In this embodiment, the target gain value is passed through the MI_AO_SetVolume interface built into the audio control system. MI_AO_SetVolume is the audio output control interface provided by the audio control system. It only receives integer dB parameters, receives the target gain parameter, performs parameter verification, converts it to the register configuration parameters corresponding to the audio codec chip, writes it to the audio hardware register, and completes the actual setting of the audio output gain. It should be understood that MI_AO_SetVolume is an exemplary interface given in this embodiment; other volume control interfaces with the same function can also be used.
[0136] Step 104: Based on the target gain value, generate a volume control command and send it to the audio control system;
[0137] Volume control commands refer to business-level control commands for audio control systems. They carry the target gain value as a control parameter and are used to transmit gain configuration requirements to the audio control system.
[0138] Optionally, the specific execution flow of step 104 is as follows:
[0139] The target gain value is encapsulated to generate a volume control command, which carries the parameter field of the target gain value.
[0140] Send volume control commands to the audio control system;
[0141] The audio control system parses the volume control command, extracts the target gain value in the field, and performs parameter validity verification. The verification items include whether the target gain value falls within the preset valid value range (such as -60dB to 10dB).
[0142] If the verification passes, the audio output control interface inside the audio control system is called, and the target gain value is input into the interface; if the verification fails, the current volume control command is discarded, and the current audio output gain remains unchanged.
[0143] The audio output control interface converts the target gain value in integer dB format into a hardware register configuration code that the audio codec chip can recognize, writes it into the gain register of the audio codec chip, and completes the hardware configuration of the audio output gain.
[0144] Step 105: Output audio playback volume matching the target gain value through the audio control system.
[0145] Audio peripherals refer to audio output devices (such as loudspeakers, vehicle audio horns, emergency broadcast horns, etc.) that are electrically connected to the audio control system. They are used to convert audio signals in the form of electrical signals into sound wave signals to realize audio output.
[0146] Optionally, the specific execution flow of step 105 is as follows:
[0147] After the audio control system completes the register configuration for the target gain value, it locks the gain parameter status of the current audio output channel to prevent abnormal parameter fluctuations during operation and ensure the stability of volume output.
[0148] The audio control system reads the raw audio PCM (Pulse Code Modulation) data to be played, performs noise reduction and equalization preprocessing on the audio data, and matches the configured target gain value to complete the gain amplification or attenuation processing of the audio signal.
[0149] The gain-adjusted audio electrical signal is transmitted to the audio peripheral through the audio output channel. The audio peripheral completes the electroacoustic conversion and outputs an audio playback volume that matches the target gain value.
[0150] The audio control system monitors the audio output status in real time and maintains the current gain configuration until a new volume control command is received. If no new volume control command is triggered throughout the process, the current volume is maintained to ensure stable output and avoid abnormal problems such as volume jumps and distortion.
[0151] In some embodiments, refer to Figure 3 , Figure 3 This is an optional structural diagram of the audio volume control link in an embodiment of the present invention, used to illustrate the hardware and software hierarchy and signal flow of the volume control method of the audio control system provided in this embodiment.
[0152] The workflow of this link is as follows: The platform command, local button, or configuration file provides a target input volume value V ranging from 0 to 100 as the input parameter for volume control. After receiving the target volume value, the SSD202D application module sequentially completes input boundary limiting and dB mapping (including gear discrimination and gain configuration), and can selectively execute smooth switching control according to the current operating scenario (whether a non-smooth adjustment command has been received), outputting an integer target gain value.
[0153] The audio control system calls MI_AO_SetVolume (audio output volume setting interface) to send the target dB value (target gain value) to the AO audio output module of the audio control system, completing the gain parameter configuration of the AO device; the PCM decoding module of the audio control system performs pulse code modulation decoding on the audio data and outputs the raw audio data stream to the AO audio output module; the AO audio output module adjusts the gain and amplifies the power of the audio signal based on the configured gain parameters, and then outputs it to the speaker terminal connected to the audio control system to complete audio playback. Among these, the volume control acts on the gain adjustment stage of the AO channel without changing the original audio encoding, network transmission and PCM decoding processing logic.
[0154] In some embodiments, the volume control method of the above-described audio control system further includes:
[0155] If no non-smooth adjustment command is received, the current effective volume value of the audio control system is compared with the volume value after limiting to generate the volume adjustment direction;
[0156] If the volume adjustment direction is not "no adjustment", then based on the current effective volume value, the limited volume value, and the volume adjustment direction, volume step processing is performed to generate a smooth transition volume value sequence.
[0157] Based on the preset total smooth adjustment duration and the number of volume values in the smooth transition volume value sequence, the execution time interval between adjacent smooth transition volume values in the smooth transition volume value sequence is determined.
[0158] Based on the receiving time of the target input volume value and the execution time interval, determine the target execution time of each smooth transition volume value in the smooth transition volume value sequence;
[0159] According to the preset gain analysis rules, the level of each smooth transition volume value is determined and the gain is configured to generate the transition gain value of each smooth transition volume value.
[0160] Based on the target execution time and transition gain value of each smooth transition volume value, a transition gain time series is generated;
[0161] Based on the transition gain time series, a timing volume drive command is generated and sent to the audio control system.
[0162] The audio control system outputs an audio playback volume that matches the corresponding transition gain value at each target execution moment;
[0163] If the volume adjustment direction is not adjusted, then the volume control matching the volume value after limiting will stop.
[0164] The currently active volume value refers to the actual user volume scale of the current audio output channel of the audio control system, corresponding to the currently continuously output audio playback volume.
[0165] A smooth transition volume value sequence refers to a sequence of smooth transition volume values that pass through in sequence during the volume stepping process, arranged in the order of adjustment. The step size of adjacent volume scales within the sequence is a preset adjustment range, gradually changing from the currently effective volume value to the volume value after the limit is set.
[0166] Transition gain time series refers to a time-series data sequence composed of each transition gain value and its corresponding target execution time in the order of adjustment, used for the gradual switching of audio gain in timing control.
[0167] Optionally, the specific execution flow of the above steps is as follows:
[0168] Instruction priority determination: If no non-smooth adjustment instruction is received, proceed to the smooth adjustment branch;
[0169] Compare the currently effective volume value Vc with the limited volume value Vt to determine the volume adjustment direction. The volume adjustment direction can be one of the following: no adjustment, volume down, or volume up.
[0170] Generate a smooth transition volume value sequence: If the volume adjustment direction is volume down or volume up, perform volume step processing: In the unit of preset adjustment amplitude (such as 1), Vc is incremented or decremented towards Vt one by one, and all volume scales passed through are arranged in the order of adjustment to generate a smooth transition volume value sequence.
[0171] Calculate the execution time interval: Obtain the preset total duration of smooth adjustment, count the total number of volume values in the smooth transition volume value sequence, divide the preset total duration of smooth adjustment by the total number of volume values, and obtain the execution time interval between adjacent smooth transition volume values in the sequence.
[0172] Determine the target execution time for each volume: Using the time of receiving the target input volume value as the timing reference zero point, and combining the execution time interval, calculate the target execution time corresponding to each volume value in the smooth transition volume value sequence in turn;
[0173] Calculate each transition gain value: Perform gear discrimination and gain calculation for each smooth transition volume value in the smooth transition volume value sequence according to the process in step 103, and generate the transition gain value corresponding to each smooth transition volume value.
[0174] Generate a transition gain time series: Associate each transition gain value with the corresponding target execution time, arrange them in time sequence, and generate a transition gain time series.
[0175] Issuing a timing drive command: encapsulating the transition gain time series, generating a timing volume drive command, and issuing it to the audio control system;
[0176] Performing volume output according to the timing: the audio control system sequentially calls the audio output volume setting interface according to each target execution time based on the timing volume drive command, configures the corresponding transition gain value, and outputs the audio playback volume matching the corresponding transition gain value, until all the timing volume drive commands are completely executed. At this time, the current effective volume value is equal to the clipped volume value, completing the complete and smooth adjustment.
[0177] In some embodiments, the above comparison of the current effective volume value of the audio control system with the clipped volume value to generate the volume adjustment direction includes:
[0178] Comparing the current effective volume value of the audio control system with the clipped volume value;
[0179] If the current effective volume value is greater than the clipped volume value, the volume adjustment direction is determined as volume down;
[0180] If the current effective volume value is less than the clipped volume value, the volume adjustment direction is determined as volume up;
[0181] If the current effective volume value is equal to the clipped volume value, the volume adjustment direction is determined as no adjustment.
[0182] Optionally, if Vc=Vt, it is determined that the volume adjustment direction is no adjustment, the current volume adjustment process is terminated, and the current audio playback volume is maintained unchanged;
[0183] If Vc>Vt, it is determined that the volume adjustment direction is volume down, that is, the current effective volume value is gradually reduced to be equal to the clipped volume value;
[0184] If Vc<Vt, it is determined that the volume adjustment direction is volume up, that is, the current effective volume value is gradually increased to be equal to the clipped volume value.
[0185] In some embodiments, the above performing volume stepping processing based on the current effective volume value, the clipped volume value, and the volume adjustment direction to generate a smooth transition volume value sequence includes:
[0186] Taking the current effective volume value as the current smooth transition value;
[0187] Matching the target superposition orientation mark and the target sorting orientation mark of the volume adjustment direction according to the preset mapping rule;
[0188] Adding the current smooth transition value to the transition volume set;
[0189] The target transition volume is generated by superimposing the current smooth transition value with the preset adjustment range and matching the target superposition orientation mark.
[0190] Add the target transition volume to the transition volume set;
[0191] If the target transition volume is not equal to the volume value after limiting, the target transition volume is used as the new current smooth transition value, and the process jumps to the step of matching the current smooth transition value with the value of the target superposition orientation mark of the preset adjustment range to generate the target transition volume, until the target transition volume is equal to the volume value after limiting.
[0192] If the target transition volume is equal to the limited volume value, then all volume elements in the transition volume set are sorted according to the target sorting orientation mark to generate a smooth transition volume value sequence.
[0193] The target overlay orientation mark refers to the direction mark that corresponds one-to-one with the volume adjustment direction, and is used to identify the operation rules of numerical overlay; volume up corresponds to positive overlay mark, and volume down corresponds to negative overlay mark.
[0194] The target sorting orientation mark refers to the sorting mark that corresponds one-to-one with the volume adjustment direction, and is used to identify the sorting rules of the transition volume set; volume up corresponds to ascending sorting mark, and volume down corresponds to descending sorting mark.
[0195] The transition volume set refers to a container set used to store all transition volume scale values throughout the smooth adjustment process, including the starting value, all intermediate step values, and the ending value.
[0196] The preset adjustment range refers to the change in volume scale in a single step iteration. In this embodiment, a fixed integer step size of 1 is used as the preset adjustment range to ensure uniform step size and continuous adjustment trajectory. The specific value of the preset adjustment range is not limited and can be configured according to actual needs.
[0197] A smooth transition volume value sequence refers to an ordered volume sequence formed by arranging the transition volume set according to a specified sorting orientation, which is used for subsequent timing gain calculation and command issuance.
[0198] Specifically, the above steps take the currently active volume scale as the starting point, generate all transition volumes through directional iterative superposition, and finally output an ordered sequence after sorting. The specific execution flow is as follows:
[0199] Initialize the current smooth transition value: Use the current effective volume value Vc as the initial current smooth transition value, which serves as the starting reference for the step iteration;
[0200] Matching orientation markers: According to the preset direction mapping rules, the direction is adjusted based on the determined volume, and the corresponding target superposition orientation markers and target sorting orientation markers are matched: volume up matches positive superposition markers and ascending order markers; volume down matches negative superposition markers and descending order markers.
[0201] Write initial value: Add the current smooth transition value to the transition volume set as the first element of the set;
[0202] Step-by-step overlay calculation: Perform numerical overlay operation on the current smooth transition value and the preset adjustment range, matching the target overlay orientation mark: perform addition operation in positive overlay mode and subtraction operation in negative overlay mode to generate target transition volume;
[0203] Write the iteration results: Add the generated target transition volume to the transition volume set;
[0204] Termination condition determination: Compare the target transition volume with the volume value Vt after limiting.
[0205] If the two are not equal, the target transition volume is updated to the new current smooth transition value, and the process jumps back to the step superposition calculation step in the fourth step to continue the next iteration.
[0206] If the two are equal, the step iteration ends and the set sorting and output stage begins;
[0207] Set sorting output: Sort all volume elements in the transition volume set according to the sorting rules corresponding to the target sorting orientation mark, and finally generate a smooth transition volume value sequence.
[0208] In some embodiments, determining the target execution time of each smooth transition volume value in the smooth transition volume value sequence based on the reception time of the target input volume value and the execution time interval includes:
[0209] The moment when the target input volume value is received is taken as the target execution moment of the first smooth transition volume value in the smooth transition volume value sequence.
[0210] Use the first smooth transition volume value in the smooth transition volume value sequence as the current smooth transition volume value;
[0211] The target execution time of the current smooth transition volume value is superimposed with the execution time interval to generate the next execution time;
[0212] If the current smooth transition volume value is not at the end of the smooth transition volume value sequence, then the next execution time is taken as the target execution time of the next smooth transition volume value in the smooth transition volume value sequence, and the next smooth transition volume value is taken as the new current smooth transition volume value.
[0213] The jump execution adds the target execution time of the current smooth transition volume value to the execution time interval to generate the next execution time step, until the current smooth transition volume value is at the end of the smooth transition volume value sequence.
[0214] The moment when the target input volume value is received refers to the moment when the target volume adjustment command is received. It serves as the timing reference zero point for the entire smooth transition process and is the starting point for calculating the execution time of all transition volumes.
[0215] The execution time interval refers to the time difference between the gain configuration of two adjacent smooth transition volume values in the smooth transition volume value sequence taking effect. It is calculated from the preset total smooth adjustment duration and the total number of volumes in the sequence, and is a fixed value throughout.
[0216] The target execution time refers to the time point when the gain configuration corresponding to each smooth transition volume value in the smooth transition volume value sequence officially takes effect; the time points are arranged sequentially with uniform intervals.
[0217] For example, the above steps take the target volume reception time as a reference, and by successively adding fixed time intervals, the effective time of each volume calibration in the sequence is determined. The specific execution flow is as follows:
[0218] Reference time calibration: The time of receiving the target input volume value is taken as the target execution time of the first smooth transition volume value in the smooth transition volume value sequence, and is used as the timing reference point for the entire smooth adjustment process;
[0219] Iteration variable initialization: Assign the first smooth transition volume value in the smooth transition volume value sequence to the current smooth transition volume value, and start the timing iteration calculation;
[0220] Next execution time calculation: The target execution time corresponding to the current smooth transition volume value is numerically superimposed with the execution time interval to generate the next execution time corresponding to the next smooth transition volume value in the sequence;
[0221] Determine if the current smooth transition volume value is at the end of the smooth transition volume value sequence:
[0222] If it is not at the end, the calculated next execution time is assigned as the target execution time of the next smooth transition volume value, and the next smooth transition volume value is updated to the new current smooth transition volume value; jump back to the above next execution time calculation step and continue iterative calculation;
[0223] If it is at the end, the timing iteration calculation terminates, and all smooth transition volume values in the sequence have completed the target execution time calibration;
[0224] After all the time calibrations are completed, the transition gain values corresponding to each volume are combined with the target execution time to generate a transition gain time series, which provides data basis for subsequent timing-driven instructions.
[0225] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0226] The volume control device of the audio control system provided in the embodiments of this application will be described below. The volume control device of the audio control system described below can be referred to in correspondence with the volume control method of the audio control system described above.
[0227] Reference Figure 4 , Figure 4 This is an optional structural diagram of a volume control device for an audio control system provided in an embodiment of the present invention. The device is used to execute the volume control method of the aforementioned audio control system, including:
[0228] Parameter acquisition module 201 is used to acquire the target input volume value and volume threshold boundary of the audio control system;
[0229] The boundary limiting module 202 is used to perform boundary limiting processing on the target input volume value based on the volume threshold boundary, and generate the limited volume value.
[0230] The gain analysis module 203 is used to perform level discrimination and gain configuration processing on the limited volume value according to the preset gain analysis rules if a non-smooth adjustment command is received, and generate a target gain value.
[0231] The volume output module 204 is used to generate volume control commands based on the target gain value and send them to the audio control system, so that the audio control system can output an audio playback volume that matches the target gain value.
[0232] In some embodiments, the boundary limiting module 202 is specifically configured as follows:
[0233] Extract the upper and lower limits of the volume threshold;
[0234] If the target input volume value is between the lower limit and the upper limit of the volume threshold, then the target input volume value will be used as the volume value after limiting.
[0235] If the target input volume value is greater than the upper limit of the volume threshold, then the upper limit of the volume threshold will be used as the volume value after limiting.
[0236] If the target input volume value is less than the lower limit of the volume threshold, then the lower limit of the volume threshold will be used as the volume value after limiting.
[0237] In some embodiments, the gain analysis module 203 is specifically configured as follows:
[0238] According to the preset level discrimination rules, match the target volume level of the limited volume value;
[0239] The limited volume value is input into the pre-built volume mapping model associated with the target volume level, and gain parsing processing is performed to generate the target gain value.
[0240] In some embodiments, the volume control device of the above-described audio control system further includes a smoothing adjustment module, which is specifically configured as follows:
[0241] If no non-smooth adjustment command is received, the current effective volume value of the audio control system is compared with the volume value after limiting to generate the volume adjustment direction;
[0242] If the volume adjustment direction is not "no adjustment", then based on the current effective volume value, the limited volume value, and the volume adjustment direction, volume step processing is performed to generate a smooth transition volume value sequence.
[0243] Based on the preset total smooth adjustment duration and the number of volume values in the smooth transition volume value sequence, the execution time interval between adjacent smooth transition volume values in the smooth transition volume value sequence is determined.
[0244] Based on the receiving time of the target input volume value and the execution time interval, determine the target execution time of each smooth transition volume value in the smooth transition volume value sequence;
[0245] According to the preset gain analysis rules, the level of each smooth transition volume value is determined and the gain is configured to generate the transition gain value of each smooth transition volume value.
[0246] Based on the target execution time and transition gain value of each smooth transition volume value, a transition gain time series is generated;
[0247] Based on the transition gain time series, a timing volume drive command is generated and sent to the audio control system.
[0248] The audio control system outputs an audio playback volume that matches the corresponding transition gain value at each target execution moment;
[0249] If the volume adjustment direction is not adjusted, then the volume control matching the volume value after limiting will stop.
[0250] In some embodiments, the smooth adjustment module includes a volume comparison unit, which compares the currently active volume value of the audio control system with the volume value after limiting to generate a volume adjustment direction. The specific configuration is as follows:
[0251] Compare the current effective volume value of the audio control system with the volume value after limiting;
[0252] If the current effective volume value is greater than the volume value after the limit is applied, the volume adjustment direction will be set to volume down;
[0253] If the current effective volume value is less than the volume value after the limit is applied, the volume adjustment direction will be set to increase the volume.
[0254] If the current effective volume value is equal to the volume value after limiting, then the volume adjustment direction will be set to no adjustment.
[0255] In some embodiments, the smooth adjustment module includes a volume step generation unit, which is used to perform volume step processing based on the currently effective volume value, the volume value after limiting, and the volume adjustment direction to generate a smooth transition volume value sequence, specifically configured as follows:
[0256] Use the current effective volume value as the current smooth transition value;
[0257] According to the preset mapping rules, match the target overlay orientation mark and the target sorting orientation mark for the volume adjustment direction;
[0258] Add the current smooth transition value to the transition volume set;
[0259] The target transition volume is generated by superimposing the current smooth transition value with the preset adjustment range and matching the target superposition orientation mark.
[0260] Add the target transition volume to the transition volume set;
[0261] If the target transition volume is not equal to the volume value after limiting, the target transition volume is used as the new current smooth transition value, and the process jumps to the step of matching the current smooth transition value with the value of the target superposition orientation mark of the preset adjustment range to generate the target transition volume, until the target transition volume is equal to the volume value after limiting.
[0262] If the target transition volume is equal to the limited volume value, then all volume elements in the transition volume set are sorted according to the target sorting orientation mark to generate a smooth transition volume value sequence.
[0263] In some embodiments, the smoothing adjustment module further includes an execution time determination unit, which is configured to determine the target execution time of each smoothing transition volume value in the smoothing transition volume value sequence based on the reception time of the target input volume value and the execution time interval. Specifically, the configuration is as follows:
[0264] The moment when the target input volume value is received is taken as the target execution moment of the first smooth transition volume value in the smooth transition volume value sequence.
[0265] Use the first smooth transition volume value in the smooth transition volume value sequence as the current smooth transition volume value;
[0266] The target execution time of the current smooth transition volume value is superimposed with the execution time interval to generate the next execution time;
[0267] If the current smooth transition volume value is not at the end of the smooth transition volume value sequence, then the next execution time is taken as the target execution time of the next smooth transition volume value in the smooth transition volume value sequence, and the next smooth transition volume value is taken as the new current smooth transition volume value.
[0268] The jump execution adds the target execution time of the current smooth transition volume value to the execution time interval to generate the next execution time step, until the current smooth transition volume value is at the end of the smooth transition volume value sequence.
[0269] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0270] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0271] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0272] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0273] If the integrated module is implemented as a software functional module 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 this invention, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0274] This invention also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the volume control method of the aforementioned audio control system. This electronic device can be any smart terminal, including a tablet computer.
[0275] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0276] Please see Figure 5 , Figure 5 The hardware structure of an electronic device according to another embodiment is illustrated, including:
[0277] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0278] The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called by the processor 901 to execute the volume control method of the audio control system of the embodiments of the present invention.
[0279] The input / output interface 903 is used to implement information input and output;
[0280] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0281] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);
[0282] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0283] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the volume control method of the audio control system described above.
[0284] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0285] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0286] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A volume control method for an audio control system, characterized in that, include: Obtain the target input volume value and volume threshold boundary of the audio control system; Based on the volume threshold boundary, the target input volume value is subjected to boundary limiting processing to generate a limited volume value; If a non-smooth adjustment command is received, the volume value after limiting is processed for level discrimination and gain configuration according to the preset gain parsing rules to generate a target gain value. Based on the target gain value, a volume control command is generated and sent to the audio control system; The audio control system outputs an audio playback volume that matches the target gain value.
2. The volume control method of the audio control system according to claim 1, characterized in that, Also includes: If no non-smooth adjustment command is received, the current effective volume value of the audio control system is compared with the volume value after limiting to generate a volume adjustment direction; If the volume adjustment direction is not "no adjustment", then based on the current effective volume value, the limited volume value, and the volume adjustment direction, volume step processing is performed to generate a smooth transition volume value sequence. Based on the preset total duration of smooth adjustment and the number of volume values in the smooth transition volume value sequence, the execution time interval between adjacent smooth transition volume values in the smooth transition volume value sequence is determined. Based on the receiving time of the target input volume value and the execution time interval, the target execution time of each smooth transition volume value in the smooth transition volume value sequence is determined; According to the preset gain analysis rules, the smooth transition volume values are processed for level discrimination and gain configuration to generate the transition gain values of each smooth transition volume value. Based on the target execution time and transition gain value of each smooth transition volume value, a transition gain time series is generated; Based on the transition gain time sequence, a timing volume drive command is generated and sent to the audio control system. The audio control system outputs an audio playback volume that matches the corresponding transition gain value at each of the target execution times.
3. The volume control method of the audio control system according to claim 2, characterized in that, The step of comparing the current effective volume value of the audio control system with the volume value after limiting to generate the volume adjustment direction includes: Compare the current effective volume value of the audio control system with the volume value after limiting; If the current effective volume value is greater than the volume value after the limit is set, then the volume adjustment direction is determined to be volume down; If the current effective volume value is less than the volume value after the limit is set, then the volume adjustment direction is determined to be volume up; If the current effective volume value is equal to the volume value after limiting, then the volume adjustment direction is determined to be no adjustment.
4. The volume control method of the audio control system according to claim 3, characterized in that, Also includes: If the volume adjustment direction is not adjusted, then the volume control matching the volume value after the limit is stopped.
5. The volume control method of the audio control system according to claim 2, characterized in that, The step of performing volume stepping processing based on the current effective volume value, the limited volume value, and the volume adjustment direction to generate a smooth transition volume value sequence includes: Use the currently active volume value as the current smooth transition value; According to the preset mapping rules, match the target overlay orientation mark and the target sorting orientation mark for the volume adjustment direction; Add the current smooth transition value to the transition volume set; The current smooth transition value is matched with the preset adjustment range by superimposing the values of the target superposition orientation mark to generate the target transition volume; Add the target transition volume to the transition volume set; If the target transition volume is not equal to the limited volume value, then the target transition volume is used as the new current smooth transition value, and the process jumps to the step of matching the current smooth transition value with the target superposition orientation mark value to generate the target transition volume, until the target transition volume is equal to the limited volume value. If the target transition volume is equal to the limited volume value, then all volume elements in the transition volume set are sorted according to the volume value to match the target sorting orientation mark, thereby generating the smooth transition volume value sequence.
6. The volume control method of the audio control system according to claim 2, characterized in that, Determining the target execution time for each smooth transition volume value in the smooth transition volume value sequence based on the reception time of the target input volume value and the execution time interval includes: The moment when the target input volume value is received is taken as the target execution moment of the first smooth transition volume value in the smooth transition volume value sequence. The first smooth transition volume value in the smooth transition volume value sequence is taken as the current smooth transition volume value; The target execution time of the current smooth transition volume value is superimposed with the execution time interval to generate the next execution time; If the current smooth transition volume value is not at the end of the smooth transition volume value sequence, then the next execution time is taken as the target execution time of the next smooth transition volume value in the smooth transition volume value sequence, and the next smooth transition volume value is taken as the new current smooth transition volume value. The process jumps to the step of superimposing the target execution time of the current smooth transition volume value with the execution time interval to generate the next execution time, until the current smooth transition volume value is at the end of the smooth transition volume value sequence.
7. The volume control method of the audio control system according to claim 1, characterized in that, The step of performing boundary limiting processing on the target input volume value based on the volume threshold boundary to generate a limited volume value includes: Extract the upper and lower limits of the volume threshold from the volume threshold boundaries; If the target input volume value is between the lower limit of the volume threshold and the upper limit of the volume threshold, then the target input volume value is used as the volume value after limiting. If the target input volume value is greater than the upper limit of the volume threshold, then the upper limit of the volume threshold is used as the volume value after limiting. If the target input volume value is less than the lower limit of the volume threshold, then the lower limit of the volume threshold is used as the volume value after limiting.
8. The volume control method of the audio control system according to claim 1, characterized in that, The step of performing level discrimination and gain configuration processing on the limited volume value according to the preset gain analysis rules to generate a target gain value includes: According to the preset level discrimination rules, match the target volume level of the limited volume value; The limited volume value is input into the pre-built volume mapping model associated with the target volume level, and gain parsing processing is performed to generate the target gain value.
9. A volume control device for an audio control system, characterized in that, include: The parameter acquisition module is used to acquire the target input volume value and volume threshold boundary of the audio control system. The boundary limiting module is used to perform boundary limiting processing on the target input volume value based on the volume threshold boundary, and generate a limited volume value. The gain analysis module is used to perform level discrimination and gain configuration processing on the limited volume value according to the preset gain analysis rules if a non-smooth adjustment command is received, and generate a target gain value. The volume output module is used to generate a volume control command based on the target gain value and send it to the audio control system, so that the audio control system outputs an audio playback volume that matches the target gain value.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the volume control method of the audio control system as described in any one of claims 1-8.
