CN106445715B - The report method and device of pedometer message - Google Patents
The report method and device of pedometer message Download PDFInfo
- Publication number
- CN106445715B CN106445715B CN201610822601.XA CN201610822601A CN106445715B CN 106445715 B CN106445715 B CN 106445715B CN 201610822601 A CN201610822601 A CN 201610822601A CN 106445715 B CN106445715 B CN 106445715B
- Authority
- CN
- China
- Prior art keywords
- step number
- pedometer
- message
- pedometer message
- statistics
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0751—Error or fault detection not based on redundancy
- G06F11/0754—Error or fault detection not based on redundancy by exceeding limits
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0793—Remedial or corrective actions
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C22/00—Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers
- G01C22/006—Pedometers
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Measurement Of Distances Traversed On The Ground (AREA)
Abstract
The embodiment of the invention discloses a kind of report methods of pedometer message, comprising: the step number of monitoring pedometer statistics generates interrupt instruction when the step number of pedometer statistics is greater than preset step threshold;The interrupt instruction that detection pedometer reports, system is waken up according to the interrupt instruction, the first pedometer message is generated according to the step number of pedometer statistics, and is reported the first pedometer message by driving layer, corresponding first numerical value of the first pedometer message;Step number acquisition instruction is detected, the second step number of the pedometer statistics is obtained according to the step number acquisition instruction;Generate the second pedometer message according to second step number, the corresponding second value of the second pedometer message be equal to second step number and the preset step threshold and.In addition, the embodiment of the invention also discloses a kind of reporting devices of pedometer message.Using the present invention, step number statistical accuracy can be improved.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of report methods and device of pedometer message.
Background technique
In the prior art, more and more softwares contain the function of step counting, for example, wechat step counting, QQ movement etc., for
For these softwares, corresponding step number is after detecting paces by pedometer built-in in terminal, in driving layer by paces
The application programs such as data report, and the wechat application of application layer, QQ are applied monitor the related news that pedometer reports, then will be corresponding
Step number update the step counting page moved in the wechat step counting page or QQ.
In general, the paces data of pedometer statistics are stored in the register of corresponding chip interior, and this is posted
There is the maximum value of the numerical value of storage in storage, for example, for one 16 registers, the maximum value for the step number that can be stored
It is 65535.When the data of pedometer statistics are more than the maximum value of above-mentioned register, corresponding numerical value can be directly zeroed, this
It is exactly common spillover.
During pedometer is reported the data counted on, if the spilling of data has occurred, this is reported
Data can be significantly less than the last data reported, that is to say, that the step number stored in register is from a biggish value jump
Change to a lesser value.In the case where data spilling occurs, corresponding application is detecting step counting such as wechat movement
After the step number that device reports, this directly upper lesser step Numerical of meeting is counted, but because data are overflowed, and
There is no the influences for considering that data spilling generates the actual value of step number during statistics, not so as to cause the step number counted
The actual amount of exercise of user can be really reacted, there is a problem of the accuracy deficiency of data statistics.
Summary of the invention
Based on this, to solve to cause to count because the size of the storable data of the register of pedometer limits in traditional technology
The spilling that the data that count generate in step device so as to cause step number statistical accuracy deficiency technical problem, spy proposes one
The report method of kind pedometer message.
A kind of report method of pedometer message, comprising:
The step number for monitoring pedometer statistics is generated when the step number of pedometer statistics is greater than preset step threshold
Interrupt instruction;
The interrupt instruction that detection pedometer reports wakes up system according to the interrupt instruction, is counted according to the pedometer
Step number generate the first pedometer message, and the first pedometer message reported by driving layer, described first counts
Walk corresponding first step number of device message;
The second pedometer message that detection pedometer reports, obtains corresponding second step number of the pedometer message;
When second step number is less than the first step number, determines that second step number is overflowed, calculate the first step
Several step numbers with second step number and, by the step number with report.
It is optionally, in one embodiment, described to determine the step of second step number is overflowed further include:
Judgement detects whether occurred to restart between the first pedometer message and the second pedometer message, if
It is no, then determine that second step number is overflowed.
It is optionally, in one embodiment, described to determine the step of second step number is overflowed further include:
Judgement detects whether pedometer occurred between the first pedometer message and the second pedometer message
Resetting, if it is not, then determining that second step number is overflowed.
Optionally, in one embodiment, before the step of judgement second step number is overflowed further include:
First time corresponding with first pedometer is obtained, when obtaining corresponding with second pedometer second
Between;
The time interval is calculated according to the first time and second time;
The ratio for calculating the second step number Yu the time interval is greater than or equal to preset change rate threshold value in the ratio
When, judgement the second pedometer message is the prompting message forged message and generate step number exception, is less than institute in the ratio
When stating change rate threshold value, the step of judgement second step number is overflowed is executed.
Optionally, in one embodiment, the method also includes:
If detecting the pedometer by driving the pedometer message that reports of layer, obtains in the pedometer message and include
Step number stores the step number to preset storage region, which is uploaded to preset application server, the application service
The step number for being added to the movement step number counted in the application server by device.
In addition, to solve to lead to step counting because the size of the storable data of the register of pedometer limits in traditional technology
The spilling that the data that count in device generate so as to cause step number statistical accuracy deficiency technical problem, spy proposes one kind
The reporting device of pedometer message.
A kind of reporting device of pedometer message, comprising:
Interrupt instruction generation module is greater than for monitoring the step number of pedometer statistics in the step number of pedometer statistics
When preset step threshold, interrupt instruction is generated;
First step number obtains module, and the interrupt instruction reported for detecting pedometer wakes up system according to the interrupt instruction
System generates the first pedometer message according to the step number of pedometer statistics, and first pedometer is disappeared by driving layer
Breath is reported, corresponding first step number of the first pedometer message;
Second step number obtains module, and the second pedometer message reported for detecting pedometer obtains the pedometer and disappears
Cease corresponding second step number;
Step number reporting module, for when second step number is less than the first step number, determining that second step number occurs to overflow
Out, calculate first step number and second step number step number and, by the step number with report.
Optionally, in one embodiment, described device further includes restarting determining module, detects described for judging
Whether occurred to restart between one pedometer message and the second pedometer message, and when restarting, called the step number
Reporting module.
Optionally, in one embodiment, described device further includes resetting determining module, detects described for judging
Pedometer resetting whether occurred between one pedometer message and the second pedometer message, pedometer resetting was occurring
When, call the step number reporting module.
Optionally, in one embodiment, described device further includes change rate determining module, for obtaining and described first
Pedometer corresponding first time obtains the second time corresponding with second pedometer;According to the first time and institute
State the second time calculating time interval;The ratio for calculating the second step number Yu the time interval, be greater than in the ratio or
When equal to preset change rate threshold value, determines the second pedometer message and disappear to forge message and generating the prompt of step number exception
Breath calls the step number reporting module when the ratio is less than the change rate threshold value.
Optionally, in one embodiment, described device further includes step number statistical module, for detecting the step counting
When the pedometer message that device is reported by driving layer, the step number for including in the pedometer message is obtained, which is stored to pre-
If storage region, which is uploaded to preset application server, the application server is for the step number to be added to
The movement step number counted in the application server.
Implement the embodiment of the present invention, will have the following beneficial effects:
After report method and device using above-mentioned pedometer message, supervised for the step number counted in pedometer
It surveys, when the step number reaches preset spilling threshold value, generates interrupt instruction and wake up system, then report corresponding step number
To application layer, so that corresponding step counting application gets step number relevant to threshold value is overflowed and counts, then in step counting next time
In the case that device reports step number, if the step number reported is less than the preceding step number once reported, the step number and upper one that this is reported
The sum of the secondary step number reported is as the step number finally reported.That is, after the step number counted in pedometer is overflowed,
On the basis of the step number that subsequent step number reports, in addition the last time when statistics step number is more than preset spilling threshold value because reporting
Step number, using the sum of the two as the final result reported, so that being contained in this step number for reporting because pedometer overflows
The loss of data that may cause.The shadow overflowed without considering step number will be reported compared to will directly work as previous step number in traditional technology
Loud technical solution can improve the accuracy of the data statistics for the step count data that pedometer reports using the present invention.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Wherein:
Fig. 1 is a kind of flow diagram of the report method of pedometer message in one embodiment;
Fig. 2 is a kind of structural schematic diagram of the reporting device of pedometer message in one embodiment;
Fig. 3 is the structural representation that the computer equipment of report method of aforementioned pedometer message is run in one embodiment
Figure.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
To solve to cause in pedometer in traditional technology because the size of the storable data of the register of pedometer limits
The spilling that the data of statistics generate so as to cause step number statistical accuracy deficiency technical problem, in the present embodiment, spy
A kind of report method of pedometer message is proposed, the realization of this method can be dependent on computer program, which can
It runs on the computer system based on von Neumann system, which can be the processing of pedometer statistical data
The application of corresponding step number statistics is applied in the step countings such as program or wechat move, QQ length of run sequence is dynamic.The computer system can be
Run above-mentioned computer program is provided with servicing such as smart phone, tablet computer, PC for pedometer sensor
Device or terminal.
Specifically, as shown in Figure 1, the report method of above-mentioned pedometer message includes the following steps:
Step S102: the step number of monitoring pedometer statistics is greater than preset step number threshold in the step number of pedometer statistics
When value, interrupt instruction is generated.
In the present embodiment, when detecting paces, the step number that will test updates in the step number of statistics pedometer,
That is the step number counted in pedometer can be with the accumulative continuous increasing of paces during pedometer detects paces
Add.It in the present embodiment, can there are one because of the size limitation of the register of the step number of the corresponding storage statistics of pedometer
With the maximum value of the step number of storage, as spilling threshold value.In the case where register is 16 registers, corresponding spilling
Threshold value is 65535, then in the case where the step number of statistics is 65535 and then secondary accumulation step number, the step that stores in register
Number can restart to accumulate from 0.
In the present embodiment, preset step threshold can be set to above-mentioned spilling threshold value, is also possible to overflow with this
Some close value of threshold value out, for example, the step threshold can be arranged in the case where overflowing threshold value is 65535
It is 65534.
In the present embodiment, if detecting, the step number of pedometer statistics is greater than or equal to preset step threshold, generates
Interrupt instruction, corresponding processor is handled after detecting the interrupt instruction for the interrupt instruction in terminal, for example,
It goes to obtain the step number counted in pedometer or instruction occurs so that the step number of statistics is reported or in by pedometer
Disconnected wake instruction system wakes up the relevant operation of application progress accordingly.
In the present embodiment, after detecting the interrupt instruction that pedometer reports, system is waken up according to the interrupt instruction,
Namely process corresponding with pedometer has been waken up, for example, wechat moves.
Step S104: the interrupt instruction that detection pedometer reports wakes up system according to the interrupt instruction, according to the meter
The step number for walking device statistics generates the first pedometer message, and is reported the first pedometer message by driving layer, institute
State corresponding first step number of the first pedometer message.
In the present embodiment, it after pedometer generates interrupt instruction and wakes up system, can will be counted in pedometer
Step number is reported, i.e., generates pedometer message according to the step number counted in pedometer, the pedometer message is then passed through drive
Dynamic layer reports.
In general, pedometer can report, in general, pedometer is reported after detecting step number via driving layer
The frequency of step number can be detects that step number update generates corresponding interrupt instruction later each time, and then terminal is detecting
After interrupt instruction, the step number that pedometer reports is obtained, alternatively, can also be arranged in the terminal to save the power consumption of terminal
One timer, the step number for periodically reporting pedometer to detect, with that is, be not that pedometer often detects step number more new capital
New step number is reported, but the update that corresponding step count information is sent to driving layer of timing.Also alternatively, receiving
After obtaining the corresponding step number acquisition instruction of step number, corresponding step number is included in pedometer message by pedometer and is reported.Tool
In body embodiment, such as the data that the devices such as pedometer, sensor, touch screen are got all are to be reported to frame via driving layer
Layer, is then reported to application layer, so that the relevant application in application layer gets corresponding pedometer message and meter
Walk the step number of device statistics.
Step S106: the second pedometer message that detection pedometer reports obtains the pedometer message corresponding second
Step number.
In the present embodiment, after pedometer has reported the first pedometer message, step number acquisition instruction is inputted in user
Or after other detect the trigger events of other triggering step number acquisition instructions, step number that pedometer can will count in pedometer
It reports, i.e., the step number counted in pedometer is included in pedometer message and is reported.It in the present embodiment, will be in pedometer
After the step number of statistics is more than preset step threshold and generates interrupt instruction and then report the first pedometer message, detect
Pedometer message is referred to as the second pedometer message, that is to say, that the second pedometer message is to detect that the first pedometer disappears
The pedometer message detected next time after breath, corresponding step number is the second step number in the second pedometer message.
Step S108: when second step number is less than the first step number, determines that second step number is overflowed, calculate institute
State the first step number and second step number step number and, the step number and will report.
In general, in a particular embodiment, because of the continuous accumulation of step number, after the pedometer message that detects it is corresponding
Step number is greater than in the corresponding step number of pedometer message preceding detected.But because the corresponding register of pedometer is deposited
The size limitation in space is stored up, there are certain limitations for the storable step number of register, that is, there is a storable step number most
The value is referred to as to overflow threshold value by big value in the present embodiment.Because the step number stored in a register reaches above-mentioned spilling
In the case where threshold value, if pedometer continues the corresponding data storage of the paces that will test into pedometer, deposited in register
The data of storage will be zeroed, that is to say, that in the case where register is 16 registers, corresponding spilling threshold value is
65535, then in the case where the step number of statistics is 65535 and then secondary accumulation step number, the step number stored in register can be from 0
Restart to accumulate.
That is, because in general, the step countings software such as wechat movement periodically all can carry out corresponding data more daily
Newly, i.e., in step counting software the update of the statistical conditions of step number be than more frequently, therefore, what adjacent pedometer twice reported
The lookup of corresponding step number is little in pedometer message, also, the corresponding spilling threshold value of the corresponding register of general pedometer
It is all a biggish numerical value, therefore, if corresponding step number is less than last pedometer in the pedometer message that pedometer reports
Corresponding step number is small in the pedometer message that last time reports, and illustrates corresponding in pedometer message that corresponding pedometer reports
Step number be it is abnormal, this exception may be because last time report among pedometer message exist overflow.
In the present embodiment, if corresponding second step number of the second pedometer message that previous ought be detected is less than preceding primary inspection
Corresponding first step number of the first pedometer message measured then determines the second pedometer message that previous ought detect corresponding the
Two step numbers are the step numbers after overflowing.
Because will be more than that the corresponding first pedometer message of preset step threshold has reported before overflowing,
That is, corresponding step number is to overflow threshold value in the preceding pedometer message once detected, in this case, again
Corresponding second step number of the second pedometer message detected has once been reported after pedometer message since 0 again upper
Accumulative, it therefore, is detecting between the first pedometer message and the second pedometer message, the paces that pedometer detects are corresponding
The summation of step number be the second step number.Therefore, in the present embodiment, it is not less than on the last time to the step number that pedometer reports
Corresponding first step number in first pedometer message of report then needs the step number for reporting the last time to take into account, that is to say, that
The step number reported be the first step number and the second step number step number and.
It should be noted that in the present embodiment, if terminal is weighed between the detection of pedometer message twice
It opens, then corresponding pedometer has carried out shutoff operation and do not restart, and pedometer is being deposited in the case where being restarted
Then the data stored in device can be all cleared to add up since new from 0.Therefore, in an alternative embodiment, judging
During whether corresponding step number overflows in pedometer message, it is also necessary to consider whether terminal is rebooted or step counting
Whether device is rebooted.
Specifically, in one embodiment, before the step of above-mentioned judgement second step number is overflowed further include: sentence
It is disconnected to detect whether occurred to restart between the first pedometer message and the second pedometer message, if it is not, then determining
Second step number is overflowed.
In another embodiment, described to determine the step of second step number is overflowed further include: judgement detects
Whether pedometer resetting was occurred between the first pedometer message and the second pedometer message, if it is not, then determining institute
The second step number is stated to overflow.
That is, only in the case where terminal or pedometer are not restarted or reset, it is previous right that can will work as
The second step number answered is judged to overflowing, conversely, if after terminal or pedometer are restarted or reset, corresponding numerical value
It is zeroed, this zero is not that cannot be judged as overflowing because caused by spilling, in this case,
Second step number is that normally, the pedometer message that the step countings software such as wechat movement directly will test is corresponding less than the first step number
Second step number is updated in corresponding application server.
Further, when whether the corresponding data of pedometer message for considering that pedometer reports are abnormal, it is also necessary to consider
The variable quantity of data and the relationship between the time, that is to say, that need consider within the unit time step number variation whether be
Reasonably.
Specifically, in one embodiment, before the step of above-mentioned judgement second step number is overflowed further include: obtain
First time corresponding with first pedometer is taken, the second time corresponding with second pedometer is obtained;According to described
At the first time and second time calculates the time interval;The ratio for calculating the second step number Yu the time interval, in institute
When stating ratio more than or equal to preset change rate threshold value, the second pedometer message is determined to forge message and generating step number
Abnormal prompting message executes judgement second step number and occurs to overflow when the ratio is less than the change rate threshold value
Out the step of.
That is, not only containing the step number counted accordingly in pedometer message, corresponding report is further comprised
Time, according to the time that the pedometer message detected twice includes can determine the pedometer message detected twice when
Between be spaced.Because the pedometer after detecting the first pedometer message is zeroed because of overflowing, that is to say, that the second step number
The step number counted between the message of pedometer twice as detected, the ratio between the second step number and above-mentioned time interval are
It can reflect the variable quantity of step number in the unit time.And this variable quantity is not exceed certain limitation, if being more than default
Changing value limiting value (i.e. preset change rate threshold value), then illustrate corresponding in the second currently detected pedometer message
Second step number may be tampered, and in this case, the prompting message for generating pedometer message exception is used to that user is prompted to work as
Preceding data may be tampered, conversely, then executing the relevant operation for determining whether the second step number overflows.
Further, in the present embodiment, disappear in the step counting software of application layer receiving the pedometer that pedometer reports
After breath, step number corresponding in pedometer message can be updated and count the page or storage region in corresponding step number.Specifically,
In the present embodiment, the method also includes: if detecting, the pedometer by driving the pedometer message that reports of layer, is obtained
The step number for including in the pedometer message, which is stored to preset storage region, which is uploaded to preset answer
With server, the step number for being added to the movement step number counted in the application server by the application server.
That is, after step counting software gets the step number for including in pedometer message, if current corresponding step counting
Corresponding step number statistics is not need to upload on network in software, then stores the step number corresponding default to the step counting software
Storage region in, if the corresponding step number statistics of current corresponding step counting software is to upload to corresponding application server, example
Such as, wechat moves, then is uploaded to application serve the step number obtained from pedometer message, application server is on receiving
After the step number of biography, which is added in the movement step number counted accordingly in application server.
In addition, to solve to lead to step counting because the size of the storable data of the register of pedometer limits in traditional technology
The spilling that the data that count in device generate so as to cause step number statistical accuracy deficiency technical problem, in one embodiment
In, as shown in Figure 2, it is also proposed that a kind of reporting device of pedometer message, specifically, the reporting device packet of the pedometer message
Include interrupt instruction generation module 102, the first step number obtains module 104, the second step number obtains module 106, step number reporting module
108, in which:
Interrupt instruction generation module 102 is big in the step number of pedometer statistics for monitoring the step number of pedometer statistics
When preset step threshold, interrupt instruction is generated;
First step number obtains module 104, and the interrupt instruction reported for detecting pedometer wakes up according to the interrupt instruction
System generates the first pedometer message according to the step number of pedometer statistics, and by driving layer by first pedometer
Message is reported, corresponding first step number of the first pedometer message;
Second step number obtains module 106, and the second pedometer message reported for detecting pedometer obtains the pedometer
Corresponding second step number of message;
Step number reporting module 108, for when second step number is less than the first step number, determining that second step number occurs
Overflow, calculate first step number and second step number step number and, by the step number with report.
Optionally, in one embodiment, as shown in Fig. 2, above-mentioned apparatus further includes restarting determining module 110, for sentencing
It is disconnected to detect whether occurred to restart between the first pedometer message and the second pedometer message, restarting
When, call the step number reporting module 108.
Optionally, in one embodiment, as shown in Fig. 2, above-mentioned apparatus further includes resetting determining module 112, for sentencing
It is disconnected to detect pedometer resetting whether occurred between the first pedometer message and the second pedometer message, occurring
When crossing pedometer resetting, the step number reporting module 108 is called.
Optionally, in one embodiment, it as shown in Fig. 2, above-mentioned apparatus further includes change rate determining module 114, is used for
First time corresponding with first pedometer is obtained, the second time corresponding with second pedometer is obtained;According to institute
It states at the first time and second time calculates the time interval;The ratio for calculating the second step number Yu the time interval,
When the ratio is greater than or equal to preset change rate threshold value, the second pedometer message is determined to forge message and generating step
The abnormal prompting message of number calls the step number reporting module 108 when the ratio is less than the change rate threshold value.
Optionally, in one embodiment, it as shown in Fig. 2, above-mentioned apparatus further includes step number statistical module 116, is used for
When detecting the pedometer message that the pedometer is reported by driving layer, the step number for including in the pedometer message is obtained, it will
The step number is stored to preset storage region, which is uploaded to preset application server, the application server is used for
The step number is added to the movement step number counted in the application server.
Implement the embodiment of the present invention, will have the following beneficial effects:
After report method and device using above-mentioned pedometer message, supervised for the step number counted in pedometer
It surveys, when the step number reaches preset spilling threshold value, generates interrupt instruction and wake up system, then report corresponding step number
To application layer, so that corresponding step counting application gets step number relevant to threshold value is overflowed and counts, then in step counting next time
In the case that device reports step number, if the step number reported is less than the preceding step number once reported, the step number and upper one that this is reported
The sum of the secondary step number reported is as the step number finally reported.That is, after the step number counted in pedometer is overflowed,
On the basis of the step number that subsequent step number reports, in addition the last time when statistics step number is more than preset spilling threshold value because reporting
Step number, using the sum of the two as the final result reported, so that being contained in this step number for reporting because pedometer overflows
The loss of data that may cause.The shadow overflowed without considering step number will be reported compared to will directly work as previous step number in traditional technology
Loud technical solution can improve the accuracy of the data statistics for the step count data that pedometer reports using the present invention.
In one embodiment, as shown in figure 3, Fig. 3 illustrates a kind of report method for running above-mentioned pedometer message
The terminal of computer system based on von Neumann system.The computer system can be smart phone, tablet computer, palm electricity
The terminal devices such as brain, laptop or PC.Specifically, may include the outer input interface connected by system bus
1001, processor 1002, memory 1003 and output interface 1004.Wherein, outer input interface 1001 optionally can be wrapped at least
Include network interface 10012.Memory 1003 may include external memory 10032 (such as hard disk, CD or floppy disk etc.) and interior storage
Device 10034.Output interface 1004 can include at least the equipment such as display screen 10042.
In the present embodiment, the operation of this method is based on computer program, and the program file of the computer program is stored in
In the external memory 10032 of the aforementioned computer system based on von Neumann system, it is loaded into built-in storage at runtime
It in 10034, is then compiled as being transferred in processor 1002 after machine code executing, so that being based on von Neumann system
Computer system in form interrupt instruction generation module 102 in logic, the first step number obtains module 104, the second step number obtains
Modulus block 106, step number reporting module 108, restart determining module 110, resetting determining module 112, change rate determining module 114 with
And step number statistical module 116.And in the report method implementation procedure of above-mentioned pedometer message, the parameter of input passes through outside
Input interface 1001 receives, and is transferred in memory 1003 and caches, and is then input in processor 1002 and is handled, and handles
Result data or be cached in memory 1003 subsequently handled, or be passed to output interface 1004 and exported.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.
Unit in the terminal of that embodiment of the invention can be combined, divided and deleted according to actual needs.The present invention is real
The terminal for applying example offer includes but is not limited to carryOr other operating systems
Terminal, such as mobile phone.Be also possible to other terminals, such as with touch sensitive surface (for example, touch-screen display and/or
Trackpad) laptop computer or tablet computer or desktop computer.
In the following discussion, a kind of terminal including display and touch sensitive surface is described.It should be appreciated, however, that terminal
It may include other one or more physical user-interface devices, such as physical keyboard, mouse and/or operating stick.
Terminal usually supports a variety of application programs, such as one of following or a variety of: application is presented in picture application program
Program, word-processing application, webpage creation application program, disk editor application program, spreadsheet applications, game are answered
With program, telephony application, videoconference application, email application, instant message application program, temper branch
Hold application program, photograph management application program, digital camera applications program, digital video camcorder application program, web browsing
Application program, digital music player application, and/or video frequency player application program.
The physical user-interface device that the various application programs that can be executed at the terminal can be used at least one shared, such as
Touch sensitive surface.The corresponding information of the one or more functions and display of touch sensitive surface at the terminal can be from a kind of application program tune
It is whole and/or be changed to a kind of lower application program and/or be adjusted and/or change in corresponding application programs.In this way, terminal is total to
It can be various using journey to support using intuitive clearly user interface for a user with physical structure (such as touch sensitive surface)
Sequence.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.
Claims (14)
1. a kind of report method of pedometer message characterized by comprising
The step number for monitoring pedometer statistics is generated and is interrupted when the step number of pedometer statistics is greater than preset step threshold
Instruction;
The interrupt instruction that detection pedometer reports wakes up system according to the interrupt instruction, the step counted according to the pedometer
Number generates the first pedometer message, and is reported the first pedometer message by driving layer, first pedometer
Message corresponds to the first step number;
The second pedometer message that detection pedometer reports, obtains corresponding second step number of the pedometer message;
When second step number is less than the first step number, determine that second step number is overflowed, calculate first step number and
The step number of second step number and, the step number and will report;
It is wherein, described to determine the step of second step number is overflowed further include:
Judgement detects whether occurred to restart between the first pedometer message and the second pedometer message, if it is not,
Then determine that second step number is overflowed.
2. the report method of pedometer message according to claim 1, which is characterized in that the method also includes:
If detecting, the pedometer by the pedometer message for driving layer to report, obtains the step for including in the pedometer message
Number, which is stored to preset storage region, which is uploaded to preset application server, the application server
For the step number to be added to the movement step number counted in the application server.
3. a kind of report method of pedometer message characterized by comprising
The step number for monitoring pedometer statistics is generated and is interrupted when the step number of pedometer statistics is greater than preset step threshold
Instruction;
The interrupt instruction that detection pedometer reports wakes up system according to the interrupt instruction, the step counted according to the pedometer
Number generates the first pedometer message, and is reported the first pedometer message by driving layer, first pedometer
Message corresponds to the first step number;
The second pedometer message that detection pedometer reports, obtains corresponding second step number of the pedometer message;
When second step number is less than the first step number, determine that second step number is overflowed, calculate first step number and
The step number of second step number and, the step number and will report;
It is wherein, described to determine the step of second step number is overflowed further include:
Judgement detects pedometer resetting whether occurred between the first pedometer message and the second pedometer message,
If it is not, then determining that second step number is overflowed.
4. the report method of pedometer message according to claim 3, which is characterized in that the method also includes:
If detecting, the pedometer by the pedometer message for driving layer to report, obtains the step for including in the pedometer message
Number, which is stored to preset storage region, which is uploaded to preset application server, the application server
For the step number to be added to the movement step number counted in the application server.
5. a kind of report method of pedometer message characterized by comprising
The step number for monitoring pedometer statistics is generated and is interrupted when the step number of pedometer statistics is greater than preset step threshold
Instruction;
The interrupt instruction that detection pedometer reports wakes up system according to the interrupt instruction, the step counted according to the pedometer
Number generates the first pedometer message, and is reported the first pedometer message by driving layer, first pedometer
Message corresponds to the first step number;
The second pedometer message that detection pedometer reports, obtains corresponding second step number of the pedometer message;
When second step number is less than the first step number, determine that second step number is overflowed, calculate first step number and
The step number of second step number and, the step number and will report;
Wherein, before the step of judgement second step number is overflowed further include:
First time corresponding with first pedometer is obtained, the second time corresponding with second pedometer is obtained;
Time interval is calculated according to the first time and second time;
The ratio for calculating the second step number Yu the time interval, when the ratio is greater than or equal to preset change rate threshold value,
The second pedometer message is determined to forge message and generating the prompting message of step number exception, is less than the change in the ratio
When rate threshold value, the step of judgement second step number is overflowed is executed.
6. the report method of pedometer message according to claim 5, which is characterized in that the method also includes:
If detecting, the pedometer by the pedometer message for driving layer to report, obtains the step for including in the pedometer message
Number, which is stored to preset storage region, which is uploaded to preset application server, the application server
For the step number to be added to the movement step number counted in the application server.
7. a kind of reporting device of pedometer message characterized by comprising
Interrupt instruction generation module is greater than default for monitoring the step number of pedometer statistics in the step number of pedometer statistics
Step threshold when, generate interrupt instruction;
First step number obtains module, and the interrupt instruction reported for detecting pedometer wakes up system, root according to the interrupt instruction
The first pedometer message is generated according to the step number of pedometer statistics, and by driving layer to carry out the first pedometer message
It reports, corresponding first step number of the first pedometer message;
Second step number obtains module, and the second pedometer message reported for detecting pedometer obtains the pedometer message pair
The second step number answered;
Step number reporting module is counted for when second step number is less than the first step number, determining that second step number is overflowed
Calculate first step number and second step number step number and, the step number and will report;
Wherein, described device further includes restarting determining module, detects the first pedometer message and described for judging
Whether occurred to restart between two pedometer message, and when restarting, called the step number reporting module.
8. the reporting device of pedometer message according to claim 7, which is characterized in that described device further includes step number system
Module is counted, for obtaining in the pedometer message when detecting the pedometer message that the pedometer is reported by driving layer
The step number for including stores the step number to preset storage region, which is uploaded to preset application server, described to answer
With server for the step number to be added to the movement step number counted in the application server.
9. a kind of reporting device of pedometer message characterized by comprising
Interrupt instruction generation module is greater than default for monitoring the step number of pedometer statistics in the step number of pedometer statistics
Step threshold when, generate interrupt instruction;
First step number obtains module, and the interrupt instruction reported for detecting pedometer wakes up system, root according to the interrupt instruction
The first pedometer message is generated according to the step number of pedometer statistics, and by driving layer to carry out the first pedometer message
It reports, corresponding first step number of the first pedometer message;
Second step number obtains module, and the second pedometer message reported for detecting pedometer obtains the pedometer message pair
The second step number answered;
Step number reporting module is counted for when second step number is less than the first step number, determining that second step number is overflowed
Calculate first step number and second step number step number and, the step number and will report;
Wherein, described device further includes resetting determining module, detects the first pedometer message and described for judging
Pedometer resetting whether occurred between two pedometer message, when pedometer resetting occurred, the step number is called to report mould
Block.
10. the reporting device of pedometer message according to claim 9, which is characterized in that described device further includes step number
Statistical module, for obtaining the pedometer message when detecting the pedometer message that the pedometer is reported by driving layer
In include step number, which is stored to preset storage region, which is uploaded to preset application server, it is described
The step number for being added to the movement step number counted in the application server by application server.
11. a kind of reporting device of pedometer message characterized by comprising
Interrupt instruction generation module is greater than default for monitoring the step number of pedometer statistics in the step number of pedometer statistics
Step threshold when, generate interrupt instruction;
First step number obtains module, and the interrupt instruction reported for detecting pedometer wakes up system, root according to the interrupt instruction
The first pedometer message is generated according to the step number of pedometer statistics, and by driving layer to carry out the first pedometer message
It reports, corresponding first step number of the first pedometer message;
Second step number obtains module, and the second pedometer message reported for detecting pedometer obtains the pedometer message pair
The second step number answered;
Step number reporting module is counted for when second step number is less than the first step number, determining that second step number is overflowed
Calculate first step number and second step number step number and, the step number and will report;
Wherein, described device further includes change rate determining module, for obtaining first time corresponding with first pedometer,
Obtain the second time corresponding with second pedometer;According between the first time and calculating time second time
Every;The ratio for calculating the second step number Yu the time interval is sentenced when the ratio is greater than or equal to preset change rate threshold value
The fixed second pedometer message is the prompting message forged message and generate step number exception, is less than the variation in the ratio
When rate threshold value, the step number reporting module is called.
12. the reporting device of pedometer message according to claim 11, which is characterized in that described device further includes step number
Statistical module, for obtaining the pedometer message when detecting the pedometer message that the pedometer is reported by driving layer
In include step number, which is stored to preset storage region, which is uploaded to preset application server, it is described
The step number for being added to the movement step number counted in the application server by application server.
13. a kind of computer-readable storage medium, which is characterized in that the computer-readable storage medium is stored with calculating
Machine program, the computer program complete method described in claim 1 to 6 any one for instructing related hardware.
14. a kind of terminal, which is characterized in that the terminal includes outer input interface, processor, memory and output interface;
Wherein, processor requires side described in 1 to 6 any one for calling the program stored in memory with perform claim
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610822601.XA CN106445715B (en) | 2016-09-13 | 2016-09-13 | The report method and device of pedometer message |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610822601.XA CN106445715B (en) | 2016-09-13 | 2016-09-13 | The report method and device of pedometer message |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106445715A CN106445715A (en) | 2017-02-22 |
CN106445715B true CN106445715B (en) | 2019-10-25 |
Family
ID=58167860
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610822601.XA Active CN106445715B (en) | 2016-09-13 | 2016-09-13 | The report method and device of pedometer message |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106445715B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107063293B (en) * | 2017-04-24 | 2020-12-22 | 深圳市沃特沃德股份有限公司 | Position reporting method and device |
WO2019090611A1 (en) * | 2017-11-09 | 2019-05-16 | 深圳传音通讯有限公司 | Detection method and detection apparatus for step counting function of intelligent device |
CN108458724B (en) * | 2017-12-29 | 2021-06-04 | 歌尔科技有限公司 | Step counting method and device |
CN108763007B (en) * | 2018-05-31 | 2020-04-07 | 腾讯科技(深圳)有限公司 | Identification method and device for step counting abnormal equipment and server |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103619056A (en) * | 2013-12-02 | 2014-03-05 | 华为终端有限公司 | Method and terminal for reporting sensor data |
CN104142728A (en) * | 2013-05-08 | 2014-11-12 | 英属维京群岛速位互动股份有限公司 | Electronic device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS60543A (en) * | 1983-06-17 | 1985-01-05 | Fujitsu Ltd | State information reporting method of input-output control device |
CN102033802B (en) * | 2010-11-11 | 2013-01-23 | 广东威创视讯科技股份有限公司 | Device and method for counting accumulated operating time of display equipment |
-
2016
- 2016-09-13 CN CN201610822601.XA patent/CN106445715B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104142728A (en) * | 2013-05-08 | 2014-11-12 | 英属维京群岛速位互动股份有限公司 | Electronic device |
CN103619056A (en) * | 2013-12-02 | 2014-03-05 | 华为终端有限公司 | Method and terminal for reporting sensor data |
Also Published As
Publication number | Publication date |
---|---|
CN106445715A (en) | 2017-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106445715B (en) | The report method and device of pedometer message | |
CN106468560B (en) | Data output method and device based on pedometer message | |
KR101195695B1 (en) | Device that determines whether to launch an application locally or remotely as a webapp | |
CN107506240B (en) | Background application program control method and device, storage medium and electronic equipment | |
CN106197468B (en) | The method and system of pedometer step number renewal | |
CN110990138A (en) | Resource scheduling method, device, server and storage medium | |
Yu et al. | Sensing human-screen interaction for energy-efficient frame rate adaptation on smartphones | |
CN113342559A (en) | Diagnostic framework in a computing system | |
CN110716848A (en) | Data collection method and device, electronic equipment and storage medium | |
CN109976966A (en) | A kind of application program launching time counting method, apparatus and system | |
CN109271208A (en) | Parameter setting method, device, terminal and storage medium | |
CN108304274A (en) | A kind of method of information exchange, server and computer-readable medium | |
CN106933677A (en) | System exception processing method and processing device | |
CN112434308B (en) | Application vulnerability detection method and device, electronic equipment and computer storage medium | |
CN115103210B (en) | Information processing method, device, terminal and storage medium | |
CN106648916B (en) | Method and device for reporting pedometer message | |
CN106482742B (en) | The acquisition methods and device of step counting data | |
CN104462116B (en) | Data selection method and device | |
CN106445698B (en) | Method and device for acquiring step counting data | |
CN112463626B (en) | Memory leakage positioning method and device, computer equipment and storage medium | |
CN115328725A (en) | State monitoring method and device, storage medium and electronic equipment | |
CN108399031B (en) | Method and device for determining interface layout mode | |
CN108307060A (en) | Electronic equipment, falling protection method and Related product | |
CN112902983A (en) | Step counting method and device and electronic equipment | |
CN113595921B (en) | Data stream processing method and device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: OPPO Guangdong Mobile Communications Co., Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: Guangdong Opel Mobile Communications Co., Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |