Movatterモバイル変換


[0]ホーム

URL:


CN107506167B - Volume control method and device of mobile terminal, storage medium and mobile terminal - Google Patents

Volume control method and device of mobile terminal, storage medium and mobile terminal
Download PDF

Info

Publication number
CN107506167B
CN107506167BCN201710710678.2ACN201710710678ACN107506167BCN 107506167 BCN107506167 BCN 107506167BCN 201710710678 ACN201710710678 ACN 201710710678ACN 107506167 BCN107506167 BCN 107506167B
Authority
CN
China
Prior art keywords
mobile terminal
shielding
distance
occlusion
degree information
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.)
Expired - Fee Related
Application number
CN201710710678.2A
Other languages
Chinese (zh)
Other versions
CN107506167A (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 LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710710678.2ApriorityCriticalpatent/CN107506167B/en
Publication of CN107506167ApublicationCriticalpatent/CN107506167A/en
Application grantedgrantedCritical
Publication of CN107506167BpublicationCriticalpatent/CN107506167B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the invention discloses a volume control method and device of a mobile terminal, a storage medium and the mobile terminal. The method comprises the following steps: determining that the mobile terminal is in a set shielding environment; obtaining shielding degree information of a shielding object, wherein the shielding object is an object which shields the mobile terminal in the set shielding environment; and adjusting the audio playing volume according to the shielding degree information. The technical scheme provided by the embodiment of the invention can avoid the problems that the user misses the telephone or information and the like due to the fact that the audio playing volume is too small when the mobile terminal is in a shielding environment, and can reasonably control the playing volume of the mobile terminal according to the shielding degree under the condition that the mobile terminal is shielded.

Description

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

技术领域technical field

本发明实施例涉及播放控制技术领域,尤其涉及一种移动终端的音量控制方法、装置及存储介质和移动终端。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 calls, listen to music, watch videos, and play games. When the user performs these operations, the audio playback control system of the mobile terminal controls the audio of these applications to be played. However, the method for controlling the audio playback volume in the related art has defects and needs to be improved.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种移动终端的音量控制方法、装置及存储介质和移动终端,可以在移动终端处于被遮挡的情况下合理的控制移动终端的播放音量。Embodiments of the present invention provide a volume control method, device, storage medium and mobile terminal for 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 information on the degree of occlusion of an occluder, where 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.

在第二方面,本发明实施例提供了一种移动终端的音量控制装置,包括: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 occlusion object, where the occlusion object 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, implements the volume control method of the mobile terminal provided in the first aspect.

在第四方面,本发明实施例提供了一种移动终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行时实现如第一方面所提供的移动终端的音量控制方法。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 running on the processor, and the processor implements the implementation as provided in the first aspect when executed 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 a distance between the mobile terminal and an obstruction; an acceleration sensor for collecting a motion state of the mobile terminal; and/or ambient light a sensor for collecting ambient light brightness of the mobile terminal; a memory for storing the distance and the motion state, and/or the distance and the ambient light brightness; a processor for storing the distance and the ambient light brightness according to the distance and The motion state, and/or the distance and the ambient light brightness, determine that the mobile terminal is in a set occlusion environment; obtain information on the occlusion degree of the occluder, where the occluder is the set occlusion environment The object blocking the mobile terminal in the middle; adjust the audio playback volume according to the blocking degree information.

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

附图说明Description of drawings

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

图1b是本发明实施例提供的一种智能手机的音频处理硬件系统结构示意图;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 of a mobile terminal provided by an embodiment of the present invention;

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

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

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

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

图7是本发明实施例提供的另一种移动终端的音量控制方法的流程图;7 is a flowchart of another method for volume control of 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 according to an embodiment of the present invention.

具体实施方式Detailed ways

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

为便于理解,下面以Android系统为例,对Android系统中的音频系统架构进行简单说明。For ease of understanding, the following takes the Android system as an example 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 a user space, a kernel space, and a hardware system. The user space includes an application layer, an application framework (Framework) layer, and a hardware abstraction layer (HAL), the kernel space includes a driver layer, and the hardware system includes speakers, audio codecs, and the like. The application layer is the top layer of the audio system. You can write an application to perform corresponding logical operations. For example, pre-set the occlusion environment including the environment where the speaker is occluded, and set the distance between the mobile terminal and the occluder in the occlusion environment. Setting the range, issuing 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 acquiring audio attribute information, audio playback status, and a speaker volume control interface. The application framework layer provides AudioTrack and AudioRecorder classes, as well as AudioManager, AudioService and AudioSystem classes. A system runtime library (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 support of the most direct java interface, which is one of the meanings of the existence of the framework layer. As "intermediaries", they do not really implement specific functions, or only implement a part of them, and focus on the library to complete. For example, the above AudioTrack, AudioRecorder, MediaPlayer and MediaRecorder can find corresponding classes in the library. This part of the code is placed in the frameworks/av/media/libmedia of the project, and most of them are written in C++ language. The hardware abstraction layer in audio 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. Depending on the product, there are great differences in audio devices. In the audio architecture of Android, 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 realize 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 parse the format of the audio data, such as MP3 and WMA. It is responsible for the normal playback of audio, not noise, etc.

图1b为本发明实施例提供的一种智能手机的音频处理硬件系统结构示意图。音频处理电路一般处于主控电路板中,由于不同手机的设计不同,音频处理电路的具体位置也可能不同。智能手机的音频处理电路主要包括音频信号处理电路、基带信号处理电路、音频功率放大器、耳机信号放大器、听筒、扬声器、麦克风及耳机接口等。其中,音频信号处理电路是整个音频处理电路的核心。音频处理电路主要由接收音频电路、送话电路、耳机通话电路等组成,包括模拟音频的模拟/数字(A/D)转换、数字/模拟(A/D)转换、数字语音信号处理及模拟音频放大电路等。FIG. 1b is a schematic structural diagram of an audio processing hardware system of a smart phone according to 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 smartphone mainly includes an audio signal processing circuit, a baseband signal processing circuit, an audio power amplifier, a headphone signal amplifier, an earpiece, a speaker, a microphone and a headphone interface. 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 calling 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, firstly, the local microphone of the call converts the mechanical sound wave signal of the sound into an analog audio signal, which is amplified by the analog audio amplifier circuit, and then A/D converted by the internal multi-mode converter to obtain a digital audio signal; The digital audio signal is sent to the baseband processor for voice coding, channel coding and other processing; again, a series of processes such as encryption and interleaving are carried out; finally, it is sent to the digital narrowband modulation module in the baseband processor for modulation to generate a transmitting baseband signal and send it to the The radio frequency circuit is modulated to transmit intermediate frequency and sent to the other party of the call. When answering a call, firstly demodulate the received baseband information from the radio frequency circuit and send it to the baseband processor for digital narrowband demodulation to separate the control signal and the voice signal; secondly, the voice signal is decrypted, deinterleaved, reorganized, etc. After processing, channel decoding and voice decoding are performed; finally, a 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 audio power is amplified to push the earpiece to sound. . If the speakerphone is selected, the baseband processor will turn off the receiver receiver amplifier, start the speakerphone amplifier tube (ring amplifier tube), and amplify the power of the audio signal to push the speaker 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 the analog audio amplifier circuit, and the 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 audio signal power is amplified to push the speaker to sound.

本发明实施例中可预先在终端中存储预设音频文件,对该预设音频文件进行播放。预存音频文件以及预设音量等级可由设计人员根据实际情况进行选取,不同的声音播放器件对应的预设音频文件和/或预设音量等级可以不同,本发明实施例不做限定。麦克风采集的音频信号可以是上述的由机械声波信号转换而来的模拟音频信号,也可以是经过放大后的模拟音频信号,可根据两者的不同分别设置相应的下文中的预设条件,本发明实施例不作限定。为了方便终端与用户之间的交互,终端一般会向用户提供音量调节功能,用户可采用调节音量调节按钮或音量调节进度条等方式对终端播放声音的音量等级进行调整,而终端根据用户调整后的音量等级对需要播放的音频信号进行相应的放大处理,如功率放大,以满足用户的收听需求。不同的终端中对音量等级的划分策略可能不同,即具体的音量等级的总数量以及每个音量等级对应的音量大小都可能不同,本发明实施例不作限定。In this 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 file and the preset volume level can be selected by the designer according to the actual situation. The preset audio file and/or the preset volume level corresponding to different sound playback devices may 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 it can be an amplified analog audio signal, and 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 audio signal to be played is amplified accordingly, such as power amplification, to meet the listening needs of users. 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 are not limited in this embodiment of the present invention.

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

如图2所示,本实施例提供的移动终端的音量控制方法包括以下步骤:As shown in FIG. 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, there may be situations in which the mobile terminal is blocked by other objects, for example, the mobile phone mobile terminal is put into a pocket or placed in sundries. This step is used to determine that the mobile terminal is in a set occlusion environment. The set occlusion environment is a preset occlusion environment that satisfies the condition of the speaker being blocked, 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 occludes the mobile terminal in the set occlusion environment.

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

步骤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 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, 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; Acquire a preset correspondence table between the occlusion degree and audio playback volume, and determine 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, the occlusion degree A<the occlusion degree B<the occlusion degree 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, 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, when the occlusion level 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, then the occlusion level 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.

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

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

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

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

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

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

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

步骤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 so, go to step 204 , otherwise skip to step 201 orstep 202 . Wherein, the first setting range is a preset distance range, for example, may be 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: Determine 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 still uncertain. Set the occlusion environment for the mobile terminal. The reason for this setting is to avoid misadjustment of the volume. For example, in the scenario where the user answers the phone, the distance between the proximity sensor close to the user's face and the occluder on 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 the sundries or other set blocking environment, the mobile terminal is stationary. Therefore, the motion state of the mobile terminal is acquired through the acceleration sensor, and only when the distance is within the first set range and in the motion state, it is determined that the mobile terminal is in the set occlusion environment.

在利用与接近传感器结合加速度传感器确定移动终端与遮挡物的距离在第一设定范围内且移动终端的运动状态为静止状态时,可确定移动终端的接近传感器处于设定遮挡环境中,由于接近传感器在扬声器的附近,他们的距离小于第一设定距离,那么在接近传感器处于设定遮挡环境中时可确定扬声器也处于设定遮挡环境中。When it is determined by combining the acceleration sensor with the proximity sensor that the distance between the mobile terminal and the obstruction is within the first set range and the motion state of the mobile terminal is in a stationary state, it can be determined that the proximity sensor of the mobile terminal is in the set blocking environment. The sensors are in the vicinity of the speaker, and their distance is smaller than the first set distance, then when the proximity sensor is in the set occlusion environment, it can be determined that the speaker is also 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 occludes 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 thestep 201 and thestep 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 the motion 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 occluder, so that the mobile terminal can be controlled reasonably according to the occlusion degree when the mobile terminal is occluded. The playback volume of the terminal can be accurately determined, and it can be accurately determined that the mobile terminal is in a set blocking environment.

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

步骤301、通过移动终端的接近传感器获取所述移动终端的遮挡物的距离。Step 301: Acquire 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的位置。The distance between the ambient light sensor and the speaker of the mobile terminal is smaller than the second set distance, and 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, and the ambient light sensor may be arranged at a position of 0cm-2cm at the bottom of the mobile terminal close to the speaker.

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

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

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

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

步骤305、获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体。Step 305: Obtain information on the degree of occlusion of an occluder, where the occluder is an object that occludes 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 obstruction is obtained through the proximity sensor of the mobile terminal, and the motion state of the mobile terminal is obtained through the ambient light sensor of the mobile terminal. When the ambient light brightness is less than the set light brightness, it is determined that the mobile terminal is in a set blocking environment, and the audio playback volume is adjusted according to the blocking program information of the blocking object. The playback volume of the mobile terminal is reasonably controlled, and it can be accurately determined that the mobile terminal is in a set blocking environment.

图5给出了本发明实施例提供的另一种移动终端的音量控制方法的流程图。如图5所示,本实施例提供的移动终端的音量控制方法包括以下步骤:FIG. 5 is a flowchart of another method for volume control of a mobile terminal provided by an embodiment of the present invention. As shown in FIG. 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 the set occlusion environment may be as provided in the foregoing embodiment, and the specific implementation details may refer to the foregoing content.

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

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

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

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

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

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

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

图6给出了本发明实施例提供的另一种移动终端的音量控制方法的流程图。如图6所示,本实施例提供的移动终端的音量控制方法包括以下步骤:FIG. 6 is a flowchart of another method for volume control of 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 by 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 , determine whether the distance between the blocking object and the mobile terminal is less than the second set distance, if so, go toStep 503 , otherwise, return toStep 502 .

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

在遮挡物与移动终端的距离小于第二设定距离时,可通过控制移动终端的马达产生振动来检测遮挡物的材质。其中,所述第二设定距离的取值范围可以为0cm-1cm。When the distance between the blocking object and the mobile terminal is less than the second set distance, the material of the blocking object 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 sample value generated by the vibration through the acceleration sensor of the mobile terminal, and/or obtain the sound sample value generated by the vibration through the sound sensor of the mobile terminal.

其中,所述通过移动终端的加速度传感器获取所述振动产生的加速度采样值可以包括:设定加速度值采样时间,通过移动终端的加速度传感器获取所述加速度值采样时间内所述振动产生的加速度采样值。所述加速度值采样时间可设置为5秒钟。Wherein, the acquiring the acceleration sampling value generated by the vibration through the acceleration sensor of the mobile terminal may include: setting an acceleration value sampling time, and acquiring the acceleration sampling value generated by the vibration during 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 acquiring the sound sample value generated by the vibration through the sound sensor of the mobile terminal may include: collecting, through the sound sensor of the mobile terminal, the sound generated by the collision of the mobile terminal with the obstruction when the mobile terminal vibrates. The sound sensor may be replaced by a microphone of the mobile terminal.

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

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

所述根据所述声音采样值,确定所述遮挡物的材质类型可以包括:对所述碰撞产生的声音进行声音频谱图分析,根据分析结果可确定遮挡物所属介质材料的类型。The determining of the material type of the blocking object according to the sound sample value may include: performing a sound spectrogram analysis on the sound generated by the collision, and determining the type of the medium material to which the blocking object belongs 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 hardness of the medium material to which the obstruction belongs is determined according to the acceleration sampling value. For example, the obstruction can be determined by performing spectrum analysis on the acceleration sampling value. It is a hard material such as a wooden desk, stone, or a soft material such as clothes and bags; then the sound sampling value generated by the vibration is obtained through the sound sensor, and the medium materials with similar degrees of softness and hardness 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 and frequency impact response of the acceleration frequency domain analysis graph are stronger than those of wood or stone. For the low frequency stage, it can be found that the frequency value of the soft dielectric material has tended to 0, while the frequency value of the hard dielectric material has always existed non-zero value. In this way, the difference between clothes, wooden desks and stones can be distinguished by frequency; the sound during vibration is collected by the sound sensor built in the mobile terminal, and the sound spectrum is analyzed for the audio. The frequency impact response is stronger than that of the wood material. When the vibration frequency of the sound is about 200Hz, the audio amplitude on the surface of the wood material is smaller than that of the stone material. Therefore, the wood material and the stone material 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 occlusion degree of the occluder can be determined to be a; When the material of is clothing, the degree of occlusion of the occluder can be determined to be c, where the degree of occlusion a>the degree of occlusion b>the degree of occlusion 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, according to the degree of occlusion a, it can be determined that the volume adjustment value is a', according to the degree of occlusion b, it can be determined that the volume adjustment value is b', and according to the degree of occlusion c, the volume adjustment value can be determined to be c', wherein the volume adjustment value a' >Volume adjustment value b`>Volume adjustment value c`.

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

图7给出了本发明实施例提供的另一种移动终端的音量控制方法的流程图。如图7所示,本实施例提供的移动终端的音量控制方法包括以下步骤:FIG. 7 is a flowchart of another method for volume control of 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 by this embodiment includes the following steps:

步骤601、通过移动终端的接近传感器获取所述移动终端与遮挡物的距离。Step 601: Obtain the distance between the mobile terminal and the obstruction through a 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 , determine whether the distance is within the first set range and whether the motion state is a stationary state, if so, go to step 604 , otherwise skip to step 601 orstep 602 .

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

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

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

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

本实施例提供的方法,通过在利用接近传感器获取的移动终端与遮挡物的距离在第一设定范围内且利用加速度传感器获取的移动终端的运动状态为静止状态时,确定移动终端处于设定遮挡环境中,利用移动终端的超声波传感器获取遮挡物的遮挡程度信息,根据所述遮挡程度信息调整音频播放音量,可以在移动终端处于被遮挡的情况下根据遮挡程度合理的控制移动终端的播放音量。In the method provided in this embodiment, 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 using the acceleration sensor is a static state, it is determined that the mobile terminal is in the set state. In the occlusion environment, the ultrasonic sensor of the mobile terminal is used to obtain the occlusion degree information of the occlusion object, and the audio playback volume is adjusted according to the occlusion degree information, so that the playback volume of the mobile terminal can be reasonably controlled 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 apparatus of a mobile terminal according to an embodiment of the present invention. The apparatus may be implemented by software and/or hardware and integrated in the mobile terminal. As shown in FIG. 8 , the device includes an occlusionenvironment determination module 71 , an occlusion degreeinformation acquisition module 72 and an audio playbackvolume adjustment module 73 .

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

所述遮挡程度信息获取模块72,用于获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体;The occlusion degreeinformation acquisition module 72 is 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;

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

本实施例提供的装置,通过确定移动终端处于设定遮挡环境中,获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体,根据所述遮挡程度信息调整音频播放音量,可以在移动终端处于被遮挡的情况下合理的根据遮挡程度控制移动终端的播放音量。The apparatus 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, where the occluder is an object that occludes the mobile terminal in the set occlusion environment. The degree information adjusts the audio playback volume, and can reasonably control the playback volume of the mobile terminal according to the degree of blocking when the mobile terminal is blocked.

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

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

通过移动终端的加速度传感器获取所述移动终端的运动状态;Obtain the motion state of the mobile terminal through the 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 foregoing embodiment, the occlusion environment determining module determining that the mobile terminal is in the 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 embodiment, the occlusion degree information acquisition module acquiring the occlusion degree information of the occluder includes:

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

根据超声波传感器接收器接收到反射回来的超声波的强度,以及发射超声波与接收到反射回来的超声波的时间差,确定遮挡物的遮挡程度信息。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 occlusion degree information of the occluder.

在上述实施例的基础上,所述接近传感器与移动终端的扬声器的距离小于第一设定距离,以使移动终端将所述接近传感器的遮挡检测结果确定为所述扬声器的遮挡检测结果。Based on the above embodiment, the distance between the proximity sensor and the speaker of the mobile terminal is smaller than the 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 embodiment, the occlusion degree information acquisition module is specifically used for:

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

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

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

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

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

获取遮挡程度与音频播放音量的预设对应关系表,根据所述预设对应关系表确定与所述遮挡程度信息对应的音量调整值;obtaining a preset correspondence table between the 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.

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

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

获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体;obtaining information on the degree of occlusion of an occluder, where 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.

存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如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 devices; 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. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a second, different 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 (eg, in different computer systems connected by a network). The storage medium may store program instructions (eg, embodied as a computer program) executable by one or more processors.

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

本发明实施例提供了一种移动终端,该移动终端可以包括本发明任意实施例提供的移动终端的音量控制装置。图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 volume control apparatus of the mobile terminal provided in any embodiment of the present invention. FIG. 9 is a schematic structural diagram of a mobile terminal according to 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 obstruction; an acceleration sensor for collecting moving The motion state of the terminal; and/or, an ambient light sensor, used to collect ambient light brightness of the mobile terminal; amemory 801, a central processing unit (Central Processing Unit, CPU) 802 (also called a processor, hereinafter referred to as CPU), the Thememory 801 is used to store executable program codes; theprocessor 802 runs a program corresponding to the executable program codes by reading the executable program codes stored in thememory 801, so as to execute: according to the The distance and the motion state, and/or the distance and the ambient light brightness, determine that the mobile terminal is in a set occlusion environment; obtain the occlusion degree information of the occluder, and the occluder is the set occlusion level. Determine the object blocking the mobile terminal in the blocking environment; adjust the audio playback volume according to the blocking degree information.

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

所述移动终端还包括:振动马达,用于在所述遮挡物与移动终端的距离小于第三设定距离时,产生设定频率的振动;声音传感器,用于采集所述振动产生的声音采样值;所述加速度传感器,还用于采集所述振动产生的加速度采样值;所述处理器,还用于获取所述加速度采样值和/或所述声音采样值;根据所述加速度采样值和/或所述声音采样值,确定所述遮挡物的材质类型;根据所述遮挡物的材质类型,确定所述遮挡物的遮挡程度信息。The mobile terminal further includes: a vibration motor for generating a vibration of a set frequency when the distance between the obstruction and the mobile terminal is less than a third set distance; a sound sensor for collecting sound samples generated by the vibration value; the acceleration sensor is also used to collect the acceleration sample value generated by the vibration; the processor is also used to obtain the acceleration sample value and/or the sound sample value; according to the acceleration sample value and /or the sound sample value, to determine the material type of the occluder; and to 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 further includes: aperipheral interface 803, an RF (Radio Frequency, radio frequency)circuit 805, anaudio circuit 806, aspeaker 811, apower management chip 808, an input/output (I/O)subsystem 809, atouch screen 812, and other Input/control devices 810 andexternal ports 804, these components communicate via one or more communication buses orsignal lines 807.

应该理解的是,图示移动终端800仅仅是移动终端的一个范例,并且移动终端800可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustratedmobile terminal 800 is merely an example of a mobile terminal, and that themobile terminal 800 may have more or fewer components than those shown in the figure, two or more components may be combined, Or can have different component configurations. 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 following will describe in detail the mobile terminal for controlling the volume provided in this embodiment, and the mobile terminal is a mobile phone as an example.

存储器801,所述存储器801可以被CPU802、外设接口803等访问,所述存储器801可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Memory 801, which can be accessed byCPU 802,peripheral interface 803, etc., saidmemory 801 can include high-speed random access memory, and can also include 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。Aperipheral interface 803 that can connect the input and output peripherals of the device to theCPU 502 and thememory 801 .

I/O子系统809,所述I/O子系统809可以将设备上的输入输出外设,例如触摸屏812和其他输入/控制设备810,连接到外设接口803。I/O子系统809可以包括显示控制器8091和用于控制其他输入/控制设备810的一个或多个输入控制器8092。其中,一个或多个输入控制器8092从其他输入/控制设备810接收电信号或者向其他输入/控制设备810发送电信号,其他输入/控制设备810可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器8092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/O subsystem 809 , which can connect input and output peripherals on the device, such astouch screen 812 and other input/control devices 810 , toperipherals interface 803 . The I/O subsystem 809 may include adisplay controller 8091 and one ormore input controllers 8092 for controlling other input/control devices 810 . Wherein, one ormore 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. ), dial pad, slide switch, joystick, click wheel. Notably, theinput 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是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。Thetouch screen 812, which is an input interface and an output interface between the user terminal and the user, displays visual output to the user, and the visual output may include graphics, text, icons, videos, and the like.

I/O子系统809中的显示控制器8091从触摸屏812接收电信号或者向触摸屏812发送电信号。触摸屏812检测触摸屏上的接触,显示控制器8091将检测到的接触转换为与显示在触摸屏812上的用户界面对象的交互,即实现人机交互,显示在触摸屏812上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。Display controller 8091 in I/O subsystem 809 receives electrical signals fromtouch screen 812 or sends electrical signals totouch screen 812 . Thetouch screen 812 detects the contact on the touch screen, and thedisplay controller 8091 converts the detected contact into interaction with the user interface objects displayed on thetouch screen 812, that is, to realize human-computer interaction, and the user interface objects displayed on thetouch screen 812 can be run. Icons for games, icons for connecting to the corresponding network, etc. It is worth noting that the device may also include a light mouse, which is a touch-sensitive surface that does not display visual output, or an extension of the 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)等等。TheRF circuit 805 is mainly used to establish the communication between the mobile phone and the wireless network (ie, the network side), and realize the data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving text messages, e-mails, etc. Specifically, theRF circuit 805 receives and transmits RF signals, also known as electromagnetic signals, theRF 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, antenna systems, RF transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, CODECs ( COder-DECoder, codec) chip set, subscriber identity module (Subscriber Identity Module, SIM) and so on.

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

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

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

上述移动终端可执行本发明任意实施例所提供的方法,具备执行方法相应的功能模块,本发明实施例提供的移动终端,通过确定移动终端处于设定遮挡环境中,获取遮挡物的遮挡程度信息,所述遮挡物为所述设定遮挡环境中遮挡所述移动终端的物体,根据所述遮挡程度信息调整音频播放音量,可以在移动终端处于被遮挡的情况下合理的根据遮挡程度控制移动终端的播放音量。The above-mentioned mobile terminal can execute the method provided by any of the embodiments of the present invention, and has corresponding functional modules for executing the method. The mobile terminal provided by the embodiment of the present invention obtains the information of the occlusion degree of the occluder by determining that the mobile terminal is in the 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 above are only the preferred embodiments of the present invention and the applied technical principles. The present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing 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. The scope is determined by the scope of the claims.

Claims (11)

CN201710710678.2A2017-08-182017-08-18Volume control method and device of mobile terminal, storage medium and mobile terminalExpired - Fee RelatedCN107506167B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710710678.2ACN107506167B (en)2017-08-182017-08-18Volume control method and device of mobile terminal, storage medium and mobile terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710710678.2ACN107506167B (en)2017-08-182017-08-18Volume control method and device of mobile terminal, storage medium and mobile terminal

Publications (2)

Publication NumberPublication Date
CN107506167A CN107506167A (en)2017-12-22
CN107506167Btrue CN107506167B (en)2020-06-30

Family

ID=60692062

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710710678.2AExpired - Fee RelatedCN107506167B (en)2017-08-182017-08-18Volume control method and device of mobile terminal, storage medium and mobile terminal

Country Status (1)

CountryLink
CN (1)CN107506167B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110392298B (en)*2018-04-232021-09-28腾讯科技(深圳)有限公司Volume adjusting method, device, equipment and medium
CN108650585B (en)*2018-06-012021-07-16联想(北京)有限公司Adjusting method and electronic equipment
CN108958699B (en)*2018-07-242021-12-07Oppo(重庆)智能科技有限公司Voice pickup method and related product
CN109547590A (en)*2018-10-152019-03-29华为技术有限公司The sound adjusting method of shell structure, mobile terminal and mobile terminal
TW202021377A (en)*2018-11-232020-06-01廣達電腦股份有限公司Environmental detection system and sound control method using the same
CN111327754A (en)*2018-12-132020-06-23青岛海尔多媒体有限公司Equipment sound optimization method and mobile terminal
CN110113068B (en)*2019-04-292022-12-06深圳市迈悦科技有限公司Sound playback mechanism, method, device and computer readable storage medium
CN111327749A (en)*2020-02-282020-06-23维沃移动通信有限公司 A volume control method and electronic device
CN117998008A (en)*2022-10-282024-05-07荣耀终端有限公司Method for adjusting call sound, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102638612A (en)*2012-02-232012-08-15华为终端有限公司Method and device for ending conversation
CN105100408A (en)*2015-05-262015-11-25努比亚技术有限公司Method and device for controlling a mobile terminal
CN106231103A (en)*2016-08-032016-12-14Tcl通讯(宁波)有限公司A kind of method and system realizing volume and brightness regulation based on Proximity Sensor

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR20070120236A (en)*2006-06-192007-12-24삼성전자주식회사 Apparatus and method for setting terminal state by detecting distance from user in mobile communication terminal
CN103137099B (en)*2011-11-282015-07-29联想(北京)有限公司Based on screen luminance adjustment method and the electronic equipment of surround lighting detecting sensor
US9431980B2 (en)*2012-01-302016-08-30Echostar Ukraine LlcApparatus, systems and methods for adjusting output audio volume based on user location
CN106486127A (en)*2015-08-252017-03-08中兴通讯股份有限公司A kind of method of speech recognition parameter adjust automatically, device and mobile terminal
CN105204620B (en)*2015-08-252018-09-14厦门美图移动科技有限公司It is a kind of to adjust the method and device of screen intensity, mobile terminal
CN105572587A (en)*2015-12-082016-05-11惠州Tcl移动通信有限公司Mobile terminal motor automatic detection method and system
CN106331371A (en)*2016-09-142017-01-11维沃移动通信有限公司 A volume adjustment method and mobile terminal
CN106850966A (en)*2016-12-282017-06-13努比亚技术有限公司A kind of method for realizing volume control, device and mobile terminal
CN106911873B (en)*2017-01-202020-05-12奇酷互联网络科技(深圳)有限公司Method and device for optimizing motor and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102638612A (en)*2012-02-232012-08-15华为终端有限公司Method and device for ending conversation
CN105100408A (en)*2015-05-262015-11-25努比亚技术有限公司Method and device for controlling a mobile terminal
CN106231103A (en)*2016-08-032016-12-14Tcl通讯(宁波)有限公司A kind of method and system realizing volume and brightness regulation based on Proximity Sensor

Also Published As

Publication numberPublication date
CN107506167A (en)2017-12-22

Similar Documents

PublicationPublication DateTitle
CN107506167B (en)Volume control method and device of mobile terminal, storage medium and mobile terminal
US11251763B2 (en)Audio signal adjustment method, storage medium, and terminal
CN107509153B (en)Detection method and device of sound playing device, storage medium and terminal
CN108519871B (en)Audio signal processing method and related product
CN107580113B (en)Prompting method, prompting device, storage medium and terminal
CN107562405B (en) Audio playback control method, device, storage medium and mobile terminal
CN107371102B (en)Audio playing volume control method and device, storage medium and mobile terminal
CN106357871A (en)Voice amplifying method and mobile terminal
CN107483735A (en) Volume control method, device and storage medium of mobile terminal and mobile terminal
CN107105367A (en)A kind of acoustic signal processing method and terminal
JP2018517167A (en) Method and apparatus for processing audio signals
CN106101929A (en)A kind of protection human ear audition method and mobile terminal
CN105827849A (en)Method for adjusting sound effect and mobile terminal
CN108803859A (en)Information processing method, device, terminal, earphone and readable storage medium
CN107483731A (en) Audio playback volume control method, device, storage medium and mobile terminal
CN107369459A (en)A kind of audio-frequency processing method and mobile terminal
WO2019033984A1 (en)Volume adjusting method, device, terminal, and storage medium
CN106060268A (en)Voice output method for mobile terminal and mobile terminal
CN107743279A (en) Noise reduction method for earphone, earphone and mobile terminal
CN107450883A (en)A kind of audio data processing method, device and mobile terminal
CN107526570B (en)Volume adjusting method and device, terminal equipment and storage medium
CN106161776B (en)Volume adjusting method and mobile terminal
CN107479852B (en)Volume adjusting method and device, terminal equipment and storage medium
CN107483732A (en) Volume control method, device and storage medium of mobile terminal and mobile terminal
CN107483734B (en) Volume adjustment method, device, terminal device and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information
CB02Change 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.

GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20200630


[8]ページ先頭

©2009-2025 Movatter.jp