CN110108296B - Step counting method, electronic equipment and computer readable storage medium - Google Patents

Step counting method, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN110108296B
CN110108296B CN201910320110.9A CN201910320110A CN110108296B CN 110108296 B CN110108296 B CN 110108296B CN 201910320110 A CN201910320110 A CN 201910320110A CN 110108296 B CN110108296 B CN 110108296B
Authority
CN
China
Prior art keywords
counting
data
application program
time point
step counting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910320110.9A
Other languages
Chinese (zh)
Other versions
CN110108296A (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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201910320110.9A priority Critical patent/CN110108296B/en
Publication of CN110108296A publication Critical patent/CN110108296A/en
Application granted granted Critical
Publication of CN110108296B publication Critical patent/CN110108296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C22/00Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers
    • G01C22/006Pedometers
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass

Abstract

The embodiment of the invention provides a step number statistical method, electronic equipment and a computer readable storage medium. The method is applied to the electronic equipment and comprises the following steps: a step counting application program in the electronic equipment obtains first step counting data from a target step counting sensor; the step counting application program determines the step number of the user according to the first step counting data and the step number calibration data; the step number calibration data is determined by the step counting application program based on the second step counting data; the second step count data is obtained from a WeChat application in the electronic device. In this way, the step count calibration data may be determined from the second step count data obtained from the WeChat application. The second step-counting data is more accurate step-counting data because the keep-alive effect of the WeChat application program is better. Furthermore, more accurate step number calibration data can be obtained according to the second step number data, so that the step number application program can accurately count the step number of the user according to the step number calibration data and the first step number data.

Description

Step counting method, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a step counting method, an electronic device, and a computer-readable storage medium.
Background
Currently, a user often uses a step counting application program to count the number of steps taken by the user, so as to count the number of steps taken by the user. For example, users often utilize a step counting application to count the number of steps a user has taken at various times of the day.
However, to reduce the power consumption of the electronic device, the electronic device often kills the progress of the step-counting application. And under the condition that the process of the step counting application program is killed, the step counting application program cannot normally execute step counting operation, so that the step count of the user obtained through counting is inaccurate.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a step counting method, an electronic device, and a computer-readable storage medium, so that accurate user step counts can be obtained through counting. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a step count statistical method, applied to an electronic device, which may include:
a step counting application program in the electronic equipment obtains first step counting data from a target step counting sensor;
the step counting application program determines the step number of the user according to the first step counting data and the step number calibration data; the step number calibration data is determined by the step counting application program based on the second step counting data; the second step count data is obtained from a WeChat application in the electronic device.
Optionally, before the step of determining the step number of the user by the step counting application program according to the first step counting data and the step number calibration data, the step counting application program may further include:
the step counting application program obtains third step counting data from the target step counting sensor and obtains second step counting data which is consistent with step counting time corresponding to the third step counting data from the WeChat application program;
and the step counting application program subtracts the second step counting data from the third step counting data to obtain step number calibration data.
Optionally, the step of determining, by the step counting application program, the step of the step count of the user according to the first step counting data and the step count calibration data may include:
the step counting application program subtracts the step number calibration data from the first step counting data to obtain the step number of the user.
Optionally, before the step of determining the step number of the user by the step counting application program according to the first step counting data and the step number calibration data, the step counting application program may further include:
the step counting application program obtains second step counting data counted by the WeChat application program from the WeChat application program;
the step counting application determines the second step counting data as step number calibration data.
Optionally, the step of determining, by the step counting application program, the step of the step count of the user according to the first step counting data and the step count calibration data may include:
the step counting application program determines a statistical time point of second step counting data obtained by the WeChat application program in a statistical mode, and the statistical time point is used as a first time point;
the step counting application program determines a statistical time point of the first step counting data obtained by the target step counting sensor in a statistical manner, and the statistical time point is used as a second time point;
when the time interval between the first time point and the second time point is larger than a preset threshold value, the step counting application program calculates the increment step number of the second time point relative to the first time point according to the first step counting data;
and the step counting application program calculates the sum of the step number calibration step number and the increment step number to obtain the step number of the user.
Optionally, in an embodiment of the present invention, the method may further include:
and when the time interval between the first time point and the second time point is smaller than a preset threshold value, the step counting application program determines the step number calibration data as the step number of the user.
Optionally, the second step count data is obtained from a wechat applet configured in a wechat application in the electronic device.
In a second aspect, an embodiment of the present invention further provides an electronic device, which may include: a step-counting application program, a WeChat application program and a target step-counting sensor;
the target step counting sensor is used for counting first step counting data;
a step-counting application for obtaining first step-counting data from a target step-counting sensor;
the WeChat application program is used for counting the second step counting data;
the step counting application program is also used for determining the step number of the user according to the first step counting data and the step number calibration data; wherein the step number calibration data is determined by the step counting application based on the second step counting data.
Optionally, in an embodiment of the present invention, the step counting application is further configured to obtain third step counting data from the target step counting sensor before determining the step count of the user according to the first step counting data and the step count calibration data, and obtain second step counting data that is consistent with the step counting time corresponding to the third step counting data from the wechat application;
and the step counting application program is also used for subtracting the second step counting data from the third step counting data to obtain step number calibration data.
Optionally, in this embodiment of the present invention, the step counting application may specifically be configured to:
the step counting application program subtracts the step number calibration data from the first step counting data to obtain the step number of the user.
Optionally, in an embodiment of the present invention, the step counting application is further configured to obtain, from the wechat application, second step counting data counted by the wechat application before determining the step count of the user according to the first step counting data and the step count calibration data;
the step counting application is further configured to determine the second step counting data as step count calibration data.
Optionally, in this embodiment of the present invention, the step counting application may specifically be configured to:
determining a statistical time point of second step counting data obtained by counting of the WeChat application program as a first time point;
determining a statistical time point of the first step counting data obtained by the target step counting sensor as a second time point;
when the time interval between the first time point and the second time point is larger than a preset threshold value, calculating the increment step number of the second time point relative to the first time point according to the first step counting data;
and calculating the sum of the step number calibration step number and the increment step number to obtain the step number of the user.
Optionally, in this embodiment of the present invention, the step counting application may further be configured to:
and when the time interval between the first time point and the second time point is smaller than a preset threshold value, determining the step number calibration data as the step number of the user.
Optionally, in this embodiment of the present invention, the second step counting data is obtained from a wechat applet configured in a wechat application in the electronic device.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps of any one of the step counting methods are implemented.
In a fourth aspect, an embodiment of the present invention further provides a computer program product including instructions, which when run on an electronic device, cause the electronic device to perform: method steps of any of the above methods for step count statistics.
In an embodiment of the invention, a step-counting application in the electronic device may obtain first step-counting data from the target step-counting sensor. The step counting application can then determine a number of steps of the user based on the first step counting data and the step number calibration data. Wherein the step count calibration data is determined by the step counting application based on second step counting data obtained from a WeChat application in the electronic device. Wherein the electronic device typically does not kill the process of the wechat application in order to ensure that the user can receive the wechat message. That is, the second step count data counted by the WeChat application is accurate. In this way, the step counting application can obtain accurate step count calibration data based on the second step count data, and can determine to obtain accurate user step count.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a step counting method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problems of the prior art, embodiments of the present invention provide a step count statistical method, an electronic device, and a computer-readable storage medium.
First, a step counting method provided by an embodiment of the present invention is explained below.
The step counting method provided by the embodiment of the invention is applied to electronic equipment, and a step counting application program and a WeChat application program are installed in the electronic equipment. And, one or more of a historical step count statistical sensor, a step data detection sensor, and an acceleration sensor may be configured in the electronic device.
Such electronic devices include, but are not limited to: smart mobile phone, smart watch and intelligent bracelet. In addition, it is reasonable that one or more of the historical step count statistical sensor, the step data detection sensor, and the acceleration sensor may be disposed inside the electronic device or may be disposed outside the electronic device.
The historical step count statistical sensor, the step data detection sensor, and the acceleration sensor will be described below.
The historical step count statistical sensor may count a total number of steps taken by a user carrying the electronic device. Also, the historical step count statistical sensor may send the detected total number of steps walked to a step counting application in the electronic device. However, the total walking steps are counted after the electronic device is turned on. This makes it impossible for the step-counting application to accurately count the total number of steps taken by the user in one, two, or several days.
The electronic device may record the identity of the historical STEP count statistical sensor as sensor.
The step data detection sensor may detect each step of the user carrying the electronic device. The step data detection sensor may send a notification to a step counting application in the electronic device after detecting a step of the user to inform the step counting application that the user has taken one step. Further, the step counting application may count the number of steps the user has walked based on the notification. However, when the progress of the step counting application is killed by the electronic device for a certain period of time (for example, one hour), the step counting application cannot obtain the notification transmitted by the step data detecting sensor for the certain period of time. Thus, the step counting application program cannot accurately count the steps of the user.
The electronic device may record, among other things, the STEP data as identifying the sensor as sensor.
The acceleration sensor may detect an acceleration of a user carrying the electronic device. After detecting the acceleration of the user, the step data detection sensor may send the acceleration to a step counting application program in the electronic device. Further, the step counting application may count the number of steps taken by the user based on the acceleration. However, when the progress of the step-counting application is killed by the electronic device within a period of time (e.g., half an hour), the step-counting application cannot obtain the acceleration transmitted by the acceleration sensor. Thus, the step counting application program cannot accurately count the steps of the user.
Wherein the electronic device may record the identification of the step data detection sensor as sensor.
Referring to fig. 1, a flowchart of a step counting method according to an embodiment of the present invention is shown. The method may comprise the steps of:
s101: a step counting application program in the electronic equipment obtains first step counting data from a target step counting sensor;
after the target step-counting sensor detects the first step-counting data, the step-counting application program can obtain the first step-counting data from the target step-counting sensor. For example, when the target step-counting sensor detects the first step-counting data at 10 o' clock in 1 morning of 4 months in 2019, the target step-counting sensor may send the first step-counting data to the step-counting application.
It will be appreciated that the step-counting application may detect whether a historical step count statistical sensor is configured in the electronic device prior to obtaining the first step-counting data from the target step-counting sensor. Wherein the step counting application may determine the historical step counting sensor as the target step counting sensor when detecting that the historical step counting sensor is configured.
In this way, when the historical step count statistical sensor is configured in the electronic device, the historical step count statistical sensor can be preferentially determined as the target step counting sensor. This is because the historical step count statistical sensor can normally count the total number of steps taken by the user (i.e., the first step count data) even if the progress of the step counting application is killed by the electronic device. Wherein, this walking total includes: the number of steps the user takes during the period of time the process is killed. Moreover, when the process of the step counting application program is pulled alive, the step counting application program can also obtain the total walking steps (namely, the first step counting data) of the user, and further can accurately calculate the steps taken by the user on the same day based on the first step counting data.
In the case of the step data detection sensor, the process of the step counting application cannot obtain the notification of the increase in the number of steps (i.e., the first step counting data) transmitted by the step data detection sensor after being killed by the electronic device. This prevents the step-counting application from counting the number of steps the user has taken during the period of time that the process was killed. Therefore, when the process of the step counting application program is pulled alive, the number of steps taken by the user on the same day cannot be accurately calculated.
In the case of the acceleration sensor, the acceleration (i.e., the first step count data) sent by the acceleration sensor cannot be obtained due to the progress of the step count application after being killed by the electronic device. This prevents the step-counting application from counting the number of steps the user has taken during the period of time that the process was killed. Therefore, when the process of the step counting application program is pulled alive, the number of steps taken by the user on the same day cannot be accurately calculated.
Thus, when a historical step count statistical sensor is configured in the electronic device, the historical step count statistical sensor may be preferentially determined as the target step counting sensor. In addition, when it is detected that the historical step count statistical sensor is not configured in the electronic device, the step counting application may determine a step data detection sensor or an acceleration sensor configured in the electronic device as a target step counting sensor.
When the acceleration sensor is determined as the target step counting sensor, the step counting application program needs to calculate the number of steps taken by the user in the same day by relying on the acceleration sent by the acceleration sensor and an algorithm for calculating the number of steps based on the acceleration. When the algorithm thread cannot execute, the calculation operation cannot be executed, so that the calculated step number is inaccurate. Thus, when the step data detecting sensor and the acceleration sensor are arranged in the electronic device, the step data detecting sensor may also be preferentially determined as the target step counting sensor.
S102: the step counting application program determines the step number of the user according to the first step counting data and the step number calibration data; the step number calibration data is determined by the step counting application program based on the second step counting data; the second step count data is obtained from a WeChat application in the electronic device.
Wherein after determining the historical step count statistical sensor as the target step count sensor, the step count application may detect whether a micro-messenger data synchronization instruction is received before determining the user step count based on the first step count data and the step count calibration data. After the micro-trusted data synchronization command is detected, the user is indicated to obtain a more accurate step counting result. In this case, the step-counting application may also detect whether authorization to invoke the WeChat application is obtained. Of course, for the case where the wechat application does not need to make call authorization, it is reasonable that the step-counting application may not perform the operation of detecting whether authorization is obtained. The account number of the login WeChat application program and the account number of the login step-counting application program can be the same or different.
For the case where the WeChat application needs to make call authorization, when authorization is detected, the step-counting application may obtain third step data currently detected by the target step-counting sensor (e.g., 8 am 4/1/morning in 2019) from the target step-counting sensor. For example, the third step count data may be 10000 steps.
In addition, the second step-counting data that matches the step-counting time corresponding to the third step-counting data (i.e., 8 am 4/1/morning in 2019) can be obtained from the WeChat application. For example, the second step count data is 2000 steps. When the step counting application program fails to acquire the second step counting data from the WeChat application program, the step counting application program can request the WeChat application program to acquire the second step counting data again so as to obtain the second step counting data detected by the WeChat application program, wherein the second step counting data is closer to 8 am in 1 morning of 4 months in 2019.
Because the wechat application program does not have an interface for providing step number data for the third-party application program, the step number acquisition applet can be configured in the wechat application program. In this way, the step number acquisition applet can send the detected step number of the WeChat movement (i.e. the second step data) to the step counting application when the step counting application invokes the WeChat application.
Moreover, the second step-counting data counted by the WeChat application is the data that the user has gone the same day (i.e., 8 o' clock before 1 month 4 months 1 year 2019). Thus, the step-counting application may subtract the second step-counting data from the third step-counting data to obtain step-count calibration data: 10000 + 2000 as 8000 steps. That is, the total number of steps of the user at 0 am on 4/1/2019 is 8000 steps.
Thus, when the step counting application obtains the first step counting data from the target step counting sensor, which is sent by the target step counting sensor at the time point of 10 or 11 a.m., the step number calibration data can be subtracted from the first step counting data corresponding to the corresponding time point. Therefore, the current user step number (namely 10 o 'clock or 12 o' clock on 1/4/2019) of the user on the current day can be accurately calculated. And even if the process of the step counting application program is in a state of being killed by the electronic equipment from 9 o 'clock to 9 o' clock 59 o 'clock, the step number of the user at 10 o' clock of 4 months and 1 day in 2019 can be accurately calculated.
And as long as the WeChat application program needs to be called once, the step number calibration data can be calculated according to the second step counting data obtained from the WeChat application program, so that the calling times of the WeChat application program are reduced. Thus, the user's step count can be accurately calculated based on the step count calibration data.
In addition, after the step data detecting sensor or the acceleration sensor provided in the electronic device is determined as the target step counting sensor, the step counting application program may also detect whether a micro message data synchronization instruction is received. After detecting the wechat data synchronization instruction, the step-counting application may also detect whether authorization to invoke the wechat application is obtained. Of course, for the case where the wechat application does not need to make call authorization, it is reasonable that the step-counting application may not perform the operation of detecting whether authorization is obtained.
For the case that the wechat application needs to perform call authorization, when it is detected that authorization is obtained, the step-counting application only needs to obtain the second step-counting data counted currently by the wechat application (for example, 9 am 4/1 am in 2019) from the wechat application. For example, the second step count data is 3000 steps. Since the step counting data transmitted from the step data detecting sensor or the acceleration sensor cannot be received when the progress of the step counting application is killed. Thus, to enable accurate statistics of the user's steps, the second step count data may be determined directly as step count calibration data.
The step-counting application may then determine, as the first time point, a statistical time point at which the wechat application statistically obtained the second step-counting data (i.e., 9 am 4/1/morning in 2019). Also, a statistical time point (for example, 9 and a half times in the 1 st morning of 4 months in 2019) at which the step data detecting sensor or the acceleration sensor statistically obtains the first step count data may be determined as the second time point.
Thereafter, the step counting application may detect whether the time interval between the first time point and the second time point is greater than a preset threshold (e.g., two minutes). In the above example, it may be detected that the time interval between the first time point and the second time point is greater than a preset threshold. The step counting application can then calculate, based on the first step counting data, an incremental number of steps for the second time point relative to the first time point. Further, the step count application may calculate the sum of the step count calibration step count and the incremental step count to obtain the user step count of 9 o' clock before 1 morning of 4 months in 2019.
The method can detect whether the process from 9 am to 9 am in 2019, 4 and 1 am to half am in the step counting application program is in a keep-alive state or not. If the mobile terminal is in the keep-alive state, second step counting data obtained by counting at 9 points in 1 morning of 4 months in 2019 by the WeChat application program can be used as a step number calculation base number. Also, the step counting application may determine first step counting data obtained from the target step counting sensor from 9 am to 9 am in 4 month 1 in 2019 as the first target step counting data, and calculate the incremental step count in the period from 9 am to 9 am in accordance with the first target step counting data. Wherein, the keep-alive state refers to a state of normal operation of the process.
If in the killed state, the step-counting application may also determine first step-counting data obtained from the target step-counting sensor at 8 o 'clock in 1 am of 4 month 1 to 9 o' clock in the morning of the day in 2019 as second target step-counting data. And may calculate the incremental steps in the half of the time from 9 am to 9 am based on the second target step count data. In this way, the incremental steps can be calculated with reference to the step count data of the user before the progress of the step count application is killed, so that a more accurate incremental step can be obtained. The killing state refers to a state in which the process is not running in the memory of the electronic device.
In addition, the step counting application may directly determine the step count calibration data as the user step count regardless of whether the process of the step counting application is killed in a time period between the first time point and the second time point when a time interval between the first time point and the second time point is less than a preset threshold.
In an embodiment of the invention, a step-counting application in the electronic device may obtain first step-counting data from the target step-counting sensor. The step counting application can then determine a number of steps of the user based on the first step counting data and the step number calibration data. Wherein the step count calibration data is determined by the step counting application based on second step counting data obtained from a WeChat application in the electronic device. Wherein the electronic device typically does not kill the process of the wechat application in order to ensure that the user can receive the wechat message. That is, the second step count data counted by the WeChat application is accurate. In this way, the step counting application can obtain accurate step count calibration data based on the second step count data, and can determine to obtain accurate user step count.
In summary, with the step counting method provided by the embodiment of the present invention, the step counting application program can obtain accurate step calibration data based on the second step counting data obtained from the WeChat application program, so as to determine to obtain accurate user step.
Corresponding to the above method embodiment, an embodiment of the present invention further provides an electronic device for counting steps, and referring to fig. 2, the electronic device may include: a step-counting application 201, a WeChat application 202 and a target step-counting sensor 203;
a target step-counting sensor 203 for counting the first step-counting data;
a step-counting application 201 for obtaining first step-counting data from a target step-counting sensor 203;
the WeChat application 202 is used for counting the second step-counting data;
the step counting application 201 is further configured to determine the step count of the user according to the first step counting data and the step count calibration data; wherein the step count calibration data is determined by the step counting application 201 based on the second step counting data.
In an embodiment of the invention, a step-counting application in the electronic device may obtain first step-counting data from the target step-counting sensor. The step counting application can then determine a number of steps of the user based on the first step counting data and the step number calibration data. Wherein the step count calibration data is determined by the step counting application based on second step counting data obtained from a WeChat application in the electronic device. Wherein, in order to ensure that the user can receive the wechat message, the electronic device does not kill the wechat application. That is, the second step count data counted by the WeChat application is accurate. In this way, the step counting application can obtain accurate step count calibration data based on the second step count data, and can determine to obtain accurate user step count.
Optionally, in the embodiment of the present invention, the step counting application 201 is further configured to detect whether a historical step counting sensor is configured in the electronic device before the first step counting data is obtained from the target step counting sensor 203;
the step counting application 201 is further used for determining the historical step counting sensor as the target step counting sensor 203 when detecting that the historical step counting sensor is configured;
the step counting application 201 is further configured to determine a step data detection sensor or an acceleration sensor configured in the electronic device as the target step counting sensor 203 when it is detected that the historical step counting sensor is not configured.
Optionally, in the embodiment of the present invention, the step counting application 201 is further configured to, after determining the target step counting sensor 203, obtain third step counting data from the target step counting sensor 203 before determining the step count of the user according to the first step counting data and the step count calibration data, and obtain second step counting data, which is consistent with the step counting time corresponding to the third step counting data, from the WeChat application 202;
the step counting application 201 is further configured to subtract the second step counting data from the third step counting data to obtain step counting calibration data.
Optionally, in the embodiment of the present invention, the step counting application 201 is specifically configured to:
the step count application 201 subtracts the step count calibration data from the first step count data to obtain the user step count.
Optionally, in the embodiment of the present invention, the step counting application 201 is further configured to, after determining the target step counting sensor 203, obtain second step counting data counted by the wechat application 202 from the wechat application 202 before determining the step count of the user according to the first step counting data and the step count calibration data;
the step counting application 201 is further configured to determine the second step counting data as step number calibration data.
Optionally, in the embodiment of the present invention, the step counting application 201 is specifically configured to:
determining a statistical time point of the second step counting data obtained by statistics of the WeChat application 202 as a first time point;
determining a statistical time point of the first step counting data obtained by the target step counting sensor as a second time point;
when the time interval between the first time point and the second time point is larger than a preset threshold value, calculating the increment step number of the second time point relative to the first time point according to the first step counting data;
and calculating the sum of the step number calibration step number and the increment step number to obtain the step number of the user.
Optionally, in an embodiment of the present invention, the step counting application 201 is further configured to:
and when the time interval between the first time point and the second time point is smaller than a preset threshold value, determining the step number calibration data as the step number of the user.
Optionally, in this embodiment of the present invention, the second step counting data is obtained from a wechat applet configured in the wechat application 202 in the electronic device.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the method steps of any one of the above step counting methods.
In an embodiment of the invention, a step-counting application in the electronic device may obtain the first step-counting data from the target step-counting sensor after the computer program stored in the computer readable storage medium is executed by a processor of the electronic device. The step counting application can then determine a number of steps of the user based on the first step counting data and the step number calibration data. Wherein the step count calibration data is determined by the step counting application based on second step counting data obtained from a WeChat application in the electronic device. Wherein the electronic device typically does not kill the wechat application in order to ensure that the user can receive the wechat message. That is, the second step count data counted by the WeChat application is accurate. In this way, the step counting application can obtain accurate step count calibration data based on the second step count data, and can determine to obtain accurate user step count.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a computer program product including instructions, which, when run on an electronic device, cause the electronic device to perform: method steps of any of the above methods for step count statistics.
In an embodiment of the invention, a step-counting application in the electronic device may obtain first step-counting data from the target step-counting sensor. The step counting application can then determine a number of steps of the user based on the first step counting data and the step number calibration data. Wherein the step count calibration data is determined by the step counting application based on second step counting data obtained from a WeChat application in the electronic device. Wherein the electronic device typically does not kill the wechat application in order to ensure that the user can receive the wechat message. That is, the second step count data counted by the WeChat application is accurate. In this way, the step counting application can obtain accurate step count calibration data based on the second step count data, and can determine to obtain accurate user step count.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the electronic device and computer-readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (7)

1. A step counting method is applied to electronic equipment and comprises the following steps:
a step counting application program in the electronic equipment obtains first step counting data from a target step counting sensor;
the step counting application program obtains second step counting data counted by the WeChat application program from the WeChat application program;
the step-counting application program determines the second step-counting data as step-count calibration data;
the step counting application program determines a statistical time point of the second step counting data obtained by the WeChat application program in a statistical mode and takes the statistical time point as a first time point;
the step counting application program determines a statistical time point of the first step counting data obtained by the target step counting sensor in a statistical manner, and the statistical time point is used as a second time point;
when the time interval between the first time point and the second time point is larger than a preset threshold value, the step counting application program calculates the increment step number of the second time point relative to the first time point according to the first step counting data;
and the step counting application program calculates the sum of the step number calibration data and the increment step number to obtain the step number of the user.
2. The method of claim 1, further comprising:
when the time interval between the first time point and the second time point is smaller than a preset threshold value, the step counting application program determines the step number calibration data as the user step number.
3. The method of claim 1, wherein the second step count data is obtained from a wechat applet configured in a wechat application in the electronic device.
4. An electronic device, comprising: a step-counting application program, a WeChat application program and a target step-counting sensor;
the target step counting sensor is used for counting first step counting data;
the step-counting application program is used for obtaining the first step-counting data from the target step-counting sensor;
the WeChat application program is used for counting second step counting data;
the step counting application program is further configured to obtain second step counting data counted by the WeChat application program from the WeChat application program, determine the second step counting data as step number calibration data, and determine a statistical time point of the second step counting data counted by the WeChat application program as a first time point; determining a statistical time point of the first step counting data obtained by the target step counting sensor as a second time point; when the time interval between the first time point and the second time point is larger than a preset threshold value, calculating the increment step number of the second time point relative to the first time point according to the first step counting data; and calculating the sum of the step number calibration data and the increment step number to obtain the step number of the user.
5. The electronic device of claim 4, wherein the step-counting application is further configured to:
and when the time interval between the first time point and the second time point is smaller than a preset threshold value, determining the step number calibration data as the user step number.
6. The electronic device of claim 4, wherein the second step count data is obtained from a wechat applet configured in a wechat application in the electronic device.
7. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1-3.
CN201910320110.9A 2019-04-19 2019-04-19 Step counting method, electronic equipment and computer readable storage medium Active CN110108296B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910320110.9A CN110108296B (en) 2019-04-19 2019-04-19 Step counting method, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910320110.9A CN110108296B (en) 2019-04-19 2019-04-19 Step counting method, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110108296A CN110108296A (en) 2019-08-09
CN110108296B true CN110108296B (en) 2021-03-26

Family

ID=67485993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910320110.9A Active CN110108296B (en) 2019-04-19 2019-04-19 Step counting method, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110108296B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110081903B (en) * 2019-04-24 2021-11-02 珠海必要工业科技股份有限公司 Step counting, exchange and step counting data sending method, device, equipment and storage medium
CN112902983B (en) * 2021-01-26 2024-04-05 维沃移动通信有限公司 Step number counting method and device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104567912A (en) * 2015-02-02 2015-04-29 河海大学 Method for realizing pedometer on Android mobile phone
CN106123910A (en) * 2016-06-21 2016-11-16 广东欧珀移动通信有限公司 Step-recording method based on mobile terminal and step count set
CN106649594A (en) * 2016-11-23 2017-05-10 腾讯科技(深圳)有限公司 Data displaying method and device
CN106681769A (en) * 2016-12-29 2017-05-17 宇龙计算机通信科技(深圳)有限公司 Application control method and terminal
CN107289966A (en) * 2016-03-30 2017-10-24 日本电气株式会社 Method and apparatus for counting step number
CN108362304A (en) * 2018-02-09 2018-08-03 维沃移动通信有限公司 A kind of data processing method and mobile terminal
CN109115240A (en) * 2018-08-02 2019-01-01 上海亿保健康管理有限公司 A kind of step-recording method based on Android step-counting sensor

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8694251B2 (en) * 2010-11-25 2014-04-08 Texas Instruments Incorporated Attitude estimation for pedestrian navigation using low cost mems accelerometer in mobile applications, and processing methods, apparatus and systems
TWI489087B (en) * 2014-07-03 2015-06-21 Globalsat Worldcom Corp The step - by - step detection method of electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104567912A (en) * 2015-02-02 2015-04-29 河海大学 Method for realizing pedometer on Android mobile phone
CN107289966A (en) * 2016-03-30 2017-10-24 日本电气株式会社 Method and apparatus for counting step number
CN106123910A (en) * 2016-06-21 2016-11-16 广东欧珀移动通信有限公司 Step-recording method based on mobile terminal and step count set
CN106649594A (en) * 2016-11-23 2017-05-10 腾讯科技(深圳)有限公司 Data displaying method and device
CN106681769A (en) * 2016-12-29 2017-05-17 宇龙计算机通信科技(深圳)有限公司 Application control method and terminal
CN108362304A (en) * 2018-02-09 2018-08-03 维沃移动通信有限公司 A kind of data processing method and mobile terminal
CN109115240A (en) * 2018-08-02 2019-01-01 上海亿保健康管理有限公司 A kind of step-recording method based on Android step-counting sensor

Also Published As

Publication number Publication date
CN110108296A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
CN110535864B (en) Service abnormity detection method, device, equipment and storage medium
CN106548402B (en) Resource transfer monitoring method and device
CN110108296B (en) Step counting method, electronic equipment and computer readable storage medium
CN109145590B (en) Function hook detection method, detection equipment and computer readable medium
US8655314B1 (en) Telecom-fraud detection using device-location information
WO2017125092A1 (en) Number marking method and system
CN111988422A (en) Subscription method, device, server and storage medium of application service
CN110222264B (en) Application program maintenance control method, device, terminal, server and storage medium
WO2020082807A1 (en) Medical insurance fund risk control method and device based on data analysis, server, and medium
JP6425697B2 (en) Determination apparatus, determination method, and determination program
CN112446983A (en) Intelligent door lock control method and device
CN113515612A (en) Heiyou mobile phone number identification method and device
CN111949421A (en) SDK calling method and device, electronic equipment and computer readable storage medium
CN109729159B (en) Method and device for reminding loss of network equipment
JP6494577B2 (en) Determination apparatus, determination method, and determination program
CN115809384A (en) Webpage updating method and device, computer equipment and computer readable medium
CN110244974B (en) Application program maintenance control method, device, server, terminal and storage medium
CN114218577A (en) API risk determination method, device, equipment and medium
JP6494848B2 (en) Determination apparatus, determination method, and determination program
US8458705B2 (en) Method and apparatus for preventing the omission and repeated execution of schedule information due to a time change
CN107943268A (en) Schedule job control method, device, terminal device and storage medium
CN111611143A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111786934A (en) Method and device for detecting normal user of client
CN112069330B (en) Multimedia information pushing method and device, electronic equipment and storage medium
CN111224936B (en) User abnormal request detection method, system, device and machine readable medium

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