[go: up one dir, main page]

CN107506167A - Method for controlling volume, device and the storage medium and mobile terminal of mobile terminal - Google Patents

Method for controlling volume, device and the storage medium and mobile terminal of mobile terminal Download PDF

Info

Publication number
CN107506167A
CN107506167A CN201710710678.2A CN201710710678A CN107506167A CN 107506167 A CN107506167 A CN 107506167A CN 201710710678 A CN201710710678 A CN 201710710678A CN 107506167 A CN107506167 A CN 107506167A
Authority
CN
China
Prior art keywords
mobile terminal
shelter
distance
occlusion
environment
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
CN201710710678.2A
Other languages
Chinese (zh)
Other versions
CN107506167B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710710678.2A priority Critical patent/CN107506167B/en
Publication of CN107506167A publication Critical patent/CN107506167A/en
Application granted granted Critical
Publication of CN107506167B publication Critical patent/CN107506167B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The embodiment of the invention discloses a kind of method for controlling volume of mobile terminal, device and storage medium and mobile terminal.Methods described includes:Determine that mobile terminal is in setting and blocked in environment;The coverage extent information of shelter is obtained, the shelter blocks the object that the mobile terminal is blocked in environment for the setting;Audio broadcast sound volume is adjusted according to the coverage extent information.Technical scheme provided in an embodiment of the present invention, the problems such as avoiding mobile terminal too small in audio broadcast sound volume when blocking in environment and causing user's missed telephone or information, the broadcast sound volume of mobile terminal can be reasonably controlled according to coverage extent in the case where mobile terminal is in and is blocked.

Description

移动终端的音量控制方法、装置及存储介质和移动终端Volume control method, device and storage medium of mobile terminal and mobile terminal

技术领域technical field

本发明实施例涉及播放控制技术领域,尤其涉及一种移动终端的音量控制方法、装置及存储介质和移动终端。The embodiments of the present invention relate to the technical field of playback control, and in particular, to a volume control method and device for a mobile terminal, a storage medium, and a mobile terminal.

背景技术Background technique

手机等移动终端中的功能越来越多,为人们的生活和工作提供了便利,人们可以利用手机接打电话,还可以听音乐、观看视频、玩游戏等。在用户进行这些操作时,移动终端的音频播放控制系统控制这些应用的音频进行播放。但相关技术中对音频播放音量的控制方法存在缺陷,需要改进。There are more and more functions in mobile terminals such as mobile phones, which provide convenience for people's life and work. People can use mobile phones to make and receive calls, listen to music, watch videos, play games, etc. When the user performs these operations, the audio playback control system of the mobile terminal controls the audio of these applications to play. However, there are defects in the method for controlling the volume of audio playback in the related art and need to be improved.

发明内容Contents of the invention

本发明实施例提供一种移动终端的音量控制方法、装置及存储介质和移动终端,可以在移动终端处于被遮挡的情况下合理的控制移动终端的播放音量。Embodiments of the present invention provide a volume control method and device for a mobile terminal, a storage medium, and a mobile terminal, which can reasonably control the playback volume of the mobile terminal when the mobile terminal is blocked.

在第一方面,本发明实施例提供了一种移动终端的音量控制方法,包括:In a first aspect, an embodiment of the present invention provides a volume control method for a mobile terminal, including:

确定移动终端处于设定遮挡环境中;Determine that the mobile terminal is in a set occlusion environment;

获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体;Obtaining occlusion degree information of an occluder, where the occluder is an object that occludes the mobile terminal in the set occlusion environment;

根据所述遮挡程度信息调整音频播放音量。Adjust audio playback volume according to the occlusion degree information.

在第二方面,本发明实施例提供了一种移动终端的音量控制装置,包括:In a second aspect, an embodiment of the present invention provides a volume control device for a mobile terminal, including:

遮挡状态确定模块,用于确定移动终端处于设定遮挡环境中;An occlusion state determination module, configured to determine that the mobile terminal is in a set occlusion environment;

遮挡程度信息获取模块,用于获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体;An occlusion degree information acquisition module, configured to acquire occlusion degree information of an occluder, where the occluder is an object that occludes the mobile terminal in the set occlusion environment;

音频播放音量调整模块,用于根据所述遮挡程度信息调整音频播放音量。The audio playback volume adjustment module is configured to adjust the audio playback volume according to the occlusion degree information.

第三方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面所提供的移动终端的音量控制方法。In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the volume control method for a mobile terminal as provided in the first aspect is implemented.

在第四方面,本发明实施例提供了一种移动终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行时实现如第一方面所提供的移动终端的音量控制方法。In a fourth aspect, an embodiment of the present invention provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and operable on the processor. A volume control method for a mobile terminal.

在第五方面,本发明实施例提供了一种移动终端,包括:接近传感器,用于采集移动终端与遮挡物的距离;加速度传感器,用于采集移动终端的运动状态;和/或,环境光传感器,用于采集移动终端的环境光亮度;存储器,用于存储所述距离和所述运动状态,和/或,所述距离和所述环境光亮度;处理器,用于根据所述距离和所述运动状态,和/或,所述距离和所述环境光亮度,确定所述移动终端处于设定遮挡环境中;获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体;根据所述遮挡程度信息调整音频播放音量。In a fifth aspect, an embodiment of the present invention provides a mobile terminal, including: a proximity sensor for collecting the distance between the mobile terminal and an obstruction; an acceleration sensor for collecting the motion state of the mobile terminal; and/or ambient light The sensor is used to collect the ambient light brightness of the mobile terminal; the memory is used to store the distance and the motion state, and/or the distance and the ambient light brightness; the processor is used to store the distance and the ambient light brightness according to the distance and the The motion state, and/or, the distance and the brightness of the environment, determine that the mobile terminal is in a set occlusion environment; acquire occlusion degree information of an occluder, and the occluder is the set occlusion environment An object that blocks the mobile terminal; adjust the audio playback volume according to the blockage degree information.

本发明实施例通过确定移动终端处于设定遮挡环境中,获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体,根据所述遮挡程度信息调整音频播放音量,可以在移动终端处于被遮挡的情况下合理的控制移动终端的播放音量。In the embodiment of the present invention, by determining that the mobile terminal is in the set occlusion environment, the occlusion degree information of the occluder is obtained. Audio playback volume, which can reasonably control the playback volume of the mobile terminal when the mobile terminal is blocked.

附图说明Description of drawings

图1a是本发明实施例提供的一种音频系统架构框图;Figure 1a is a block diagram of an audio system architecture provided by an embodiment of the present invention;

图1b是本发明实施例提供的一种智能手机的音频处理硬件系统结构示意图;Fig. 1b is a schematic structural diagram of an audio processing hardware system of a smart phone provided by an embodiment of the present invention;

图2是本发明实施例提供的一种移动终端的音量控制方法的流程图;FIG. 2 is a flow chart of a volume control method for a mobile terminal provided by an embodiment of the present invention;

图3是本发明实施例提供的另一种移动终端的音量控制方法的流程图;FIG. 3 is a flow chart of another volume control method for a mobile terminal provided by an embodiment of the present invention;

图4是本发明实施例提供的另一种移动终端的音量控制方法的流程图;FIG. 4 is a flowchart of another volume control method for a mobile terminal provided by an embodiment of the present invention;

图5是本发明实施例提供的另一种移动终端的音量控制方法的流程图;FIG. 5 is a flow chart of another volume control method for a mobile terminal provided by an embodiment of the present invention;

图6是本发明实施例提供的另一种移动终端的音量控制方法的流程图;FIG. 6 is a flow chart of another volume control method for a mobile terminal provided by an embodiment of the present invention;

图7是本发明实施例提供的另一种移动终端的音量控制方法的流程图;FIG. 7 is a flow chart of another volume control method for a mobile terminal provided by an embodiment of the present invention;

图8是本发明实施例提供的一种移动终端的音量控制装置的结构示意图;8 is a schematic structural diagram of a volume control device for a mobile terminal provided by an embodiment of the present invention;

图9是本发明实施例提供的一种移动终端的结构示意图。FIG. 9 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present invention.

具体实施方式detailed description

为了使本发明的目的、技术方案和优点更加清楚,下面结合附图对本发明具体实施例作进一步的详细描述。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部内容。在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。In order to make the object, technical solution and advantages of the present invention clearer, specific embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only parts related to the present invention are shown in the drawings but not all content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe various operations (or steps) as sequential processing, many of the operations may be performed in parallel, concurrently, or simultaneously. In addition, the order of operations can be rearranged. The process may be terminated when its operations are complete, but may also have additional steps not included in the figure. The processing may correspond to a method, function, procedure, subroutine, subroutine, or the like.

为便于理解,下面以Android系统为例,对Android系统中的音频系统架构进行简单说明。For ease of understanding, the Android system is taken as an example below to briefly describe the audio system architecture in the Android system.

如图1a所示,本实施例提供的音频系统架构主要包括用户空间、内核空间和硬件系统。用户空间包括应用(Application)层、应用框架(Framework)层和硬件抽象层(Hardware Abstraction Layer,HAL),内核空间包括驱动(Driver)层,硬件系统包括扬声器、音频编解码器等。应用层是音频体系的最上层,可通过编写一个应用程序来执行对应的逻辑操作,例如预先设置设定遮挡环境包括扬声器被遮挡的环境,设定遮挡环境下移动终端与遮挡物的距离所属的设定范围,下发音量调整指令等。应用框架层包括音频控制接口和标准化插件模块负责提供获取音频属性信息、音频播放状态的接口,以及扬声器音量大小控制接口等。应用框架层提供了AudioTrack和AudioRecorder两个类,以及AudioManager、AudioService及AudioSystem类。在应用框架层和硬件抽象层之间还包括一个系统运行库(Libraries)层。我们知道,framework层的很多类,实际上只是应用程序使用Android库文件的“中介”而已。因为上层应用采用java语言编写,它们需要最直接的java接口的支持,这就是framework层存在的意义之一。而作为“中介”,它们并不会真正去实现具体的功能,或者只实现其中的一部分功能,而把主要重心放在库中来完成。比如上面的AudioTrack、AudioRecorder、MediaPlayer和MediaRecorder等等在库中都能找到相对应的类。这一部分代码集中放置在工程的frameworks/av/media/libmedia中,多数是C++语言编写的。音频方面的硬件抽象层主要分为两部分,即AudioFlinger和AudioPolicyService,实际上后者并不是一个真实的设备,只是采用虚拟设备的方式来让厂商可以方便地定制出自己的策略。根据产品的不同,音频设备存在很大差异,在Android的音频架构中,这些问题都是由HAL层的audio.primary等来解决的,而不需要大规模地修改上层实现。硬件抽象层是应用框架层到驱动层的过渡,以实现底层硬件的兼容。驱动层按照音频编解码器的特性对其进行控制,确保音频编解码器可以正常工作,将音频编解码器获取到的音频数据提供给系统层。硬件系统包括扬声器和音频编解码器,扬声器用于播放音频数据控制音量大小,音频编解码器用于解析音频数据的格式,如MP3、WMA,负责音频可以正常播放,不是噪音等。As shown in Fig. 1a, the audio system architecture provided by this embodiment mainly includes user space, kernel space and hardware system. User space includes application (Application) layer, application framework (Framework) layer and hardware abstraction layer (Hardware Abstraction Layer, HAL), kernel space includes driver (Driver) layer, and hardware system includes speakers, audio codecs, etc. The application layer is the top layer of the audio system, and an application program can be written to perform corresponding logical operations, such as pre-setting the occlusion environment including the environment where the speaker is occluded, and setting the distance between the mobile terminal and the occlusion in the occlusion environment. Set the range, issue volume adjustment commands, etc. The application framework layer includes an audio control interface and a standardized plug-in module responsible for providing an interface for obtaining audio attribute information, audio playback status, and a speaker volume control interface. The application framework layer provides two classes, AudioTrack and AudioRecorder, as well as AudioManager, AudioService and AudioSystem classes. A system runtime (Libraries) layer is also included between the application framework layer and the hardware abstraction layer. We know that many classes in the framework layer are actually just "intermediaries" for applications to use Android library files. Because upper-layer applications are written in java language, they need the most direct support of java interface, which is one of the meanings of the framework layer. As "intermediaries", they don't really implement specific functions, or only implement part of them, but focus on the library to complete. For example, the above AudioTrack, AudioRecorder, MediaPlayer and MediaRecorder, etc. can find corresponding classes in the library. This part of the code is centrally placed in the frameworks/av/media/libmedia of the project, most of which are written in C++ language. The audio hardware abstraction layer is mainly divided into two parts, namely AudioFlinger and AudioPolicyService. In fact, the latter is not a real device, but a virtual device is used to allow manufacturers to easily customize their own policies. According to different products, there are great differences in audio devices. In the Android audio architecture, these problems are solved by the audio.primary of the HAL layer, without the need to modify the upper layer implementation on a large scale. The hardware abstraction layer is the transition from the application framework layer to the driver layer to achieve the compatibility of the underlying hardware. The driver layer controls the audio codec according to its characteristics, ensures that the audio codec can work normally, and provides the audio data obtained by the audio codec to the system layer. The hardware system includes a speaker and an audio codec. The speaker is used to play audio data to control the volume. The audio codec is used to analyze the format of the audio data, such as MP3 and WMA. It is responsible for the normal playback of the audio and not noise.

图1b为本发明实施例提供的一种智能手机的音频处理硬件系统结构示意图。音频处理电路一般处于主控电路板中,由于不同手机的设计不同,音频处理电路的具体位置也可能不同。智能手机的音频处理电路主要包括音频信号处理电路、基带信号处理电路、音频功率放大器、耳机信号放大器、听筒、扬声器、麦克风及耳机接口等。其中,音频信号处理电路是整个音频处理电路的核心。音频处理电路主要由接收音频电路、送话电路、耳机通话电路等组成,包括模拟音频的模拟/数字(A/D)转换、数字/模拟(A/D)转换、数字语音信号处理及模拟音频放大电路等。Fig. 1b is a schematic structural diagram of an audio processing hardware system of a smartphone provided by an embodiment of the present invention. The audio processing circuit is generally located in the main control circuit board. Due to the different designs of different mobile phones, the specific location of the audio processing circuit may also be different. The audio processing circuit of a smart phone mainly includes an audio signal processing circuit, a baseband signal processing circuit, an audio power amplifier, an earphone signal amplifier, an earpiece, a speaker, a microphone, and an earphone jack, etc. Among them, the audio signal processing circuit is the core of the entire audio processing circuit. The audio processing circuit is mainly composed of receiving audio circuit, sending circuit, earphone call circuit, etc., including analog/digital (A/D) conversion of analog audio, digital/analog (A/D) conversion, digital voice signal processing and analog audio amplifier circuit, etc.

在通话时,首先通话本地端麦克风把声音的机械声波信号转化为模拟音频信号,通过模拟音频放大电路进行放大,经内部的多模转换器进行A/D转换,得到数字音频信号;其次把此数字音频信号送到基带处理器,进行语音编码、信道编码等处理;再次进行加密、交织等一系列处理;最后送到基带处理器中的数字窄带制调模块进行调制,产生发射基带信号送入射频电路调制成发射中频,发送给通话对方。在接听电话时,首先从射频电路解调出接收基带信息,送到基带处理器内部进行数字窄带解调,分离出控制信号和语音信号;其次把语音信号进行解密、去交织、重组等一系列处理,然后进行信道解码、语音解码;最后得到纯正数字语音信号,送入语音信号处理器中的多模转换器进行D/A转换;还原成模拟音频信号后,经过音频功率放大后推动听筒发声。若选择免提受话,基带处理器则关闭听筒受话放大器,启动免提受话放大管(振铃放大管)工作,把音频信号功率放大后推动扬声器发声。During a call, the microphone at the local end of the call first converts the mechanical sound wave signal of the sound into an analog audio signal, amplifies it through an analog audio amplifier circuit, and performs A/D conversion through an internal multi-mode converter to obtain a digital audio signal; The digital audio signal is sent to the baseband processor for processing such as speech coding and channel coding; it is then processed again for encryption and interleaving; finally it is sent to the digital narrowband modulation module in the baseband processor for modulation to generate the baseband signal for transmission and send it to the The radio frequency circuit modulates to transmit the intermediate frequency and sends it to the other party. When answering the phone, first demodulate the received baseband information from the radio frequency circuit, send it to the baseband processor for digital narrowband demodulation, and separate the control signal and voice signal; secondly, decrypt, deinterleave, and recombine the voice signal. After processing, channel decoding and voice decoding are performed; finally the pure digital voice signal is obtained, which is sent to the multi-mode converter in the voice signal processor for D/A conversion; after being restored to an analog audio signal, the earpiece is pushed to make a sound after the audio power is amplified . If the hands-free receiver is selected, the baseband processor closes the earpiece receiver amplifier, starts the hands-free receiver amplifier tube (ringing amplifier tube) to work, amplifies the audio signal power and promotes the loudspeaker to sound.

在录音时,与上述过程类似,首先由麦克风把声音的机械声波信号转化为模拟音频信号,通过模拟音频放大电路进行放大,经过A/D转换后得到数字音频信号,按照预设的音频格式进行编码及存储。在播放录音或其他音频文件时,将音频文件进行解码得到数字音频信号,经过D/A换后还原成模拟音频信号,把音频信号功率放大后推动扬声器发声。When recording, similar to the above process, the mechanical sound wave signal of the sound is first converted into an analog audio signal by the microphone, amplified by an analog audio amplifier circuit, and a digital audio signal is obtained after A/D conversion, which is performed according to the preset audio format. encoding and storage. When playing recordings or other audio files, the audio files are decoded to obtain digital audio signals, which are restored to analog audio signals after D/A conversion, and the power of the audio signals is amplified to drive the speaker to produce sound.

本发明实施例中可预先在终端中存储预设音频文件,对该预设音频文件进行播放。预存音频文件以及预设音量等级可由设计人员根据实际情况进行选取,不同的声音播放器件对应的预设音频文件和/或预设音量等级可以不同,本发明实施例不做限定。麦克风采集的音频信号可以是上述的由机械声波信号转换而来的模拟音频信号,也可以是经过放大后的模拟音频信号,可根据两者的不同分别设置相应的下文中的预设条件,本发明实施例不作限定。为了方便终端与用户之间的交互,终端一般会向用户提供音量调节功能,用户可采用调节音量调节按钮或音量调节进度条等方式对终端播放声音的音量等级进行调整,而终端根据用户调整后的音量等级对需要播放的音频信号进行相应的放大处理,如功率放大,以满足用户的收听需求。不同的终端中对音量等级的划分策略可能不同,即具体的音量等级的总数量以及每个音量等级对应的音量大小都可能不同,本发明实施例不作限定。In the embodiment of the present invention, a preset audio file may be stored in the terminal in advance, and the preset audio file may be played. The pre-stored audio files and preset volume levels can be selected by the designer according to the actual situation, and the preset audio files and/or preset volume levels corresponding to different sound playback devices can be different, which is not limited in the embodiment of the present invention. The audio signal collected by the microphone can be the above-mentioned analog audio signal converted from the mechanical sound wave signal, or an amplified analog audio signal. The corresponding preset conditions below can be set according to the difference between the two. The embodiments of the invention are not limited. In order to facilitate the interaction between the terminal and the user, the terminal generally provides the user with a volume adjustment function. The user can adjust the volume level of the sound played by the terminal by adjusting the volume adjustment button or the volume adjustment progress bar. The volume level of the audio signal to be played is amplified accordingly, such as power amplification, to meet the listening needs of the user. Different terminals may have different strategies for dividing volume levels, that is, the total number of specific volume levels and the volume corresponding to each volume level may be different, which is not limited in this embodiment of the present invention.

图2给出了本发明实施例提供的一种移动终端的音量控制方法的流程图,本实施例的方法可以由移动终端的音量控制装置来执行,该装置可通过硬件和/或软件的方式实现,所述装置可作为移动终端一部分设置在所述移动终端的内部。Figure 2 shows a flow chart of a volume control method for a mobile terminal provided by an embodiment of the present invention. The method of this embodiment can be executed by a volume control device for a mobile terminal, and the device can be implemented by means of hardware and/or software. To achieve, the device can be set inside the mobile terminal as a part of the mobile terminal.

如图2所示,本实施例提供的移动终端的音量控制方法包括以下步骤:As shown in Figure 2, the volume control method of the mobile terminal provided by this embodiment includes the following steps:

步骤101、确定移动终端处于设定遮挡环境中。Step 101. Determine that the mobile terminal is in a set occlusion environment.

本发明实施例提供的移动终端包括但不限定于智能手机、笔记本或者平板电脑等设备。The mobile terminals provided by the embodiments of the present invention include but are not limited to devices such as smart phones, notebooks, or tablet computers.

在移动终端的使用过程,可能存在移动终端被其他物体遮挡的情况,例如手机移动终端放入了口袋或者被置于杂物中等。该步骤用于确定移动终端处于设定遮挡环境中。所述设定遮挡环境为预先设定的满足扬声器被遮挡条件的遮挡环境,如上述的放入了口袋或者被置于杂物中。During the use of the mobile terminal, the mobile terminal may be blocked by other objects, for example, the mobile terminal of the mobile phone is put in a pocket or placed in sundries. This step is used to determine that the mobile terminal is in a set occlusion environment. The set shielding environment is a preset shielding environment that satisfies the shielding condition of the loudspeaker, such as being put into a pocket or placed in sundries as mentioned above.

步骤102、获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体。Step 102. Obtain information on the degree of occlusion of an occluder, where the occluder is an object that blocks the mobile terminal in the set occlusion environment.

当移动终端所处的遮挡环境不同时,遮挡物对移动终端的遮挡程度不同。所述遮挡环境的决定因素包括遮挡物与移动终端的距离,遮挡物的材质和厚度等,也即遮挡程度和遮挡物与移动终端的距离,遮挡物的材质和厚度相关联。When the occlusion environment where the mobile terminal is located is different, the occlusion degree of the occluder to the mobile terminal is different. The determinants of the occlusion environment include the distance between the occluder and the mobile terminal, the material and thickness of the occluder, etc., that is, the degree of occlusion is related to the distance between the occluder and the mobile terminal, and the material and thickness of the occluder.

步骤103、根据所述遮挡程度信息调整音频播放音量。Step 103. Adjust the audio playback volume according to the occlusion degree information.

可根据遮挡物的遮挡程度信息来调整音频播放音量,该步骤可以包括:获取遮挡程度与音频播放音量的预设对应关系表,根据所述预设对应关系表确定与所述遮挡程度信息对应的音量调整值;将当前音频播放音量增加所述音量调整值,作为调整后的音频播放音量。在遮挡程度较大时则可根据预设对应关系表确定一个较大的音量调整值,在遮挡程度较小时则可根据预设对应关系表确定一个较小的音量调整值。The audio playback volume may be adjusted according to the occlusion degree information of the occluder, and this step may include: obtaining a preset correspondence table between the occlusion degree and the audio playback volume, and determining the corresponding to the occlusion degree information according to the preset correspondence table. Volume adjustment value; increase the current audio playback volume by the volume adjustment value as the adjusted audio playback volume. When the degree of occlusion is large, a larger volume adjustment value can be determined according to the preset correspondence table, and when the degree of occlusion is small, a smaller volume adjustment value can be determined according to the preset correspondence table.

其中,所述获取遮挡程度与音频播放音量的预设对应关系表,根据所述预设对应关系表确定与所述遮挡程度信息对应的音量调整值可以包括:确定移动终端的当前默认播放音量;获取遮挡程度与音频播放音量的预设对应关系表,根据所述当前默认播放音量和所述预设对应关系表确定与所述遮挡程度信息对应的音量调整值。在当前默认播放音量较小时,可确定一个相对较大的音量调整值,在当前默认播放音量较大时,则可确定一个相对较小的音量调整值。示例性的,遮挡程度A<遮挡程度B<遮挡程度C,最大播放音量为10,当前默认播放音量为2,则在遮挡程度为C时,可根据预设对应关系表确定音量调整值为4,即调整后的播放音量为6;而若当前播放音量为4,则在遮挡程度为C时,可根据预设对应关系表确定音量调整值为3,即调整后的播放音量为7;而若当前播放音量为2,则在遮挡程度为B时,可根据预设对应关系表确定音量调整值为3,即调整后的播放音量为5;而若当前播放音量为4,则在遮挡程度为B时,可根据预设对应关系表确定音量调整值为2,即调整后的播放音量为6。Wherein, the acquiring the preset correspondence table between the occlusion degree and the audio playback volume, and determining the volume adjustment value corresponding to the occlusion degree information according to the preset correspondence table may include: determining the current default playback volume of the mobile terminal; Acquiring a preset correspondence table between occlusion degree and audio playback volume, and determining a volume adjustment value corresponding to the occlusion degree information according to the current default playback volume and the preset correspondence table. When the current default playback volume is low, a relatively large volume adjustment value may be determined, and when the current default playback volume is high, a relatively small volume adjustment value may be determined. Exemplarily, if the degree of occlusion A<the degree of occlusion B<the degree of occlusion C, the maximum playback volume is 10, and the current default playback volume is 2, then when the occlusion degree is C, the volume adjustment value can be determined to be 4 according to the preset correspondence table , that is, the adjusted playback volume is 6; and if the current playback volume is 4, then when the degree of occlusion is C, the volume adjustment value can be determined to be 3 according to the preset correspondence table, that is, the adjusted playback volume is 7; and If the current playback volume is 2, then when the occlusion degree is B, the volume adjustment value can be determined to be 3 according to the preset correspondence table, that is, the adjusted playback volume is 5; and if the current playback volume is 4, the occlusion degree When it is B, the volume adjustment value can be determined to be 2 according to the preset correspondence table, that is, the adjusted playback volume is 6.

本实施例提供的移动终端的音量控制方法,通过确定移动终端处于设定遮挡环境中,获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体,根据所述遮挡程度信息调整音频播放音量,避免移动终端处于遮挡环境中时音频播放音量过小而导致用户错过电话或者信息等问题,可以在移动终端处于被遮挡的情况下根据遮挡程度合理的控制移动终端的播放音量。The volume control method of the mobile terminal provided in this embodiment obtains information on the degree of occlusion of an occluder by determining that the mobile terminal is in a set occlusion environment, and the occluder is an object that blocks the mobile terminal in the set occlusion environment , adjust the audio playback volume according to the occlusion degree information to avoid problems such as the audio playback volume being too low when the mobile terminal is in an occlusion environment and causing the user to miss calls or messages. Control the playback volume of the mobile terminal.

在上述实施例的基础上,可以是在检测到音频播放事件被触发时,确定移动终端处于设定遮挡环境中,也可以是定时检测移动终端所处的环境,并确定移动终端处于设定遮挡环境中。On the basis of the above embodiments, it may be determined that the mobile terminal is in a set occlusion environment when an audio playback event is detected, or it may be determined that the mobile terminal is in a set occlusion environment by periodically detecting the environment in which the mobile terminal is located. Environment.

图3给出了本发明实施例提供的另一种移动终端的音量控制法的流程图。如图3所示,本实施例提供的方法包括以下步骤:FIG. 3 shows a flow chart of another volume control method for a mobile terminal provided by an embodiment of the present invention. As shown in Figure 3, the method provided in this embodiment includes the following steps:

步骤201、通过移动终端的接近传感器获取所述移动终端与遮挡物的距离。Step 201. Acquire the distance between the mobile terminal and an obstruction through the proximity sensor of the mobile terminal.

其中,所述接近传感器与移动终端的扬声器的距离小于第一设定距离,这样设置的原因是:可以使移动终端将根据所述接近传感器获取的遮挡检测结果确定为所述扬声器的遮挡检测结果。所述第一设定距离可以为0cm-2cm,不包括0cm。一般移动终端的扬声器设置在移动终端的底部,则所述接近传感器可设置在移动终端底部靠近扬声器0cm-2cm的位置。Wherein, the distance between the proximity sensor and the speaker of the mobile terminal is less than the first set distance, the reason for this setting is that the mobile terminal can determine the occlusion detection result acquired according to the proximity sensor as the occlusion detection result of the speaker . The first set distance may be 0cm-2cm, excluding 0cm. Generally, the speaker of the mobile terminal is arranged at the bottom of the mobile terminal, and the proximity sensor can be arranged at the bottom of the mobile terminal at a position 0cm-2cm close to the speaker.

步骤202、通过移动终端的加速度传感器获取所述移动终端的运动状态。Step 202, acquire the motion state of the mobile terminal through the acceleration sensor of the mobile terminal.

所述运动状态可以包括静止状态和运动状态。The state of motion may include a state of rest and a state of motion.

步骤203、判断所述距离是否在第一设定范围内且所述运动状态是否为静止状态,若是,则执行步骤204,否则跳转执行步骤201或者步骤202。其中,所述第一设定范围为预先设定的一个距离范围,例如可以为0-0.5m。示例性的,移动终端与遮挡物贴合时,它们之间的距离为0m,在移动终端被放置于密封空间如抽屉里时,移动终端底部的接近传感器或者扬声器与抽屉的距离为5cm。Step 203 , judging whether the distance is within the first set range and whether the motion state is a static state, if yes, execute step 204 , otherwise skip to step 201 or step 202 . Wherein, the first setting range is a preset distance range, such as 0-0.5m. Exemplarily, when the mobile terminal is attached to the shield, the distance between them is 0m, and when the mobile terminal is placed in a sealed space such as a drawer, the distance between the proximity sensor or speaker at the bottom of the mobile terminal and the drawer is 5cm.

步骤204、确定所述移动终端处于设定遮挡环境中。Step 204, determining that the mobile terminal is in a set occlusion environment.

若用户正在使用移动终端,那么加速度传感器可以检测到移动终端处于运动状态,在移动终端处于运动状态下,即使接近传感器检测到移动终端与遮挡物的距离在第一设定范围内,也不确定为移动终端处于设定遮挡环境中。这样设置的原因是:避免音量的误调节,例如在用户接听电话的场景下,接近传感器靠近用户脸部与所述脸部这个遮挡物的距离在第一设定范围内,但移动终端其实并非处于设定遮挡环境中。而在移动终端被置于杂物中或者其他设定遮挡环境中时,移动终端是静止的。因此,通过加速度传感器获取移动终端的运动状态,在所述距离在第一设定范围内且处于运动状态时,才确定移动终端处于设定遮挡环境中。If the user is using the mobile terminal, the acceleration sensor can detect that the mobile terminal is in motion. When the mobile terminal is in motion, even if the proximity sensor detects that the distance between the mobile terminal and the obstruction is within the first set range, it is not sure. The mobile terminal is in a set occlusion environment. The reason for this setting is to avoid misadjustment of the volume. For example, in the scene where the user answers the phone, the distance between the proximity sensor close to the user's face and the occluder of the face is within the first set range, but the mobile terminal is not actually In a set occlusion environment. However, when the mobile terminal is placed in sundries or other set blocking environments, the mobile terminal is still. Therefore, the motion state of the mobile terminal is acquired through the acceleration sensor, and it is determined that the mobile terminal is in a set occlusion environment when the distance is within the first set range and in the motion state.

在利用与接近传感器结合加速度传感器确定移动终端与遮挡物的距离在第一设定范围内且移动终端的运动状态为静止状态时,可确定移动终端的接近传感器处于设定遮挡环境中,由于接近传感器在扬声器的附近,他们的距离小于第一设定距离,那么在接近传感器处于设定遮挡环境中时可确定扬声器也处于设定遮挡环境中。When the proximity sensor is combined with the acceleration sensor to determine that the distance between the mobile terminal and the occluder is within the first set range and the motion state of the mobile terminal is in a static state, it can be determined that the proximity sensor of the mobile terminal is in the set occlusion environment. The sensors are near the speaker, and the distance between them is less than the first set distance, then it can be determined that the speaker is also in the set occlusion environment when the proximity sensor is in the set occlusion environment.

步骤205、获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体。Step 205. Obtain information on the degree of occlusion of an occluder, where the occluder is an object that blocks the mobile terminal in the set occlusion environment.

步骤206、根据所述遮挡程度信息调整音频播放音量。Step 206. Adjust the audio playback volume according to the occlusion degree information.

其中,所述步骤201和步骤202的执行顺序可以调换。Wherein, the execution order of step 201 and step 202 can be exchanged.

本实施例提供的方法,通过移动终端的接近传感器获取移动终端与遮挡物的距离,通过移动终端的加速度传感器获取移动终端的运动状态,在检测到所述距离在第一设定范围内且所述运动状态为静止状态时,确定所述移动终端处于设定遮挡环境中,并根据遮挡物的遮挡程序信息调整音频播放音量,可以在移动终端处于被遮挡的情况下根据遮挡程度合理的控制移动终端的播放音量,并可以准确的确定移动终端处于设定遮挡环境中。In the method provided in this embodiment, the distance between the mobile terminal and the obstruction is obtained through the proximity sensor of the mobile terminal, and the motion state of the mobile terminal is obtained through the acceleration sensor of the mobile terminal. When it is detected that the distance is within the first set range and the When the moving state is a static state, it is determined that the mobile terminal is in a set occlusion environment, and the audio playback volume is adjusted according to the occlusion program information of the occlusion object, so that the movement can be reasonably controlled according to the occlusion degree when the mobile terminal is in the occlusion condition The playback volume of the terminal, and can accurately determine that the mobile terminal is in the set occlusion environment.

图4给出了本发明实施例提供的另一种移动终端的音量控制法的流程图。如图4所示,本实施例提供的方法包括以下步骤:FIG. 4 shows a flow chart of another volume control method for a mobile terminal provided by an embodiment of the present invention. As shown in Figure 4, the method provided in this embodiment includes the following steps:

步骤301、通过移动终端的接近传感器获取所述移动终端的遮挡物的距离。Step 301. Obtain the distance of the obstruction of the mobile terminal through the proximity sensor of the mobile terminal.

步骤302、通过移动终端的环境光传感器获取所述移动终端的环境光亮度。Step 302, acquire the ambient light brightness of the mobile terminal through the ambient light sensor of the mobile terminal.

其中,所述环境光传感器与移动终端的扬声器的距离小于第二设定距离,这样设置的原因是:可以使移动终端将根据所述环境光传感器获取的遮挡检测结果确定为所述扬声器的遮挡检测结果。所述第二设定距离可以为0cm-2cm,不包括0cm。一般移动终端的扬声器设置在移动终端的底部,则所述环境光感器可设置在移动终端底部靠近扬声器0cm-2cm的位置。Wherein, the distance between the ambient light sensor and the speaker of the mobile terminal is smaller than the second set distance, the reason for this setting is that the mobile terminal can determine the occlusion detection result obtained according to the ambient light sensor as the occlusion of the speaker Test results. The second set distance may be 0cm-2cm, excluding 0cm. Generally, the speaker of the mobile terminal is arranged at the bottom of the mobile terminal, so the ambient light sensor can be arranged at the bottom of the mobile terminal at a position of 0cm-2cm close to the speaker.

其中,所述获取移动终端的环境光亮度可以为获取设定时间段内的环境光亮度的平均值。这样设置的原因是:根据一段时间内的环境光亮度而非瞬时或者短时间内的环境光亮度来确定移动终端是否处于设定遮挡环境中,可以避免由于用户不小心遮挡造成环境光亮度满足小于设定光亮度而导致误判为移动终端处于设定遮挡环境中。Wherein, the obtaining the ambient light brightness of the mobile terminal may be obtaining an average value of the ambient light brightness within a set period of time. The reason for this setting is: to determine whether the mobile terminal is in the set occlusion environment according to the ambient light brightness for a period of time rather than the ambient light brightness for an instant or a short period of time, which can avoid the ambient light brightness meeting less than Setting the brightness leads to misjudgment that the mobile terminal is in the set blocking environment.

步骤303、判断所述距离是否在第二设定范围内且所述环境光亮度是否小于设定光亮度,若是,则执行步骤304,否则跳转执行步骤301或者步骤302。其中,所述第二设定范围为预先设定的一个距离范围,例如可以为0-0.5m。Step 303 , judging whether the distance is within the second set range and whether the ambient light brightness is lower than the set light brightness, if yes, execute step 304 , otherwise skip to step 301 or step 302 . Wherein, the second setting range is a preset distance range, such as 0-0.5m.

步骤304、确定所述移动终端处于设定遮挡环境中。Step 304, determining that the mobile terminal is in a set occlusion environment.

在所述距离在第二设定范围内且所述环境光亮度小于设定光亮度时,确定所述移动终端处于设定遮挡环境中。一般,在移动终端处于被遮挡情况下,环境光亮度是比较暗的,若设定时间段内的环境光亮度的平均值小于设定光亮度,且距离在第二设定范围内,则确定移动终端处于设定遮挡环境中。When the distance is within a second set range and the ambient light brightness is less than a set light brightness, it is determined that the mobile terminal is in a set blocking environment. Generally, when the mobile terminal is blocked, the ambient light brightness is relatively dark, if the average value of the ambient light brightness within the set time period is less than the set light brightness, and the distance is within the second set range, then determine The mobile terminal is in a set occlusion environment.

步骤305、获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体。Step 305. Obtain information on the degree of occlusion of the occluder, where the occluder is an object that blocks the mobile terminal in the set occlusion environment.

步骤306、根据所述遮挡程度信息调整音频播放音量。Step 306. Adjust the audio playback volume according to the occlusion degree information.

本实施例提供的方法,通过移动终端的接近传感器获取移动终端与遮挡物的距离,通过移动终端的环境光传感器获取移动终端的运动状态,在检测到所述距离在第二设定范围内且所述环境光亮度小于设定光亮度时,确定所述移动终端处于设定遮挡环境中,并根据遮挡物的遮挡程序信息调整音频播放音量,可以在移动终端处于被遮挡的情况下根据遮挡程度合理的控制移动终端的播放音量,并可以准确的确定移动终端处于设定遮挡环境中。In the method provided in this embodiment, the distance between the mobile terminal and the occluder is acquired through the proximity sensor of the mobile terminal, and the motion state of the mobile terminal is acquired through the ambient light sensor of the mobile terminal. When it is detected that the distance is within the second set range and When the ambient light brightness is less than the set light brightness, it is determined that the mobile terminal is in the set occlusion environment, and the audio playback volume is adjusted according to the occlusion program information of the occluder. Reasonably control the playback volume of the mobile terminal, and accurately determine that the mobile terminal is in a set occlusion environment.

图5给出了本发明实施例提供的另一种移动终端的音量控制方法的流程图。如图5所示,本实施例提供的移动终端的音量控制方法包括以下步骤:FIG. 5 shows a flow chart of another volume control method for a mobile terminal provided by an embodiment of the present invention. As shown in Figure 5, the volume control method of the mobile terminal provided by this embodiment includes the following steps:

步骤401、确定移动终端处于设定遮挡环境中。Step 401. Determine that the mobile terminal is in a set occlusion environment.

其中,确定移动终端处于设定遮挡环境中的方法可如上述实施例所提供的方式,具体实现细节可参见上述内容。Wherein, the method for determining that the mobile terminal is in a set occlusion environment may be as provided in the above-mentioned embodiments, and specific implementation details may refer to the above-mentioned contents.

步骤402、通过移动终端的超声波传感器发射器向遮挡物发射超声波。Step 402: Transmit ultrasonic waves to the barrier through the ultrasonic sensor transmitter of the mobile terminal.

其中,所述超声波发射器可设置在靠近扬声器的位置,例如若扬声器设置在移动终端的底部,所述超声波发射器可设置在移动终端底部靠近扬声器0-2cm(不包括0cm)的位置处。Wherein, the ultrasonic emitter can be arranged at a position close to the speaker, for example, if the speaker is arranged at the bottom of the mobile terminal, the ultrasonic emitter can be arranged at a position 0-2 cm (not including 0 cm) from the bottom of the mobile terminal close to the speaker.

步骤403、根据超声波传感器接收器接收到反射回来的超声波的强度,以及发射超声波与接收到反射回来的超声波的时间差,确定遮挡物的遮挡程度信息。Step 403 , according to the intensity of the reflected ultrasonic wave received by the ultrasonic sensor receiver, and the time difference between transmitting the ultrasonic wave and receiving the reflected ultrasonic wave, determine the blocking degree information of the obstruction.

其中,所述反射回来的超声波的强度越大,说明遮挡物的遮挡程度越小;所述时间差越长,那么表明遮挡物越不易穿透,比如遮挡物的厚度较大,那么说明遮挡程度越大。Wherein, the greater the intensity of the reflected ultrasonic waves, the smaller the blocking degree of the blocking object; the longer the time difference, it indicates that the blocking object is less likely to penetrate, for example, the thicker the blocking object, the greater the blocking degree. big.

在某种实施方式中,可以利用移动终端的扬声器作为超声波发射器向遮挡物发射超声波,以及利用移动终端的麦克风作为超声波接收器接收反射回来的超声波。In a certain implementation manner, the speaker of the mobile terminal may be used as an ultrasonic transmitter to emit ultrasonic waves to the barrier, and the microphone of the mobile terminal may be used as an ultrasonic receiver to receive the reflected ultrasonic waves.

步骤404、根据所述遮挡程度信息调整音频播放音量。Step 404. Adjust audio playback volume according to the occlusion degree information.

本实施例提供的方法,通过移动终端本身集成的超声波传感器来获取遮挡环境中遮挡物的遮挡程度信息,可以准确快速的根据遮挡程度调整音频播放音量。In the method provided by this embodiment, the ultrasonic sensor integrated in the mobile terminal itself acquires the occlusion degree information of the occlusion object in the occlusion environment, and can accurately and quickly adjust the audio playback volume according to the occlusion degree.

图6给出了本发明实施例提供的另一种移动终端的音量控制方法的流程图。如图6所示,本实施例提供的移动终端的音量控制方法包括以下步骤:FIG. 6 shows a flow chart of another volume control method for a mobile terminal provided by an embodiment of the present invention. As shown in FIG. 6, the volume control method of the mobile terminal provided in this embodiment includes the following steps:

步骤501、确定移动终端处于设定遮挡环境中。Step 501. Determine that the mobile terminal is in a set occlusion environment.

步骤502、判断遮挡物与移动终端的距离是否小于第二设定距离,若是,则执行步骤503,否则返回执行步骤502。Step 502 , judging whether the distance between the occluder and the mobile terminal is less than a second set distance, if yes, execute step 503 , otherwise return to execute step 502 .

步骤503、控制所述移动终端的振动马达产生设定频率的振动。Step 503, controlling the vibration motor of the mobile terminal to generate vibration at a set frequency.

在遮挡物与移动终端的距离小于第二设定距离时,可通过控制移动终端的马达产生振动来检测遮挡物的材质。其中,所述第二设定距离的取值范围可以为0cm-1cm。When the distance between the shield and the mobile terminal is less than the second set distance, the material of the shield can be detected by controlling the motor of the mobile terminal to generate vibration. Wherein, the value range of the second set distance may be 0cm-1cm.

步骤504、通过移动终端的加速度传感器获取所述振动产生的加速度采样值,和/或,通过移动终端的声音传感器获取所述振动产生的声音采样值。Step 504, acquire the acceleration sampling value generated by the vibration through the acceleration sensor of the mobile terminal, and/or acquire the sound sampling value generated by the vibration through the sound sensor of the mobile terminal.

其中,所述通过移动终端的加速度传感器获取所述振动产生的加速度采样值可以包括:设定加速度值采样时间,通过移动终端的加速度传感器获取所述加速度值采样时间内所述振动产生的加速度采样值。所述加速度值采样时间可设置为5秒钟。Wherein, the acquisition of the acceleration sampling value generated by the vibration through the acceleration sensor of the mobile terminal may include: setting the acceleration value sampling time, and acquiring the acceleration sampling value generated by the vibration within the acceleration value sampling time through the acceleration sensor of the mobile terminal value. The acceleration value sampling time can be set to 5 seconds.

所述通过移动终端的声音传感器获取所述振动产生的声音采样值可以包括:通过移动终端的声音传感器采集移动终端振动时与遮挡物碰撞产生的声音。所述声音传感器可以由移动终端的麦克风替代。The acquisition of the sound sampling value generated by the vibration through the sound sensor of the mobile terminal may include: collecting the sound generated by the mobile terminal colliding with an obstacle when the mobile terminal vibrates through the sound sensor of the mobile terminal. The sound sensor can be replaced by a microphone of the mobile terminal.

步骤505、根据所述加速度采样值和/或所述声音采样值,确定所述遮挡物的材质类型。Step 505: Determine the material type of the occluder according to the acceleration sampling value and/or the sound sampling value.

其中,所述根据所述加速度采样值,确定所述遮挡物的材质类型可以包括:对所述加速度采样值进行频谱分析,根据分析结果确定所述遮挡物的材质类型。所述对所述加速度采样值进行频谱分析可以包括:对所述加速度采样值进行快速傅氏变换,将时域采样值转化为频域采样值,进行频谱特性分析。根据分析结果可确定遮挡物所属介质材料的类型。Wherein, the determining the material type of the barrier according to the acceleration sampling value may include: performing frequency spectrum analysis on the acceleration sampling value, and determining the material type of the barrier according to the analysis result. The frequency spectrum analysis of the acceleration sampling value may include: performing fast Fourier transform on the acceleration sampling value, converting the time domain sampling value into a frequency domain sampling value, and performing spectrum characteristic analysis. According to the analysis results, the type of medium material to which the occluder belongs can be determined.

所述根据所述声音采样值,确定所述遮挡物的材质类型可以包括:对所述碰撞产生的声音进行声音频谱图分析,根据分析结果可确定遮挡物所属介质材料的类型。The determining the material type of the barrier according to the sound sampling value may include: analyzing the sound spectrum of the sound generated by the collision, and determining the type of the medium material of the barrier according to the analysis result.

另外,也可以先通过加速度传感器获取所述振动产生的加速度采样值,根据所述加速度采样值确定遮挡物所属介质材料的软硬程度,例如,通过对加速度采样值进行频谱分析,可确定遮挡物为木书桌、石头等硬材质或者衣物、包等软材质;然后再通过声音传感器获取所述振动产生的声音采样值,根据所述声音采样值对软硬程度相似的介质材料进行区分,例如,通过对声音频谱进行分析,可以确定遮挡物的材质具体为木书桌还是石头。In addition, the acceleration sampling value generated by the vibration can also be obtained first through the acceleration sensor, and the degree of softness and hardness of the medium material to which the obstruction belongs is determined according to the acceleration sampling value. For example, by performing frequency spectrum analysis on the acceleration sampling value, the obstruction can be determined. Hard materials such as wooden desks and stones, or soft materials such as clothing and bags; then the sound sampling value generated by the vibration is obtained through the sound sensor, and the medium materials with similar hardness and softness are distinguished according to the sound sampling value, for example, By analyzing the sound spectrum, it can be determined whether the material of the occluder is a wooden desk or a stone.

当遮挡物为衣物时产生的加速度频域分析图包络线与频率冲击响应比木质材质或者石头响应强烈。对于低频率阶段而言,可以发现,软介质材料上的频率值已经趋向于0,而硬介质材料的频率值却一直有非零值的存在。这样通过频率便可区分出衣物与木书桌、石头的区别;通过移动终端自带的声音传感器采集振动时的声音,并对该音频进行声音频谱图分析,可知,当遮挡物为石头材质时产生频率冲击响应比木质材质时的响应强烈,当声音振动频率大约为200Hz左右时,木质材质表面的音频振幅小于石头材质,因此便可以通过设置频率阈值来对木质材质以及石制材质进行区分。When the occluder is clothing, the envelope curve and frequency shock response of the acceleration frequency domain analysis diagram are stronger than those of wood or stone. For the low frequency stage, it can be found that the frequency value on the soft dielectric material tends to 0, while the frequency value on the hard dielectric material always has a non-zero value. In this way, the difference between clothes, wooden desks and stones can be distinguished through the frequency; the sound of vibration is collected through the sound sensor of the mobile terminal, and the sound spectrum analysis is performed on the audio. It can be known that when the obstruction is made of stone The frequency impact response is stronger than that of wooden materials. When the sound vibration frequency is about 200Hz, the audio amplitude on the surface of wooden materials is smaller than that of stone materials. Therefore, wood materials and stone materials can be distinguished by setting the frequency threshold.

步骤506、根据所述遮挡物的材质类型,确定所述遮挡物的遮挡程度信息。Step 506: Determine the occlusion degree information of the occluder according to the material type of the occluder.

示例性的,在所述遮挡物的材质为石头时可确定遮挡物的遮挡程度为a,在所述遮挡物的材质为木书桌时可确定遮挡物的遮挡程度为b,在所述遮挡物的材质为衣物时可确定遮挡物的遮挡程度为c,其中,所述遮挡程度a>遮挡程度b>遮挡程度c。Exemplarily, when the material of the occluder is stone, the degree of occlusion of the occluder can be determined to be a; when the material of the occluder is a wooden desk, the degree of occlusion of the occluder can be determined to be b; When the material is clothing, the occlusion degree of the occlusion object can be determined as c, wherein the occlusion degree a>occlusion degree b>occlusion degree c.

步骤507、根据所述遮挡程度信息调整音频播放音量。Step 507. Adjust the audio playback volume according to the occlusion degree information.

示例性的,根据遮挡程度a可确定音量调整值为a`,根据遮挡程度b可确定音量调整值为b`,根据遮挡程度c可确定音量调整值为c`,其中,音量调整值a`>音量调整值b`>音量调整值c`。Exemplarily, the volume adjustment value a' can be determined according to the occlusion degree a', the volume adjustment value b' can be determined according to the occlusion degree b, and the volume adjustment value c' can be determined according to the occlusion degree c', wherein the volume adjustment value a' > volume adjustment value b` > volume adjustment value c`.

本实施例提供的方法,通过确定移动终端处于设定遮挡环境中后,在遮挡物与移动终端的距离小于第二设定距离时,控制移动终端的振动马达产生设定频率的振动,通过加速度传感器获取所述振动产生的加速度采样值和/或通过声音传感器获取所述振动产生的声音采样值,根据所述加速度采样值和/或所述声音采样值,确定所述遮挡物的材质类型,根据所述遮挡物的材质类型,确定所述遮挡物的遮挡程度信息,根据所述遮挡程度信息调整音频播放音量,可以准确的获取遮挡物所属的材质进而确定遮挡物的遮挡程度信息,根据遮挡程度信息合理的控制移动终端的播放音量。In the method provided in this embodiment, after determining that the mobile terminal is in a set occlusion environment, when the distance between the occluder and the mobile terminal is less than the second set distance, the vibration motor of the mobile terminal is controlled to generate vibration at a set frequency, and the acceleration The sensor acquires the acceleration sampling value generated by the vibration and/or the sound sensor acquires the sound sampling value generated by the vibration, and according to the acceleration sampling value and/or the sound sampling value, the material type of the barrier is determined, According to the material type of the occluder, determine the occlusion degree information of the occluder, adjust the audio playback volume according to the occlusion degree information, can accurately obtain the material to which the occluder belongs and then determine the occlusion degree information of the occluder, according to the occlusion The level information reasonably controls the playback volume of the mobile terminal.

图7给出了本发明实施例提供的另一种移动终端的音量控制方法的流程图。如图7所示,本实施例提供的移动终端的音量控制方法包括以下步骤:FIG. 7 shows a flow chart of another volume control method for a mobile terminal provided by an embodiment of the present invention. As shown in FIG. 7, the volume control method of the mobile terminal provided in this embodiment includes the following steps:

步骤601、通过移动终端的接近传感器获取所述移动终端与遮挡物的距离。Step 601. Obtain the distance between the mobile terminal and the obstruction through the proximity sensor of the mobile terminal.

步骤602、通过移动终端的加速度传感器获取所述移动终端的运动状态。Step 602, acquire the motion state of the mobile terminal through the acceleration sensor of the mobile terminal.

步骤603、判断所述距离是否在第一设定范围内且所述运动状态是否为静止状态,若是,则执行步骤604,否则跳转执行步骤601或者步骤602。Step 603 , judging whether the distance is within the first set range and whether the motion state is a static state, if yes, execute step 604 , otherwise skip to step 601 or step 602 .

步骤604、确定所述移动终端处于设定遮挡环境中。Step 604. Determine that the mobile terminal is in a set occlusion environment.

步骤605、通过移动终端的超声波传感器发射器向遮挡物发射超声波。Step 605: Transmit ultrasonic waves to the barrier through the ultrasonic sensor transmitter of the mobile terminal.

步骤606、根据超声波传感器接收器接收到反射回来的超声波的强度,以及发射超声波与接收到反射回来的超声波的时间差,确定遮挡物的遮挡程度信息。Step 606 , according to the intensity of the reflected ultrasonic wave received by the ultrasonic sensor receiver, and the time difference between transmitting the ultrasonic wave and receiving the reflected ultrasonic wave, determine the blocking degree information of the obstruction.

步骤607、根据所述遮挡程度信息调整音频播放音量。Step 607. Adjust audio playback volume according to the occlusion degree information.

本实施例提供的方法,通过在利用接近传感器获取的移动终端与遮挡物的距离在第一设定范围内且利用加速度传感器获取的移动终端的运动状态为静止状态时,确定移动终端处于设定遮挡环境中,利用移动终端的超声波传感器获取遮挡物的遮挡程度信息,根据所述遮挡程度信息调整音频播放音量,可以在移动终端处于被遮挡的情况下根据遮挡程度合理的控制移动终端的播放音量。The method provided in this embodiment determines that the mobile terminal is in the set state when the distance between the mobile terminal and the obstruction obtained by the proximity sensor is within the first set range and the motion state of the mobile terminal obtained by the acceleration sensor is in a static state. In an occlusion environment, use the ultrasonic sensor of the mobile terminal to obtain the occlusion degree information of the occlusion object, adjust the audio playback volume according to the occlusion degree information, and reasonably control the playback volume of the mobile terminal according to the occlusion degree when the mobile terminal is blocked .

图8为本发明实施例提供的一种移动终端的音量控制装置的结构示意图,该装置可由软件和/或硬件实现,集成在移动终端中。如图8所示,该装置包括遮挡环境确定模块71、遮挡程度信息获取模块72和音频播放音量调整模块73。FIG. 8 is a schematic structural diagram of a volume control device for a mobile terminal provided by an embodiment of the present invention. The device can be implemented by software and/or hardware and integrated in the mobile terminal. As shown in FIG. 8 , the device includes an occlusion environment determination module 71 , an occlusion degree information acquisition module 72 and an audio playback volume adjustment module 73 .

所述遮挡环境确定模块71,用于确定移动终端处于设定遮挡环境中;The occlusion environment determination module 71 is used to determine that the mobile terminal is in a set occlusion environment;

所述遮挡程度信息获取模块72,用于获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体;The occlusion degree information acquisition module 72 is configured to acquire occlusion degree information of an occluder, where the occluder is an object that blocks the mobile terminal in the set occlusion environment;

所述音频播放音量调整模块73,用于根据所述遮挡程度信息调整音频播放音量。The audio playback volume adjustment module 73 is configured to adjust the audio playback volume according to the occlusion degree information.

本实施例提供的装置,通过确定移动终端处于设定遮挡环境中,获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体,根据所述遮挡程度信息调整音频播放音量,可以在移动终端处于被遮挡的情况下合理的根据遮挡程度控制移动终端的播放音量。The device provided in this embodiment obtains information on the degree of occlusion of an occluder by determining that the mobile terminal is in a set occlusion environment. The occluder is an object that blocks the mobile terminal in the set occlusion environment. According to the occlusion The degree information adjusts the audio playback volume, and the playback volume of the mobile terminal can be reasonably controlled according to the degree of occlusion when the mobile terminal is blocked.

在上述实施例的基础上,所述遮挡环境确定模块具体用于:On the basis of the above embodiments, the occlusion environment determination module is specifically used for:

通过移动终端的接近传感器获取所述移动终端与遮挡物的距离;Obtaining the distance between the mobile terminal and the occluder through the proximity sensor of the mobile terminal;

通过移动终端的加速度传感器获取所述移动终端的运动状态;Obtaining the motion state of the mobile terminal through an acceleration sensor of the mobile terminal;

根据所述距离和所述运动状态,确定所述移动终端处于设定遮挡环境中。According to the distance and the motion state, it is determined that the mobile terminal is in a set occlusion environment.

在上述实施例的基础上,所述遮挡环境确定模块根据所述距离和所述运动状态,确定移动终端处于设定遮挡环境中包括:On the basis of the above embodiments, the occlusion environment determination module determines that the mobile terminal is in a set occlusion environment according to the distance and the motion state includes:

在检测到所述距离在设定范围内且所述运动状态为静止状态时,确定所述移动终端处于设定遮挡环境中。When it is detected that the distance is within a set range and the motion state is a static state, it is determined that the mobile terminal is in a set occlusion environment.

在上述实施例的基础上,所述遮挡程度信息获取模块获取遮挡物的遮挡程度信息包括:On the basis of the above-mentioned embodiments, the acquisition module of the occlusion degree information acquiring the occlusion degree information of the occluder includes:

通过移动终端的超声波传感器发射器向遮挡物发射超声波;Transmit ultrasonic waves to the obstruction through the ultrasonic sensor transmitter of the mobile terminal;

根据超声波传感器接收器接收到反射回来的超声波的强度,以及发射超声波与接收到反射回来的超声波的时间差,确定遮挡物的遮挡程度信息。According to the intensity of the reflected ultrasonic waves received by the receiver of the ultrasonic sensor, and the time difference between transmitting the ultrasonic waves and receiving the reflected ultrasonic waves, the blocking degree information of the obstruction is determined.

在上述实施例的基础上,所述接近传感器与移动终端的扬声器的距离小于第一设定距离,以使移动终端将所述接近传感器的遮挡检测结果确定为所述扬声器的遮挡检测结果。On the basis of the above embodiments, the distance between the proximity sensor and the speaker of the mobile terminal is smaller than a first set distance, so that the mobile terminal determines the occlusion detection result of the proximity sensor as the occlusion detection result of the speaker.

在上述实施例的基础上,所述遮挡程度信息获取模块具体用于:On the basis of the above embodiments, the occlusion degree information acquisition module is specifically used for:

在所述遮挡物与移动终端的距离小于第二设定距离时,控制所述移动终端的振动马达产生设定频率的振动;When the distance between the shield and the mobile terminal is less than a second set distance, controlling the vibration motor of the mobile terminal to generate vibration at a set frequency;

通过移动终端的加速度传感器获取所述振动产生的加速度采样值,和/或,通过移动终端的声音传感器获取所述振动产生的声音采样值;Obtain the acceleration sampling value generated by the vibration through the acceleration sensor of the mobile terminal, and/or obtain the sound sampling value generated by the vibration through the sound sensor of the mobile terminal;

根据所述加速度采样值和/或所述声音采样值,确定所述遮挡物的材质类型;determining the material type of the occluder according to the acceleration sampling value and/or the sound sampling value;

根据所述遮挡物的材质类型,确定所述遮挡物的遮挡程度信息。Determine the occlusion degree information of the occluder according to the material type of the occluder.

在上述实施例的基础上,所述音频播放音量调整模块具体用于:On the basis of the foregoing embodiments, the audio playback volume adjustment module is specifically used for:

获取遮挡程度与音频播放音量的预设对应关系表,根据所述预设对应关系表确定与所述遮挡程度信息对应的音量调整值;Acquiring a preset correspondence table between occlusion degree and audio playback volume, and determining a volume adjustment value corresponding to the occlusion degree information according to the preset correspondence table;

将当前音频播放音量增加所述音量调整值,作为调整后的音频播放音量。The current audio playback volume is increased by the volume adjustment value as the adjusted audio playback volume.

本发明实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种移动终端的音量控制方法,该方法包括:An embodiment of the present invention also provides a storage medium containing computer-executable instructions, the computer-executable instructions are used to execute a volume control method of a mobile terminal when executed by a computer processor, the method comprising:

确定移动终端处于设定遮挡环境中;Determine that the mobile terminal is in a set occlusion environment;

获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体;Obtaining occlusion degree information of an occluder, where the occluder is an object that occludes the mobile terminal in the set occlusion environment;

根据所述遮挡程度信息调整音频播放音量。Adjust audio playback volume according to the occlusion degree information.

存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDR RAM、SRAM、EDO RAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media such as CD-ROMs, floppy disks or tape drives; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc. ; non-volatile memory, such as flash memory, magnetic media (eg hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. Also, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network such as the Internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems connected by a network. The storage medium may store program instructions (eg embodied as computer programs) executable by one or more processors.

当然,本发明实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的音量控制操作,还可以执行本发明任意实施例所提供的移动终端的音量控制方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided by an embodiment of the present invention, the computer-executable instructions are not limited to the above-mentioned volume control operation, and can also perform the volume control operation of the mobile terminal provided by any embodiment of the present invention. Related operations in the control method.

本发明实施例提供了一种移动终端,该移动终端可以包括本发明任意实施例提供的移动终端的音量控制装置。图9为本发明实施例提供的一种移动终端的结构示意图,如图9所示,该移动终端可以包括:接近传感器,用于采集移动终端与遮挡物的距离;加速度传感器,用于采集移动终端的运动状态;和/或,环境光传感器,用于采集移动终端的环境光亮度;存储器801、中央处理器(Central Processing Unit,CPU)802(又称处理器,以下简称CPU)、所述存储器801,用于存储可执行程序代码;所述处理器802通过读取所述存储器801中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行:根据所述距离和所述运动状态,和/或,所述距离和所述环境光亮度,确定所述移动终端处于设定遮挡环境中;获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体;根据所述遮挡程度信息调整音频播放音量。An embodiment of the present invention provides a mobile terminal, and the mobile terminal may include the mobile terminal volume control device provided in any embodiment of the present invention. Fig. 9 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present invention. As shown in Fig. 9, the mobile terminal may include: a proximity sensor for collecting the distance between the mobile terminal and an obstacle; an acceleration sensor for collecting the distance between the mobile terminal The motion state of the terminal; and/or, an ambient light sensor for collecting ambient light brightness of the mobile terminal; a memory 801, a central processing unit (Central Processing Unit, CPU) 802 (also known as a processor, hereinafter referred to as CPU), the The memory 801 is configured to store executable program codes; the processor 802 executes a program corresponding to the executable program codes by reading the executable program codes stored in the memory 801, so as to execute: according to the The distance and the motion state, and/or, the distance and the brightness of the ambient light, determine that the mobile terminal is in a set occlusion environment; obtain the occlusion degree information of the occlusion, and the occlusion is the set An object blocking the mobile terminal in a fixed blocking environment; adjusting the audio playback volume according to the blocking degree information.

所述移动终端还可以包括:超声波传感器发射器,用于向遮挡物发射超声波;超声波传感器接收器,用于接收反射回来的超声波;所述处理器,还用于根据所述反射回来的超声波的强度,以及发射超声波与接收到反射回来的超声波的时间差,确定遮挡物的遮挡程度信息。The mobile terminal may further include: an ultrasonic sensor transmitter, configured to transmit ultrasonic waves to an obstruction; an ultrasonic sensor receiver, configured to receive reflected ultrasonic waves; Intensity, as well as the time difference between the transmitted ultrasonic wave and the received reflected ultrasonic wave, determine the occlusion degree information of the occluder.

所述移动终端还包括:振动马达,用于在所述遮挡物与移动终端的距离小于第三设定距离时,产生设定频率的振动;声音传感器,用于采集所述振动产生的声音采样值;所述加速度传感器,还用于采集所述振动产生的加速度采样值;所述处理器,还用于获取所述加速度采样值和/或所述声音采样值;根据所述加速度采样值和/或所述声音采样值,确定所述遮挡物的材质类型;根据所述遮挡物的材质类型,确定所述遮挡物的遮挡程度信息。The mobile terminal also includes: a vibration motor, used to generate vibration at a set frequency when the distance between the shield and the mobile terminal is less than a third set distance; a sound sensor, used to collect sound samples generated by the vibration value; the acceleration sensor is also used to collect the acceleration sampling value generated by the vibration; the processor is also used to obtain the acceleration sampling value and/or the sound sampling value; according to the acceleration sampling value and /or the sound sampling value, determine the material type of the occluder; determine the occlusion degree information of the occluder according to the material type of the occluder.

所述移动终端还包括:外设接口803、RF(Radio Frequency,射频)电路805、音频电路806、扬声器811、电源管理芯片808、输入/输出(I/O)子系统809、触摸屏812、其他输入/控制设备810以及外部端口804,这些部件通过一个或多个通信总线或信号线807来通信。The mobile terminal also includes: peripheral interface 803, RF (Radio Frequency, radio frequency) circuit 805, audio circuit 806, speaker 811, power management chip 808, input/output (I/O) subsystem 809, touch screen 812, other Input/control devices 810 and external ports 804 , these components communicate via one or more communication buses or signal lines 807 .

应该理解的是,图示移动终端800仅仅是移动终端的一个范例,并且移动终端800可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated mobile terminal 800 is only an example of a mobile terminal, and the mobile terminal 800 may have more or fewer components than those shown in the figure, and two or more components may be combined, Or can have a different component configuration. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.

下面就本实施例提供的用于控制音量的移动终端进行详细的描述,该移动终端以手机为例。The mobile terminal for volume control provided in this embodiment will be described in detail below, and the mobile terminal is a mobile phone as an example.

存储器801,所述存储器801可以被CPU802、外设接口803等访问,所述存储器801可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Memory 801, the memory 801 can be accessed by the CPU 802, the peripheral interface 803, etc., the memory 801 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more disk storage devices, flash memory devices , or other volatile solid-state storage devices.

外设接口803,所述外设接口803可以将设备的输入和输出外设连接到CPU502和存储器801。Peripheral interface 803 , which can connect the input and output peripherals of the device to CPU 502 and memory 801 .

I/O子系统809,所述I/O子系统809可以将设备上的输入输出外设,例如触摸屏812和其他输入/控制设备810,连接到外设接口803。I/O子系统809可以包括显示控制器8091和用于控制其他输入/控制设备810的一个或多个输入控制器8092。其中,一个或多个输入控制器8092从其他输入/控制设备810接收电信号或者向其他输入/控制设备810发送电信号,其他输入/控制设备810可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器8092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。The I/O subsystem 809 , the I/O subsystem 809 can connect input and output peripherals on the device, such as a touch screen 812 and other input/control devices 810 , to the peripheral interface 803 . I/O subsystem 809 may include a display controller 8091 and one or more input controllers 8092 for controlling other input/control devices 810 . Among them, one or more input controllers 8092 receive electrical signals from or send electrical signals to other input/control devices 810, which may include physical buttons (push buttons, rocker buttons, etc.) ), dials, slide switches, joysticks, click wheels. It is worth noting that the input controller 8092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.

触摸屏812,所述触摸屏812是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。A touch screen 812. The touch screen 812 is an input interface and an output interface between the user terminal and the user, and displays visual output to the user. The visual output may include graphics, text, icons, videos, and the like.

I/O子系统809中的显示控制器8091从触摸屏812接收电信号或者向触摸屏812发送电信号。触摸屏812检测触摸屏上的接触,显示控制器8091将检测到的接触转换为与显示在触摸屏812上的用户界面对象的交互,即实现人机交互,显示在触摸屏812上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。The display controller 8091 in the I/O subsystem 809 receives electrical signals from the touch screen 812 or sends electrical signals to the touch screen 812 . The touch screen 812 detects the contact on the touch screen, and the display controller 8091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 812, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 812 can be a running Icons for games, icons for networking to appropriate networks, etc. It is worth noting that the device may also include an optical mouse, which is a touch-sensitive surface that does not display visual output, or that is an extension of a touch-sensitive surface formed by a touch screen.

RF电路805,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路805接收并发送RF信号,RF信号也称为电磁信号,RF电路805将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路805可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 805 is mainly used to establish communication between the mobile phone and the wireless network (that is, the network side), and realize data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. Specifically, the RF circuit 805 receives and sends RF signals, which are also called electromagnetic signals, and the RF circuit 805 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with communication networks and other devices through the electromagnetic signals to communicate. RF circuitry 805 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC ( COder-DECoder, Codec) Chipset, Subscriber Identity Module (Subscriber Identity Module, SIM) and so on.

音频电路806,主要用于从外设接口803接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器811。The audio circuit 806 is mainly used to receive audio data from the peripheral interface 803 , convert the audio data into electrical signals, and send the electrical signals to the speaker 811 .

扬声器811,用于将手机通过RF电路805从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 811 is used to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 805 into sound and play the sound to the user.

电源管理芯片808,用于为CPU802、I/O子系统及外设接口803所连接的硬件进行供电及电源管理。The power management chip 808 is used for power supply and power management for the hardware connected to the CPU 802 , the I/O subsystem and the peripheral interface 803 .

上述移动终端可执行本发明任意实施例所提供的方法,具备执行方法相应的功能模块,本发明实施例提供的移动终端,通过确定移动终端处于设定遮挡环境中,获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体,根据所述遮挡程度信息调整音频播放音量,可以在移动终端处于被遮挡的情况下合理的根据遮挡程度控制移动终端的播放音量。The above-mentioned mobile terminal can execute the method provided by any embodiment of the present invention, and has a corresponding functional module for executing the method. The mobile terminal provided by the embodiment of the present invention obtains the occlusion degree information of the occlusion by determining that the mobile terminal is in a set occlusion environment , the occluder is an object that occludes the mobile terminal in the set occlusion environment, the audio playback volume is adjusted according to the occlusion degree information, and the mobile terminal can be reasonably controlled according to the occlusion degree when the mobile terminal is blocked playback volume.

上述仅为本发明的较佳实施例及所运用的技术原理。本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行的各种明显变化、重新调整及替代均不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由权利要求的范围决定。The foregoing are only preferred embodiments of the present invention and the applied technical principles. The present invention is not limited to the specific embodiments described here, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not depart from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention, and the present invention The scope is determined by the scope of the claims.

Claims (14)

  1. A kind of 1. method for controlling volume of mobile terminal, it is characterised in that including:
    Determine that mobile terminal is in setting and blocked in environment;
    The coverage extent information of shelter is obtained, the shelter blocks for the setting and the mobile terminal is blocked in environment Object;
    Audio broadcast sound volume is adjusted according to the coverage extent information.
  2. 2. according to the method for claim 1, it is characterised in that the determination mobile terminal, which is in setting and blocked in environment, to be wrapped Include:
    The distance of the mobile terminal and shelter is obtained by the proximity transducer of mobile terminal;
    The motion state of the mobile terminal is obtained by the acceleration transducer of mobile terminal;
    If the distance is detected in the first setting range and the motion state is inactive state, it is determined that described mobile whole Blocked in setting in environment at end.
  3. 3. according to the method for claim 1, it is characterised in that the determination mobile terminal, which is in setting and blocked in environment, to be wrapped Include:
    The distance of the shelter of the mobile terminal is obtained by the proximity transducer of mobile terminal;
    The environmental light brightness of the mobile terminal is obtained by the ambient light sensor of mobile terminal;
    If the distance is detected in the second setting range and the environmental light brightness is less than setting brightness, it is determined that described Mobile terminal is in setting and blocked in environment.
  4. 4. according to the method for claim 1, it is characterised in that the coverage extent information for obtaining shelter includes:
    Ultrasonic wave is launched to shelter by the ultrasonic sensor transmitter of mobile terminal;
    The intensity of the ultrasonic wave reflected, and transmitting ultrasonic wave are received according to ultrasonic sensor receiver with receiving The time difference of the ultrasonic wave reflected, determine the coverage extent information of shelter.
  5. 5. according to the method for claim 2, it is characterised in that the loudspeaker of the proximity transducer and mobile terminal away from From less than the first setpoint distance, so that the occlusion detection result obtained according to the proximity transducer is defined as institute by mobile terminal State the occlusion detection result of loudspeaker.
  6. 6. according to the method for claim 3, it is characterised in that the loudspeaker of the ambient light sensor and mobile terminal Distance is less than the second setpoint distance, so that mobile terminal determines the occlusion detection result obtained according to the ambient light sensor For the occlusion detection result of the loudspeaker.
  7. 7. according to the method for claim 1, it is characterised in that the coverage extent information for obtaining shelter includes:
    When the distance of the shelter and mobile terminal is less than three setpoint distances, the vibrating motor of the mobile terminal is controlled Produce the vibration of setpoint frequency;
    Acceleration sampled value caused by the vibration is obtained by the acceleration transducer of mobile terminal, and/or, by mobile whole The sound transducer at end obtains sampled voice value caused by the vibration;
    According to the acceleration sampled value and/or the sampled voice value, the material type of the shelter is determined;
    According to the material type of the shelter, the coverage extent information of the shelter is determined.
  8. 8. according to the method described in claim any one of 1-7, it is characterised in that described to be adjusted according to the coverage extent information Audio broadcast sound volume includes:
    The default mapping table of coverage extent and audio broadcast sound volume is obtained, according to the default mapping table determination and institute State volume adjustment value corresponding to coverage extent information;
    Present video broadcast sound volume is increased into the volume adjustment value, as the audio broadcast sound volume after adjustment.
  9. A kind of 9. sound volume control device of mobile terminal, it is characterised in that including:
    Environment determination module is blocked, is blocked for determining that mobile terminal is in setting in environment;
    Coverage extent data obtaining module, for obtaining the coverage extent information of shelter, the shelter hides for the setting The object of the mobile terminal is blocked in baffle ring border;
    Audio broadcast sound volume adjusting module, for adjusting audio broadcast sound volume according to the coverage extent information.
  10. 10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor The method for controlling volume of the mobile terminal as described in any in claim 1-8 is realized during execution.
  11. 11. a kind of mobile terminal, including memory, processor and storage are on a memory and the calculating that can run on a processor Machine program, it is characterised in that realized described in the computing device during computer program as described in any in claim 1-8 The method for controlling volume of mobile terminal.
  12. A kind of 12. mobile terminal, it is characterised in that including:
    Proximity transducer, for gathering the distance of mobile terminal and shelter;
    Acceleration transducer, for gathering the motion state of mobile terminal;And/or ambient light sensor, it is mobile whole for gathering The environmental light brightness at end;
    Memory, for storing the distance and the motion state, and/or, the distance and the environmental light brightness;
    Processor, for according to the distance and the motion state, and/or, the distance and the environmental light brightness, it is determined that The mobile terminal is in setting and blocked in environment;The coverage extent information of shelter is obtained, the shelter is the setting Block the object that the mobile terminal is blocked in environment;Audio broadcast sound volume is adjusted according to the coverage extent information.
  13. 13. mobile terminal according to claim 12, it is characterised in that also include:
    Ultrasonic sensor transmitter, for launching ultrasonic wave to shelter;
    Ultrasonic sensor receiver, for receiving the ultrasonic wave reflected;
    The processor, the intensity of ultrasonic wave reflected according to, and transmitting ultrasonic wave are additionally operable to receiving instead The time difference of the ultrasonic wave come is emitted back towards, determines the coverage extent information of shelter.
  14. 14. mobile terminal according to claim 12, it is characterised in that also include:
    Vibrating motor, for when the distance of the shelter and mobile terminal is less than three setpoint distances, producing setpoint frequency Vibration;
    Sound transducer, for gathering sampled voice value caused by the vibration;
    The acceleration transducer, it is additionally operable to gather acceleration sampled value caused by the vibration;
    The processor, it is additionally operable to obtain the acceleration sampled value and/or the sampled voice value;Adopted according to the acceleration Sample value and/or the sampled voice value, determine the material type of the shelter;According to the material type of the shelter, really The coverage extent information of the fixed shelter.
CN201710710678.2A 2017-08-18 2017-08-18 Volume control method and device of mobile terminal, storage medium and mobile terminal Expired - Fee Related CN107506167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710710678.2A CN107506167B (en) 2017-08-18 2017-08-18 Volume control method and device of mobile terminal, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710710678.2A CN107506167B (en) 2017-08-18 2017-08-18 Volume control method and device of mobile terminal, storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN107506167A true CN107506167A (en) 2017-12-22
CN107506167B CN107506167B (en) 2020-06-30

Family

ID=60692062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710710678.2A Expired - Fee Related CN107506167B (en) 2017-08-18 2017-08-18 Volume control method and device of mobile terminal, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN107506167B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650585A (en) * 2018-06-01 2018-10-12 联想(北京)有限公司 A kind of method of adjustment and electronic equipment
CN108958699A (en) * 2018-07-24 2018-12-07 Oppo(重庆)智能科技有限公司 Voice pick-up method and Related product
CN109547590A (en) * 2018-10-15 2019-03-29 华为技术有限公司 The sound adjusting method of shell structure, mobile terminal and mobile terminal
CN110113068A (en) * 2019-04-29 2019-08-09 努比亚技术有限公司 The outer laying mechanism of sound, method, apparatus and computer readable storage medium
CN110392298A (en) * 2018-04-23 2019-10-29 腾讯科技(深圳)有限公司 A kind of volume adjusting method, device, equipment and medium
CN111225319A (en) * 2018-11-23 2020-06-02 广达电脑股份有限公司 Speaker system and speaker control method using the same
CN111327754A (en) * 2018-12-13 2020-06-23 青岛海尔多媒体有限公司 Equipment sound optimization method and mobile terminal
CN111327749A (en) * 2020-02-28 2020-06-23 维沃移动通信有限公司 A volume control method and electronic device
CN117998008A (en) * 2022-10-28 2024-05-07 荣耀终端有限公司 Method for adjusting call sound, electronic device and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080119175A1 (en) * 2006-06-19 2008-05-22 Samsung Electronics Co., Ltd. Apparatus and method for setting terminal state in portable communication terminal
CN102638612A (en) * 2012-02-23 2012-08-15 华为终端有限公司 Method and device for ending conversation
CN103137099A (en) * 2011-11-28 2013-06-05 联想(北京)有限公司 Screen luminance adjustment method and electronic device based on ambient light detecting sensor
US20150010169A1 (en) * 2012-01-30 2015-01-08 Echostar Ukraine Llc Apparatus, systems and methods for adjusting output audio volume based on user location
CN105100408A (en) * 2015-05-26 2015-11-25 努比亚技术有限公司 Method and device for controlling a mobile terminal
CN105204620A (en) * 2015-08-25 2015-12-30 厦门美图移动科技有限公司 Method and device for regulating screen brightness and mobile terminal
CN105572587A (en) * 2015-12-08 2016-05-11 惠州Tcl移动通信有限公司 Mobile terminal motor automatic detection method and system
CN106231103A (en) * 2016-08-03 2016-12-14 Tcl通讯(宁波)有限公司 A kind of method and system realizing volume and brightness regulation based on Proximity Sensor
CN106331371A (en) * 2016-09-14 2017-01-11 维沃移动通信有限公司 Volume adjustment method and mobile terminal
CN106486127A (en) * 2015-08-25 2017-03-08 中兴通讯股份有限公司 A kind of method of speech recognition parameter adjust automatically, device and mobile terminal
CN106850966A (en) * 2016-12-28 2017-06-13 努比亚技术有限公司 A kind of method for realizing volume control, device and mobile terminal
CN106911873A (en) * 2017-01-20 2017-06-30 奇酷互联网络科技(深圳)有限公司 Optimize method, device and the mobile terminal of motor

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080119175A1 (en) * 2006-06-19 2008-05-22 Samsung Electronics Co., Ltd. Apparatus and method for setting terminal state in portable communication terminal
CN103137099A (en) * 2011-11-28 2013-06-05 联想(北京)有限公司 Screen luminance adjustment method and electronic device based on ambient light detecting sensor
US20150010169A1 (en) * 2012-01-30 2015-01-08 Echostar Ukraine Llc Apparatus, systems and methods for adjusting output audio volume based on user location
CN102638612A (en) * 2012-02-23 2012-08-15 华为终端有限公司 Method and device for ending conversation
CN105100408A (en) * 2015-05-26 2015-11-25 努比亚技术有限公司 Method and device for controlling a mobile terminal
CN105204620A (en) * 2015-08-25 2015-12-30 厦门美图移动科技有限公司 Method and device for regulating screen brightness and mobile terminal
CN106486127A (en) * 2015-08-25 2017-03-08 中兴通讯股份有限公司 A kind of method of speech recognition parameter adjust automatically, device and mobile terminal
CN105572587A (en) * 2015-12-08 2016-05-11 惠州Tcl移动通信有限公司 Mobile terminal motor automatic detection method and system
CN106231103A (en) * 2016-08-03 2016-12-14 Tcl通讯(宁波)有限公司 A kind of method and system realizing volume and brightness regulation based on Proximity Sensor
CN106331371A (en) * 2016-09-14 2017-01-11 维沃移动通信有限公司 Volume adjustment method and mobile terminal
CN106850966A (en) * 2016-12-28 2017-06-13 努比亚技术有限公司 A kind of method for realizing volume control, device and mobile terminal
CN106911873A (en) * 2017-01-20 2017-06-30 奇酷互联网络科技(深圳)有限公司 Optimize method, device and the mobile terminal of motor

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110392298B (en) * 2018-04-23 2021-09-28 腾讯科技(深圳)有限公司 Volume adjusting method, device, equipment and medium
CN110392298A (en) * 2018-04-23 2019-10-29 腾讯科技(深圳)有限公司 A kind of volume adjusting method, device, equipment and medium
US11012777B2 (en) 2018-06-01 2021-05-18 Lenovo (Beijing) Co., Ltd. Audio adjustment method and electronic device thereof
CN108650585A (en) * 2018-06-01 2018-10-12 联想(北京)有限公司 A kind of method of adjustment and electronic equipment
CN108650585B (en) * 2018-06-01 2021-07-16 联想(北京)有限公司 Adjusting method and electronic equipment
CN108958699A (en) * 2018-07-24 2018-12-07 Oppo(重庆)智能科技有限公司 Voice pick-up method and Related product
CN109547590A (en) * 2018-10-15 2019-03-29 华为技术有限公司 The sound adjusting method of shell structure, mobile terminal and mobile terminal
WO2020078233A1 (en) * 2018-10-15 2020-04-23 华为技术有限公司 Housing structure, mobile terminal and sound adjusting method for mobile terminal
CN111225319A (en) * 2018-11-23 2020-06-02 广达电脑股份有限公司 Speaker system and speaker control method using the same
CN111225319B (en) * 2018-11-23 2022-03-15 广达电脑股份有限公司 Speaker system and speaker control method using the same
CN111327754A (en) * 2018-12-13 2020-06-23 青岛海尔多媒体有限公司 Equipment sound optimization method and mobile terminal
CN110113068A (en) * 2019-04-29 2019-08-09 努比亚技术有限公司 The outer laying mechanism of sound, method, apparatus and computer readable storage medium
CN110113068B (en) * 2019-04-29 2022-12-06 深圳市迈悦科技有限公司 Sound playback mechanism, method, device and computer readable storage medium
CN111327749A (en) * 2020-02-28 2020-06-23 维沃移动通信有限公司 A volume control method and electronic device
CN117998008A (en) * 2022-10-28 2024-05-07 荣耀终端有限公司 Method for adjusting call sound, electronic device and storage medium

Also Published As

Publication number Publication date
CN107506167B (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN107506167B (en) Volume control method and device of mobile terminal, storage medium and mobile terminal
CN107509153B (en) Detection method and device of sound playing device, storage medium and terminal
US11251763B2 (en) Audio signal adjustment method, storage medium, and terminal
US10466961B2 (en) Method for processing audio signal and related products
CN107580113B (en) Prompting method, prompting device, storage medium and terminal
JP6505252B2 (en) Method and apparatus for processing audio signals
CN107483735A (en) Volume control method, device and storage medium of mobile terminal and mobile terminal
CN107371102B (en) Audio playing volume control method and device, storage medium and mobile terminal
CN107277268B (en) A kind of audio playback method and mobile terminal
CN107483733B (en) Volume adjusting method, device, terminal and storage medium
CN108540900A (en) Volume adjusting method and related product
CN103618514A (en) Volume adjustment method, device and electronic equipment
CN107483731A (en) Audio playback volume control method, device, storage medium and mobile terminal
CN108449496B (en) Voice call data detection method, device, storage medium and mobile terminal
CN108668009A (en) Input operation control method, device, terminal, earphone and readable storage medium
CN103513769A (en) Method, device and mobile terminal for setting key function
WO2019174492A1 (en) Voice call data detection method, device, storage medium and mobile terminal
CN108833683B (en) Dynamic antenna adjustment implementation method and related product
CN107743279A (en) A kind of earphone noise-reduction method, earphone and mobile terminal
CN110297543B (en) Audio playing method and terminal equipment
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
CN106126170A (en) A terminal sound effect setting method and terminal
CN107483732A (en) Volume control method, device and storage medium of mobile terminal and mobile terminal
WO2019061292A1 (en) Noise reduction method for terminal and terminal
CN108600906B (en) Playing control method and device for multiple sound boxes

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200630

CF01 Termination of patent right due to non-payment of annual fee