CN110381416A - A kind of media play method for controlling volume, device, electronic equipment and storage medium - Google Patents

A kind of media play method for controlling volume, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110381416A
CN110381416A CN201910600925.2A CN201910600925A CN110381416A CN 110381416 A CN110381416 A CN 110381416A CN 201910600925 A CN201910600925 A CN 201910600925A CN 110381416 A CN110381416 A CN 110381416A
Authority
CN
China
Prior art keywords
volume
value
media
media play
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910600925.2A
Other languages
Chinese (zh)
Other versions
CN110381416B (en
Inventor
刘晓丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910600925.2A priority Critical patent/CN110381416B/en
Publication of CN110381416A publication Critical patent/CN110381416A/en
Application granted granted Critical
Publication of CN110381416B publication Critical patent/CN110381416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Telephone Function (AREA)

Abstract

A kind of media play method for controlling volume, device, electronic equipment and the storage medium that the embodiment of the present invention proposes; by the media play volume settings for obtaining terminal; judge whether media play volume settings are greater than preset volume protection threshold value; if more than; initial value is protected with regard to obtaining preset volume in terminal; when terminal receives media play instruction, the broadcast sound volume of media is gradually increased to media play volume settings from volume protection initial value in controlling terminal.By this mode, when solving the problems, such as to start due to media broadcasting, volume is excessive causes scaring to user.

Description

A kind of media play method for controlling volume, device, electronic equipment and storage medium
Technical field
The present embodiments relate to technical field of electronic equipment, and in particular to a kind of media play method for controlling volume, dress It sets, electronic equipment and storage medium.
Background technique
With the fast development of mobile application, it is also more and more abundant to be suitable for the application that children use, cover nursery rhymes children's folk rhymes, Many aspects such as developmental game, study education.These children application either provides service in which form for children, all can be with Sound is one of appearance form, especially children's video, children education class APP, is all to play the video with audio It is main.
Parent during using mobile device, usually in order to listen to become apparent from by the volume setting of mobile device compared with Greatly, when children using mobile device open in application, often because mobile device broadcast sound volume it is excessive get a fright, give Children and parent bring bad usage experience.
Summary of the invention
In order to solve the above-mentioned technical problem or it at least is partially solved above-mentioned technical problem, the embodiment of the invention provides A kind of media play method for controlling volume, device, electronic equipment and storage medium.
In view of this, in a first aspect, the embodiment of the present invention provides a kind of media play method for controlling volume, comprising:
Obtain the media play volume settings of terminal;
Judge whether the media play volume settings are greater than preset volume protection threshold value;
If the media play volume settings, which are greater than the volume, protects threshold value, preset volume protection starting is obtained Value;
Detect whether the terminal receives media play instruction;
If the terminal receives the media play instruction,
The broadcast sound volume for controlling media in the terminal rises to the media play volume by volume protection initial value Setting value.
In a possible embodiment, the method also includes:
Before the media play volume settings for obtaining terminal, detect whether to receive media play instruction;
If the step of receiving the media play instruction, executing the media play volume settings for obtaining terminal.
In a possible embodiment, the broadcast sound volume for controlling media in the terminal is protected by the volume to be originated Value rises to the media play volume settings, comprising:
Obtain volume rate of rise;
The broadcast sound volumes of media in the terminal is controlled on the basis of the volume protects initial value according to the volume Rate of rise executes volume increase operation, until the broadcast sound volume of media is equal to the media play sound volume setting in the terminal Value.
In a possible embodiment, volume rate of rise is obtained, comprising:
Obtain preset volume protection duration;
Calculate the difference of the media play volume settings and volume protection initial value;
Protect duration and the difference that volume rate of rise is calculated as follows according to the volume:
F=(Vn-V1)/T
In formula, f indicates volume rate of rise, and Vn indicates that media play volume settings, V1 indicate that volume protects initial value, T indicates that volume protects duration.
In a possible embodiment, the broadcast sound volume of media is protected in the volume in the control terminal Volume increase operation is executed according to the volume rate of rise on the basis of initial value, comprising:
Obtain preset first threshold duration;
At interval of first threshold duration, the currently playing volume value of media in the primary terminal is obtained;
Judge whether the currently playing volume value is less than the media play volume settings;
If the currently playing volume value is less than the media play volume settings, target broadcast sound volume value is calculated;
The broadcast sound volumes of media in the terminal is controlled on the basis of the currently playing volume value according to the volume Rate of rise rises to the target broadcast sound volume value;
If the currently playing volume value is not less than the media play volume settings, the broadcast sound volume of media is controlled It remains that currently playing volume value is constant, and stops obtaining the currently playing volume value of media in the terminal.
In a possible embodiment, target broadcast sound volume value is calculated, comprising:
Obtain preset second threshold duration;
According to the second threshold duration and the volume rate of rise, volume increasing value is calculated as follows:
V0=T0*f
According to the volume increasing value and the currently playing volume value, target sound magnitude is calculated as follows:
VTarget=VCurrently+V0
In formula, VTargetIndicate target broadcast sound volume value, VCurrentlyIndicate that currently playing volume value, V0 indicate volume increasing value, T0 Indicate second threshold duration, f indicates volume rate of rise.
Second aspect, the embodiment of the invention also provides a kind of media play sound volume control devices, comprising:
First obtains module, for obtaining the media play volume settings of terminal;
Judgment module, for judging whether the media play volume settings are greater than preset volume protection threshold value;
Second obtains module, for obtaining when the media play volume settings are greater than volume protection threshold value Preset volume protects initial value;
Detection module, for detecting whether the terminal receives media play instruction;
Control module controls broadcasting for media in the terminal if receiving media play instruction for the terminal Playback amount rises to the media play volume settings by volume protection initial value.
In a possible embodiment, the control module controls the terminal for obtaining volume rate of rise The broadcast sound volume of middle media executes volume according to the volume rate of rise on the basis of volume protects initial value and increases Operation, until the broadcast sound volume of media is equal to the media play volume settings in the terminal.
In a possible embodiment, the control module obtains volume rate of rise, comprising:
Obtain preset volume protection duration;
Calculate the difference of the media play volume settings and volume protection initial value;
Protect duration and the difference that volume rate of rise is calculated as follows according to the volume:
F=(Vn-V1)/T
In formula, f indicates volume rate of rise, and Vn indicates that media play volume settings, V1 indicate that volume protects initial value, T indicates that volume protects duration.
In a possible embodiment, the control module controls the broadcast sound volume of media in the terminal described Volume operates on the basis of protecting initial value according to volume rate of rise execution volume increase, comprising:
Obtain preset first threshold duration;
At interval of first threshold duration, the currently playing volume value of media in the primary terminal is obtained;
Judge whether the currently playing volume value is less than the media play volume settings;
If the currently playing volume value is less than the media play volume settings, target broadcast sound volume value is calculated;
The broadcast sound volumes of media in the terminal is controlled on the basis of the currently playing volume value according to the volume Rate of rise rises to the target broadcast sound volume value by the currently playing volume value;
If the currently playing volume value is not less than the media play volume settings, the broadcast sound volume of media is controlled It remains that currently playing volume value is constant, and stops obtaining the currently playing volume value of media in the terminal.
In a possible embodiment, target broadcast sound volume value is calculated, comprising:
Obtain preset second threshold duration;
According to the second threshold duration and the volume rate of rise, volume increasing value is calculated as follows:
V0=T0*f
According to the volume increasing value and the currently playing volume value, target sound magnitude is calculated as follows:
VTarget=VCurrently+V0
In formula, VTargetIndicate target broadcast sound volume value, VCurrentlyIndicate that currently playing volume value, V0 indicate volume increasing value, T0 Indicate second threshold duration, f indicates volume rate of rise.
The third aspect, the embodiment of the present invention also provide a kind of electronic equipment, comprising: processor and memory, the processing Device is for executing the data processor stored in the memory, to realize media play volume control described in first aspect Method.
Fourth aspect, the embodiment of the present invention also provide a kind of storage medium, and the storage medium is stored with one or more A program, one or more of programs can be executed by one or more processor, to realize matchmaker described in first aspect Body playing volume control method.
Compared with prior art, a kind of media play method for controlling volume that the embodiment of the present invention proposes, by obtaining terminal Media play volume settings, judge whether media play volume settings are greater than preset volume protection threshold value, if more than, Initial value is protected with regard to obtaining preset volume in terminal, when terminal receives media play instruction, media in controlling terminal Broadcast amount is gradually increased to media play volume settings from volume protection initial value.By this mode, solve due to media Volume excessive the problem of scaring is caused to user when starting to play.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be in embodiment or description of the prior art Required attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some realities of the invention Example is applied, it for those of ordinary skill in the art, without any creative labor, can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is a kind of flow chart of media play method for controlling volume provided by one embodiment of the present invention;
Fig. 2 is a kind of schematic diagram for terminal that another embodiment of the present invention provides;
Fig. 3 is a kind of block diagram for media play sound volume control device that another embodiment of the invention provides;
Fig. 4 is the block diagram of a kind of electronic equipment provided by one embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiments of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
The present invention provides a kind of media play method for controlling volume, for controlling volume of the media when playing, is applied to Terminal or server, wherein terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as Mobile phone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), The mobile terminal of PMP (portable media player), navigation device etc. and such as number TV, desktop computer etc. Fixed terminal.The present invention will be described by taking terminal as an example below.
Fig. 1 is a kind of flow chart of media play method for controlling volume provided in an embodiment of the present invention, as shown in Figure 1, should Media play method for controlling volume includes the following steps:
S101. the media play volume settings of terminal are obtained;
Fig. 2 is a kind of terminal schematic diagram provided in an embodiment of the present invention, comprising: volume setup module 201 and audio output Module 202, as shown in Fig. 2, volume setup module 201 includes two keys of "+" and "-", wherein "+" key is used to increase volume, The volume value that audio output module 202 exports is arranged by volume setup module 201 for reducing volume, user for "-" key, according to The demand of user can set volume value to 0-100 any one value, the bigger expression audio output module 202 of volume value The volume of output is bigger.
The volume of terminal is divided into media volume and ringing volume, wherein media volume be media play when volume (such as Play the volume of video, play the volume of music), ringing volume is volume (such as the sound of incoming call prompting sound when the tinkle of bells plays Amount), in the present invention using media volume set by user as the media play volume settings of terminal.
In addition, Fig. 2 is a schematic diagram, the position of volume setup module 201 and audio output module 202 in figure, Those skilled in the art can be changed according to design or demand, such as audio output module 202 can be arranged in terminal Lower end, implementation those skilled in the art of volume setup module 201 and audio output module 202 can also be according to design Or demand is changed, such as can set Touch control key for volume setup module 201, sets audio output module 202 to The earphone or loudspeaker being connect by data line or bluetooth with terminal.
Media play volume settings in terminal can store in the terminal after being set by volume setup module 201, In the present embodiment, terminal generates the instruction for obtaining media play volume settings, sends instructions to and is stored with media play The memory of volume settings, to obtain the media play volume settings of storage.
S102. judge whether the media play volume settings are greater than preset volume protection threshold value;
When the purpose of the present invention is preventing terminal from carrying out media play, since broadcast sound volume causes to frighten very much to user greatly, Therefore the media play volume settings for needing first to determine present terminal before media play can or can not cause to frighten to user.
In embodiments of the present invention, by way of protecting threshold value to be compared with volume media play volume settings Determine that terminal carries out media play according to media play volume settings and can or can not cause to frighten to user, wherein volume protects threshold Value is the volume value that scaring will not be caused to user, and volume protection threshold value can voluntarily be set by user according to own situation It is fixed, the service condition of terminal can also be automatically generated in the past according to user by terminal.
In a possible embodiment, it can determine that volume protects threshold value by following manner:
User is obtained to the historical operation record of terminal, is found out in historical operation record and starts one section played in media Time (such as 10S) interior user records the adjusting of volume, finds out the most common volume range of user according to above-mentioned adjusting record, Any one value chosen in volume range protects threshold value as volume.
If S103. the media play volume settings are greater than volume protection threshold value, obtain preset volume and protect Protect initial value;
In embodiments of the present invention, whether can be to user using volume protection threshold value as judgement media play volume settings The standard of scaring is caused, if media play volume settings are greater than volume and protect threshold value, is indicated that if starting to broadcast in media Directly user will be caused to frighten using media play volume settings as volume output valve when putting, thus in order to prevent to Family causes to frighten, and media play volume settings cannot be directlyed adopt when media start and play and carry out audio output, need to make A volume value no more than volume protection threshold value is used to start volume output valve when playing as media, and this value is exactly sound Amount protection initial value, volume protection initial value is one and is more than or equal to 0, less than or equal to the volume value of volume protection threshold value, user The specific value of volume protection initial value can be set according to self-demand.
If media play volume settings no more than volume protect threshold value, indicate that media start play when directly with Media play volume settings, which carry out audio output as volume output valve, to be caused to frighten to user, and there is no need to obtain at this time It takes volume to protect initial value, does not also need to execute subsequent step, directly using media play volume settings as volume output valve Carry out media play.
S104. detect whether the terminal receives media play instruction;
Because the present invention is that the broadcast sound volume of media is adjusted when media start and play, to prevent broadcast sound volume mistake Greatly user is caused to frighten, so it needs to be determined that whether starting media in terminal before the broadcast sound volume to media is adjusted It plays.
The embodiment of the present invention is by detecting whether terminal receives media play instruction, to determine whether terminal starts media It plays, if receiving media play instruction determines that terminal starts media play, and S105 is executed, if not receiving media play Instruction determines that terminal does not start to media play or just in media play process, then do not execute S105.
Wherein, media play instruction restarts the instruction played after can be media pause, is also possible to media by closing Closed state starts the instruction played.
If S105. the terminal receives media play instruction, control the broadcast sound volumes of media in the terminal by The volume protection initial value rises to the media play volume settings.
In a possible embodiment, if media play instruction is to restart the finger played after media suspend It enables, then the broadcast sound volume of media rises to the media play volume by volume protection initial value and sets in controlling the terminal Before definite value, further includes:
Obtain media pause at the time of and current time.
At the time of pause according to media and current time calculates the pause duration of media.
Judge whether the pause duration of media is greater than preset starting duration.
Wherein, starting duration is the value set as the case may be with demand, if pause duration has been more than starting duration, Then indicate that present terminal may have switched user, media play volume is excessive in order to prevent causes to frighten to user, just opens at this time The broadcast sound volume of media rises to the media play volume by volume protection initial value and sets in the execution control terminal that begins Definite value, if pause duration is not above starting duration, then it represents that present or original user, because behaviour is in a certain environment After lower a period of time, environment will be adapted to, so user has been already adapted to media if user does not switch Broadcast sound volume before pause, so not needing to execute the broadcast sound volume for controlling media in the terminal by volume protection starting Value rises to the media play volume settings, directly continues broadcasting according to the broadcast sound volume before pause.
In embodiments of the present invention, volume is excessive in order to prevent causes to frighten to user, when media start to play, control The broadcast sound volume of media gradually rises to media play volume settings protecting initial value by volume.
When volume rises in order to allow users to gradually to adapt to the increase of volume and prevent volume change fluctuation from making greatly very much Poor user experience, in a possible embodiment, the broadcast sound volume for controlling media carry out on smoothly according to certain rate It rises, specifically includes:
Obtain volume rate of rise;
Volume rate of rise indicate volume increased volume value per second, in a possible embodiment, can by with Family obtains volume rate of rise by obtaining the numerical value of user's input according to self-demand sets itself.
In a possible embodiment, a volume protection duration can be first set, the broadcasting of media in terminal is made Volume rises to media play volume settings by volume protection initial value in volume protection duration, can be calculated by following formula Obtain volume rate of rise:
F=(Vn-V1)/T
In formula, f indicates volume rate of rise, and Vn indicates that media play volume settings, V1 indicate that volume protects initial value, T indicates that volume protects duration;
The broadcast sound volumes of media in the terminal is controlled on the basis of the volume protects initial value according to above-mentioned volume Rate of rise f executes volume increase operation, and the broadcast sound volume of media in terminal is made to be slowly increased to the media play sound volume setting It is gentle can then to guarantee that volume increases for value, and user experience is good.
Above-mentioned volume increase operation, not have certain interval of time just to detect the currently playing volume of media in terminal Value, sees whether to have reached media play volume settings, stops volume increase operation if having reached, specifically includes:
Obtain preset first threshold duration.
In embodiments of the present invention, first threshold duration is when detecting the interval of the currently playing volume value of media in terminal It is long, the specific value of first threshold duration can by being set as the case may be with demand, can for 0 and volume protect duration it Between any one value.
At interval of first threshold duration, the currently playing volume value of media in the primary terminal is obtained.
The purpose of this step is in order to which the currently playing volume value to media is monitored, so as to understand terminal in time Whether the broadcast sound volume of media has reached media play volume settings.
A timer can be specifically set, the time cycle of timer is set as first threshold duration, according to timing The timing of device calls a deuterzooid step just at interval of first threshold duration to obtain the currently playing volume value of terminal media.
Judge whether the currently playing volume value is less than the media play volume settings.
If the currently playing volume value is less than the media play volume settings, just explanation is also needed to media Broadcast sound volume is increased.
If the currently playing volume value is less than the media play volume settings, target broadcast sound volume value is calculated.
Wherein, target broadcast sound volume value can be calculated according to following manner:
Obtain preset second threshold duration, a length of one of when second threshold is greater than 0 and is less than or equal to first threshold duration Value, the growth of long quantity when can be calculated according to second threshold duration and volume rate of rise at interval of second threshold Amount, the increment of volume and currently playing volume value and be exactly target broadcast sound volume value.
Specific calculation formula is as follows:
V0=T0*f
Current+the V0 of V target=V
In formula, V target indicates target broadcast sound volume value, and V currently indicates that currently playing volume value, V0 indicate that volume increases Value, T0 indicate second threshold duration, and f indicates volume rate of rise.
In a possible embodiment, second threshold duration is equal to first threshold duration, can thus make in matchmaker The broadcast sound volume of body by volume protection initial value be raised to media play volume settings during the entire process of, volume always according to Volume rate of rise increases, and does not pause, this allows for volume can be in the case where volume rate of rise be certain using most short Time complete rise.
If second threshold duration is less than first threshold duration, that will exist during volume rises pauses, example Such as: a length of 2s when second threshold, when first threshold a length of 3s, be less than media play volume in the currently playing volume value got In the case where setting value, volume is needed further to increase because volume rate of rise be it is certain, target broadcast sound volume value be sound The product for measuring rate of rise and second threshold duration, so if wanting to rise to the broadcast sound volume of media by currently playing volume value The broadcast sound volume that target broadcast sound volume value will control media increases 2s according to volume rate of rise and then reaches target broadcasting sound Magnitude, but since the interval for obtaining currently playing volume value every time is 3s, so distance obtains currently playing sound next time at this time There are also the times of 1s for magnitude, and only just know whether after next time gets currently playing volume value and further increase sound Magnitude, thus the time volume value that 1s is just had during this be it is constant, spent by this process for resulting in entire volume to increase Time it is elongated.
The broadcast sound volumes of media in the terminal is controlled on the basis of the currently playing volume value according to the volume Rate of rise rises to the target broadcast sound volume value;
If the currently playing volume value is not less than the media play volume settings, the broadcast sound volume of media is controlled It remains that currently playing volume value is constant, and stops obtaining the currently playing volume value of media in the terminal.
Based on inventive concept identical with above-mentioned media play method for controlling volume, the embodiment of the present invention also provides a kind of matchmaker Body broadcast sound volume control device, as shown in figure 3, the media play sound volume control device 300 includes:
First obtains module 301, for obtaining the media play volume settings of terminal;
Judgment module 302, for judging whether the media play volume settings are greater than preset volume protection threshold value;
Second obtains module 303, for obtaining when the media play volume settings are greater than volume protection threshold value Take preset volume protection initial value;
Detection module 304, for detecting whether the terminal receives media play instruction;
Control module 305 controls media in the terminal if receiving the media play instruction for the terminal Broadcast sound volume rises to the media play volume settings by volume protection initial value.
In a possible embodiment, the control module is for obtaining volume rate of rise;Control the terminal The broadcast sound volume of middle media executes volume according to the volume rate of rise on the basis of volume protects initial value and increases Operation, until the broadcast sound volume of media is equal to the media play volume settings in the terminal.
In a possible embodiment, the control module obtains volume rate of rise, comprising:
Obtain preset volume protection duration;
Calculate the difference of the media play volume settings and volume protection initial value;
Protect duration and the difference that volume rate of rise is calculated as follows according to the volume:
F=(Vn-V1)/T
In formula, f indicates volume rate of rise, and Vn indicates that media play volume settings, V1 indicate that volume protects initial value, T indicates that volume protects duration.
In a possible embodiment, the control module controls the broadcast sound volume of media in the terminal described Volume operates on the basis of protecting initial value according to volume rate of rise execution volume increase, comprising:
Obtain preset first threshold duration;
At interval of first threshold duration, the currently playing volume value of media in the primary terminal is obtained;
Judge whether the currently playing volume value is less than the media play volume settings;
If the currently playing volume value is less than the media play volume settings, target broadcast sound volume value is calculated;
The broadcast sound volumes of media in the terminal is controlled on the basis of the currently playing volume value according to the volume Rate of rise rises to the target broadcast sound volume value by the currently playing volume value;
If the currently playing volume value is not less than the media play volume settings, the broadcast sound volume of media is controlled It remains that currently playing volume value is constant, and stops obtaining the currently playing volume value of media in the terminal.
In a possible embodiment, target broadcast sound volume value is calculated, comprising:
Obtain preset second threshold duration;
According to the second threshold duration and the volume rate of rise, volume increasing value is calculated as follows:
V0=T0*f
According to the volume increasing value and the currently playing volume value, target sound magnitude is calculated as follows:
VTarget=VCurrently+V0
In formula, VTargetIndicate target broadcast sound volume value, VCurrentlyIndicate that currently playing volume value, V0 indicate volume increasing value, T0 Indicate second threshold duration, f indicates volume rate of rise.
The mobile terminal of each embodiment of the present invention is realized in description with reference to the drawings.In subsequent description, use For indicate element such as " module ", " component " or " unit " suffix only for being conducive to explanation of the invention, itself There is no specific meanings.Therefore, " module " can be used mixedly with " component ".
In another embodiment of the application, a kind of electronic equipment is additionally provided, as shown in figure 4, including processor 401, logical Believe interface 402, memory 403 and communication bus 404, wherein processor 401, communication interface 402, memory 403 pass through communication Bus 404 completes mutual communication;
Memory 403, for storing computer program;
Processor 401 when for executing the program stored on memory 403, realizes following steps:
Obtain the media play volume settings of terminal;
Judge whether the media play volume settings are greater than preset volume protection threshold value;
If the media play volume settings, which are greater than the volume, protects threshold value, preset volume protection starting is obtained Value;
The broadcast sound volume for controlling media in the terminal rises to the media play volume by volume protection initial value Setting value.
The communication bus 404 that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, abbreviation EISA) bus etc..The communication bus 404 can be divided into address bus, data/address bus, Control bus etc..Only to be indicated with a thick line in Fig. 4, it is not intended that an only bus or a seed type convenient for indicating Bus.
Communication interface 402 is for the communication between above-mentioned electronic equipment and other equipment.
Memory 403 may include random access memory (Random Access Memory, abbreviation RAM), can also be with Including nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Optionally, memory It can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor 401 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array, Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
In another embodiment of the application, a kind of computer readable storage medium is additionally provided, it is described computer-readable to deposit Data processing method program is stored on storage media, the data processing method program is realized any of the above-described when being executed by processor The step of described media play method for controlling volume.
It is understood that embodiments described herein can with hardware, software, firmware, middleware, microcode or its Combination is to realize.For hardware realization, processing unit be may be implemented in one or more specific integrated circuit (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor, In controller, microcontroller, microprocessor, other electronic units for executing herein described function or combinations thereof.
For software implementations, the techniques described herein can be realized by executing the unit of function described herein.Software generation Code is storable in memory and is executed by processor.Memory can in the processor or portion realizes outside the processor.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the embodiment of the present invention is substantially The part of the part that contributes to existing technology or the technical solution can embody in the form of software products in other words Come, which is stored in a storage medium, including some instructions are used so that a computer equipment (can To be personal computer, server or the network equipment etc.) execute all or part of each embodiment the method for the present invention Step.And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can store program The medium of code.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
It should be noted that, in this document, the relational terms of such as " first " and " second " or the like are used merely to one A entity or operation with another entity or operate distinguish, without necessarily requiring or implying these entities or operation it Between there are any actual relationship or orders.
Through the above description of the embodiments, those skilled in the art can be understood that each reality of the present invention Applying method described in example can realize by means of software and necessary general hardware platform, naturally it is also possible to by hardware, But the former is more preferably embodiment in many cases.Based on this understanding, technical solution of the present invention is substantially in other words The part that contributes to existing technology can be embodied in the form of software products, which is stored in one In a storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be hand Machine, computer, server, air conditioner or network equipment etc.) execute method or implementation described in each embodiment of the present invention Method described in certain parts of example.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (12)

1. a kind of media play method for controlling volume characterized by comprising
Obtain the media play volume settings of terminal;
Judge whether the media play volume settings are greater than preset volume protection threshold value;
If the media play volume settings, which are greater than the volume, protects threshold value, preset volume protection initial value is obtained;
Detect whether the terminal receives media play instruction;
If the terminal receives the media play instruction, the broadcast sound volume for controlling media in the terminal is protected by the volume Shield initial value rises to the media play volume settings.
2. the method according to claim 1, wherein controlling the broadcast sound volume of media in the terminal by the sound Amount protection initial value rises to the media play volume settings, comprising:
Obtain volume rate of rise;
The broadcast sound volume for controlling media in the terminal increases on the basis of the volume protects initial value according to the volume Rate executes volume increase operation, until the broadcast sound volume of media is equal to the media play volume settings in the terminal.
3. according to the method described in claim 2, it is characterized in that, obtaining volume rate of rise, comprising:
Obtain preset volume protection duration;
Calculate the difference of the media play volume settings and volume protection initial value;
Protect duration and the difference that volume rate of rise is calculated as follows according to the volume:
F=(Vn-V1)/T
In formula, f indicates volume rate of rise, and Vn indicates that media play volume settings, V1 indicate that volume protects initial value, T table Show that volume protects duration.
4. according to the method described in claim 2, it is characterized in that, the broadcast sound volume of media is in institute in the control terminal It states on the basis of volume protects initial value and is operated according to volume rate of rise execution volume increase, comprising:
Obtain preset first threshold duration;
At interval of first threshold duration, the currently playing volume value of media in the primary terminal is obtained;
Judge whether the currently playing volume value is less than the media play volume settings;
If the currently playing volume value is less than the media play volume settings, target broadcast sound volume value is calculated;
The broadcast sound volume for controlling media in the terminal increases on the basis of the currently playing volume value according to the volume Rate rises to the target broadcast sound volume value;
If the currently playing volume value is not less than the media play volume settings, the broadcast sound volume for controlling media is kept It is constant for currently playing volume value, and stop obtaining the currently playing volume value of media in the terminal.
5. according to the method described in claim 4, it is characterized in that, calculating target broadcast sound volume value, comprising:
Obtain preset second threshold duration;
According to the second threshold duration and the volume rate of rise, volume increasing value is calculated as follows:
V0=T0*f
According to the volume increasing value and the currently playing volume value, target sound magnitude is calculated as follows:
VTarget=VCurrently+V0
In formula, VTargetIndicate target broadcast sound volume value, VCurrentlyIndicate that currently playing volume value, V0 indicate that volume increasing value, T0 indicate Second threshold duration, f indicate volume rate of rise.
6. a kind of media play sound volume control device characterized by comprising
First obtains module, for obtaining the media play volume settings of terminal;
Judgment module, for judging whether the media play volume settings are greater than preset volume protection threshold value;
Second obtains module, for obtaining default when the media play volume settings are greater than volume protection threshold value Volume protect initial value;
Detection module, for detecting whether the terminal receives media play instruction;
Control module controls the broadcasting sound of media in the terminal if receiving the media play instruction for the terminal Amount rises to the media play volume settings by volume protection initial value.
7. device according to claim 6, which is characterized in that the control module is controlled for obtaining volume rate of rise The broadcast sound volume for making media in the terminal is held on the basis of the volume protects initial value according to the volume rate of rise Row volume increase operation, until the broadcast sound volume of media is equal to the media play volume settings in the terminal.
8. device according to claim 7, which is characterized in that the control module obtains volume rate of rise, comprising:
Obtain preset volume protection duration;
Calculate the difference of the media play volume settings and volume protection initial value;
Protect duration and the difference that volume rate of rise is calculated as follows according to the volume:
F=(Vn-V1)/T
In formula, f indicates volume rate of rise, and Vn indicates that media play volume settings, V1 indicate that volume protects initial value, T table Show that volume protects duration.
9. device according to claim 7, which is characterized in that the control module controls the broadcasting of media in the terminal Volume executes volume increase operation according to the volume rate of rise on the basis of volume protects initial value, comprising:
Obtain preset first threshold duration;
At interval of first threshold duration, the currently playing volume value of media in the primary terminal is obtained;
Judge whether the currently playing volume value is less than the media play volume settings;
If the currently playing volume value is less than the media play volume settings, target broadcast sound volume value is calculated;
The broadcast sound volume for controlling media in the terminal increases on the basis of the currently playing volume value according to the volume Rate rises to the target broadcast sound volume value by the currently playing volume value;
If the currently playing volume value is not less than the media play volume settings, the broadcast sound volume for controlling media is kept It is constant for currently playing volume value, and stop obtaining the currently playing volume value of media in the terminal.
10. device according to claim 9, which is characterized in that calculate target broadcast sound volume value, comprising:
Obtain preset second threshold duration;
According to the second threshold duration and the volume rate of rise, volume increasing value is calculated as follows:
V0=T0*f
According to the volume increasing value and the currently playing volume value, target sound magnitude is calculated as follows:
VTarget=VCurrently+V0
In formula, VTargetIndicate target broadcast sound volume value, VCurrentlyIndicate that currently playing volume value, V0 indicate that volume increasing value, T0 indicate Second threshold duration, f indicate volume rate of rise.
11. a kind of electronic equipment characterized by comprising processor and memory, the processor is for executing the storage The data processor stored in device, to realize media play method for controlling volume according to any one of claims 1 to 5.
12. a kind of storage medium, which is characterized in that the storage medium is stored with one or more program, it is one or The multiple programs of person can be executed by one or more processor, to realize media play according to any one of claims 1 to 5 Method for controlling volume.
CN201910600925.2A 2019-07-04 2019-07-04 Media playing volume control method and device, electronic equipment and storage medium Active CN110381416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910600925.2A CN110381416B (en) 2019-07-04 2019-07-04 Media playing volume control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910600925.2A CN110381416B (en) 2019-07-04 2019-07-04 Media playing volume control method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110381416A true CN110381416A (en) 2019-10-25
CN110381416B CN110381416B (en) 2021-07-09

Family

ID=68252012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910600925.2A Active CN110381416B (en) 2019-07-04 2019-07-04 Media playing volume control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110381416B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112689173A (en) * 2020-12-23 2021-04-20 海信视像科技股份有限公司 Display device and volume control method
CN112887857A (en) * 2021-01-25 2021-06-01 湖南普奇水环境研究院有限公司 Hearing protection method and system for eliminating reception noise
CN114554278A (en) * 2022-01-28 2022-05-27 青岛海尔科技有限公司 Play control method and device, storage medium and electronic device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106535042A (en) * 2016-10-27 2017-03-22 广州视源电子科技股份有限公司 Volume control method, device and system for vehicle-mounted loudspeaker
CN109582274A (en) * 2018-11-30 2019-04-05 北京微播视界科技有限公司 Volume adjusting method, device, electronic equipment and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106535042A (en) * 2016-10-27 2017-03-22 广州视源电子科技股份有限公司 Volume control method, device and system for vehicle-mounted loudspeaker
CN109582274A (en) * 2018-11-30 2019-04-05 北京微播视界科技有限公司 Volume adjusting method, device, electronic equipment and computer readable storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112689173A (en) * 2020-12-23 2021-04-20 海信视像科技股份有限公司 Display device and volume control method
CN112887857A (en) * 2021-01-25 2021-06-01 湖南普奇水环境研究院有限公司 Hearing protection method and system for eliminating reception noise
CN112887857B (en) * 2021-01-25 2023-04-07 湖南普奇水环境研究院有限公司 Hearing protection method and system for eliminating reception noise
CN114554278A (en) * 2022-01-28 2022-05-27 青岛海尔科技有限公司 Play control method and device, storage medium and electronic device
CN114554278B (en) * 2022-01-28 2023-12-19 青岛海尔科技有限公司 Playing control method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN110381416B (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN110381416A (en) A kind of media play method for controlling volume, device, electronic equipment and storage medium
KR102059882B1 (en) Method and terminal for playing media
CN106791109A (en) A kind of sound prompting method and mobile terminal
CN103873988B (en) Based on external equipment identify circuit, the methods, devices and systems of earphone socket
CN107911544A (en) The method for controlling volume and device of a kind of mobile terminal
CN103034114A (en) Method and device for clock alarming
TW201327265A (en) System and method for controlling an alarm of an electronic device
WO2024125487A1 (en) Audio playback method and apparatus, and terminal device
CN104639758A (en) Alarm clock control method and alarm clock control device applied to intelligent terminal
KR20140116618A (en) Controlling Method of Alert Function and Electronic Device supporting the same
KR100783113B1 (en) Method for shortened storing of music file in mobile communication terminal
CN105450844A (en) Method and device for controlling mobile terminal alarm clock
KR100753042B1 (en) Method for storing and displaying of music file list in mobile communication terminal using hot key
CN106648540B (en) Music switching method and device
CN106775681A (en) Incorrect manipulation processing method and maloperation processing unit
CN104581338B (en) A kind of method and device for controlling player to close automatically
CN108916982B (en) Intelligent water drainage control method and device and terminal equipment
CN105376385A (en) Volume adjusting method and user terminal
CN105263125B (en) A kind of sharing method of alarm clock, device and mobile terminal
CN105959845B (en) External equipment identification circuit, methods, devices and systems based on earphone socket
CN101276631B (en) Playback apparatus, broadcast receiving device
CN107133010A (en) A kind of reminding sound volume of application program determines method, device and terminal
CN107147780B (en) A kind of method and mobile terminal of the output of control audio frequency of mobile terminal
WO2020078087A1 (en) Method and device for controlling music play, household appliance, terminal and medium
WO2016074376A1 (en) Method and apparatus for implementing voice control and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant