CN107122159B - Quality switching method of online audio and mobile terminal - Google Patents

Quality switching method of online audio and mobile terminal Download PDF

Info

Publication number
CN107122159B
CN107122159B CN201710262397.5A CN201710262397A CN107122159B CN 107122159 B CN107122159 B CN 107122159B CN 201710262397 A CN201710262397 A CN 201710262397A CN 107122159 B CN107122159 B CN 107122159B
Authority
CN
China
Prior art keywords
online audio
mobile terminal
audio
volume
code rate
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.)
Active
Application number
CN201710262397.5A
Other languages
Chinese (zh)
Other versions
CN107122159A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710262397.5A priority Critical patent/CN107122159B/en
Publication of CN107122159A publication Critical patent/CN107122159A/en
Application granted granted Critical
Publication of CN107122159B publication Critical patent/CN107122159B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a quality switching method of online audio, which is used for a mobile terminal and comprises the following steps: judging whether the environmental volume exceeds a threshold volume or not according to the environmental volume acquired by a microphone; if the environmental volume exceeds a threshold volume, acquiring the network speed of the mobile terminal; and if the network speed is less than a first threshold value, switching the currently played online audio into the online audio with a first code rate, wherein the first code rate is less than the code rate of the currently played online audio. The embodiment of the invention also provides the mobile terminal. The embodiment of the invention comprehensively considers two factors of the environment volume and the network speed, so that the online audio is switched into the online audio with a smaller first code rate under the condition that the environment volume exceeds the threshold volume and the network speed is less than the first threshold, the occupied network speed is minimum under the condition that the hearing of a mobile terminal user is not reduced, and the flow can be saved when the flow networking is used.

Description

Quality switching method of online audio and mobile terminal
Technical Field
The present invention relates to the field of mobile terminal technologies, and in particular, to a quality switching method for online audio and a mobile terminal.
Background
The quality of the audio can be embodied by the code rate, the higher the code rate is, the higher the quality of the audio is, the higher the required network speed is, and the better the listening feeling is brought to the user. With the popularization of mobile traffic, a larger network speed can be guaranteed even under the condition of using the traffic. Therefore, the flow is no longer the main reference factor influencing the bitrate selection of the online audio by the user. However, in the prior art, the code rate switching manner for the online audio is still switched based on the used network, and generally, when the online audio is switched from the WIFI environment to the mobile network, the code rate of the online audio is switched to a relatively low code rate.
Disclosure of Invention
The embodiment of the invention provides a quality switching method of online audio, which aims to solve the problem that the prior art can only switch the online audio code rate when a used network is switched.
The embodiment of the invention provides a mobile terminal, which aims to solve the problem that the mobile terminal in the prior art can only switch the online audio code rate when the used network is switched.
In a first aspect, a method for switching quality of online audio is provided, where the method is used for a mobile terminal, and the method includes: judging whether the environmental volume exceeds a threshold volume or not according to the environmental volume acquired by a microphone; if the environmental volume exceeds a threshold volume, acquiring the network speed of the mobile terminal; and if the network speed is less than a first threshold value, switching the currently played online audio into the online audio with a first code rate, wherein the first code rate is less than the code rate of the currently played online audio.
In a second aspect, a mobile terminal is provided, including: the first judgment module is used for judging whether the environmental volume exceeds a threshold volume or not according to the environmental volume acquired by the microphone; the acquisition module is used for acquiring the network speed of the mobile terminal if the environmental volume exceeds a threshold volume; and the switching module is used for switching the currently played online audio into the online audio with a first code rate if the network speed is less than a first threshold value, wherein the first code rate is less than the code rate of the currently played online audio.
Thus, in the embodiment of the present invention, by comprehensively considering two factors, namely, the ambient volume and the network speed, when the ambient volume exceeds the threshold volume and the network speed is less than the first threshold, the currently played online audio is switched to the online audio with the smaller first code rate, so that the occupied network speed is the minimum under the condition that the hearing of the mobile terminal user is not reduced, and the traffic can be saved when the traffic networking is used.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart of a method for switching the quality of online audio according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a method for switching the quality of online audio according to a second embodiment of the present invention;
fig. 3 is a block diagram of a mobile terminal according to a third embodiment of the present invention;
fig. 4 is a block diagram of a mobile terminal according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a mobile terminal according to a fifth embodiment of the present invention;
fig. 6 is a block diagram of a mobile terminal according to a sixth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First embodiment
The first embodiment of the invention provides a method for switching the quality of online audio. The method is used for the mobile terminal. As shown in fig. 1, the method specifically includes the following steps:
step S101: and judging whether the ambient volume exceeds a threshold volume or not according to the ambient volume acquired by the microphone.
The quality of the online audio can be embodied by code rate, and the higher the code rate is, the higher the quality of the online audio is, and the better listening feeling can be brought to a mobile terminal user. However, in a noisy environment, even if the code rate of the online audio is high, the mobile terminal user cannot obtain a good listening feeling due to the interference of the environment. Generally, whether it is a noisy environment can be determined by the volume of the environment. Therefore, whether the environmental volume exceeds the threshold volume is judged through the step, so that corresponding processing can be carried out according to the judgment result.
If the ambient volume exceeds the threshold volume, the mobile terminal is in a quieter environment, for example, when the mobile terminal is in a quiet office or home, the code rate of the online audio does not need to be switched, and the online audio is continuously played at the current code rate.
Step S102: and if the environmental volume exceeds the threshold volume, acquiring the network speed of the mobile terminal.
The higher the code rate of the online audio, the larger the online audio file is, and the higher the requirement on the network speed is. Therefore, if the ambient volume exceeds the threshold volume, and the current environment of the mobile terminal is a noisy environment, the mobile terminal user is difficult to obtain a better listening feeling. Under the condition, if the network speed is lower, the online audio with lower code rate can be played, so that the network speed can be reasonably distributed, and if the flow networking is adopted, the flow can be saved, and the hearing of the mobile terminal user cannot be influenced. If the network speed is higher, the network speed can support the simultaneous operation of various tasks needing the network speed, and the code rate of the online audio can be kept to be played continuously.
Specifically, in the process of online audio playing, the network speed can be read at intervals by calling a judgment network speed interface class (for example, android traffic classes) of the mobile terminal, so as to determine the current network speed.
Step S103: and if the network speed is less than a first threshold value, switching the currently played online audio into the online audio with the first code rate.
And the first code rate is smaller than the code rate of the currently played online audio. The first threshold value can be set by a mobile terminal system or by a mobile terminal user according to the actual situation. If the network speed currently used by the mobile terminal is less than the first threshold, the network speed is low, so that the influence on other tasks due to the fact that the playing of the online audio occupies more network speed is avoided, or the waste of the traffic when the traffic networking is used is avoided, and the code rate of the online audio can be switched. The online audio may include online audio with multiple code rates, and the currently played online audio is switched to the online audio with the first code rate as long as the currently played online audio is not the online audio with the lowest code rate, so that the online speed occupied by the online audio is ensured to be the minimum, and the flow is saved. Specifically, the first code rate may be the lowest code rate, or may be a first code rate that is switched to a more appropriate code rate according to the network speed.
To sum up, the method for switching the quality of the online audio according to the first embodiment of the present invention switches the currently played online audio to the online audio with the smaller first code rate by comprehensively considering two factors, namely the environmental volume and the network speed, when the environmental volume exceeds the threshold volume and the network speed is smaller than the first threshold, so that the occupied network speed is the minimum without reducing the hearing of the mobile terminal user, and the traffic can be saved when the traffic networking is used.
Second embodiment
The second embodiment of the invention provides a quality switching method of online audio. The method is used for the mobile terminal. As shown in fig. 2, the method specifically includes the following steps:
step S201: and judging whether the currently played audio is online audio.
If the audio is not online, namely the audio stored locally in the mobile terminal, the occupation of network speed or the consumption of flow cannot be involved. Typically, locally stored audio also has no other bitrate audio available for switching. Therefore, if the currently played audio is not the online audio, the code rate cannot be switched, and the subsequent steps are not required.
Step S202: and if the currently played audio is the online audio, judging whether the currently played online audio comprises the online audio with different code rates.
In order to realize the switching of the online audio with different code rates of the embodiment, the online audio needs to include the online audio with different code rates. Therefore, whether the online audio provides the online audio with other switchable code rates can be judged through the step. The online audio may include online audio with multiple bitrate rates, such as a normal bitrate rate, an HQ bitrate rate, an SQ bitrate rate, and the like. If the online audio only has the online audio with one code rate, the online audio with different code rates can not be switched, and subsequent steps are not required.
Step S203: and if the currently played online audio comprises online audio with different code rates, judging whether the currently played online audio is the online audio with the lowest code rate.
The step can judge whether the online audio is the online audio with the lowest code rate. If the online audio is the lowest-bit-rate online audio, the switching is not needed.
Step S204: and if the currently played online audio is not the online audio with the lowest code rate, acquiring the environmental volume through a microphone.
If the online audio is not the online audio with the lowest code rate, the noisy degree of the environment needs to be considered to determine whether the online audio needs to be switched to the online audio with the smaller code rate. Therefore, whether the environment volume is enough to influence the hearing of the mobile terminal user can be judged by acquiring the environment volume of the environment where the mobile terminal is currently located.
Step S205: and judging whether the ambient volume continuously exceeds the threshold volume within a first preset time.
The ambient volume may be greater than the threshold volume at one moment and less than the threshold volume at other moments. In this case, the environment should not be considered a noisy environment, and the hearing of the user of the mobile terminal is not continuously affected. Therefore, the environment is regarded as a noisy environment only by collecting the volume of the environment higher than the threshold volume once, which affects the hearing of the mobile terminal user and is inaccurate. To avoid such a false determination, the volume of the environment is required to continuously exceed the threshold volume for a first predetermined time to indicate that the environment is a noisy environment. The threshold volume can be set by the mobile terminal system or by the mobile terminal user according to the actual situation.
Step S206: and if the environmental volume exceeds the threshold volume, acquiring the network speed of the mobile terminal.
The higher the code rate of the online audio, the larger the online audio file is, and the higher the requirement on the network speed is. Therefore, if the ambient volume exceeds the threshold volume, and the current environment of the mobile terminal is a noisy environment, the mobile terminal user is difficult to obtain a better listening feeling. Under the condition, if the network speed is lower, the online audio with lower code rate can be played, so that the network speed can be reasonably distributed, and if the flow is adopted for listening to songs, the flow can be saved, and the listening feeling of a mobile terminal user can not be influenced. If the network speed is higher, the network speed can support the simultaneous operation of various tasks needing the network speed, and the code rate of the online audio can be kept to be played continuously.
Specifically, in the process of online audio playing, the network speed can be read at intervals by calling a judgment network speed interface class (android traffic classes) of the mobile terminal, so that the current network speed is determined.
Step S207: and if the network speed is less than the first threshold value, prompting the mobile terminal user to switch the online audio into the online audio with the first code rate.
And the first code rate is smaller than the code rate of the currently played online audio. The first threshold value can be set by a mobile terminal system or by a mobile terminal user according to the actual situation. If the network speed currently used by the mobile terminal is less than the first threshold, the network speed is low, so that the situation that the playing of the online audio occupies more network speed and affects other tasks is avoided, or the situation that the traffic is wasted when the traffic networking is used is avoided, and a user of the mobile terminal can be prompted to switch the online audio into the online audio with the first code rate. The first code rate may be the lowest code rate, or may be the first code rate that is switched to be more appropriate according to the network speed.
Specifically, the mobile terminal user can be prompted to switch in a pop-up window mode.
And if the switching operation of the mobile terminal user is received within the second preset time after the prompt is sent, performing step S208. If the switching operation of the mobile terminal user is not received within the second preset time after the prompt is sent, step S209 is performed.
Step S208: and switching the online audio into the online audio with the first code rate based on the switching operation of the mobile terminal user.
After receiving the prompt, the mobile terminal user can perform an operation of confirming the switching by touching the switching graphic button or by pressing the mechanical button. After receiving the switching operation, the mobile terminal can switch the online audio into the online audio with the first code rate, so that the network speed occupied by the online audio is ensured to be minimum, and the flow is saved.
Step S209: and automatically switching the online audio into the online audio with the first code rate.
The prompt issued in step S207 may be a delay message. If the mobile terminal user does not actively respond within the second preset time, namely the mobile terminal does not receive the switching operation of the mobile terminal user, the mobile terminal responds to the delay message and automatically switches the online audio into the online audio with the first code rate, so that the network speed occupied by the online audio is minimum, and the flow is saved.
To sum up, the code rate switching method for the online audio according to the second embodiment of the present invention switches the online audio to the online audio with the smaller first code rate by comprehensively considering two factors, namely, the environmental volume and the network speed, under the condition that the environmental volume continuously exceeds the threshold volume within the first preset time and the network speed is less than the first threshold, so that the occupied network speed is the minimum under the condition that the hearing of the mobile terminal user is not reduced, and the traffic can be saved when the traffic networking is used.
Third embodiment
A third embodiment of the present invention provides a mobile terminal. Preferably, the mobile terminal of this embodiment may be, but is not limited to, a mobile phone, a tablet computer, MP3/MP4, a Personal Digital Assistant (PDA), a car computer, and the like. As shown in fig. 3, the mobile terminal 300 specifically includes the following modules:
the first determining module 301 is configured to determine whether the ambient volume exceeds a threshold volume according to the ambient volume acquired by the microphone.
The quality of the online audio can be represented by the code rate, and the higher the code rate is, the higher the quality of the online audio is, which can bring better hearing to the user of the mobile terminal 300. However, in the case of a noisy environment, even if the quality of the online audio is high, the user of the mobile terminal 300 cannot obtain a good listening feeling due to the interference of the environment. Generally, whether it is a noisy environment can be determined by the volume of the environment. Therefore, whether the environmental volume exceeds the threshold volume is judged through the module, and corresponding processing can be carried out according to the judgment result.
If the ambient volume exceeds the threshold volume, the mobile terminal 300 is in a quieter environment, for example, when the mobile terminal 300 is in a quiet office or home, the switching of the code rate of the online audio is not required, and the online audio is continuously played at the current code rate.
An obtaining module 302, configured to obtain a network speed of the mobile terminal 300 if the ambient volume exceeds a threshold volume.
The higher the code rate of the online audio, the larger the online audio file is, and the higher the requirement on the network speed is. Therefore, if the ambient volume exceeds the threshold volume, and the current environment of the mobile terminal 300 is a noisy environment, the user of the mobile terminal 300 is difficult to obtain a better listening feeling. In this case, if the network speed is low, the on-line audio with low code rate can be played, so that the network speed can be reasonably distributed, and if the traffic networking is adopted, the traffic can be saved, and the listening feeling of the user of the mobile terminal 300 cannot be influenced. If the network speed is higher, the network speed can support the simultaneous operation of various tasks needing the network speed, and the code rate of the online audio can be kept to be played continuously.
Specifically, in the process of playing the online audio, the network speed can be read at intervals by calling the network speed interface class (android traffic classes) of the mobile terminal 300, so as to determine the current network speed.
The switching module 303 is configured to switch the currently played online audio to an online audio with a first code rate if the network speed is less than a first threshold.
And the first code rate is smaller than the code rate of the currently played online audio. The first threshold may be set by the mobile terminal 300 system, or may be set by the user of the mobile terminal 300 according to actual conditions. If the network speed currently used by the mobile terminal 300 is less than the first threshold, it indicates that the network speed is slow, so as to avoid that playing the online audio occupies a large network speed and affects other tasks, or avoid wasting the traffic when using traffic networking, and this module can switch the code rate of the online audio. The online audio may include online audio with multiple code rates, and the module switches the currently played online audio to the online audio with the first code rate as long as the currently played online audio is not the online audio with the lowest code rate, so as to ensure that the online speed occupied by the online audio is the minimum and save the flow. Specifically, the first code rate may be the lowest code rate, or may be a first code rate that is switched to a more appropriate code rate according to the network speed.
To sum up, the mobile terminal 300 according to the third embodiment of the present invention comprehensively considers two factors, namely, the ambient volume and the network speed, so that when the ambient volume exceeds the threshold volume and the network speed is less than the first threshold, the currently played online audio is switched to the online audio with the smaller first bitrate, so that the occupied network speed is the minimum without reducing the hearing of the user of the mobile terminal 300, and the traffic can be saved when the traffic is used for networking.
Fourth embodiment
A fourth embodiment of the present invention provides a mobile terminal. Preferably, the mobile terminal of this embodiment may be, but is not limited to, a mobile phone, a tablet computer, MP3/MP4, a Personal Digital Assistant (PDA), a car computer, and the like. As shown in fig. 4, the mobile terminal 400 specifically includes the following modules: a first judging module 401, an obtaining module 402 and a switching module 403. The functions of the modules are the same as those of the third embodiment, and are not described again here.
Preferably, the mobile terminal 400 further includes:
the second determining module 404 is configured to determine whether the currently played audio is an online audio before the step of determining whether the ambient volume exceeds the threshold volume according to the ambient volume acquired by the microphone.
If the audio is not online, that is, the audio stored locally in the mobile terminal 400, the occupation of the network speed or the consumption of the traffic will not be involved. Typically, locally stored audio also has no other bitrate audio available for switching. Therefore, if the currently played audio is not the online audio, the code rate cannot be switched, and the subsequent process is not needed.
The third determining module 405 is configured to determine whether the currently played online audio includes online audio with different code rates if the currently played audio is online audio.
In order to realize the switching of the online audio with different code rates of the embodiment, the online audio needs to include the online audio with different code rates. Therefore, whether the online audio provides the online audio with other switchable code rates can be judged through the module. The online audio may include online audio with multiple bitrate rates, such as a normal bitrate rate, an HQ bitrate rate, an SQ bitrate rate, and the like. If the online audio only has the online audio with one code rate, the online audio with different code rates can not be switched, and the subsequent process is not needed.
Preferably, the mobile terminal 400 further includes:
a fourth determining module 406, configured to determine whether the currently played online audio includes online audio with different code rates, and if the currently played online audio includes online audio with different code rates, determine whether the currently played online audio is the online audio with the lowest code rate.
The module can judge whether the online audio is the online audio with the lowest code rate. If the online audio is the lowest-bit-rate online audio, the switching is not needed.
Preferably, the first determining module 401 includes:
the first obtaining sub-module 4011 is configured to obtain, through the microphone, the ambient volume if the currently played online audio is not the online audio with the lowest code rate.
If the online audio is not the online audio with the lowest code rate, the noisy degree of the environment needs to be considered to determine whether the online audio needs to be switched to the online audio with the smaller code rate. Accordingly, it may be determined whether the ambient volume is sufficient to affect the hearing of the user of the mobile terminal 400 by obtaining the ambient volume of the environment in which the mobile terminal 400 is currently located.
The determining sub-module 4012 is configured to determine whether the ambient volume continuously exceeds the threshold volume within a first preset time.
The ambient volume may be greater than the threshold volume at one moment and less than the threshold volume at other moments. In this case, the environment should not be considered a noisy environment and will not continuously affect the hearing of the user of the mobile terminal 400. Therefore, the environment is considered to be a noisy environment only by collecting the ambient volume once above the threshold volume, which may affect the hearing of the user of the mobile terminal 400 and is inaccurate. To avoid such a false determination, the volume of the environment is required to be continuously greater than the threshold volume for a first preset time period to indicate that the environment is a noisy environment. The threshold volume may be set by the mobile terminal 400 system or may be set by the user of the mobile terminal 400 based on the actual situation.
Whether the environment in which the mobile terminal 400 is located affects the hearing of the user of the mobile terminal 400 may be determined by the sub-modules described above.
If the ambient volume exceeds the threshold volume, the obtaining module 402 performs the step of obtaining the network speed of the mobile terminal 400.
If the volume of the environment exceeds the threshold volume, and the current environment of the mobile terminal 400 is a noisy environment, the user of the mobile terminal 400 is difficult to obtain a better listening feeling. In this case, if the network speed is low, the online audio with a low code rate can be played, so that the network speed can be reasonably distributed, and if the flow is adopted for listening to songs, the flow can be saved, and the listening feeling of the user of the mobile terminal 400 cannot be influenced. If the network speed is higher, the network speed can support the simultaneous operation of various tasks needing the network speed, and the code rate of the online audio can be kept to be continuously played
Preferably, the switching module 403 includes:
the prompting submodule 4031 is configured to prompt the user of the mobile terminal 400 to switch the online audio to the online audio with the first code rate if the network speed is smaller than the first threshold.
And the first code rate is smaller than the code rate of the currently played online audio. The first threshold may be set by the mobile terminal 400 system, or may be set by the user of the mobile terminal 400 according to actual conditions. If the network speed currently used by the mobile terminal 400 is less than the first threshold, it indicates that the network speed is slow, so as to avoid that playing the online audio occupies a large network speed and affects other tasks, or avoid wasting the traffic when using traffic networking, and prompt the user of the mobile terminal 400 to switch the online audio into the online audio with the first code rate. The first code rate may be the lowest code rate, or may be the first code rate that is switched to be more appropriate according to the network speed.
Specifically, the prompt sub-module 4031 may prompt the user of the mobile terminal 400 to perform handover in a pop-up window manner.
The first switching sub-module 4032 is configured to, if the switching operation of the user of the mobile terminal 400 is received within the second preset time after the prompt is sent, switch the online audio to the online audio with the first code rate based on the switching operation of the user of the mobile terminal 400.
The user of the mobile terminal 400 may perform an operation of confirming the switching by touching the switching graphic button or by pressing the mechanical button after receiving the prompt. After the mobile terminal 400 receives the switching operation, the first switching sub-module 4032 may switch the online audio to the online audio with the first code rate, so as to ensure that the online audio occupies the minimum network speed and save the traffic.
And the second switching sub-module 4033 is configured to automatically switch the online audio to the online audio with the first code rate if the switching operation of the user of the mobile terminal 400 is not received within a second preset time after the prompt is sent.
The prompt issued by the prompt sub-module 4031 may be a delayed message. If the user of the mobile terminal 400 does not actively respond within the second preset time, that is, the mobile terminal 400 does not receive the switching operation of the user of the mobile terminal 400, the second switching sub-module 4033 will respond to the delay message and automatically switch the online audio to the online audio with the first code rate, so as to ensure that the online speed occupied by the online audio is minimum and save the flow.
To sum up, the mobile terminal 400 according to the fourth embodiment of the present invention, by comprehensively considering two factors, namely, the ambient volume and the network speed, switches the online audio to the online audio with the smaller first code rate when the ambient volume continuously exceeds the threshold volume within the first preset time and the network speed is less than the first threshold, so that the occupied network speed is the minimum without reducing the hearing of the user of the mobile terminal 400, and the traffic can be saved when the traffic networking is used.
Fifth embodiment
Fig. 5 is a block diagram of a mobile terminal according to a fifth embodiment of the present invention. The mobile terminal 500 shown in fig. 5 includes: at least one processor 501, memory 502, at least one network interface 504, and a user interface 503. The various components in the mobile terminal 500 are coupled together by a bus system 505. It is understood that the bus system 505 is used to enable connection communications between these components. The bus system 505 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 505 in FIG. 5.
The user interface 503 may include, among other things, a display, a keyboard, or a pointing device such as a mouse, trackball (trackball), touch pad, or touch screen.
It is to be understood that the memory 502 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration, and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous SDRAM (ESDRAM), Sync Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 502 of the subject systems and methods described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 502 stores elements, executable modules or data structures, or a subset thereof, or an expanded set thereof as follows: an operating system 5021 and application programs 5022.
The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 5022 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. The program for implementing the method according to the embodiment of the present invention may be included in the application program 5022.
In the embodiment of the present invention, the program or the instruction stored in the memory 502 may be specifically a program or an instruction stored in the application 5022. In the embodiment of the present invention, the processor 501 is configured to determine whether the ambient volume exceeds a threshold volume according to the ambient volume acquired by the microphone; if the environmental volume exceeds the threshold volume, acquiring the network speed of the mobile terminal 500; and if the network speed is less than a first threshold value, switching the currently played online audio into the online audio with a first code rate, wherein the first code rate is less than the code rate of the currently played online audio.
The method disclosed by the above-mentioned embodiments of the present invention may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 501. The Processor 501 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described in this disclosure may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described in this disclosure. The software codes may be stored in memory 502 and executed by processors. The memory 502 may be implemented in the processor 501 or external to the processor 501.
Optionally, before the step of determining whether the ambient volume exceeds the threshold volume according to the ambient volume acquired by the microphone, the processor 501 is further configured to determine whether the currently played audio is an online audio; and if the currently played audio is the online audio, judging whether the currently played online audio comprises the online audio with different code rates.
Optionally, after the step of determining whether the currently played online audio includes online audios with different code rates, the processor 501 is further configured to determine whether the currently played online audio is an online audio with a lowest code rate if the currently played online audio includes online audios with different code rates.
Optionally, the processor 501 is configured to, in the step of determining whether the ambient volume exceeds a threshold volume according to the ambient volume acquired by the microphone, specifically, if the currently played online audio is not the online audio with the lowest code rate, acquire the ambient volume through the microphone; judging whether the environmental volume continuously exceeds the threshold volume within a first preset time; if the ambient volume exceeds the threshold volume, the processor 501 is configured to perform the step of acquiring the network speed of the mobile terminal 500.
Optionally, in the step of switching the currently played online audio to the online audio with the first code rate, the processor 501 is specifically configured to prompt the user of the mobile terminal 500 to switch the online audio to the online audio with the first code rate if the network speed is less than the first threshold; if the switching operation of the mobile terminal 500 user is received within the second preset time after the prompt is sent, switching the online audio into the online audio with the first code rate based on the switching operation of the mobile terminal 500 user; and if the switching operation of the user of the mobile terminal 500 is not received within the second preset time after the prompt is sent, automatically switching the online audio into the online audio with the first code rate.
The mobile terminal 500 can implement the processes implemented by the mobile terminal in the foregoing embodiments, and in order to avoid repetition, the detailed description is omitted here.
The mobile terminal 500 of the embodiment of the present invention comprehensively considers two factors, namely, the ambient volume and the network speed, so that the online audio is switched to the online audio with the smaller first code rate under the condition that the ambient volume continuously exceeds the threshold volume within the first preset time and the network speed of the network is less than the first threshold, so that the network speed occupied by the mobile terminal 500 is the minimum under the condition that the user listening experience of the mobile terminal is not reduced, and the traffic can be saved when the traffic networking is used.
Sixth embodiment
Fig. 6 is a schematic structural diagram of a mobile terminal according to a sixth embodiment of the present invention. Specifically, the mobile terminal 600 in fig. 6 may be a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), or a vehicle-mounted computer.
The mobile terminal 600 in fig. 6 includes a Radio Frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a processor 660, an audio circuit 670, a wifi (wireless fidelity) module 680, and a power supply 690.
The input unit 630 may be used, among other things, to receive numeric or character information input by a user and to generate signal inputs related to user settings and function control of the mobile terminal 600. Specifically, in the embodiment of the present invention, the input unit 630 may include a touch panel 631. The touch panel 631, also referred to as a touch screen, may collect touch operations of a user (e.g., operations of the user on the touch panel 631 by using a finger, a stylus, or any other suitable object or accessory) thereon or nearby, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 631 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 660, and can receive and execute commands sent by the processor 660. In addition, the touch panel 631 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 631, the input unit 630 may also include other input devices 632, and the other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Among other things, the display unit 640 may be used to display information input by a user or information provided to the user and various menu interfaces of the mobile terminal 600. The display unit 640 may include a display panel 641, and optionally, the display panel 641 may be configured in the form of an LCD or an Organic Light-Emitting Diode (OLED).
It should be noted that the touch panel 631 may cover the display panel 641 to form a touch display screen, and when the touch display screen detects a touch operation thereon or nearby, the touch display screen is transmitted to the processor 660 to determine the type of the touch event, and then the processor 660 provides a corresponding visual output on the touch display screen according to the type of the touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like.
The processor 660 is a control center of the mobile terminal 600, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile terminal 600 and processes data by operating or executing software programs and/or modules stored in the first memory 621 and calling data stored in the second memory 622, thereby integrally monitoring the mobile terminal 600. Optionally, processor 660 may include one or more processing units.
In the embodiment of the present invention, the mobile terminal 600 has a front camera, and the processor 660 is configured to determine whether the ambient volume exceeds a threshold volume according to the ambient volume acquired by the microphone by calling a software program and/or a module stored in the first memory 621 and/or data stored in the second memory 622; if the environmental volume exceeds the threshold volume, acquiring the network speed of the mobile terminal 600; and if the network speed is less than a first threshold value, switching the currently played online audio into the online audio with a first code rate, wherein the first code rate is less than the code rate of the currently played online audio.
Optionally, the processor 660 is configured to determine, according to the ambient volume acquired by the microphone, whether the ambient volume exceeds a threshold volume, and before the step, the processor 660 is further configured to determine whether the currently played audio is an online audio; and if the currently played audio is the online audio, judging whether the currently played online audio comprises the online audio with different code rates.
Optionally, after the step of determining whether the currently played online audio includes online audios with different code rates, the processor 660 is further configured to determine whether the current quality of the currently played online audio is the online audio with the lowest code rate if the currently played online audio includes online audios with different code rates.
Optionally, the processor 660 is configured to, in the step of determining whether the ambient volume exceeds a threshold volume according to the ambient volume acquired by the microphone, specifically, the processor 660 is configured to acquire the ambient volume through the microphone if the currently played online audio is not the online audio with the lowest code rate; judging whether the environmental volume continuously exceeds the threshold volume within a first preset time; if the ambient volume exceeds the threshold volume, the processor 660 is configured to perform the step of obtaining the network speed of the mobile terminal 600.
Optionally, in the step of switching the currently played online audio to the online audio with the first code rate, the processor 660 is specifically configured to prompt the user of the mobile terminal 600 to switch the online audio to the online audio with the first code rate if the network speed is less than the first threshold; if the switching operation of the mobile terminal 600 user is received within the second preset time after the prompt is sent, switching the online audio into the online audio with the first code rate based on the switching operation of the mobile terminal 600 user; and if the switching operation of the user of the mobile terminal 600 is not received within the second preset time after the prompt is sent, automatically switching the online audio into the online audio with the first code rate.
It can be seen that, the mobile terminal 600 according to the embodiment of the present invention comprehensively considers two factors, namely, the ambient volume and the network speed, so that when the ambient volume continuously exceeds the threshold volume within the first preset time and the network speed is less than the first threshold, the online audio is switched to the online audio with the smaller first code rate, so that the occupied network speed is the minimum without reducing the hearing of the user of the mobile terminal 600, and when the traffic networking is used, the traffic can be saved.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A quality switching method of online audio, which is used for a mobile terminal, is characterized in that the method comprises the following steps:
judging whether the environmental volume continuously exceeds a threshold volume within a first preset time according to the environmental volume acquired by a microphone;
if the environmental volume exceeds a threshold volume, acquiring the network speed of the mobile terminal;
if the network speed is less than a first threshold value, switching the currently played online audio into the online audio with a first code rate, wherein the first code rate is less than the code rate of the currently played online audio;
before the step of determining whether the ambient volume continuously exceeds the threshold volume within a first preset time according to the ambient volume acquired by the microphone, the method further includes:
judging whether the currently played audio is online audio;
if the currently played audio is online audio, judging whether the currently played online audio comprises online audio with different code rates.
2. The method of claim 1, wherein after the step of determining whether the currently played online audio comprises online audio with different bitrate, the method further comprises:
if the currently played online audio comprises online audio with different code rates, judging whether the currently played online audio is the online audio with the lowest code rate.
3. The method of claim 2, wherein the step of determining whether the ambient volume continuously exceeds a threshold volume for a first preset time according to the ambient volume obtained by the microphone comprises:
if the currently played online audio is not the online audio with the lowest code rate, acquiring the environmental volume through the microphone;
judging whether the environmental volume continuously exceeds the threshold volume within a first preset time;
and if the environmental volume exceeds the threshold volume, executing the step of acquiring the network speed of the mobile terminal.
4. The method of claim 1, wherein the step of switching the currently played online audio to the online audio with the first bitrate comprises:
if the network speed is lower than the first threshold value, prompting the mobile terminal user to switch the online audio to the online audio with the first code rate;
if the switching operation of the mobile terminal user is received within the second preset time after the prompt is sent, switching the online audio to the online audio with the first code rate based on the switching operation of the mobile terminal user;
and if the switching operation of the mobile terminal user is not received within the second preset time after the prompt is sent, automatically switching the online audio into the online audio with the first code rate.
5. A mobile terminal, comprising:
the first judgment module is used for judging whether the environmental volume continuously exceeds the threshold volume within a first preset time according to the environmental volume acquired by the microphone;
the acquisition module is used for acquiring the network speed of the mobile terminal if the environmental volume exceeds a threshold volume;
the switching module is used for switching the currently played online audio into the online audio with a first code rate if the network speed is less than a first threshold value, wherein the first code rate is less than the code rate of the currently played online audio;
the mobile terminal further includes:
the second judgment module is used for judging whether the currently played audio is online audio or not before the step of judging whether the environmental volume continuously exceeds the threshold volume within the first preset time according to the environmental volume acquired by the microphone;
and the third judging module is used for judging whether the currently played online audio comprises online audio with different code rates if the currently played audio is online audio.
6. The mobile terminal of claim 5, further comprising:
and the fourth judging module is used for judging whether the currently played online audio is the online audio with the lowest code rate or not if the currently played online audio comprises the online audio with different code rates after the step of judging whether the currently played online audio comprises the online audio with different code rates.
7. The mobile terminal of claim 6, wherein the first determining module comprises:
the first obtaining submodule is used for obtaining the environment volume through the microphone if the currently played online audio is not the online audio with the lowest code rate;
the judgment submodule is used for judging whether the environment volume continuously exceeds the threshold volume within a first preset time;
and if the environmental volume exceeds the threshold volume, the acquisition module executes the step of acquiring the network speed of the mobile terminal.
8. The mobile terminal of claim 5, wherein the handover module comprises:
a prompt submodule, configured to prompt the mobile terminal user to switch the online audio to an online audio with a first code rate if the network speed is lower than the first threshold;
the first switching submodule is used for switching the online audio into the online audio with the first code rate based on the switching operation of the mobile terminal user if the switching operation of the mobile terminal user is received within second preset time after the prompt is sent out;
and the second switching submodule is used for automatically switching the online audio into the online audio with the first code rate if the switching operation of the mobile terminal user is not received within second preset time after the prompt is sent.
CN201710262397.5A 2017-04-20 2017-04-20 Quality switching method of online audio and mobile terminal Active CN107122159B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710262397.5A CN107122159B (en) 2017-04-20 2017-04-20 Quality switching method of online audio and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710262397.5A CN107122159B (en) 2017-04-20 2017-04-20 Quality switching method of online audio and mobile terminal

Publications (2)

Publication Number Publication Date
CN107122159A CN107122159A (en) 2017-09-01
CN107122159B true CN107122159B (en) 2020-04-17

Family

ID=59724967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710262397.5A Active CN107122159B (en) 2017-04-20 2017-04-20 Quality switching method of online audio and mobile terminal

Country Status (1)

Country Link
CN (1) CN107122159B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104519372A (en) * 2014-12-19 2015-04-15 深圳市九洲电器有限公司 Switching method and switching system for streaming media playing
KR20160004712A (en) * 2014-07-04 2016-01-13 삼성전자주식회사 Method for communicating wireless in accordance with an unauthorized frequency band and a electronic device implementing the same
CN105939426A (en) * 2016-06-30 2016-09-14 努比亚技术有限公司 Method and device for processing information and terminal
CN106454395A (en) * 2016-09-20 2017-02-22 北京百度网讯科技有限公司 Method and device for providing multi-code rate streaming media self-adaptively in server

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1855793A (en) * 2005-04-19 2006-11-01 华为技术有限公司 Control of video encoding speed
CN101765003A (en) * 2008-12-23 2010-06-30 上海茂碧信息科技有限公司 Method for transmitting audio and video under environment of network with different speeds
CN101944364B (en) * 2009-07-09 2012-06-06 展讯通信(上海)有限公司 Voice frequency processing method and voice frequency system
CN103474080A (en) * 2013-09-02 2013-12-25 百度在线网络技术(北京)有限公司 Processing method, device and system of audio data based on code rate switching
CN103440138B (en) * 2013-09-06 2018-05-22 杭州网易云音乐科技有限公司 A kind of behavioral guidance method and device
CN103617797A (en) * 2013-12-09 2014-03-05 腾讯科技(深圳)有限公司 Voice processing method and device
CN104468706A (en) * 2014-10-22 2015-03-25 小米科技有限责任公司 Audio file transmission method and device
CN104506631B (en) * 2014-12-26 2018-06-15 杭州网易云音乐科技有限公司 A kind of audio file caching method and equipment
CN105989844B (en) * 2015-01-29 2019-12-13 中国移动通信集团公司 Self-adaptive method and device for audio transmission
CN104837042B (en) * 2015-05-06 2018-01-16 腾讯科技(深圳)有限公司 The coding method of digital multimedia data and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160004712A (en) * 2014-07-04 2016-01-13 삼성전자주식회사 Method for communicating wireless in accordance with an unauthorized frequency band and a electronic device implementing the same
CN104519372A (en) * 2014-12-19 2015-04-15 深圳市九洲电器有限公司 Switching method and switching system for streaming media playing
CN105939426A (en) * 2016-06-30 2016-09-14 努比亚技术有限公司 Method and device for processing information and terminal
CN106454395A (en) * 2016-09-20 2017-02-22 北京百度网讯科技有限公司 Method and device for providing multi-code rate streaming media self-adaptively in server

Also Published As

Publication number Publication date
CN107122159A (en) 2017-09-01

Similar Documents

Publication Publication Date Title
CN107466077B (en) Network switching method and mobile terminal
CN107171874B (en) Voice engine switching method, mobile terminal and server
US20160283059A1 (en) Terminal and method for setting menu environments in the terminal
CN106201632B (en) Application program access method and mobile terminal
CN105159530A (en) Application display object switching method and apparatus
CN108366169B (en) Notification message processing method and mobile terminal
CN106453953B (en) Wireless access point connection method and mobile terminal
CN106354373B (en) Icon moving method and mobile terminal
CN106874046B (en) Application program operation method and mobile terminal
CN107221347B (en) Audio playing method and terminal
CN107172287B (en) Multi-card communication method and mobile terminal
CN106453925B (en) Information transmission method and mobile terminal
CN106993091B (en) Image blurring method and mobile terminal
CN106161776B (en) Volume adjusting method and mobile terminal
CN103135934A (en) Touch-screen mobile device and method and device for switching application program quickly
CN107562262B (en) Method for responding touch operation, terminal and computer readable storage medium
CN106775378B (en) Method for determining candidate words of input method and mobile terminal
CN107632761B (en) Display content viewing method, mobile terminal and computer readable storage medium
CN106991150B (en) Webpage data display method and mobile terminal
US20140282058A1 (en) Electronic device with a funiction of applying applications of different operating systems, system and method thereof
KR102205935B1 (en) Method and terminal for adjusting screen-on duration of terminal
US20140302833A1 (en) Method and device for forwarding an incoming call according to a remaining battery capacity
CN107656746B (en) Program upgrading method and mobile terminal
CN107257411B (en) Message reminding method and mobile terminal
CN106101381B (en) Call request processing method and mobile terminal

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