Movatterモバイル変換


[0]ホーム

URL:


CN106354250B - A kind of method, apparatus and terminal that meter step parameter is set - Google Patents

A kind of method, apparatus and terminal that meter step parameter is set
Download PDF

Info

Publication number
CN106354250B
CN106354250BCN201610639908.6ACN201610639908ACN106354250BCN 106354250 BCN106354250 BCN 106354250BCN 201610639908 ACN201610639908 ACN 201610639908ACN 106354250 BCN106354250 BCN 106354250B
Authority
CN
China
Prior art keywords
terminal
swing angle
angle
acceleration
threshold
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
CN201610639908.6A
Other languages
Chinese (zh)
Other versions
CN106354250A (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 CN201610639908.6ApriorityCriticalpatent/CN106354250B/en
Publication of CN106354250ApublicationCriticalpatent/CN106354250A/en
Application grantedgrantedCritical
Publication of CN106354250BpublicationCriticalpatent/CN106354250B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例提供了一种设置计步参数的方法、装置及终端,该方法采用检测到终端处于被握持状态时,判断该终端是否处于运动状态,若判断结果为该终端处于运动状态,则获取该终端在竖直面内的摆动角度,判断该摆动角度是否大于预设角度,若判断结果为该摆动角度大于该预设角度,则减小该终端中触发计步的阈值;该方案当终端在竖直面内的摆动角度大于预设角度时,减小该终端中触发计步的阈值,相对于现有技术而言,触发计步的阈值结合了终端的实际运动情况来进行设置,提高了计步的准确性。

Embodiments of the present invention provide a method, device, and terminal for setting step counting parameters. The method uses the method to determine whether the terminal is in a motion state when it is detected that the terminal is in a held state. If the judgment result is that the terminal is in a motion state, Then obtain the swing angle of the terminal in the vertical plane, judge whether the swing angle is greater than the preset angle, if the judgment result is that the swing angle is greater than the preset angle, then reduce the threshold for triggering step counting in the terminal; the scheme When the swing angle of the terminal in the vertical plane is greater than the preset angle, the threshold for triggering step counting in the terminal is reduced. Compared with the prior art, the threshold for triggering step counting is set in combination with the actual motion of the terminal , to improve the accuracy of step counting.

Description

Translated fromChinese
一种设置计步参数的方法、装置及终端A method, device and terminal for setting step counting parameters

技术领域technical field

本发明涉及终端技术领域,具体涉及一种设置计步参数的方法、装置及终端。The invention relates to the technical field of terminals, in particular to a method, device and terminal for setting step counting parameters.

背景技术Background technique

计步器是通过统计用户运动的步数、距离、速度、时间等数据,测算卡路里或热量消耗,用以掌控用户的运动量,监测运动量不足或运动过量的一种工具。当前,计步器的应用越来越广泛,例如把计步器集成到终端中,通过终端中的硬件和计步器应用程序来完成计步器的计步功能。The pedometer is a tool that calculates calories or calorie consumption by counting the number of steps, distance, speed, time and other data of the user's exercise, so as to control the user's exercise amount and monitor the lack of exercise or excessive exercise. At present, pedometers are more and more widely used, such as integrating the pedometer into the terminal, and completing the step counting function of the pedometer through the hardware in the terminal and the pedometer application program.

计步器通过加速度传感器检测用户运动的加速度,并基于该检测值的变化对用户的步数进行计数。目前的计步器中,触发计步的加速度阈值通常为固定值。The pedometer detects the acceleration of the user's movement through the acceleration sensor, and counts the number of steps of the user based on the change of the detected value. In current pedometers, the acceleration threshold for triggering step counting is usually a fixed value.

但实践发现,用户的运动情况与使用终端的情况能够在很大程度上影响计步器的计步数据从而造成误差。例如,终端置于用户手中时,用户的摆臂行为会在终端中产生一个加速度,该加速度与用户运动的加速度并不总是一致的。该加速度与用户运动的加速度存在部分抵消的情况,使得终端中的加速度传感器检测到的加速度与用户运动的加速度不同,从而造成计步器计步的准确性低。However, it has been found in practice that the user's exercise situation and the use of the terminal can greatly affect the step counting data of the pedometer and cause errors. For example, when the terminal is placed in the user's hand, the user's arm swing action will generate an acceleration in the terminal, which is not always consistent with the acceleration of the user's movement. The acceleration partially cancels out the acceleration of the user's movement, so that the acceleration detected by the acceleration sensor in the terminal is different from the acceleration of the user's movement, resulting in low accuracy of step counting by the pedometer.

发明内容Contents of the invention

本发明实施例提供一种设置计步参数的方法、装置及终端,可以解决现有技术中计步器计步的准确性低的技术问题。Embodiments of the present invention provide a method, device and terminal for setting step counting parameters, which can solve the technical problem of low step counting accuracy of pedometers in the prior art.

本发明实施例提供一种设置计步参数的方法,包括:An embodiment of the present invention provides a method for setting step counting parameters, including:

检测到终端处于被握持状态时,判断所述终端是否处于运动状态;When it is detected that the terminal is in a held state, it is determined whether the terminal is in a motion state;

若判断结果为所述终端处于运动状态,则获取所述终端在竖直面内的摆动角度;If the judgment result is that the terminal is in a moving state, then acquiring the swing angle of the terminal in the vertical plane;

判断所述摆动角度是否大于预设角度;judging whether the swing angle is greater than a preset angle;

若判断结果为所述摆动角度大于所述预设角度,则减小所述终端中触发计步的阈值。If the judging result is that the swing angle is greater than the preset angle, the threshold for triggering step counting in the terminal is reduced.

优选地,所述判断所述终端是否处于运动状态的步骤具体包括:Preferably, the step of judging whether the terminal is in motion specifically includes:

获取所述终端的加速度;Acquiring the acceleration of the terminal;

判断所述加速度是否大于预设加速度;judging whether the acceleration is greater than a preset acceleration;

若是,则判断结果为所述终端处于运动状态。If yes, the determination result is that the terminal is in a motion state.

优选地,所述获取所述终端在竖直面内的摆动角度的步骤具体包括:Preferably, the step of obtaining the swing angle of the terminal in the vertical plane specifically includes:

获取所述终端在预设时间段内在竖直面内的最大摆动角度;Obtaining the maximum swing angle of the terminal in a vertical plane within a preset period of time;

以所述最大摆动角度作为所述终端在竖直面内的摆动角度。The maximum swing angle is used as the swing angle of the terminal in the vertical plane.

优选地,所述减小所述终端中触发计步的阈值的步骤具体包括:Preferably, the step of reducing the threshold for triggering step counting in the terminal specifically includes:

获取所述摆动角度与所述预设角度的差值;Acquiring the difference between the swing angle and the preset angle;

根据所述差值获取触发计步的阈值的减小幅度;Acquiring the reduction range of the threshold triggering step counting according to the difference;

根据所述减小幅度减小所述终端中触发计步的阈值。Decreasing the threshold for triggering step counting in the terminal according to the reduction range.

优选地,所述减小所述终端中触发计步的阈值的步骤具体包括:Preferably, the step of reducing the threshold for triggering step counting in the terminal specifically includes:

获取所述摆动角度对应的目标阈值;Acquiring a target threshold corresponding to the swing angle;

将所述终端中触发计步的阈值设置为所述目标阈值。Setting the threshold for triggering step counting in the terminal as the target threshold.

相应的,本发明实施例还提供一种设置计步参数的装置,包括:Correspondingly, the embodiment of the present invention also provides a device for setting step counting parameters, including:

第一判断模块,用于当检测到终端处于被握持状态时,判断所述终端是否处于运动状态;A first judging module, configured to judge whether the terminal is in a motion state when it is detected that the terminal is in a held state;

获取模块,用于当所述第一判断模块的判断结果为所述终端处于运动状态时,获取所述终端在竖直面内的摆动角度;An acquisition module, configured to acquire a swing angle of the terminal in a vertical plane when the judgment result of the first judgment module is that the terminal is in motion;

第二判断模块,用于判断所述摆动角度是否大于预设角度;The second judging module is used to judge whether the swing angle is greater than a preset angle;

调整模块,用于当所述第二判断模块的判断结果为所述摆动角度大于所述预设角度时,减小所述终端中触发计步的阈值。An adjustment module, configured to reduce the threshold for triggering step counting in the terminal when the judgment result of the second judgment module is that the swing angle is greater than the preset angle.

优选地,所述第一判断模块具体包括:Preferably, the first judging module specifically includes:

获取子模块,用于获取所述终端的加速度;an acquisition submodule, configured to acquire the acceleration of the terminal;

判断子模块,用于判断所述加速度是否大于预设加速度;若是,则判断结果为所述终端处于运动状态。The judging sub-module is used to judge whether the acceleration is greater than a preset acceleration; if yes, the judging result is that the terminal is in a motion state.

优选地,所述获取模块具体用于:Preferably, the acquisition module is specifically used for:

当所述第一判断模块的判断结果为所述终端处于运动状态时,获取所述终端在预设时间段内在竖直面内的最大摆动角度;When the judgment result of the first judging module is that the terminal is in motion, acquire the maximum swing angle of the terminal in the vertical plane within a preset time period;

以所述最大摆动角度作为所述终端在竖直面内的摆动角度。The maximum swing angle is used as the swing angle of the terminal in the vertical plane.

优选地,所述调整模块具体用于:Preferably, the adjustment module is specifically used for:

当所述第二判断模块的判断结果为所述摆动角度大于所述预设角度时,获取所述摆动角度与所述预设角度的差值;When the judgment result of the second judging module is that the swing angle is greater than the preset angle, obtain the difference between the swing angle and the preset angle;

根据所述差值获取触发计步的阈值的减小幅度;Acquiring the reduction range of the threshold triggering step counting according to the difference;

根据所述减小幅度减小所述终端中触发计步的阈值。Decreasing the threshold for triggering step counting in the terminal according to the reduction range.

优选地,所述调整模块具体用于:Preferably, the adjustment module is specifically used for:

当所述第二判断模块的判断结果为所述摆动角度大于所述预设角度时,获取所述摆动角度对应的目标阈值;When the judgment result of the second judging module is that the swing angle is greater than the preset angle, acquire a target threshold corresponding to the swing angle;

将所述终端中触发计步的阈值设置为所述目标阈值。Setting the threshold for triggering step counting in the terminal as the target threshold.

相应的,本发明实施例还提供一种终端,包括上述任一项所述的设置计步参数的装置。Correspondingly, an embodiment of the present invention also provides a terminal, including the device for setting step counting parameters described in any one of the above.

本发明实施例采用检测到终端处于被握持状态时,判断该终端是否处于运动状态;若判断结果为该终端处于运动状态,则获取该终端在竖直面内的摆动角度;判断该摆动角度是否大于预设角度;若判断结果为该摆动角度大于该预设角度,则减小该终端中触发计步的阈值。该方案在终端处于运动状态时,判断终端在竖直面内的摆动角度是否大于预设角度,若是,则减小该终端中触发计步的阈值。相对于现有技术而言,触发计步的阈值不再是固定值,而是根据终端的摆动角度相应减小,触发计步的阈值结合了终端的实际运动情况来进行设置,提高了计步的准确性。In the embodiment of the present invention, when it is detected that the terminal is in a held state, it is judged whether the terminal is in a motion state; if the judgment result is that the terminal is in a motion state, then the swing angle of the terminal in a vertical plane is acquired; Whether it is greater than the preset angle; if the judgment result is that the swing angle is greater than the preset angle, then reduce the threshold for triggering step counting in the terminal. In this solution, when the terminal is in a moving state, it is judged whether the swing angle of the terminal in the vertical plane is greater than a preset angle, and if so, the threshold for triggering step counting in the terminal is reduced. Compared with the existing technology, the threshold for triggering step counting is no longer a fixed value, but is correspondingly reduced according to the swing angle of the terminal. The threshold for triggering step counting is set in combination with the actual movement of the terminal, which improves the step counting. accuracy.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to these drawings without creative work.

图1是本发明实施例一提供的设置计步参数的方法的流程示意图;FIG. 1 is a schematic flowchart of a method for setting step counting parameters provided by Embodiment 1 of the present invention;

图2是本发明实施例二提供的设置计步参数的方法的流程示意图;FIG. 2 is a schematic flowchart of a method for setting step counting parameters provided by Embodiment 2 of the present invention;

图3是本发明实施例三提供的第一种设置计步参数的装置的结构示意图;Fig. 3 is a schematic structural diagram of the first device for setting step counting parameters provided by Embodiment 3 of the present invention;

图4是本发明实施例三提供的第二种设置计步参数的装置的结构示意图;Fig. 4 is a schematic structural diagram of a second device for setting step counting parameters provided by Embodiment 3 of the present invention;

图5是本发明实施例四提供的第一种终端的结构示意图;FIG. 5 is a schematic structural diagram of a first type of terminal provided in Embodiment 4 of the present invention;

图6是本发明实施例四提供的第二种终端的结构示意图。FIG. 6 is a schematic structural diagram of a second type of terminal provided by Embodiment 4 of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例提供一种设置计步参数的方法、装置及终端,以下将分别进行详细说明。Embodiments of the present invention provide a method, device, and terminal for setting step counting parameters, which will be described in detail below.

实施例一Embodiment one

本实施例将从设置计步参数的装置的角度进行描述,该装置具体可以集成在终端中,该终端可以是智能手机、平板电脑等设备。This embodiment will be described from the perspective of a device for setting step counting parameters. Specifically, the device may be integrated into a terminal, and the terminal may be a smart phone, a tablet computer and other devices.

一种设置计步参数的方法,包括:检测到终端处于被握持状态时,判断该终端是否处于运动状态;若判断结果为该终端处于运动状态,则获取该终端在竖直面内的摆动角度;判断该摆动角度是否大于预设角度;若判断结果为该摆动角度大于预设角度,则减小该终端中触发计步的阈值。A method for setting step counting parameters, comprising: when it is detected that a terminal is held, judging whether the terminal is in a motion state; if the judgment result is that the terminal is in a motion state, acquiring the swing of the terminal in a vertical plane angle; determine whether the swing angle is greater than a preset angle; if the result of the determination is that the swing angle is greater than the preset angle, then reduce the threshold for triggering step counting in the terminal.

如图1所示,设置计步参数的方法,具体流程可以包括:As shown in Figure 1, the method for setting the step counting parameters, the specific process may include:

S101,检测到终端处于被握持状态时,判断该终端是否处于运动状态。S101. When it is detected that the terminal is in a held state, determine whether the terminal is in a moving state.

具体应用中,可以在终端中设置握持传感器。握持传感器可以是电容式传感器。该握持传感器可以设置在终端的侧边或背面,还可以设置在终端的配件中。例如,握持传感器设置在终端的保护套中,保护套通过有线通信或无线通信方式与终端进行数据连接。In a specific application, a grip sensor may be set in the terminal. The grip sensor may be a capacitive sensor. The grip sensor can be set on the side or back of the terminal, and can also be set in accessories of the terminal. For example, the grip sensor is disposed in a protective case of the terminal, and the protective case is connected to the terminal for data through wired communication or wireless communication.

终端通过握持传感器实时检测终端是否处于被握持状态。当用户将终端置于手中时,握持传感器会感应到并产生相应的信号,终端接收到该信号时即表明终端处于被握持状态。然后判断终端是否处于运动状态。The terminal detects in real time whether the terminal is being held by the holding sensor. When the user puts the terminal in the hand, the grip sensor will sense and generate a corresponding signal, and when the terminal receives the signal, it indicates that the terminal is in a gripped state. Then determine whether the terminal is in a motion state.

具体地,可以在终端中设置加速度传感器,根据加速度传感器采集到的终端的加速度来判断终端是否处于运动状态。该加速度可以是终端在竖直方向的加速度,也可以是终端在三个轴向的加速度的合加速度。判断该终端是否处于运动状态可以具体包括以下步骤:Specifically, an acceleration sensor may be provided in the terminal, and whether the terminal is in a motion state is determined according to the acceleration of the terminal collected by the acceleration sensor. The acceleration may be the acceleration of the terminal in the vertical direction, or may be the combined acceleration of the accelerations of the terminal in the three axes. Judging whether the terminal is in motion may specifically include the following steps:

获取该终端的加速度;Obtain the acceleration of the terminal;

判断该加速度是否大于预设加速度;Judging whether the acceleration is greater than a preset acceleration;

若是,则判断结果为该终端处于运动状态。If yes, the judgment result is that the terminal is in a motion state.

具体地,预设加速度可以是终端中预先存储的一个加速度数值,也可以是用户设置并存储在终端中的一个加速度数值。例如,2m/s2。终端通过加速度传感器实时获取终端的加速度,然后将该加速度与预设加速度进行比较,以判断该加速度是否大于预设加速度。若该加速度大于预设加速度,则判断结果为该终端处于运动状态,随后执行步骤S102;若该加速度不大于预设加速度,则判断结果为该终端不处于运动状态,可重新执行步骤S101。Specifically, the preset acceleration may be an acceleration value pre-stored in the terminal, or an acceleration value set by the user and stored in the terminal. For example, 2m/s2 . The terminal acquires the acceleration of the terminal in real time through the acceleration sensor, and then compares the acceleration with a preset acceleration to determine whether the acceleration is greater than the preset acceleration. If the acceleration is greater than the preset acceleration, it is judged that the terminal is in motion, and then step S102 is executed; if the acceleration is not greater than the preset acceleration, it is judged that the terminal is not in motion, and step S101 can be re-executed.

S102,获取该终端在竖直面内的摆动角度。S102. Obtain the swing angle of the terminal in the vertical plane.

实际应用中,终端是随用户一起运动的,终端处于运动状态即用户也处于运动状态。用户在运动(例如,走路)时,通常会伴随有摆臂行为,此时会使得终端在竖直面内发生摆动。可以在终端中设置传感器(例如,陀螺仪)来检测终端的摆动,获取终端在竖直面内的摆动角度。获取该终端在竖直面内的摆动角度可以具体包括以下步骤:In practical applications, the terminal moves together with the user, and when the terminal is in a moving state, the user is also in a moving state. When the user moves (for example, walks), it is usually accompanied by an arm swing action, which will cause the terminal to swing in the vertical plane. A sensor (for example, a gyroscope) may be provided in the terminal to detect the swing of the terminal, and obtain the swing angle of the terminal in the vertical plane. Obtaining the swing angle of the terminal in the vertical plane may specifically include the following steps:

获取该终端在预设时间段内在竖直面内的最大摆动角度;Obtain the maximum swing angle of the terminal in the vertical plane within the preset time period;

以该最大摆动角度作为该终端在竖直面内的摆动角度。The maximum swing angle is used as the swing angle of the terminal in the vertical plane.

具体地,预设时间段可以是预先存储在终端中的一个时间段。例如,10s。终端通过传感器实时检测该终端在预设时间段内的摆动角度,并计算终端在该预设时间段内的最大摆动角度。例如,在该预设时间段内,检测到终端在正方向的最大摆动角度为10°、在负方向的最大摆动角度为10°(可以用户前行的方向为正方向,用户前行的方向的反方向为负方向),则该终端的最大摆动角度为20°。然后以该最大摆动角度作为该终端在竖直面内的摆动角度。Specifically, the preset time period may be a time period pre-stored in the terminal. For example, 10s. The terminal detects in real time the swing angle of the terminal within the preset time period through the sensor, and calculates the maximum swing angle of the terminal within the preset time period. For example, within the preset time period, it is detected that the maximum swing angle of the terminal in the positive direction is 10°, and the maximum swing angle in the negative direction is 10° (the direction in which the user is moving is the positive direction, and the direction in which the user is moving The opposite direction is the negative direction), then the maximum swing angle of the terminal is 20°. Then use the maximum swing angle as the swing angle of the terminal in the vertical plane.

S103,判断该摆动角度是否大于预设角度。S103, judging whether the swing angle is greater than a preset angle.

具体地,预设角度可以是预先存储在终端中的一个角度值,也可以是用户设置并存储在终端中的一个角度值。例如,15°。获取到终端在竖直面内的摆动角度后,将该摆动角度与预设角度进行比较,以判断该摆动角度是否大于预设角度。若判断结果为该摆动角度大于该预设角度,则执行步骤S104;若判断结果为该摆动角度不大于该预设角度,可返回执行步骤S101。Specifically, the preset angle may be an angle value pre-stored in the terminal, or an angle value set by the user and stored in the terminal. For example, 15°. After the swing angle of the terminal in the vertical plane is acquired, the swing angle is compared with a preset angle to determine whether the swing angle is greater than the preset angle. If the judging result is that the swing angle is larger than the preset angle, execute step S104; if the judging result is that the swing angle is not larger than the preset angle, go back to step S101.

S104,减小该终端中触发计步的阈值。S104. Decrease the threshold for triggering step counting in the terminal.

具体应用中,终端中触发计步的阈值是预先设置的。该阈值可以是一个加速度值。例如,3m/s2。当S103中判断结果为该摆动角度大于预设角度时,减小该触发计步的阈值。减小该终端中触发计步的阈值可以具体包括以下步骤:In a specific application, the threshold for triggering step counting in the terminal is preset. The threshold can be an acceleration value. For example, 3m/s2 . When the judging result in S103 is that the swing angle is greater than the preset angle, reduce the threshold for triggering step counting. Reducing the threshold for triggering step counting in the terminal may specifically include the following steps:

获取该摆动角度与该预设角度的差值;Obtain the difference between the swing angle and the preset angle;

根据该差值获取触发计步的阈值的减小幅度;Obtain the reduction range of the threshold for triggering step counting according to the difference;

根据该减小幅度减小该终端中触发计步的阈值。The threshold for triggering step counting in the terminal is reduced according to the reduction range.

具体地,当该摆动角度大于预设角度时,计算该摆动角度与该预设角度的差值。可以在终端中预先存储该差值与触发计步的阈值的减小幅度之间的映射关系。获取到差值后,根据该差值和该映射关系获取对应的减小幅度。随后根据该减小幅度减小终端中触发计步的阈值。该减小幅度可以是具体的数值,也可以是百分比。Specifically, when the swing angle is greater than the preset angle, the difference between the swing angle and the preset angle is calculated. The mapping relationship between the difference and the decrease range of the threshold triggering step counting may be pre-stored in the terminal. After the difference is obtained, the corresponding reduction range is obtained according to the difference and the mapping relationship. The threshold for triggering step counting in the terminal is then reduced according to the magnitude of the reduction. The reduction range may be a specific numerical value or a percentage.

减小该终端中触发计步的阈值也可以具体包括以下步骤:Reducing the threshold for triggering step counting in the terminal may also specifically include the following steps:

获取该摆动角度对应的目标阈值;Obtain the target threshold corresponding to the swing angle;

将该终端中触发计步的阈值设置为该目标阈值。Set the threshold that triggers step counting in the terminal to the target threshold.

具体地,可以在终端中预先存储摆动角度与目标阈值之间的映射关系。根据该摆动角度和该映射关系获取对应的目标阈值,然后将该终端中触发计步的阈值设置为该目标阈值。Specifically, the mapping relationship between the swing angle and the target threshold may be pre-stored in the terminal. Obtain the corresponding target threshold according to the swing angle and the mapping relationship, and then set the threshold for triggering step counting in the terminal as the target threshold.

具体实施时,本发明不受所描述的各个步骤的执行顺序的限制,在不产生冲突的情况下,某些步骤还可以采用其它顺序进行或者同时进行。During specific implementation, the present invention is not limited by the execution order of the described steps, and some steps may be performed in other orders or simultaneously if no conflict arises.

由上可知,本发明实施例提供的设置计步参数的方法,采用检测到终端处于被握持状态时,判断该终端是否处于运动状态;若判断结果为该终端处于运动状态,则获取该终端在竖直面内的摆动角度;判断该摆动角度是否大于预设角度;若判断结果为该摆动角度大于该预设角度,则减小该终端中触发计步的阈值。该方案在终端处于运动状态时,判断终端在竖直面内的摆动角度是否大于预设角度,若是,则减小该终端中触发计步的阈值。相对于现有技术而言,触发计步的阈值不再是固定值,而是根据终端的摆动角度相应减小,触发计步的阈值结合了终端的实际运动情况来进行设置,提高了计步的准确性。As can be seen from the above, the method for setting the step counting parameters provided by the embodiment of the present invention adopts the method of determining whether the terminal is in a motion state when it is detected that the terminal is in a held state; if the judgment result is that the terminal is in a motion state, then obtain the The swing angle in the vertical plane; judging whether the swing angle is greater than a preset angle; if the judgment result is that the swing angle is greater than the preset angle, then reducing the threshold for triggering step counting in the terminal. In this solution, when the terminal is in a moving state, it is judged whether the swing angle of the terminal in the vertical plane is greater than a preset angle, and if so, the threshold for triggering step counting in the terminal is reduced. Compared with the existing technology, the threshold for triggering step counting is no longer a fixed value, but is correspondingly reduced according to the swing angle of the terminal. The threshold for triggering step counting is set in combination with the actual movement of the terminal, which improves the step counting. accuracy.

实施例二Embodiment two

根据实施例一所描述的设置计步参数的方法,以下将举例作进一步详细说明。According to the method for setting step counting parameters described in the first embodiment, an example will be given below for further detailed description.

在本实施例中,将以设置计步参数的方法具体集成在智能手机中,以智能手机中设置计步参数的方法为例进行详细描述。In this embodiment, the method for setting the step counting parameter will be specifically integrated in the smart phone, and the method for setting the step counting parameter in the smart phone will be described in detail as an example.

如图2所示,设置计步参数的方法,具体流程可以如下:As shown in Figure 2, the method for setting the step counting parameters, the specific process can be as follows:

S201,检测到智能手机处于被握持状态时,获取该智能手机的加速度。S201. Acquire the acceleration of the smart phone when it is detected that the smart phone is held.

具体地,在智能手机中集成有握持传感器。当用户将智能手机置于手中时,握持传感器会感应到并产生相应的信号。智能手机接收到该信号时,即表明智能手机处于被握持状态。Specifically, a grip sensor is integrated in the smart phone. When the user places the smartphone in the hand, the grip sensor senses and generates a corresponding signal. When the smart phone receives the signal, it indicates that the smart phone is in a state of being held.

在智能手机中还集成有加速度传感器。当智能手机处于被握持状态时,通过加速度传感器实时获取智能手机的加速度。An acceleration sensor is also integrated in the smartphone. When the smart phone is held, the acceleration of the smart phone is obtained in real time through the acceleration sensor.

S202,判断该加速度是否大于预设加速度。S202, judging whether the acceleration is greater than a preset acceleration.

具体地,预设加速度是预先存储在智能手机中的一个加速度值。例如,2m/s2。智能手机获取到加速度后,调用存储在智能手机中的预设加速度,将获取到的加速度与预设加速度进行比较,以判断该加速度是否大于预设加速度。当判断结果为该加速度大于预设加速度时,执行步骤S203;当判断结果为该加速度不大于预设加速度时,返回执行步骤S201。Specifically, the preset acceleration is an acceleration value pre-stored in the smart phone. For example, 2m/s2 . After acquiring the acceleration, the smart phone calls the preset acceleration stored in the smart phone, and compares the acquired acceleration with the preset acceleration to determine whether the acceleration is greater than the preset acceleration. When the judging result is that the acceleration is greater than the preset acceleration, execute step S203; when the judging result is that the acceleration is not greater than the preset acceleration, return to step S201.

S203,判断结果为该智能手机处于运动状态。S203, the result of judging is that the smart phone is in a motion state.

具体地,当获取到的智能手机的加速度大于预设加速度时,则判断结果为该智能手机处于运动状态。随后执行步骤S204。Specifically, when the acquired acceleration of the smart phone is greater than the preset acceleration, it is determined that the smart phone is in a motion state. Then step S204 is executed.

S204,获取该智能手机在预设时间段内在竖直面内的最大摆动角度。S204. Obtain the maximum swing angle of the smart phone in the vertical plane within a preset time period.

具体地,在智能手机中集成有陀螺仪,用来实时检测智能手机的摆动,获取智能手机在竖直面内的摆动角度。预设时间段可以是预先存储在智能手机中的一个时间段。例如,10s。智能手机通过陀螺仪实时检测在预设时间段内的摆动角度,并计算智能手机在该预设时间段内的最大摆动角度。例如,在该预设的10s内,检测到智能手机在正方向的最大摆动角度为10°、在负方向的最大摆动角度为10°(可以用户前行的方向为正方向,用户前行的方向的反方向为负方向),则智能手机的最大摆动角度为20°。Specifically, the smart phone is integrated with a gyroscope, which is used to detect the swing of the smart phone in real time, and obtain the swing angle of the smart phone in the vertical plane. The preset time period may be a time period pre-stored in the smart phone. For example, 10s. The smart phone uses the gyroscope to detect in real time the swing angle within the preset time period, and calculates the maximum swing angle of the smart phone within the preset time period. For example, within the preset 10s, it is detected that the maximum swing angle of the smart phone in the positive direction is 10°, and the maximum swing angle in the negative direction is 10° (the direction in which the user is moving is the positive direction, and the direction in which the user is moving is The opposite direction of the direction is the negative direction), then the maximum swing angle of the smartphone is 20°.

S205,以该最大摆动角度作为该智能手机在竖直面内的摆动角度。S205. Use the maximum swing angle as the swing angle of the smart phone in the vertical plane.

具体地,获取到智能手机在预设时间段内在竖直面内的最大摆动角度后,以该最大摆动角度作为该智能手机在竖直面内的摆动角度。Specifically, after obtaining the maximum swing angle of the smart phone in the vertical plane within a preset time period, the maximum swing angle is used as the swing angle of the smart phone in the vertical plane.

S206,判断该摆动角度是否大于预设角度。S206, judging whether the swing angle is greater than a preset angle.

具体地,预设角度可以是预先存储在智能手机中的一个角度值。例如,预设角度为15°。获取到智能手机在竖直面内的摆动角度后,将该摆动角度与预设角度进行比较,以判断该摆动角度是否大于预设角度。若判断结果为该摆动角度大于该预设角度,则执行步骤S207;若判断结果为该摆动角度不大于该预设角度,可返回执行步骤S201。Specifically, the preset angle may be an angle value pre-stored in the smart phone. For example, the preset angle is 15°. After obtaining the swing angle of the smart phone in the vertical plane, the swing angle is compared with the preset angle to determine whether the swing angle is greater than the preset angle. If the judging result is that the swing angle is larger than the preset angle, execute step S207; if the judging result is that the swing angle is not larger than the preset angle, go back to step S201.

S207,获取该摆动角度与该预设角度的差值。S207. Obtain a difference between the swing angle and the preset angle.

具体地,当判断结果为该摆动角度大于该预设角度后,计算该摆动角度与该预设角度的差值。例如,获取到的摆动角度为20°,预设角度为15°,则该摆动角度与该预设角度的差值为5°。Specifically, when the judging result is that the swing angle is greater than the preset angle, the difference between the swing angle and the preset angle is calculated. For example, if the acquired swing angle is 20° and the preset angle is 15°, the difference between the swing angle and the preset angle is 5°.

S208,根据该差值获取触发计步的阈值的减小幅度。S208. Obtain the decrease range of the threshold for triggering step counting according to the difference.

具体地,可以在智能手机中预先存储差值与触发计步的阈值的减小幅度之间的映射关系。获取到差值后,根据该差值和该映射关系获取对应的减小幅度。该减小幅度可以是具体的数值,也可以是百分比。例如,该减小幅度可以为0.2m/s2,该减小幅度也可以为0.5%。优选地,在智能手机中,该减小幅度为32mg(32mg为计步器阈值的最小调整单位)的整数倍。Specifically, the mapping relationship between the difference and the decrease range of the threshold triggering step counting may be pre-stored in the smart phone. After the difference is obtained, the corresponding reduction range is obtained according to the difference and the mapping relationship. The reduction range may be a specific numerical value or a percentage. For example, the reduction range can be 0.2m/s2 , and the reduction range can also be 0.5%. Preferably, in the smart phone, the reduction range is an integer multiple of 32mg (32mg is the minimum adjustment unit of the pedometer threshold).

S209,根据该减小幅度减小该智能手机中触发计步的阈值。S209. Decrease the threshold for triggering step counting in the smart phone according to the decrease range.

具体地,获取到减小幅度后,根据该减小幅度减小智能手机中触发计步的阈值。例如,原始设置的阈值为3m/s2,获取到的减小幅度为0.2m/s2,则减小后的阈值为2.8m/s2Specifically, after the reduction range is obtained, the threshold for triggering step counting in the smart phone is reduced according to the reduction range. For example, if the originally set threshold is 3m/s2 , and the acquired reduction range is 0.2m/s2 , then the reduced threshold is 2.8m/s2 .

具体实施时,本发明不受所描述的各个步骤的执行顺序的限制,在不产生冲突的情况下,某些步骤还可以采用其它顺序进行或者同时进行。During specific implementation, the present invention is not limited by the execution order of the described steps, and some steps may be performed in other orders or simultaneously if no conflict arises.

由上可知,本发明实施例提供的设置计步参数的方法,采用检测到智能手机处于被握持状态时,获取该智能手机的加速度;判断该加速度是否大于预设加速度;若是,则判断结果为该智能手机处于运动状态;随后获取该智能手机在预设时间段内在竖直面内的最大摆动角度,以该最大摆动角度作为该智能手机在竖直面内的摆动角度;判断该摆动角度是否大于预设角度;若是,则获取该摆动角度与该预设角度的差值;根据该差值获取触发计步的阈值的减小幅度;根据该减小幅度减小该智能手机中触发计步的阈值。该方案在智能手机处于运动状态时,判断智能手机在竖直面内的摆动角度是否大于预设角度,若是,则减小该智能手机中触发计步的阈值。相对于现有技术而言,触发计步的阈值不再是固定值,而是根据智能手机的摆动角度相应减小,触发计步的阈值结合了智能手机的实际运动情况来进行设置,提高了计步的准确性。As can be seen from the above, the method for setting the pedometer parameters provided by the embodiment of the present invention adopts the method of obtaining the acceleration of the smart phone when it is detected that the smart phone is in a held state; judging whether the acceleration is greater than the preset acceleration; if so, judging the result The smart phone is in motion; then obtain the maximum swing angle of the smart phone in the vertical plane within a preset time period, and use the maximum swing angle as the swing angle of the smart phone in the vertical plane; determine the swing angle Whether it is greater than the preset angle; if yes, then obtain the difference between the swing angle and the preset angle; obtain the reduction range of the threshold for triggering step counting according to the difference; reduce the trigger count in the smart phone according to the reduction range step threshold. This scheme judges whether the swing angle of the smart phone in the vertical plane is greater than a preset angle when the smart phone is in a motion state, and if so, reduces the threshold for triggering step counting in the smart phone. Compared with the prior art, the threshold for triggering step counting is no longer a fixed value, but is correspondingly reduced according to the swing angle of the smart phone. The threshold for triggering step counting is set in combination with the actual motion of the smart phone, which improves the Accuracy of step counting.

实施例三Embodiment three

为了更好地实施以上方法,本发明实施例还提供一种设置计步参数的装置,该装置可以集成在终端中,该终端可以是智能手机、平板电脑等设备。In order to better implement the above method, an embodiment of the present invention also provides a device for setting step counting parameters, and the device can be integrated in a terminal, which can be a smart phone, a tablet computer or other devices.

如图3所示,设置计步参数的装置可以包括:第一判断模块301、获取模块302、第二判断模块303、调整模块304,具体描述如下:As shown in Figure 3, the device for setting step counting parameters may include: a first judgment module 301, an acquisition module 302, a second judgment module 303, and an adjustment module 304, specifically described as follows:

该第一判断模块301,用于当检测到终端处于被握持状态时,判断该终端是否处于运动状态;The first judging module 301 is configured to judge whether the terminal is in a motion state when it is detected that the terminal is in a held state;

该获取模块302,用于当该第一判断模块301的判断结果为该终端处于运动状态时,获取该终端在竖直面内的摆动角度;The obtaining module 302 is configured to obtain the swing angle of the terminal in the vertical plane when the judgment result of the first judgment module 301 is that the terminal is in a motion state;

该第二判断模块303,用于判断该摆动角度是否大于预设角度;The second judging module 303 is used to judge whether the swing angle is greater than a preset angle;

该调整模块304,用于当该第二判断模块303的判断结果为该摆动角度大于该预设角度时,减小该终端中触发计步的阈值。The adjustment module 304 is configured to reduce the threshold for triggering step counting in the terminal when the judgment result of the second judging module 303 is that the swing angle is greater than the preset angle.

优选地,如图4所示,该第一判断模块301包括:获取子模块3011、判断子模块3012,具体如下:Preferably, as shown in Figure 4, the first judging module 301 includes: an acquisition submodule 3011 and a judging submodule 3012, specifically as follows:

该获取子模块3011,用于获取该终端的加速度;The obtaining submodule 3011 is used to obtain the acceleration of the terminal;

该判断子模块3012,用于判断该加速度是否大于预设加速度;若是,则判断结果为该终端处于运动状态。The judging sub-module 3012 is used to judge whether the acceleration is greater than a preset acceleration; if yes, the judging result is that the terminal is in motion.

优选地,该获取模块302具体用于:Preferably, the obtaining module 302 is specifically used for:

当该第一判断模块301的判断结果为该终端处于运动状态时,获取该终端在预设时间段内在竖直面内的最大摆动角度;When the judgment result of the first judging module 301 is that the terminal is in motion, acquire the maximum swing angle of the terminal in the vertical plane within a preset time period;

以该最大摆动角度作为该终端在竖直面内的摆动角度。The maximum swing angle is used as the swing angle of the terminal in the vertical plane.

优选地,该调整模块304具体用于:Preferably, the adjustment module 304 is specifically used for:

当该第二判断模块303的判断结果为该摆动角度大于该预设角度时,获取该摆动角度与该预设角度的差值;When the judgment result of the second judging module 303 is that the swing angle is greater than the preset angle, obtain the difference between the swing angle and the preset angle;

根据该差值获取触发计步的阈值的减小幅度;Obtain the reduction range of the threshold for triggering step counting according to the difference;

根据该减小幅度减小该终端中触发计步的阈值。The threshold for triggering step counting in the terminal is reduced according to the reduction range.

优选地,该调整模块304具体用于:Preferably, the adjustment module 304 is specifically used for:

当该第二判断模块303的判断结果为该摆动角度大于该预设角度时,获取该摆动角度对应的目标阈值;When the judgment result of the second judging module 303 is that the swing angle is greater than the preset angle, acquire a target threshold corresponding to the swing angle;

将该终端中触发计步的阈值设置为该目标阈值。Set the threshold that triggers step counting in the terminal to the target threshold.

具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现。以上各个模块的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above modules may be implemented as an independent entity, or may be combined arbitrarily to be implemented as the same or several entities. For the specific implementation of the above modules, reference may be made to the foregoing method embodiments, and details are not repeated here.

由上可知,本发明实施例提供的设置计步参数的装置,通过第一判断模块301当检测到终端处于被握持状态时,判断该终端是否处于运动状态;获取模块302当第一判断模块301的判断结果为该终端处于运动状态时,获取该终端在竖直面内的摆动角度;第二判断模块303判断该摆动角度是否大于预设角度;调整模块304当第二判断模块303的判断结果为该摆动角度大于该预设角度时,减小该终端中触发计步的阈值。该方案在终端处于运动状态时,判断终端在竖直面内的摆动角度是否大于预设角度,若是,则减小该终端中触发计步的阈值。相对于现有技术而言,触发计步的阈值不再是固定值,而是根据终端的摆动角度相应减小,触发计步的阈值结合了终端的实际运动情况来进行设置,提高了计步的准确性。It can be seen from the above that the device for setting step counting parameters provided by the embodiment of the present invention judges whether the terminal is in a motion state when the first judgment module 301 detects that the terminal is in a state of being held; the acquisition module 302 acts as the first judgment module The judgment result of 301 is that when the terminal is in a motion state, obtain the swing angle of the terminal in the vertical plane; the second judgment module 303 judges whether the swing angle is greater than a preset angle; As a result, when the swing angle is greater than the preset angle, the threshold for triggering step counting in the terminal is reduced. In this solution, when the terminal is in a moving state, it is judged whether the swing angle of the terminal in the vertical plane is greater than a preset angle, and if so, the threshold for triggering step counting in the terminal is reduced. Compared with the existing technology, the threshold for triggering step counting is no longer a fixed value, but is correspondingly reduced according to the swing angle of the terminal. The threshold for triggering step counting is set in combination with the actual movement of the terminal, which improves the step counting. accuracy.

实施例四Embodiment four

本发明实施例还提供一种终端,该终端可以是智能手机、平板电脑等设备。The embodiment of the present invention also provides a terminal, and the terminal may be a device such as a smart phone or a tablet computer.

如图5所示,终端400可以包括:第一判断模块401、获取模块402、第二判断模块403、调整模块404,具体描述如下:As shown in FIG. 5, the terminal 400 may include: a first judgment module 401, an acquisition module 402, a second judgment module 403, and an adjustment module 404, which are specifically described as follows:

该第一判断模块401,用于当检测到终端处于被握持状态时,判断该终端是否处于运动状态;The first judging module 401 is configured to judge whether the terminal is in a motion state when it is detected that the terminal is in a held state;

该获取模块402,用于当该第一判断模块401的判断结果为该终端处于运动状态时,获取该终端在竖直面内的摆动角度;The obtaining module 402 is configured to obtain the swing angle of the terminal in the vertical plane when the judgment result of the first judgment module 401 is that the terminal is in a motion state;

该第二判断模块403,用于判断该摆动角度是否大于预设角度;The second judging module 403 is used to judge whether the swing angle is greater than a preset angle;

该调整模块404,用于当该第二判断模块403的判断结果为该摆动角度大于该预设角度时,减小该终端中触发计步的阈值。The adjustment module 404 is configured to reduce the threshold for triggering step counting in the terminal when the judgment result of the second judging module 403 is that the swing angle is greater than the preset angle.

优选地,该第一判断模块包括:获取子模块、判断子模块,具体如下:Preferably, the first judgment module includes: an acquisition submodule and a judgment submodule, specifically as follows:

该获取子模块,用于获取该终端的加速度;The obtaining submodule is used to obtain the acceleration of the terminal;

该判断子模块,用于判断该加速度是否大于预设加速度;若是,则判断结果为该终端处于运动状态。The judging sub-module is used to judge whether the acceleration is greater than a preset acceleration; if yes, the judging result is that the terminal is in a motion state.

优选地,该获取模块具体用于:Preferably, the acquisition module is specifically used for:

当该第一判断模块的判断结果为该终端处于运动状态时,获取该终端在预设时间段内在竖直面内的最大摆动角度;When the judgment result of the first judging module is that the terminal is in motion, obtain the maximum swing angle of the terminal in the vertical plane within a preset time period;

以该最大摆动角度作为该终端在竖直面内的摆动角度。The maximum swing angle is used as the swing angle of the terminal in the vertical plane.

优选地,该调整模块具体用于:Preferably, the adjustment module is specifically used for:

当该第二判断模块的判断结果为该摆动角度大于该预设角度时,获取该摆动角度与该预设角度的差值;When the judgment result of the second judging module is that the swing angle is greater than the preset angle, obtain the difference between the swing angle and the preset angle;

根据该差值获取触发计步的阈值的减小幅度;Obtain the reduction range of the threshold for triggering step counting according to the difference;

根据该减小幅度减小该终端中触发计步的阈值。The threshold for triggering step counting in the terminal is reduced according to the reduction range.

优选地,该调整模块具体用于:Preferably, the adjustment module is specifically used for:

当该第二判断模块的判断结果为该摆动角度大于该预设角度时,获取该摆动角度对应的目标阈值;When the judgment result of the second judging module is that the swing angle is greater than the preset angle, acquire a target threshold corresponding to the swing angle;

将该终端中触发计步的阈值设置为该目标阈值。Set the threshold that triggers step counting in the terminal to the target threshold.

上述操作具体可参见前面的方法实施例,在此不再赘述。For details of the above operations, reference may be made to the foregoing method embodiments, and details are not repeated here.

本发明实施例还提供另一种终端,如图6所示,该终端500可以包括射频(RF,RadioFrequency)电路501、包括有一个或一个以上计算机可读存储介质的存储器502、输入单元503、显示单元504、传感器505、音频电路506、无线保真(WiFi,Wireless Fidelity)模块507、包括有一个或者一个以上处理核心的处理器508、以及电源509等部件。本领域技术人员可以理解,图6中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The embodiment of the present invention also provides another terminal. As shown in FIG. 6, the terminal 500 may include a radio frequency (RF, Radio Frequency) circuit 501, a memory 502 including one or more computer-readable storage media, an input unit 503, A display unit 504 , a sensor 505 , an audio circuit 506 , a wireless fidelity (WiFi, Wireless Fidelity) module 507 , a processor 508 including one or more processing cores, and a power supply 509 and other components. Those skilled in the art can understand that the terminal structure shown in FIG. 6 does not constitute a limitation on the terminal, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.

射频电路501可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器508处理;另外,将涉及上行的数据发送给基站。通常,射频电路501包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,射频电路501还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long TermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The radio frequency circuit 501 can be used to send and receive information, or to receive and send signals during a call. In particular, after receiving the downlink information of the base station, it is processed by one or more processors 508; in addition, the data related to the uplink is sent to the base station . Generally, the radio frequency circuit 501 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM, Subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, the radio frequency circuit 501 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division Multiple Access), Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), email, Short Message Service (SMS, Short Messaging Service), etc.

存储器502可用于存储软件程序以及模块。处理器508通过运行存储在存储器502的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器508和输入单元503对存储器502的访问。The memory 502 can be used to store software programs as well as modules. The processor 508 executes various functional applications and data processing by running software programs and modules stored in the memory 502 . The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of the terminal (such as audio data, phonebook, etc.) and the like. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 502 may further include a memory controller to provide access to the memory 502 by the processor 508 and the input unit 503 .

输入单元503可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入单元503可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器508,并能接收处理器508发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元503还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 503 can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 503 may include a touch-sensitive surface and other input devices. A touch-sensitive surface, also known as a touch display or trackpad, collects user touch operations on or near it (for example, the user uses a finger, stylus, etc. any suitable object or accessory on the touch-sensitive surface or on the touch-sensitive Operation near the surface), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 508, and can receive and execute commands sent by the processor 508. In addition, touch-sensitive surfaces can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to touch-sensitive surfaces, the input unit 503 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.

显示单元504可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元504可包括显示面板,可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器508以确定触摸事件的类型,随后处理器508根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图6中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display unit 504 can be used to display information input by or provided to the user and various graphical user interfaces of the terminal. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The display unit 504 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), and the like. Further, the touch-sensitive surface can cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is sent to the processor 508 to determine the type of the touch event, and then the processor 508 displays on the display according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 6, the touch-sensitive surface and the display panel are used as two independent components to realize the input and input functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize the input and output functions.

终端还可包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The terminal may also include at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or the backlight when the terminal moves to the ear . As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.

音频电路506可通过扬声器、传声器提供用户与终端之间的音频接口。音频电路506可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路506接收后转换为音频数据,再将音频数据输出处理器508处理后,经射频电路501以发送给比如另一终端,或者将音频数据输出至存储器502以便进一步处理。音频电路506还可能包括耳塞插孔,以提供外设耳机与终端的通信。The audio circuit 506 can provide an audio interface between the user and the terminal through a speaker or a microphone. The audio circuit 506 can convert the received audio data into an electrical signal, transmit it to the speaker, and the speaker converts it into a sound signal output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted into The audio data, after being processed by the audio data output processor 508, is sent to another terminal through the radio frequency circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earplug jack to provide communication between an external earphone and the terminal.

无线保真(WiFi)属于短距离无线传输技术,终端通过无线保真模块507可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了无线保真模块507,但是可以理解的是,其并不属于终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wireless Fidelity (WiFi) is a short-distance wireless transmission technology. The terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 507. It provides users with wireless broadband Internet access. Although Fig. 6 shows the Wi-Fi module 507, it can be understood that it is not an essential component of the terminal, and can be completely omitted as required without changing the essence of the invention.

处理器508是终端的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或执行存储在存储器502内的软件程序和/或模块,以及调用存储在存储器502内的数据,执行终端的各种功能和处理数据,从而对终端进行整体监控。可选的,处理器508可包括一个或多个处理核心;优选的,处理器508可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器508中。The processor 508 is the control center of the terminal. It uses various interfaces and lines to connect various parts of the entire terminal. By running or executing software programs and/or modules stored in the memory 502, and calling data stored in the memory 502, execution Various functions and processing data of the terminal, so as to monitor the terminal as a whole. Optionally, the processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 508 .

终端还包括给各个部件供电的电源509(比如电池)。优选的,电源可以通过电源管理系统与处理器508逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源509还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal also includes a power source 509 (such as a battery) for powering various components. Preferably, the power supply can be logically connected to the processor 508 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 509 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

尽管图6中未示出,终端还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 6 , the terminal may also include a camera, a Bluetooth module, etc., which will not be repeated here.

具体在本实施例中,终端中的处理器508会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器502中,并由处理器508来运行存储在存储器502中的应用程序,从而实现各种功能:Specifically, in this embodiment, the processor 508 in the terminal loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 508 runs the executable file stored in the memory. 502 in order to achieve various functions:

检测到终端处于被握持状态时,判断该终端是否处于运动状态;若判断结果为该终端处于运动状态,则获取该终端在竖直面内的摆动角度;判断该摆动角度是否大于预设角度;若判断结果为该摆动角度大于预设角度,则减小该终端中触发计步的阈值。When it is detected that the terminal is held, judge whether the terminal is in motion; if the judgment result is that the terminal is in motion, obtain the swing angle of the terminal in the vertical plane; judge whether the swing angle is greater than a preset angle ; If the judgment result is that the swing angle is greater than the preset angle, then reduce the threshold for triggering step counting in the terminal.

优选地,处理器508具有第一判断模块、获取模块、第二判断模块、调整模块,具体描述如下:Preferably, the processor 508 has a first judgment module, an acquisition module, a second judgment module, and an adjustment module, which are specifically described as follows:

处理器508用于通过第一判断模块当检测到终端处于被握持状态时,判断该终端是否处于运动状态;The processor 508 is configured to judge whether the terminal is in a motion state when it is detected that the terminal is in a held state through the first judgment module;

处理器508用于通过获取模块当该第一判断模块的判断结果为该终端处于运动状态时,获取该终端在竖直面内的摆动角度;The processor 508 is configured to obtain the swing angle of the terminal in the vertical plane when the judgment result of the first judgment module is that the terminal is in a motion state through the obtaining module;

处理器508用于通过第二判断模块判断该摆动角度是否大于预设角度;The processor 508 is configured to judge whether the swing angle is greater than a preset angle through a second judging module;

处理器508用于通过调整模块当该第二判断模块的判断结果为该摆动角度大于该预设角度时,减小该终端中触发计步的阈值。The processor 508 is configured to reduce the threshold for triggering step counting in the terminal when the judgment result of the second judging module is that the swing angle is greater than the preset angle through the adjustment module.

上述操作具体可参见前面的方法实施例,在此不再赘述。For details of the above operations, reference may be made to the foregoing method embodiments, and details are not repeated here.

由上可知,本发明实施例提供了一种终端,通过检测到终端处于被握持状态时,判断该终端是否处于运动状态;若判断结果为该终端处于运动状态,则获取该终端在竖直面内的摆动角度;判断该摆动角度是否大于预设角度;若判断结果为该摆动角度大于该预设角度,则减小该终端中触发计步的阈值。该方案在终端处于运动状态时,判断终端在竖直面内的摆动角度是否大于预设角度,若是,则减小该终端中触发计步的阈值。相对于现有技术而言,触发计步的阈值不再是固定值,而是根据终端的摆动角度相应减小,触发计步的阈值结合了终端的实际运动情况来进行设置,提高了计步的准确性。It can be known from the above that the embodiment of the present invention provides a terminal, by detecting that the terminal is in a held state, it is judged whether the terminal is in a motion state; if the judgment result is that the terminal is in a motion state, the vertical In-plane swing angle; judging whether the swing angle is greater than a preset angle; if the judgment result is that the swing angle is greater than the preset angle, then reducing the threshold for triggering step counting in the terminal. In this solution, when the terminal is in a moving state, it is judged whether the swing angle of the terminal in the vertical plane is greater than a preset angle, and if so, the threshold for triggering step counting in the terminal is reduced. Compared with the existing technology, the threshold for triggering step counting is no longer a fixed value, but is correspondingly reduced according to the swing angle of the terminal. The threshold for triggering step counting is set in combination with the actual movement of the terminal, which improves the step counting. accuracy.

需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that 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 related hardware through a program, and the program can be stored in a computer-readable storage medium. The medium may include: a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.

以上对本发明实施例所提供的一种设置计步参数的方法、装置及终端进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A method, device, and terminal for setting step counting parameters provided by the embodiments of the present invention have been introduced in detail above. In this paper, specific examples are used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used To help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, the content of this specification It should not be construed as a limitation of the invention.

Claims (12)

CN201610639908.6A2016-08-052016-08-05A kind of method, apparatus and terminal that meter step parameter is setExpired - Fee RelatedCN106354250B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610639908.6ACN106354250B (en)2016-08-052016-08-05A kind of method, apparatus and terminal that meter step parameter is set

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610639908.6ACN106354250B (en)2016-08-052016-08-05A kind of method, apparatus and terminal that meter step parameter is set

Publications (2)

Publication NumberPublication Date
CN106354250A CN106354250A (en)2017-01-25
CN106354250Btrue CN106354250B (en)2017-11-17

Family

ID=57843754

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610639908.6AExpired - Fee RelatedCN106354250B (en)2016-08-052016-08-05A kind of method, apparatus and terminal that meter step parameter is set

Country Status (1)

CountryLink
CN (1)CN106354250B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116501175B (en)*2023-06-252023-09-22江西格如灵科技股份有限公司Virtual character moving method, device, computer equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102297701A (en)*2010-06-222011-12-28雅马哈株式会社Pedometer
CN104956185A (en)*2012-12-212015-09-30高通股份有限公司Swing compensation in step detection
CN105224104A (en)*2015-09-012016-01-06电子科技大学Pedestrian movement's state identification method of mode is held based on smart mobile phone

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
TWI457539B (en)*2012-12-192014-10-21Ind Tech Res InstMulti-posture step length calibration system and method for indoor positioning
CN104902078B (en)*2015-04-292018-08-17深圳市万普拉斯科技有限公司The control method and system and mobile terminal of screen rotation in mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102297701A (en)*2010-06-222011-12-28雅马哈株式会社Pedometer
CN104956185A (en)*2012-12-212015-09-30高通股份有限公司Swing compensation in step detection
CN105224104A (en)*2015-09-012016-01-06电子科技大学Pedestrian movement's state identification method of mode is held based on smart mobile phone

Also Published As

Publication numberPublication date
CN106354250A (en)2017-01-25

Similar Documents

PublicationPublication DateTitle
CN106412249B (en) Drop information detection method and device
CN106357897B (en)Method and device for acquiring falling information
CN106453829B (en) Method and device for detecting drop height
WO2015090248A1 (en)Server overload protection method and device
CN107102864A (en)One kind puts out screen control method, device, storage medium and terminal
CN106487984B (en)A kind of method and apparatus adjusting volume
CN106340925A (en) A charging control method, device and terminal
CN107450029B (en) Battery state verification method and device, computer equipment, and computer-readable storage medium
US20210124480A1 (en)Split view exiting method, split view exiting device, and electronic device
CN107172671A (en)A kind of channel switching method, device, storage medium and terminal
CN106646440A (en)Drop height detection method and drop height detection device
WO2018166204A1 (en)Method for controlling fingerprint recognition module, and mobile terminal and storage medium
CN111064847B (en)False touch prevention method and device, storage medium and electronic equipment
CN106502681A (en) A sensor registration method, device and mobile terminal
TW201541337A (en)Method, device and system for displaying messages in mobile terminal
CN109714476B (en)Data processing method and device, mobile terminal and storage medium
CN107528958A (en)Method for controlling mobile terminal, device, readable storage medium storing program for executing and mobile terminal
CN109688611B (en)Frequency band parameter configuration method, device, terminal and storage medium
CN106254673A (en)Terminal fall detection method and device
CN104901992A (en)Resource transfer method and device
CN110851014B (en)Touch recognition method and device, storage medium and terminal equipment
CN106412250A (en) A drop statistics method and device
CN111898542A (en) A display screen control method, device and terminal
CN106227337A (en) Method, device and terminal for adjusting screen brightness
CN106354250B (en)A kind of method, apparatus and terminal that meter step parameter is set

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CP01Change in the name or title of a patent holder
CP01Change in the name or title of a patent holder

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

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

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

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

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:20171117


[8]ページ先頭

©2009-2025 Movatter.jp