CN108600542B - Gyroscope calibration method and device - Google Patents
Gyroscope calibration method and device Download PDFInfo
- Publication number
- CN108600542B CN108600542B CN201810376512.6A CN201810376512A CN108600542B CN 108600542 B CN108600542 B CN 108600542B CN 201810376512 A CN201810376512 A CN 201810376512A CN 108600542 B CN108600542 B CN 108600542B
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- gyroscope
- calibration data
- angle
- data
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/12—Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Telephone Function (AREA)
Abstract
本申请实施例公开了一种陀螺仪校准方法及装置,包括:当检测到移动终端处于跌落状态时,启动陀螺仪;当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据;根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。本申请实施例实现了移动终端在跌落过程,且处于休眠状态时,校准陀螺仪时不会启动应用处理器,降低功率消耗和跌落损坏程度。
The embodiment of the present application discloses a gyroscope calibration method and device, including: when a mobile terminal is detected to be in a falling state, starting the gyroscope; when the system operation state of the mobile terminal is detected to be in a dormant state, obtaining pre-stored first calibration data of the gyroscope; obtaining multiple sets of angle data collected by the gyroscope according to the first calibration data, and determining the angle change value of the mobile terminal during the falling process through the multiple sets of angle data. The embodiment of the present application realizes that when the mobile terminal is in a falling process and in a dormant state, the application processor will not be started when calibrating the gyroscope, thereby reducing power consumption and the degree of falling damage.
Description
技术领域technical field
本申请涉及移动终端技术领域,具体涉及一种陀螺仪校准方法及装置。The present application relates to the technical field of mobile terminals, and in particular, to a gyroscope calibration method and device.
背景技术Background technique
随着移动终端(例如,智能手机)的大量普及与快速发展,越来越多的应用被安装在用户的移动终端中,人们越来越频繁的使用移动终端,例如视频类应用、支付类应用、游戏类应用、音乐类应用等。With the mass popularization and rapid development of mobile terminals (for example, smart phones), more and more applications are installed in users' mobile terminals, and people use mobile terminals more and more frequently, such as video applications, payment applications , game applications, music applications, etc.
目前,移动终端由于被频繁使用,经常会因为跌落导致部件损坏(如显示屏,外壳等),导致移动终端使用寿命减短,因此,如何准确定位出损坏的部件,获取准确的跌落数据对延长移动终端的使用寿命具有重要的指导意义。At present, due to the frequent use of mobile terminals, parts (such as display screens, casings, etc.) are often damaged due to falling, which shortens the service life of the mobile terminal. Therefore, how to accurately locate the damaged parts and obtain accurate drop data can prolong the life of the mobile terminal. The service life of the mobile terminal has important guiding significance.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种陀螺仪校准方法及装置,可以实现移动终端在跌落过程,且处于休眠状态时,校准陀螺仪时不会启动应用处理器,降低功率消耗和跌落损坏程度。The embodiments of the present application provide a gyroscope calibration method and device, which can realize that when the mobile terminal is in a falling process and is in a sleep state, the application processor will not be started when calibrating the gyroscope, thereby reducing power consumption and drop damage.
第一方面,本申请实施例提供了一种陀螺仪校准方法,所述方法包括:In a first aspect, an embodiment of the present application provides a method for calibrating a gyroscope, the method comprising:
当检测到移动终端处于跌落状态时,启动陀螺仪;When it is detected that the mobile terminal is in a falling state, start the gyroscope;
当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据;When it is detected that the system running state of the mobile terminal is the dormant state, acquiring pre-stored first calibration data of the gyroscope;
根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。Acquire multiple sets of angle data collected by the gyroscope according to the first calibration data, and determine the angle change value of the mobile terminal during the falling process by using the multiple sets of angle data.
第二方面,本申请实施例提供了一种陀螺仪校准装置,包括启动单元、获取单元和确定单元,其中:In a second aspect, an embodiment of the present application provides a gyroscope calibration device, including a startup unit, an acquisition unit, and a determination unit, wherein:
所述启动单元,用于当检测到移动终端处于跌落状态时,启动陀螺仪;The starting unit is used to start the gyroscope when it is detected that the mobile terminal is in a falling state;
所述获取单元,用于当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据;the acquisition unit, configured to acquire pre-stored first calibration data of the gyroscope when it is detected that the system operating state of the mobile terminal is a sleep state;
所述确定单元,用于根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。The determining unit is configured to acquire multiple sets of angle data collected by the gyroscope according to the first calibration data, and determine the angle change value of the mobile terminal during the falling process by using the multiple sets of angle data.
第三方面,本申请实施例提供了一种移动终端,包括:处理器,存储器,以及一个或多个程序;所述一个或多个程序被存储在上述存储器中,并且被配置成由所述处理器执行,所述程序包括用于执行本申请实施例第一方面任一方法中所描述的步骤的指令。In a third aspect, an embodiment of the present application provides a mobile terminal, including: a processor, a memory, and one or more programs; the one or more programs are stored in the above-mentioned memory, and are configured to be executed by the Executed by the processor, the program includes instructions for executing the steps described in any of the methods in the first aspect of the embodiments of this application.
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,所述计算机可读存储介质存储有用于电子数据交换的计算机程序,该计算机程序具体包括指令,所述指令用于执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤,所述计算机包括移动终端。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program specifically includes instructions for executing As part or all of the steps described in any method in the first aspect of the embodiments of this application, the computer includes a mobile terminal.
第五方面,本申请实施例提供了一种计算机程序产品,其中,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包,所述计算机包括移动终端。In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the Part or all of the steps described in any method of the first aspect of the application examples. The computer program product may be a software installation package, and the computer includes a mobile terminal.
可以看出,本申请实施例中,移动终端首先当检测到移动终端处于跌落状态时,启动陀螺仪,其次,当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据,最后,根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。可见,移动终端在处于跌落状态时,启动陀螺仪,避免陀螺仪时刻处于工作状态时的电量消耗,而且,在系统运行状态为休眠状态时,使用历史记录中预存的第一校准数据,而不是获取实时数据,使陀螺仪根据第一校准数据采集多组角度数据,而不进行陀螺仪的校准,避免了在休眠状态下,因为校准陀螺仪唤醒应用处理器带来的功率消耗,有利于降低功耗,且在低功耗情况下发生跌落,降低移动终端的损坏程度,此外,使陀螺仪根据第一校准数据采集多组角度数据,有利于提升陀螺仪的准确性。It can be seen that, in the embodiment of the present application, the mobile terminal firstly starts the gyroscope when it is detected that the mobile terminal is in a falling state, and secondly, when it is detected that the system running state of the mobile terminal is in the sleep state, obtains the pre-stored gyroscope The first calibration data. Finally, according to the first calibration data, multiple sets of angle data collected by the gyroscope are acquired, and the angle change value of the mobile terminal during the falling process is determined by the multiple sets of angle data. It can be seen that when the mobile terminal is in a falling state, the gyroscope is activated to avoid power consumption when the gyroscope is in a working state at all times. Moreover, when the system running state is a sleep state, the first calibration data pre-stored in the history record is used instead of Acquire real-time data, so that the gyroscope can collect multiple sets of angle data according to the first calibration data without calibrating the gyroscope, which avoids the power consumption caused by calibrating the gyroscope to wake up the application processor in the sleep state, which is conducive to reducing the power consumption. power consumption, and the drop occurs under low power consumption, which reduces the damage degree of the mobile terminal. In addition, making the gyroscope collect multiple sets of angle data according to the first calibration data is beneficial to improve the accuracy of the gyroscope.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1A是本申请实施例公开的一种陀螺仪校准方法的流程示意图;1A is a schematic flowchart of a gyroscope calibration method disclosed in an embodiment of the present application;
图1B是本发明实施例公开的一种移动终端水平放置时的加速度方向示意图;1B is a schematic diagram of an acceleration direction when a mobile terminal is placed horizontally according to an embodiment of the present invention;
图1C是本发明实施例公开的一种移动终端发生跌落时的加速度方向示意图;1C is a schematic diagram of an acceleration direction of a mobile terminal when a mobile terminal falls according to an embodiment of the present invention;
图2是本申请实施例公开的另一种陀螺仪校准方法的流程示意图;2 is a schematic flowchart of another gyroscope calibration method disclosed in an embodiment of the present application;
图3是本申请实施例公开的另一种陀螺仪校准方法的流程示意图;3 is a schematic flowchart of another gyroscope calibration method disclosed in an embodiment of the present application;
图4是本申请实施例公开的一种移动终端的结构示意图;FIG. 4 is a schematic structural diagram of a mobile terminal disclosed in an embodiment of the present application;
图5A是本申请实施例公开的一种陀螺仪校准装置的功能单元组成框图;FIG. 5A is a block diagram of functional units of a gyroscope calibration device disclosed in an embodiment of the present application;
图5B是本申请实施例公开的另一种陀螺仪校准装置的功能单元组成框图;5B is a block diagram of functional units of another gyroscope calibration device disclosed in an embodiment of the present application;
图6是本申请实施例公开的一种智能手机的结构示意图。FIG. 6 is a schematic structural diagram of a smart phone disclosed in an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
本申请实施例所涉及到的移动终端可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminaldevice)等等。为方便描述,上面提到的设备统称为移动终端。下面对本申请实施例进行详细介绍。The mobile terminals involved in the embodiments of the present application may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to wireless modems, as well as various forms of user equipment (User Equipment). Equipment, UE), mobile station (Mobile Station, MS), terminal device (terminal device) and so on. For the convenience of description, the devices mentioned above are collectively referred to as mobile terminals. The embodiments of the present application will be described in detail below.
请参阅图1A,图1A是本申请实施例提供了一种陀螺仪校准方法的流程示意图,如图所示,本陀螺仪校准方法包括:Please refer to FIG. 1A. FIG. 1A is a schematic flowchart of a gyroscope calibration method provided by an embodiment of the present application. As shown in the figure, the gyroscope calibration method includes:
S101,移动终端当检测到所述移动终端处于跌落状态时,启动陀螺仪;S101, when the mobile terminal detects that the mobile terminal is in a falling state, start the gyroscope;
其中,所述陀螺仪用于采集所述移动终端在运行过程中的角速度值。Wherein, the gyroscope is used to collect the angular velocity value of the mobile terminal during operation.
其中,所述检测到所述移动终端处于跌落状态为所述移动终端通过加速度传感器检测到所述移动终端的加速度方向或者加速度值发生突变,即可判定所述移动终端发生跌落,处于跌落状态。The detecting that the mobile terminal is in a falling state means that the mobile terminal detects a sudden change in the acceleration direction or the acceleration value of the mobile terminal through the acceleration sensor, and it can be determined that the mobile terminal has fallen and is in a falling state.
举例而言,所述移动终端水平放置在桌面时,如图1B所示,加速度传感器的X轴、Y轴、Z轴如图所示,所述移动终端受到重力和桌面的支持力,使所述移动终端的加速度为0,而当所述移动终端发生跌落时,如图1C所示,所述移动终端的加速度方向为如图1C所示的加速度方向,与水平放置时的加速度方向不同,加速度发生突变,则移动终端发生跌落,在所述加速度恢复到如图1B所示的加速度之前,所述移动终端处于跌落状态。For example, when the mobile terminal is placed horizontally on a desktop, as shown in FIG. 1B , the X-axis, Y-axis, and Z-axis of the acceleration sensor are as shown in the figure. The mobile terminal is supported by gravity and the desktop, so that all The acceleration of the mobile terminal is 0, and when the mobile terminal falls, as shown in FIG. 1C , the acceleration direction of the mobile terminal is the acceleration direction shown in FIG. 1C , which is different from the acceleration direction when placed horizontally, When the acceleration suddenly changes, the mobile terminal falls, and before the acceleration returns to the acceleration shown in FIG. 1B , the mobile terminal is in a falling state.
S102,所述移动终端当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据;S102, when the mobile terminal detects that the system running state of the mobile terminal is a sleep state, obtain pre-stored first calibration data of the gyroscope;
其中,所述移动终端的系统运行状态为休眠状态可以理解为所述移动终端的应用处理器处于不运行的休眠状态,不存在功率消耗。Wherein, that the system operating state of the mobile terminal is a dormant state can be understood that the application processor of the mobile terminal is in a dormant state that is not running, and there is no power consumption.
其中,所述系统运行状态分为休眠状态和唤醒状态。Wherein, the system operating state is divided into a sleep state and a wake-up state.
其中,所述第一校准数据为所述移动终端存储的多组校准数据中的一组校准数据,所述移动终端预存的多组校准数据为所述移动终端多次历史跌落过程中,系统运行状态为唤醒状态时,实时获取的校准所述陀螺仪的校准数据。Wherein, the first calibration data is one set of calibration data among multiple sets of calibration data stored by the mobile terminal, and the multiple sets of calibration data pre-stored by the mobile terminal are the system running during multiple historical drops of the mobile terminal. When the state is the wake-up state, the calibration data for calibrating the gyroscope is acquired in real time.
其中,获取预存的第一校准数据的具体实现方式可以是多种多样的,例如可以是获取距离当前跌落状态最近的一次系统运行状态为唤醒状态下跌落事件发生时的陀螺仪校准数据,或者可以是与当前地点匹配的历史跌落事件中的陀螺仪校准数据,在此不做限定。The specific implementation of acquiring the pre-stored first calibration data may be various, for example, it may be to acquire the gyroscope calibration data when the drop event occurs when the system operating state closest to the current drop state is the wake-up state, or it may be It is the gyroscope calibration data in the historical drop events matching the current location, which is not limited here.
S103,所述移动终端根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。S103, the mobile terminal acquires multiple sets of angle data collected by the gyroscope according to the first calibration data, and determines an angle change value of the mobile terminal during the falling process according to the multiple sets of angle data.
其中,所述多组角速度数据为所述陀螺仪采集的数据通过所述第一校准数据校准后得到的所述多组角速度数据。The multiple sets of angular velocity data are the multiple sets of angular velocity data obtained after the data collected by the gyroscope is calibrated by the first calibration data.
其中,所述陀螺仪采集的数据通过所述第一校准数据校准的具体实现方式可以是多种多样的,例如可以是陀螺仪采集的数据加上第一校准数据得到多组角速度数据,或者可以是陀螺仪采集的数据减去第一校准数据得到多组角速度数据,在此不做唯一限定。Wherein, the specific implementation manner of calibrating the data collected by the gyroscope through the first calibration data may be various, for example, the data collected by the gyroscope may be added with the first calibration data to obtain multiple sets of angular velocity data, or It is the data collected by the gyroscope minus the first calibration data to obtain multiple sets of angular velocity data, which is not limited here.
其中,角度变化值为陀螺仪采集的多组角速度数据中的任一组角速度值对时间积分得到移动终端从跌落开始直到获取该组角速度值时刻,所述移动终端转过的角度。Wherein, the angle change value is any set of angular velocity values in the multiple sets of angular velocity data collected by the gyroscope, and the time integral is obtained to obtain the angle that the mobile terminal turns from the time the mobile terminal falls until the moment when the set of angular velocity values is obtained.
可以看出,本申请实施例中,移动终端首先当检测到移动终端处于跌落状态时,启动陀螺仪,其次,当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据,最后,根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。可见,移动终端在处于跌落状态时,启动陀螺仪,避免陀螺仪时刻处于工作状态时的电量消耗,而且,在系统运行状态为休眠状态时,使用历史记录中预存的第一校准数据,而不是获取实时数据,使陀螺仪根据第一校准数据采集多组角度数据,而不进行陀螺仪的校准,避免了在休眠状态下,因为校准陀螺仪唤醒应用处理器带来的功率消耗,有利于降低功耗,且在低功耗情况下发生跌落,降低移动终端的损坏程度,此外,使陀螺仪根据第一校准数据采集多组角度数据,有利于提升陀螺仪的准确性。It can be seen that, in the embodiment of the present application, the mobile terminal firstly starts the gyroscope when it is detected that the mobile terminal is in a falling state, and secondly, when it is detected that the system running state of the mobile terminal is in the sleep state, obtains the pre-stored gyroscope The first calibration data. Finally, according to the first calibration data, multiple sets of angle data collected by the gyroscope are acquired, and the angle change value of the mobile terminal during the falling process is determined by the multiple sets of angle data. It can be seen that when the mobile terminal is in a falling state, the gyroscope is activated to avoid power consumption when the gyroscope is in a working state at all times. Moreover, when the system running state is a sleep state, the first calibration data pre-stored in the history record is used instead of Acquire real-time data, so that the gyroscope can collect multiple sets of angle data according to the first calibration data without calibrating the gyroscope, which avoids the power consumption caused by calibrating the gyroscope to wake up the application processor in the sleep state, which is conducive to reducing the power consumption. power consumption, and the drop occurs under low power consumption, which reduces the damage degree of the mobile terminal. In addition, making the gyroscope collect multiple sets of angle data according to the first calibration data is beneficial to improve the accuracy of the gyroscope.
在一个可能的示例中,所述检测到移动终端处于跌落状态之后,所述方法还包括:In a possible example, after detecting that the mobile terminal is in a falling state, the method further includes:
根据加速度传感器确定跌落时所述移动终端的初始角度;Determine the initial angle of the mobile terminal when it falls according to the acceleration sensor;
所述根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值之后,所述方法还包括:After acquiring multiple sets of angle data collected by the gyroscope according to the first calibration data, and after determining the angle change value of the mobile terminal during the falling process by using the multiple sets of angle data, the method further includes:
根据所述移动终端的所述初始角度和所述角度变化值确定所述移动终端在所述跌落过程中撞击地面时的撞击角度。The impact angle of the mobile terminal when the mobile terminal hits the ground during the falling process is determined according to the initial angle of the mobile terminal and the angle change value.
其中,所述加速度传感器在跌落开始时通过如图1B所示的X轴、Y轴、Z轴获取的所述移动终端的静止时的初始角度值。Wherein, the acceleration sensor obtains the initial angle value of the mobile terminal when the mobile terminal is stationary through the X axis, the Y axis, and the Z axis as shown in FIG. 1B at the beginning of the fall.
其中,所述跌落过程中撞击地面时的撞击角度为所述移动终端首次撞击地面时的撞击角度,所述角度变化值为通过所述陀螺仪获取的所述移动终端从跌落开始到撞击地面时刻之间的移动终端的角度变化值。Wherein, the impact angle when the mobile terminal hits the ground during the falling process is the impact angle when the mobile terminal hits the ground for the first time, and the angle change value is obtained by the gyroscope from the start of the fall to the time when the mobile terminal hits the ground. The angle change value of the mobile terminal between.
可见,本示例中,移动终端通过加速度传感器获取移动终端跌落开始时刻移动终端的初始角度,继而通过陀螺仪获取跌落过程中移动终端的角度变化,最终确定移动终端跌落撞地时的角度值,获取了准确的跌落数据,有利于提升移动终端跌落数据分析的准确性。It can be seen that in this example, the mobile terminal obtains the initial angle of the mobile terminal when the mobile terminal starts to fall through the acceleration sensor, and then obtains the angle change of the mobile terminal during the drop process through the gyroscope, and finally determines the angle value when the mobile terminal falls and hits the ground, and obtains the Accurate drop data is conducive to improving the accuracy of mobile terminal drop data analysis.
在一个可能的示例中,所述获取预存的陀螺仪第一校准数据,包括:In a possible example, the acquiring pre-stored first calibration data of the gyroscope includes:
获取所述移动终端的目标环境参数,所述目标环境参数包括位置参数和温度参数;acquiring target environmental parameters of the mobile terminal, where the target environmental parameters include location parameters and temperature parameters;
查询预存的多组校准数据对应的参考环境参数,确定与所述目标环境参数匹配的参考环境参数对应的校准数据为所述第一校准数据。The reference environment parameters corresponding to the pre-stored multiple sets of calibration data are queried, and the calibration data corresponding to the reference environment parameters matching the target environment parameters is determined as the first calibration data.
其中,移动终端通过位置传感器获取位置参数,以及通过温度传感器获取温度参数。Wherein, the mobile terminal obtains the position parameter through the position sensor, and obtains the temperature parameter through the temperature sensor.
其中,预存的多组校准数据中的每组校准数据包括校准数据和参考环境参数,该参考环境参数包括参考位置参数和参考温度参数。Wherein, each set of calibration data in the pre-stored sets of calibration data includes calibration data and a reference environment parameter, and the reference environment parameter includes a reference position parameter and a reference temperature parameter.
可见,本示例中,移动终端根据当前的目标环境参数,查询预存的多组校准数据,确定出与当前目标环境参数匹配的第一校准数据,有利于提升陀螺仪获取角度变化值的智能性、便捷性和准确性。It can be seen that in this example, the mobile terminal queries multiple sets of pre-stored calibration data according to the current target environment parameters, and determines the first calibration data that matches the current target environment parameters, which is conducive to improving the intelligence of the gyroscope to obtain the angle change value, Convenience and accuracy.
在一个可能的示例中,所述检测到所述移动终端的系统运行状态为休眠状态之后,所述方法还包括:In a possible example, after it is detected that the system running state of the mobile terminal is a sleep state, the method further includes:
根据所述休眠状态,通知传感器服务SensorService取消针对第二校准数据的获取操作和写入操作,所述第二校准数据为实时校准数据。According to the sleep state, the sensor service SensorService is notified to cancel the acquiring operation and the writing operation for the second calibration data, where the second calibration data is real-time calibration data.
其中,取消针对第二校准数据的获取操作和写入操作为取消实时获取校准数据,即取消实时获取第二校准数据,该为获取预存的第一校准数据,以及取消针对第二校准数据的写入操作。Wherein, canceling the acquisition operation and writing operation for the second calibration data is canceling the real-time acquisition of the calibration data, that is, canceling the real-time acquisition of the second calibration data, which is acquiring the pre-stored first calibration data, and canceling the writing of the second calibration data. into operation.
可见,本示例中,移动终端在系统状态为休眠状态时,通知传感器服务取消实时获取第二校准数据,不需要在休眠状态唤醒应用处理器,有利于进一步降低功率消耗。It can be seen that, in this example, when the system state is in the sleep state, the mobile terminal notifies the sensor service to cancel the real-time acquisition of the second calibration data, and does not need to wake up the application processor in the sleep state, which is conducive to further reducing power consumption.
在一个可能的示例中,所述当检测到移动终端处于跌落状态时,启动陀螺仪之后,所述方法还包括:In a possible example, when it is detected that the mobile terminal is in a falling state, after starting the gyroscope, the method further includes:
当检测到所述移动终端的系统运行状态为唤醒状态时,获取第二校准数据;When it is detected that the system operating state of the mobile terminal is an awake state, acquiring second calibration data;
根据所述第二校准数据校准所述陀螺仪;Calibrate the gyroscope according to the second calibration data;
通过校准后的所述陀螺仪确定所述跌落过程中所述移动终端的角度变化值。The angle change value of the mobile terminal during the falling process is determined by the calibrated gyroscope.
其中,所述第二校准数据为实时获取并写入的陀螺仪校准数据,所述角度变化值同上所述为校准后的陀螺仪获取的实时角度值与时间的积分。Wherein, the second calibration data is gyroscope calibration data obtained and written in real time, and the angle change value is the integration of the real-time angle value and time obtained by the calibrated gyroscope as described above.
可见,本示例中,移动终端为唤醒状态时,实时获取第二校准数据,并根据第二校准数据校准陀螺仪,有利于提升陀螺仪数据获取的准确性,以及数据校准的实时性,而且在唤醒状态下校准陀螺仪,不需要重新唤醒应用处理器,不会增加移动终端的功率消耗。It can be seen that in this example, when the mobile terminal is in the wake-up state, the second calibration data is acquired in real time, and the gyroscope is calibrated according to the second calibration data, which is beneficial to improve the accuracy of gyroscope data acquisition and the real-time performance of data calibration, and in Calibrating the gyroscope in the wake-up state does not require re-awakening the application processor and does not increase the power consumption of the mobile terminal.
与所述图1A所示的实施例一致的,请参阅图2,图2是本申请实施例提供的另一种陀螺仪校准方法的流程示意图,如图所示,本陀螺仪校准方法包括:Consistent with the embodiment shown in FIG. 1A , please refer to FIG. 2 . FIG. 2 is a schematic flowchart of another gyroscope calibration method provided by an embodiment of the present application. As shown in the figure, the gyroscope calibration method includes:
S201,移动终端当检测到所述移动终端处于跌落状态时,启动陀螺仪。S201, when the mobile terminal detects that the mobile terminal is in a falling state, start the gyroscope.
S202,所述移动终端根据加速度传感器确定跌落时所述移动终端的初始角度。S202, the mobile terminal determines an initial angle of the mobile terminal when it falls according to an acceleration sensor.
S203,所述移动终端当检测到所述移动终端的系统运行状态为休眠状态时,获取所述移动终端的目标环境参数,所述目标环境参数包括位置参数和温度参数。S203: When detecting that the system running state of the mobile terminal is a sleep state, the mobile terminal acquires a target environment parameter of the mobile terminal, where the target environment parameter includes a location parameter and a temperature parameter.
S204,所述移动终端查询预存的多组校准数据对应的参考环境参数,确定与所述目标环境参数匹配的参考环境参数对应的校准数据为第一校准数据。S204, the mobile terminal queries the reference environment parameters corresponding to the pre-stored multiple sets of calibration data, and determines that the calibration data corresponding to the reference environment parameters matching the target environment parameter is the first calibration data.
S205,所述移动终端根据所述休眠状态,通知传感器服务SensorService取消针对第二校准数据的获取操作和写入操作,所述第二校准数据为实时校准数据。S205 , the mobile terminal notifies, according to the sleep state, the sensor service, SensorService, to cancel the acquiring operation and the writing operation for the second calibration data, where the second calibration data is real-time calibration data.
S206,所述移动终端根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。S206, the mobile terminal acquires multiple sets of angle data collected by the gyroscope according to the first calibration data, and determines the angle change value of the mobile terminal during the falling process according to the multiple sets of angle data.
S207,所述移动终端根据所述移动终端的所述初始角度和所述角度变化值确定所述移动终端在所述跌落过程中撞击地面时的撞击角度。S207, the mobile terminal determines, according to the initial angle of the mobile terminal and the angle change value, an impact angle of the mobile terminal when the mobile terminal hits the ground during the falling process.
可以看出,本申请实施例中,移动终端首先当检测到移动终端处于跌落状态时,启动陀螺仪,其次,当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据,最后,根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。可见,移动终端在处于跌落状态时,启动陀螺仪,避免陀螺仪时刻处于工作状态时的电量消耗,而且,在系统运行状态为休眠状态时,使用历史记录中预存的第一校准数据,而不是获取实时数据,使陀螺仪根据第一校准数据采集多组角度数据,而不进行陀螺仪的校准,避免了在休眠状态下,因为校准陀螺仪唤醒应用处理器带来的功率消耗,有利于降低功耗,且在低功耗情况下发生跌落,降低移动终端的损坏程度,此外,使陀螺仪根据第一校准数据采集多组角度数据,有利于提升陀螺仪的准确性。It can be seen that, in the embodiment of the present application, the mobile terminal firstly starts the gyroscope when it is detected that the mobile terminal is in a falling state, and secondly, when it is detected that the system running state of the mobile terminal is in the sleep state, obtains the pre-stored gyroscope The first calibration data. Finally, according to the first calibration data, multiple sets of angle data collected by the gyroscope are acquired, and the angle change value of the mobile terminal during the falling process is determined by the multiple sets of angle data. It can be seen that when the mobile terminal is in a falling state, the gyroscope is activated to avoid power consumption when the gyroscope is in a working state at all times. Moreover, when the system running state is a sleep state, the first calibration data pre-stored in the history record is used instead of Acquire real-time data, so that the gyroscope can collect multiple sets of angle data according to the first calibration data without calibrating the gyroscope, which avoids the power consumption caused by calibrating the gyroscope to wake up the application processor in the sleep state, which is conducive to reducing the power consumption. power consumption, and the drop occurs under low power consumption, which reduces the damage degree of the mobile terminal. In addition, making the gyroscope collect multiple sets of angle data according to the first calibration data is beneficial to improve the accuracy of the gyroscope.
此外,移动终端通过加速度传感器获取移动终端跌落开始时刻移动终端的初始角度,继而通过陀螺仪获取跌落过程中移动终端的角度变化,最终确定移动终端跌落撞地时的角度值,获取了准确的跌落数据,有利于提升移动终端跌落数据分析的准确性,而且,移动终端根据当前的目标环境参数,查询预存的多组校准数据,确定出与当前目标环境参数匹配的第一校准数据,有利于提升陀螺仪获取角度变化值的智能性、便捷性和准确性。In addition, the mobile terminal obtains the initial angle of the mobile terminal when the mobile terminal starts to fall through the acceleration sensor, and then obtains the angle change of the mobile terminal during the drop process through the gyroscope, and finally determines the angle value when the mobile terminal falls and hits the ground, and obtains accurate drop data. , which is conducive to improving the accuracy of the mobile terminal's drop data analysis. Moreover, the mobile terminal queries multiple sets of pre-stored calibration data according to the current target environment parameters, and determines the first calibration data that matches the current target environment parameters, which is conducive to improving the gyro The intelligence, convenience and accuracy of the instrument to obtain the angle change value.
此外,移动终端在系统状态为休眠状态时,通知传感器服务取消实时获取第二校准数据,不需要在休眠状态唤醒应用处理器,有利于进一步降低功率消耗。In addition, when the system state is in the sleep state, the mobile terminal notifies the sensor service to cancel the real-time acquisition of the second calibration data, and does not need to wake up the application processor in the sleep state, which is beneficial to further reduce power consumption.
与所述图1A所示的实施例一致的,请参阅图3,图3是本申请实施例提供的另一种陀螺仪校准方法的流程示意图,如图所示,本陀螺仪校准方法包括:Consistent with the embodiment shown in FIG. 1A , please refer to FIG. 3 . FIG. 3 is a schematic flowchart of another gyroscope calibration method provided by an embodiment of the present application. As shown in the figure, the gyroscope calibration method includes:
S301,移动终端当检测到所述移动终端处于跌落状态时,启动陀螺仪。S301, when the mobile terminal detects that the mobile terminal is in a falling state, start the gyroscope.
S302,所述移动终端根据加速度传感器确定跌落时所述移动终端的初始角度。S302, the mobile terminal determines the initial angle of the mobile terminal when it falls according to the acceleration sensor.
S303,所述移动终端当检测到所述移动终端的系统运行状态为唤醒状态时,获取第二校准数据。S303, the mobile terminal acquires second calibration data when detecting that the system running state of the mobile terminal is an awake state.
S304,所述移动终端根据所述第二校准数据校准所述陀螺仪。S304, the mobile terminal calibrates the gyroscope according to the second calibration data.
S305,所述移动终端通过校准后的所述陀螺仪确定所述跌落过程中所述移动终端的角度变化值。S305, the mobile terminal determines, by using the calibrated gyroscope, an angle change value of the mobile terminal during the falling process.
S306,所述移动终端根据所述移动终端的所述初始角度和所述角度变化值确定所述移动终端在所述跌落过程中撞击地面时的撞击角度。S306, the mobile terminal determines, according to the initial angle of the mobile terminal and the angle change value, an impact angle of the mobile terminal when the mobile terminal hits the ground during the falling process.
可以看出,本申请实施例中,移动终端首先当检测到移动终端处于跌落状态时,启动陀螺仪,其次,当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据,最后,根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。可见,移动终端在处于跌落状态时,启动陀螺仪,避免陀螺仪时刻处于工作状态时的电量消耗,而且,在系统运行状态为休眠状态时,使用历史记录中预存的第一校准数据,而不是获取实时数据,使陀螺仪根据第一校准数据采集多组角度数据,而不进行陀螺仪的校准,避免了在休眠状态下,因为校准陀螺仪唤醒应用处理器带来的功率消耗,有利于降低功耗,且在低功耗情况下发生跌落,降低移动终端的损坏程度,此外,使陀螺仪根据第一校准数据采集多组角度数据,有利于提升陀螺仪的准确性。It can be seen that, in the embodiment of the present application, the mobile terminal firstly starts the gyroscope when it is detected that the mobile terminal is in a falling state, and secondly, when it is detected that the system running state of the mobile terminal is in the sleep state, obtains the pre-stored gyroscope The first calibration data. Finally, according to the first calibration data, multiple sets of angle data collected by the gyroscope are acquired, and the angle change value of the mobile terminal during the falling process is determined by the multiple sets of angle data. It can be seen that when the mobile terminal is in a falling state, the gyroscope is activated to avoid power consumption when the gyroscope is in a working state at all times. Moreover, when the system running state is a sleep state, the first calibration data pre-stored in the history record is used instead of Acquire real-time data, so that the gyroscope can collect multiple sets of angle data according to the first calibration data without calibrating the gyroscope, which avoids the power consumption caused by calibrating the gyroscope to wake up the application processor in the sleep state, which is conducive to reducing the power consumption. power consumption, and the drop occurs under low power consumption, which reduces the damage degree of the mobile terminal. In addition, making the gyroscope collect multiple sets of angle data according to the first calibration data is beneficial to improve the accuracy of the gyroscope.
此外,移动终端为唤醒状态时,实时获取第二校准数据,并根据第二校准数据校准陀螺仪,有利于提升陀螺仪数据获取的准确性,以及数据校准的实时性,而且在唤醒状态下校准陀螺仪,不需要重新唤醒应用处理器,不会增加移动终端的功率消耗。In addition, when the mobile terminal is in the awake state, the second calibration data is acquired in real time, and the gyroscope is calibrated according to the second calibration data, which is beneficial to improve the accuracy of gyroscope data acquisition and the real-time performance of data calibration. The gyroscope does not need to re-wake the application processor and does not increase the power consumption of the mobile terminal.
与上述图1A、图2、图3所示的实施例一致的,请参阅图4,图4是本申请实施例提供的一种移动终端的结构示意图,如图所示,该移动终端包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行以下步骤的指令;Consistent with the embodiments shown in FIG. 1A , FIG. 2 , and FIG. 3 above, please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present application. As shown in the figure, the mobile terminal includes processing a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the program comprising instructions for performing the following steps;
当检测到移动终端处于跌落状态时,启动陀螺仪;When it is detected that the mobile terminal is in a falling state, start the gyroscope;
当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据;When it is detected that the system running state of the mobile terminal is the dormant state, acquiring pre-stored first calibration data of the gyroscope;
根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。Acquire multiple sets of angle data collected by the gyroscope according to the first calibration data, and determine the angle change value of the mobile terminal during the falling process by using the multiple sets of angle data.
可以看出,本申请实施例中,移动终端首先当检测到移动终端处于跌落状态时,启动陀螺仪,其次,当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据,最后,根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。可见,移动终端在处于跌落状态时,启动陀螺仪,避免陀螺仪时刻处于工作状态时的电量消耗,而且,在系统运行状态为休眠状态时,使用历史记录中预存的第一校准数据,而不是获取实时数据,使陀螺仪根据第一校准数据采集多组角度数据,而不进行陀螺仪的校准,避免了在休眠状态下,因为校准陀螺仪唤醒应用处理器带来的功率消耗,有利于降低功耗,且在低功耗情况下发生跌落,降低移动终端的损坏程度,此外,使陀螺仪根据第一校准数据采集多组角度数据,有利于提升陀螺仪的准确性。It can be seen that, in the embodiment of the present application, the mobile terminal firstly starts the gyroscope when it is detected that the mobile terminal is in a falling state, and secondly, when it is detected that the system running state of the mobile terminal is in the sleep state, obtains the pre-stored gyroscope The first calibration data. Finally, according to the first calibration data, multiple sets of angle data collected by the gyroscope are acquired, and the angle change value of the mobile terminal during the falling process is determined by the multiple sets of angle data. It can be seen that when the mobile terminal is in a falling state, the gyroscope is activated to avoid power consumption when the gyroscope is in a working state at all times. Moreover, when the system running state is a sleep state, the first calibration data pre-stored in the history record is used instead of Acquire real-time data, so that the gyroscope can collect multiple sets of angle data according to the first calibration data without calibrating the gyroscope, which avoids the power consumption caused by calibrating the gyroscope to wake up the application processor in the sleep state, which is conducive to reducing the power consumption. power consumption, and the drop occurs under low power consumption, which reduces the damage degree of the mobile terminal. In addition, making the gyroscope collect multiple sets of angle data according to the first calibration data is beneficial to improve the accuracy of the gyroscope.
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:在所述检测到移动终端处于跌落状态之后,根据加速度传感器确定跌落时所述移动终端的初始角度;In a possible example, the above program further includes an instruction for performing the following steps: after detecting that the mobile terminal is in a falling state, determine the initial angle of the mobile terminal when it falls according to the acceleration sensor;
上述程序还包括用于执行以下步骤的指令:在所述根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值之后,根据所述移动终端的所述初始角度和所述角度变化值确定所述移动终端在所述跌落过程中撞击地面时的撞击角度。The above program also includes instructions for performing the following steps: in the process of acquiring multiple sets of angle data collected by the gyroscope according to the first calibration data, and determining the position of the mobile terminal during the falling process by using the multiple sets of angle data. After the angle change value is determined, the impact angle of the mobile terminal when the mobile terminal hits the ground during the falling process is determined according to the initial angle of the mobile terminal and the angle change value.
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:所述检测到所述执行时长大于或等于第一预设时长阈值之前,确定所述第一应用程序的类别;以及以所述第一应用程序的类别为查询表示,查询应用程序类别与预设时长阈值的映射关系,确定所述第一应用程序的类别对应的所述第一预设时长阈值。In a possible example, the above program further includes instructions for performing the following steps: before the detection that the execution duration is greater than or equal to a first preset duration threshold, determine the category of the first application; and The category of the first application is a query representation, the mapping relationship between the category of the application and the preset duration threshold is queried, and the first preset duration threshold corresponding to the category of the first application is determined.
在一个可能的示例中,在所述获取预存的陀螺仪第一校准数据方面,所述程序中的指令具体用于执行以下操作:获取所述移动终端的目标环境参数,所述目标环境参数包括位置参数和温度参数;以及用于查询预存的多组校准数据对应的参考环境参数,确定与所述目标环境参数匹配的参考环境参数对应的校准数据为所述第一校准数据。In a possible example, in the aspect of acquiring the pre-stored first calibration data of the gyroscope, the instructions in the program are specifically used to perform the following operations: acquiring target environment parameters of the mobile terminal, where the target environment parameters include location parameters and temperature parameters; and reference environmental parameters corresponding to multiple sets of pre-stored calibration data are inquired, and the calibration data corresponding to the reference environmental parameters matching the target environmental parameters are determined as the first calibration data.
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:在所述检测到所述移动终端的系统运行状态为休眠状态之后,根据所述休眠状态,通知传感器服务SensorService取消针对第二校准数据的获取操作和写入操作,所述第二校准数据为实时校准数据。In a possible example, the above program further includes an instruction for executing the following steps: after it is detected that the system running state of the mobile terminal is a sleep state, according to the sleep state, notify the sensor service SensorService to cancel the Two operations of acquiring and writing calibration data, where the second calibration data is real-time calibration data.
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:所述当检测到移动终端处于跌落状态时,启动陀螺仪之后,当检测到所述移动终端的系统运行状态为唤醒状态时,获取第二校准数据;以及根据所述第二校准数据校准所述陀螺仪;以及通过校准后的所述陀螺仪确定所述跌落过程中所述移动终端的角度变化值。In a possible example, the above program further includes an instruction for executing the following steps: when it is detected that the mobile terminal is in a falling state, after starting the gyroscope, when it is detected that the system running state of the mobile terminal is a wake-up state when , obtain second calibration data; and calibrate the gyroscope according to the second calibration data; and determine the angle change value of the mobile terminal during the falling process by using the calibrated gyroscope.
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,移动终端为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所提供的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solutions of the embodiments of the present application from the perspective of the method-side execution process. It can be understood that, in order to implement the above-mentioned functions, the mobile terminal includes corresponding hardware structures and/or software modules for executing each function. Those skilled in the art should easily realize that the present application can be implemented in hardware or in the form of a combination of hardware and computer software, in combination with the units and algorithm steps of each example described in the embodiments provided herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对移动终端进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the mobile terminal may be divided into functional units according to the foregoing method examples. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and other division methods may be used in actual implementation.
图5A是本申请实施例中所涉及的陀螺仪校准装置500的功能单元组成框图。该陀螺仪校准装置500应用于移动终端,该陀螺仪校准装置500包括启动单元501、获取单元502和确定单元503,其中,FIG. 5A is a block diagram of functional units of the
所述启动单元501,用于当检测到移动终端处于跌落状态时,启动陀螺仪;The
所述获取单元502,用于当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据;The obtaining
所述确定单元503,用于根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。The determining
可以看出,本申请实施例中,移动终端首先当检测到移动终端处于跌落状态时,启动陀螺仪,其次,当检测到所述移动终端的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据,最后,根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值。可见,移动终端在处于跌落状态时,启动陀螺仪,避免陀螺仪时刻处于工作状态时的电量消耗,而且,在系统运行状态为休眠状态时,使用历史记录中预存的第一校准数据,而不是获取实时数据,使陀螺仪根据第一校准数据采集多组角度数据,而不进行陀螺仪的校准,避免了在休眠状态下,因为校准陀螺仪唤醒应用处理器带来的功率消耗,有利于降低功耗,且在低功耗情况下发生跌落,降低移动终端的损坏程度,此外,使陀螺仪根据第一校准数据采集多组角度数据,有利于提升陀螺仪的准确性。It can be seen that, in the embodiment of the present application, the mobile terminal firstly starts the gyroscope when it is detected that the mobile terminal is in a falling state, and secondly, when it is detected that the system running state of the mobile terminal is in the sleep state, obtains the pre-stored gyroscope The first calibration data. Finally, according to the first calibration data, multiple sets of angle data collected by the gyroscope are acquired, and the angle change value of the mobile terminal during the falling process is determined by the multiple sets of angle data. It can be seen that when the mobile terminal is in a falling state, the gyroscope is activated to avoid power consumption when the gyroscope is in a working state at all times. Moreover, when the system running state is a sleep state, the first calibration data pre-stored in the history record is used instead of Acquire real-time data, so that the gyroscope can collect multiple sets of angle data according to the first calibration data without calibrating the gyroscope, which avoids the power consumption caused by calibrating the gyroscope to wake up the application processor in the sleep state, which is conducive to reducing the power consumption. power consumption, and the drop occurs under low power consumption, which reduces the damage degree of the mobile terminal. In addition, making the gyroscope collect multiple sets of angle data according to the first calibration data is beneficial to improve the accuracy of the gyroscope.
在一个可能的示例中,所述确定单元503还用于:在所述检测到移动终端处于跌落状态之后,根据加速度传感器确定跌落时所述移动终端的初始角度;In a possible example, the determining
所述确定单元503还用于:在所述根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述移动终端的角度变化值之后,根据所述移动终端的所述初始角度和所述角度变化值确定所述移动终端在所述跌落过程中撞击地面时的撞击角度。The determining
在一个可能的示例中,在所述获取预存的陀螺仪第一校准数据方面,所述获取单元502具体用于:获取所述移动终端的目标环境参数,所述目标环境参数包括位置参数和温度参数;以及用于查询预存的多组校准数据对应的参考环境参数,确定与所述目标环境参数匹配的参考环境参数对应的校准数据为所述第一校准数据。In a possible example, in terms of acquiring the pre-stored first calibration data of the gyroscope, the acquiring
在一个可能的示例中,所述陀螺仪校准装置500还包括取消单元,In a possible example, the
所述取消单元,用于所述检测到所述移动终端的系统运行状态为休眠状态之后,根据所述休眠状态,通知传感器服务SensorService取消针对第二校准数据的获取操作和写入操作,所述第二校准数据为实时校准数据。The canceling unit is used for, after detecting that the system operating state of the mobile terminal is the dormant state, notify the sensor service SensorService to cancel the acquisition operation and write operation for the second calibration data according to the dormant state, and the The second calibration data is real-time calibration data.
在一个可能的示例中,如图5B所示,所述陀螺仪校准装置500还包括校准单元504,In a possible example, as shown in FIG. 5B , the
所述获取单元502还用于,所述当检测到移动终端处于跌落状态时,启动陀螺仪之后,当检测到所述移动终端的系统运行状态为唤醒状态时,获取第二校准数据;The acquiring
所述校准单元504,用于根据所述第二校准数据校准所述陀螺仪;the
所述确定单元503还用于,通过校准后的所述陀螺仪确定所述跌落过程中所述移动终端的角度变化值。The determining
具体的,启动单元501、获取单元502、确定单元503以及校准单元504可以是处理器或者收发器。Specifically, the
请参阅图6,图6是本申请实施例提供了一种智能手机600的结构示意图,上述智能手机600包括:壳体610、显示屏620、主板630,主板630上设置有前置摄像头631、处理器632、存储器633、电源管理芯片634,连接所述处理器的陀螺仪635、加速度传感器636等。Please refer to FIG. 6. FIG. 6 is a schematic structural diagram of a
其中,该智能手机当检测到该智能手机处于跌落状态时,启动陀螺仪;当检测到所述智能手机的系统运行状态为休眠状态时,获取预存的陀螺仪第一校准数据;根据所述第一校准数据获取所述陀螺仪采集的多组角度数据,通过所述多组角度数据确定跌落过程中所述智能手机的角度变化值。Wherein, the smart phone starts the gyroscope when it is detected that the smart phone is in a falling state; when it is detected that the system running state of the smart phone is in a dormant state, obtains the pre-stored first calibration data of the gyroscope; A calibration data acquires multiple sets of angle data collected by the gyroscope, and the angle change value of the smartphone during the falling process is determined by the multiple sets of angle data.
其中,上述陀螺仪635用于在智能手机运动的过程中获取智能手机的角速度,上述加速度传感器636用于在智能手机静止时通过三维坐标系确定智能手机静止时的角度值。The above-mentioned
上述处理器632是智能手机的控制中心,利用各种接口和线路连接整个智能手机的各个部分,通过运行或执行存储在存储器633内的软件程序和/或模块,以及调用存储在存储器633内的数据,执行智能手机的各种功能和处理数据,从而对智能手机进行整体监控。可选的,处理器632可包括一个或多个处理单元;优选的,处理器632可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器632中。该处理器632例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable GateArray,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。上述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。The above-mentioned
上述存储器633可用于存储软件程序以及模块,处理器632通过运行存储在存储器633的软件程序以及模块,从而执行智能手机的各种功能应用以及数据处理。存储器633可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据智能手机的使用所创建的数据等。此外,存储器633可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。该存储器633例如可以是随机存取存储器(RandomAccess Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(ElectricallyEPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质。The above-mentioned
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种陀螺仪校准方法的部分或全部步骤,上述计算机包括移动终端。Embodiments of the present application further provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables the computer to execute any of the gyroscope calibration methods described in the above method embodiments. For some or all of the steps, the above-mentioned computer includes a mobile terminal.
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中记载的任何一种陀螺仪校准方法的部分或全部步骤,上述计算机包括移动终端。Embodiments of the present application further provide a computer program product, the computer program product comprising a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to execute the methods described in the foregoing method embodiments Part or all of the steps of any gyroscope calibration method, the above-mentioned computer includes a mobile terminal.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or concurrently. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art, or all or part of the technical solution, and the computer software product is stored in a memory, Several instructions are included to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, referred to as: ROM), random access device (English: Random Access Memory, referred to as: RAM), magnetic disk or optical disk, etc.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application have been introduced in detail above, and the principles and implementations of the present application are described in this paper by using specific examples. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application; at the same time, for Persons of ordinary skill in the art, based on the idea of the present application, will have changes in the specific implementation manner and application scope. In summary, the contents of this specification should not be construed as limitations on the present application.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810376512.6A CN108600542B (en) | 2018-04-24 | 2018-04-24 | Gyroscope calibration method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810376512.6A CN108600542B (en) | 2018-04-24 | 2018-04-24 | Gyroscope calibration method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108600542A CN108600542A (en) | 2018-09-28 |
| CN108600542B true CN108600542B (en) | 2020-07-10 |
Family
ID=63609549
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810376512.6A Expired - Fee Related CN108600542B (en) | 2018-04-24 | 2018-04-24 | Gyroscope calibration method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108600542B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109855654A (en) * | 2019-03-11 | 2019-06-07 | 深圳市橙子数字科技有限公司 | Gyro calibiatio i method, apparatus, computer equipment and the storage medium of equipment |
| CN111459561B (en) * | 2020-04-01 | 2023-02-14 | 深圳创元智能软件科技有限公司 | Fall-based sleep control method and device and computer readable storage medium |
| CN114577192B (en) * | 2020-11-16 | 2025-06-10 | 罗伯特·博世有限公司 | Method and device for angle correction of gyroscope |
| CN112462956A (en) * | 2020-11-24 | 2021-03-09 | 江西小辣椒通讯技术有限责任公司 | Method, device and system for automatically locking screen during falling and storage medium |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006292690A (en) * | 2005-04-14 | 2006-10-26 | Asahi Kasei Electronics Co Ltd | System and method for determination of falling |
| US9342108B2 (en) * | 2011-09-16 | 2016-05-17 | Apple Inc. | Protecting an electronic device |
| US9689887B1 (en) * | 2012-12-07 | 2017-06-27 | Amazon Technologies, Inc. | Fall event monitoring |
| CN104092180B (en) * | 2014-06-20 | 2017-02-15 | 三星电子(中国)研发中心 | Collision detection processing method and device |
| CN105847689B (en) * | 2016-04-08 | 2019-02-19 | Oppo广东移动通信有限公司 | Focusing method and device and mobile terminal |
| CN106908082A (en) * | 2017-02-28 | 2017-06-30 | 百度在线网络技术(北京)有限公司 | Method, apparatus and system for the gyroscope in calibrating terminal |
-
2018
- 2018-04-24 CN CN201810376512.6A patent/CN108600542B/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| CN108600542A (en) | 2018-09-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108600542B (en) | Gyroscope calibration method and device | |
| CN108235754B (en) | A method and device for prompting a user to update an application version | |
| CN107635078B (en) | Game control method and device | |
| WO2019041280A1 (en) | Application resource recommendation method and related device | |
| JP6068660B2 (en) | Character selection method, character selection device, terminal device, program, and recording medium | |
| CN110837343B (en) | Method, device and terminal for processing snapshots | |
| CN107205088A (en) | Camera control method and Related product | |
| CN105960004A (en) | Mobile terminal positioning function control method, and mobile terminal | |
| CN108984066B (en) | Application icon display method and mobile terminal | |
| CN105783900B (en) | A kind of calibration method and device of sensing data | |
| CN107766370A (en) | A kind of file fragmentation appraisal procedure and terminal | |
| WO2019141085A1 (en) | Electronic device, collision data processing method and related products | |
| CN112559390B (en) | Data writing control method and storage device | |
| WO2015027864A1 (en) | Method, device and touch screen apparatus for refreshing content of draggable listview | |
| CN108388458A (en) | Message processing method and related products | |
| CN107613129A (en) | Unlocking method and related products | |
| WO2018161540A1 (en) | Fingerprint registration method and related product | |
| CN103677417B (en) | A kind of detect the method for gesture, device and terminal device | |
| CN107890667B (en) | game application program control method and device | |
| CN111651030B (en) | Sensor detection method and device, storage medium and mobile terminal | |
| CN107317917B (en) | Application control methods and related products | |
| CN112902988A (en) | Parameter calibration method, device, terminal and storage medium | |
| CN108307053B (en) | Electronic device, drop control method, and related products | |
| CN108197007A (en) | Electronic equipment, data processing method and Related product | |
| CN107679870A (en) | Brush amount resource determining method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200710 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |