CN117387655A - Step counting method, step counting device, terminal and storage medium - Google Patents

Step counting method, step counting device, terminal and storage medium Download PDF

Info

Publication number
CN117387655A
CN117387655A CN202311697295.8A CN202311697295A CN117387655A CN 117387655 A CN117387655 A CN 117387655A CN 202311697295 A CN202311697295 A CN 202311697295A CN 117387655 A CN117387655 A CN 117387655A
Authority
CN
China
Prior art keywords
acceleration
time point
step counting
value
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311697295.8A
Other languages
Chinese (zh)
Other versions
CN117387655B (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.)
Shaoxing Yuanfang Semiconductor Co Ltd
Original Assignee
Shaoxing Yuanfang Semiconductor 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 Shaoxing Yuanfang Semiconductor Co Ltd filed Critical Shaoxing Yuanfang Semiconductor Co Ltd
Priority to CN202311697295.8A priority Critical patent/CN117387655B/en
Publication of CN117387655A publication Critical patent/CN117387655A/en
Application granted granted Critical
Publication of CN117387655B publication Critical patent/CN117387655B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Algebra (AREA)
  • Remote Sensing (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The embodiment of the invention discloses a step counting method, a step counting device, a terminal and a storage medium. According to the scheme, three axial acceleration values of a triaxial acceleration sensor can be acquired based on sampling frequency, triaxial fusion acceleration values are calculated, an average acceleration value is calculated according to the fusion acceleration values of the current moment and the fusion acceleration values of the previous three moments, so that a data curve of the average acceleration value is obtained, a first time point corresponding to the current peak is searched in the data curve according to an acceleration threshold of the current moment, a time difference is calculated according to the first time point and a second time point of the last peak, and when the time difference is larger than an interval threshold, the current total step number is accumulated. According to the scheme provided by the embodiment of the application, multiple data after the acceleration data are squared can be processed smoothly, burr peak values are filtered, and false data can be filtered through setting the interval threshold value, so that the accuracy of step counting can be improved.

Description

Step counting method, step counting device, terminal and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a step counting method, a step counting device, a step counting terminal, and a storage medium.
Background
At present, the life rhythm is quickened, and many people gradually neglect the health management of themselves. In order to encourage people to walk more, a step counting function is supported on many electronic products, so that people can monitor the daily exercise amount of the people conveniently. At present, various technologies for counting the walking condition of a user have appeared, but the accuracy of statistics is mostly unsatisfactory. In addition, while the walking situation of the user is counted, some electronic products can detect the motion state of the user at the same time, and detect that the user is walking or running normally, so that the motion quantity of the user is further monitored and analyzed.
However, in the research and practice process of the prior art, the applicant finds that the prior art mainly determines the motion state of the user by acquiring the accelerations of the acceleration sensor in three axial directions, but the following defects exist in the mode: the acceleration data are discrete, have more noise, are easy to influence subsequent judgment and calculation, and are easy to be interfered by external factors so as to cause inaccurate step counting.
Disclosure of Invention
The embodiment of the invention provides a step counting method, a step counting device, a step counting terminal and a step counting storage medium, which can carry out multi-data smoothing processing on acceleration data after evolution, filter burr peaks, and filter false data by setting an interval threshold value, so that the step counting accuracy can be improved.
The embodiment of the invention provides a step counting method, which comprises the following steps:
acquiring three axial acceleration values of a triaxial acceleration sensor based on sampling frequency, and calculating triaxial fusion acceleration values;
calculating an average acceleration value according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments to obtain a data curve of the average acceleration value;
searching a first time point corresponding to the current peak in the data curve according to the acceleration threshold value at the current moment;
and calculating a time difference according to the first time point and the second time point of the last wave crest, and accumulating the current total step number when the time difference is larger than an interval threshold value.
The embodiment of the invention also provides a step counting device, which comprises:
the acquisition unit is used for acquiring three axial acceleration values of the triaxial acceleration sensor based on the sampling frequency and calculating triaxial fusion acceleration values;
the computing unit is used for computing an average acceleration value according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments so as to obtain a data curve of the average acceleration value;
the searching unit is used for searching a first time point corresponding to the current peak in the data curve according to the acceleration threshold value of the current moment;
and the accumulation unit is used for calculating the time difference according to the first time point and the second time point of the last wave crest, and accumulating the current total step number when the time difference is larger than the interval threshold value.
The embodiment of the invention also provides a terminal, which comprises: the system comprises a memory and a processor, wherein an application program processing program is stored in the memory, and the application program processing program realizes the steps of any step counting method provided by the embodiment of the invention when being executed by the processor.
The embodiment of the invention also provides a computer-readable storage medium, wherein the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute any step counting method provided by the embodiment of the invention.
According to the step counting method provided by the embodiment of the invention, three axial acceleration values of the triaxial acceleration sensor can be acquired based on sampling frequency, the triaxial fusion acceleration value is calculated, the average acceleration value is calculated according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments, so that a data curve of the average acceleration value is obtained, a first time point corresponding to the current crest is searched in the data curve according to the acceleration threshold value at the current moment, a time difference is calculated according to the first time point and the second time point of the last crest, and when the time difference is larger than the interval threshold value, the current total step number is accumulated. According to the scheme provided by the embodiment of the application, multiple data after the acceleration data are squared can be processed smoothly, burr peak values are filtered, and false data can be filtered through setting the interval threshold value, so that the accuracy of step counting can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a first flow chart of a step counting method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a scenario of registering data provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of a second flow chart of a step counting method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a first structure of a step counting device according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a second structure of the step counting device according to the embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
It should be noted that, in this document, 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, the element defined by the phrase "comprising one … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element, and furthermore, elements having the same name in different embodiments of the present application may have the same meaning or may have different meanings, a particular meaning of which is to be determined by its interpretation in this particular embodiment or by further combining the context of this particular embodiment.
It should be understood that, although the steps in the flowcharts in the embodiments of the present application are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily occurring in sequence, but may be performed alternately or alternately with other steps or at least a portion of the other steps or stages.
It should be noted that, in this document, step numbers such as 101 and 102 are used for the purpose of describing the corresponding content more clearly and briefly, and not to constitute a substantial limitation on the sequence, and those skilled in the art may execute 102 first and then execute 101 when they are implemented, which is within the scope of protection of the present application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The embodiment of the invention provides a step counting method, and an execution main body of the step counting method can be the step counting device provided by the embodiment of the invention or an intelligent terminal and a server integrated with the step counting device, wherein the step counting device can be realized in a hardware or software mode.
Specifically, referring to fig. 1, fig. 1 is a schematic flow chart of a step counting method according to an embodiment of the present invention, where the specific flow chart of the step counting method may be as follows:
101. and acquiring acceleration values of three axial directions of the triaxial acceleration sensor based on the sampling frequency, and calculating a triaxial fusion acceleration value.
In an embodiment, the three-axis acceleration sensor may be integrated on an electronic device (such as a smart phone) or may be integrated on a wearable device (such as a smart bracelet or a smart watch), and when the three-axis acceleration sensor is stationary with a human body, the 3 coordinate axis directions x, y and z of the acceleration sensor correspond to the right side direction, the front direction and the vertical direction respectively. When the three-axis acceleration sensor is in a static state, the acceleration values of the three-axis acceleration sensor in each direction can be read, and the acceleration values can be respectively recorded as ACC_X, ACC_Y and ACC_Z, wherein the acceleration values of the X, Y and Z axes are respectively 0.0m/s2,0.0m/m/s2 and 9.8m/m/s2, and when the three-axis acceleration sensor is in a motion state, the X, Y and Z axes are all changed. In an embodiment, the sampling frequency of the triaxial acceleration sensor can be adjusted according to the current equipment electric quantity, so that the equipment endurance is improved.
In one embodiment, after the three axial acceleration values acc_x, acc_y, acc_z are obtained, a triaxial fusion acceleration value may be calculated by the following formula:
the data is a fusion acceleration value, and the acceleration values of the three axial directions of the triaxial acceleration sensor are ACC_X, ACC_Y and ACC_Z respectively.
In an embodiment, after the raw acceleration sampling values acc_x, acc_y, acc_z are obtained, 2 times of filtering processing may be further performed, including, for example, first order low-pass filtering processing and moving average filtering processing. The low-pass filtering process is used for filtering out some interference generated by the acceleration sensor hardware, the moving average filtering process is used for filtering out some pseudo peaks, and an FIR filter can be selected. In this implementation, the FIR filter may be designed using a window function method. The sampling points in the walking stage are intercepted, and after low-pass filtering and secondary filtering, the waveform is smoother than the original waveform, and meanwhile, the pseudo wave crest generated by body jitter is greatly reduced. And after the twice filtering treatment, further calculating the triaxial fusion acceleration value.
102. And calculating an average acceleration value according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments to obtain a data curve of the average acceleration value.
In the embodiment of the application, pipeline processing is performed on the fused acceleration value, and data is registered, as shown in fig. 2, wherein data0 is a value at time T0, data1 is a value at time T-1, data2 is a value at time T-2, and data3 is a value at time T-3. Furthermore, the average acceleration value can be calculated according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments, specifically, the average acceleration value is calculated by the following formula:
wherein, data smooth Data is the average acceleration value at the current moment 3 Data is the fusion acceleration value at the current moment 0 、data 1 、data 2 And respectively fusing the acceleration values at the first three moments to obtain a data curve of the average acceleration value.
103. Searching a first time point corresponding to the current peak in the data curve according to the acceleration threshold value at the current moment.
In one embodiment, the acceleration threshold Base is a dynamic value that varies with time, such as Base at time T0 t0 =data t0 After that, the acceleration threshold value is calculated by the following formula:
+(1-/>)/>
wherein,for the acceleration threshold at time K, when k=0,/is>=/>For the filtering parameters, the filtering parameters may be adjusted by the user according to the actual requirements, which will not be further described in this embodiment. Further, a peak value exceeding the current acceleration threshold value can be searched at each moment in the data curve of the average acceleration value, and a time point corresponding to the peak is the first time point.
104. And calculating the time difference according to the first time point and the second time point of the last wave crest, and accumulating the current total step number when the time difference is larger than the interval threshold value.
Correspondingly, the second time point of the last peak can be obtained from the data curve of the average acceleration value through the acceleration threshold value of the last moment, the time difference between the first time point and the second time point is calculated and compared with the interval threshold value, and when the time difference is larger than the interval threshold value, the step number of the user is determined to be increased by one, and the current total step number is accumulated. When the time difference is not greater than the interval threshold, the false touch is judged, and the current total step number is kept unchanged, so that false step counting caused by jitter is avoided, namely false data is filtered.
In view of the foregoing, the step counting method provided by the embodiment of the invention may collect three axial acceleration values of the triaxial acceleration sensor based on the sampling frequency, calculate the triaxial fusion acceleration value, calculate the average acceleration value according to the fusion acceleration value at the current time and the fusion acceleration values at the first three times, so as to obtain a data curve of the average acceleration value, find a first time point corresponding to the current peak in the data curve according to the acceleration threshold at the current time, calculate a time difference according to the first time point and a second time point of the last peak, and accumulate the current total step number when the time difference is greater than the interval threshold. According to the scheme provided by the embodiment of the application, multiple data after the acceleration data are squared can be processed smoothly, burr peak values are filtered, and false data can be filtered through setting the interval threshold value, so that the accuracy of step counting can be improved.
The method according to the previous embodiments will be described in further detail below.
Referring to fig. 3, fig. 3 is a second flowchart of the step counting method according to the embodiment of the invention. The method comprises the following steps:
201. and acquiring acceleration values of three axial directions of the triaxial acceleration sensor based on the sampling frequency, and calculating a triaxial fusion acceleration value.
202. And calculating an average acceleration value according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments to obtain a data curve of the average acceleration value.
The content of calculating the triaxial fusion acceleration value and the average acceleration value is referred to the related calculation process in the previous embodiment, and further description is omitted.
203. And determining a maximum acceleration threshold value and a minimum acceleration threshold value at the current moment according to the acceleration threshold value at the current moment and the preset jitter amplitude.
204. Searching a first time point corresponding to the current peak in the data curve according to the maximum acceleration threshold value at the current moment.
205. And searching a second time point corresponding to the last wave crest in the data curve according to the minimum acceleration threshold value of the current moment.
206. The time difference is calculated from the first time point and the second time point.
In one embodiment, at data smooth Before being smaller than the maximum threshold, recording a time point T0 when the data looks for a peak value and records the maximum value, and recording the data smooth Repeating the step before the peak value is smaller than the maximum threshold value, and when the peak value calculated at the back is larger than the peak value calculated at the front, updating the recorded time T0, namely finding the time corresponding to the highest peak value before the minimum threshold value. When data is smooth When the time of the peak value is less than the minimum threshold value, locking the time recording time point T1 of the peak value, repeating the steps, recording the time point of the peak value of the second time, and when the data of the second time smooth If the data is smaller than the minimum threshold value, judging once, and then data each time smooth And if the calculated time is smaller than the minimum threshold value, judging once, namely, waiting for the time of two peaks at the initial moment, and calculating 3 rd time and 2 nd time.
207. And acquiring the body parameter information and the motion state of the current user.
208. And calculating the step frequency of the current user according to the body parameter information and the motion state, determining an interval threshold according to the step frequency, and accumulating the current total step number when the time difference is larger than the interval threshold.
In one embodiment, when
△T=T 1 -T 0 <T Interval threshold
When the pedometer detects a step, the interval threshold can be set adaptively according to physical parameters of a pattern user, for example, the step frequency of the current user is calculated according to the gender, the height and the age of the user and the current motion state (walking or running), and then the corresponding interval threshold is set according to the step frequency, so that the accuracy of step counting is improved.
In an embodiment, the method may further include: and stopping accumulating the total step number when the time difference is larger than the detection threshold, judging whether the total step number is larger than the step counting threshold, and updating the total step number into a register if the total step number is larger than the step counting threshold. For example, the step counting threshold is set according to the user parameter, when the step counting threshold is greater than the user parameter, the step counting is effective, the number of steps detected before is accumulated and synchronously updated to the register for reading by the upper computer, if the step counting threshold is not greater than the step counting threshold, the step counting of the round is considered to be ineffective, the step counting error caused by shaking is deleted, the detection of the round is finished, and meanwhile, the step counting module is reset to prepare for the next detection.
In the step counting method provided by the embodiment of the invention, three axial acceleration values of the triaxial acceleration sensor can be acquired based on the sampling frequency, the triaxial fusion acceleration value is calculated, the average acceleration value is calculated according to the fusion acceleration value at the current moment and the fusion acceleration value at the first three moments, so as to obtain a data curve of the average acceleration value, the maximum acceleration threshold and the minimum acceleration threshold at the current moment are determined according to the acceleration threshold at the current moment and the preset jitter amplitude, a first time point corresponding to the current peak is searched according to the maximum acceleration threshold at the current moment in the data curve, a second time point corresponding to the last peak is searched according to the minimum acceleration threshold at the current moment in the data curve, the time difference is calculated according to the first time point and the second time point, the body parameter information and the motion state of the current user are obtained, the step frequency of the current user is calculated according to the body parameter information and the motion state, the interval threshold is determined according to the step frequency, and the current total step number is accumulated when the time difference is larger than the interval threshold. According to the scheme provided by the embodiment of the application, multiple data after the acceleration data are squared can be processed smoothly, burr peak values are filtered, and false data can be filtered through setting the interval threshold value, so that the accuracy of step counting can be improved.
In order to implement the above method, the embodiment of the invention also provides a step counting device, which can be integrated in terminal equipment such as a mobile phone, a tablet personal computer and the like.
For example, as shown in fig. 4, a schematic diagram of a first structure of a step counting device according to an embodiment of the present invention is shown. The step counting device can comprise:
the acquisition unit 301 is configured to acquire three axial acceleration values of the triaxial acceleration sensor based on a sampling frequency, and calculate a triaxial fusion acceleration value;
a calculating unit 302, configured to calculate an average acceleration value according to the fusion acceleration value at the current time and the fusion acceleration values at the first three times, so as to obtain a data curve of the average acceleration value;
a searching unit 303, configured to search a first time point corresponding to a current peak in the data curve according to an acceleration threshold at a current time;
the accumulating unit 304 is configured to calculate a time difference according to the first time point and the second time point of the last peak, and accumulate the current total number of steps when the time difference is greater than the interval threshold.
In an embodiment, referring to fig. 5, fig. 5 is a schematic diagram of a second structure of a step counting device according to an embodiment of the present invention, wherein the accumulating unit 304 specifically includes:
a calculating subunit 3041, configured to obtain body parameter information and a motion state of a current user, calculate a step frequency of the current user according to the body parameter information and the motion state, and determine the interval threshold according to the step frequency;
the accumulation subunit 3042 is configured to calculate a time difference according to the first time point and the second time point of the last peak, and accumulate the current total number of steps when the time difference is greater than the interval threshold.
In an embodiment, the step counting device may further include:
and an updating unit 305, configured to stop accumulating the total number of steps when the time difference is greater than a detection threshold, and determine whether the total number of steps is greater than a step counting threshold, and if so, update the total number of steps to a register.
The step counting device provided by the embodiment of the invention can collect three axial acceleration values of the triaxial acceleration sensor based on sampling frequency, calculate triaxial fusion acceleration values, calculate average acceleration values according to the fusion acceleration values at the current moment and the fusion acceleration values at the first three moments to obtain a data curve of the average acceleration values, search a first time point corresponding to the current crest according to the acceleration threshold at the current moment in the data curve, calculate a time difference according to the first time point and a second time point of the last crest, and accumulate the current total step number when the time difference is larger than an interval threshold. According to the scheme provided by the embodiment of the application, multiple data after the acceleration data are squared can be processed smoothly, burr peak values are filtered, and false data can be filtered through setting the interval threshold value, so that the accuracy of step counting can be improved.
Embodiments of the present invention also provide a terminal, as shown in fig. 6, which may include a Radio Frequency (RF) circuit 601, a memory 602 including one or more computer readable storage media, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a wireless fidelity (WiFi, wireless Fidelity) module 607, a processor 608 including one or more processing cores, and a power supply 609. It will be appreciated by those skilled in the art that the terminal structure shown in fig. 7 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the RF circuit 601 may be used for receiving and transmitting signals during a message or a call, and in particular, after receiving downlink information of a base station, the downlink information is processed by one or more processors 608; in addition, data relating to uplink is transmitted to the base station. Typically, RF circuitry 601 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM, subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 601 may also communicate with networks and other devices through wireless communications. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications (GSM, global System of Mobile communication), general packet radio service (GPRS, general Packet Radio Service), code division multiple access (CDMA, code Division Multiple Access), wideband code division multiple access (WCDMA, wideband Code Division Multiple Access), long term evolution (LTE, long Term Evolution), email, short message service (SMS, short Messaging Service), and the like.
The memory 602 may be used to store software programs and modules, and the processor 608 may execute various functional applications and information processing by executing the software programs and modules stored in the memory 602. The memory 602 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the terminal, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide access to the memory 602 by the processor 608 and the input unit 603.
The input unit 603 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 603 may include a touch-sensitive surface, as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations thereon or thereabout by a user using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program. Alternatively, the touch-sensitive surface may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 608, and can receive commands from the processor 608 and execute them. In addition, touch sensitive surfaces may be implemented in a variety of types, such as resistive, capacitive, infrared, and surface acoustic waves. The input unit 603 may comprise other input devices in addition to a touch sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 604 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the terminal, which may be composed of graphics, text, icons, video and any combination thereof. The display unit 604 may include a display panel, which may be optionally configured in the form of a liquid crystal display (LCD, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay a display panel, and upon detection of a touch operation thereon or thereabout, the touch-sensitive surface is passed to the processor 608 to determine the type of touch event, and the processor 608 then provides a corresponding visual output on the display panel based on the type of touch event. Although in reference 7 the touch sensitive surface and the display panel are implemented as two separate components for input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement the input and output functions.
The terminal may also include at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or backlight when the terminal moves to the ear. The gravity acceleration sensor can detect the acceleration in all directions (generally three axes), can detect the gravity and the direction when the mobile phone is stationary, can be used for identifying the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration identification related functions (such as pedometer and knocking), and other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor and the like which are also configured by the terminal are not repeated herein.
Audio circuitry 606, speakers, and a microphone may provide an audio interface between the user and the terminal. The audio circuit 606 may transmit the received electrical signal after audio data conversion to a speaker, where the electrical signal is converted to a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 606 and converted into audio data, which are processed by the audio data output processor 608 for transmission to, for example, another terminal via the RF circuit 601, or which are output to the memory 602 for further processing. The audio circuit 606 may also include an ear bud jack to provide communication of the peripheral ear bud with the terminal.
The WiFi belongs to a short-distance wireless transmission technology, and the terminal can help the user to send and receive e-mail, browse web pages, access streaming media and the like through the WiFi module 607, so that wireless broadband internet access is provided for the user. Although the WiFi module 607 is shown in fig. 7, it is understood that it does not belong to the essential constitution of the terminal, and can be omitted entirely as required within the scope of not changing the essence of the invention.
The processor 608 is a control center of the terminal, and connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 602, and calling data stored in the memory 602, thereby performing overall monitoring of the mobile phone. Optionally, the processor 608 may include one or more processing cores; preferably, the processor 608 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 608.
The terminal also includes a power supply 609 (e.g., a battery) for powering the various components, which may be logically connected to the processor 608 via a power management system so as to provide for managing charging, discharging, and power consumption by the power management system. The power supply 609 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the processor 608 in the terminal loads executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 608 executes the application programs stored in the memory 602, so as to implement various functions:
acquiring three axial acceleration values of a triaxial acceleration sensor based on sampling frequency, and calculating triaxial fusion acceleration values;
calculating an average acceleration value according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments to obtain a data curve of the average acceleration value;
searching a first time point corresponding to the current peak in the data curve according to the acceleration threshold value at the current moment;
and calculating a time difference according to the first time point and the second time point of the last wave crest, and accumulating the current total step number when the time difference is larger than an interval threshold value.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the portions of an embodiment that are not described in detail in the foregoing embodiments may be referred to in the foregoing detailed description of the step counting method, which is not repeated herein.
As can be seen from the above, the terminal according to the embodiment of the present invention may collect three axial acceleration values of the triaxial acceleration sensor based on the sampling frequency, calculate a triaxial fusion acceleration value, calculate an average acceleration value according to the fusion acceleration value at the current time and the fusion acceleration values at the first three times, so as to obtain a data curve of the average acceleration value, find a first time point corresponding to the current peak in the data curve according to the acceleration threshold at the current time, calculate a time difference according to the first time point and a second time point of the last peak, and accumulate the current total step number when the time difference is greater than the interval threshold. According to the scheme provided by the embodiment of the application, multiple data after the acceleration data are squared can be processed smoothly, burr peak values are filtered, and false data can be filtered through setting the interval threshold value, so that the accuracy of step counting can be improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present invention provide a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform steps of any of the step counting methods provided by embodiments of the present invention. For example, the instructions may perform the steps of:
acquiring three axial acceleration values of a triaxial acceleration sensor based on sampling frequency, and calculating triaxial fusion acceleration values;
calculating an average acceleration value according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments to obtain a data curve of the average acceleration value;
searching a first time point corresponding to the current peak in the data curve according to the acceleration threshold value at the current moment;
and calculating a time difference according to the first time point and the second time point of the last wave crest, and accumulating the current total step number when the time difference is larger than an interval threshold value.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The instructions stored in the storage medium can execute steps in any step counting method provided by the embodiment of the present invention, so that the beneficial effects of any step counting method provided by the embodiment of the present invention can be achieved, and detailed descriptions of the foregoing embodiments are omitted herein.
The foregoing describes in detail a step counting method, device, terminal and storage medium provided in the embodiments of the present invention, and specific examples are applied to illustrate the principles and embodiments of the present invention, where the foregoing examples are only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.

Claims (10)

1. A method of step counting, comprising:
acquiring three axial acceleration values of a triaxial acceleration sensor based on sampling frequency, and calculating triaxial fusion acceleration values;
calculating an average acceleration value according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments to obtain a data curve of the average acceleration value;
searching a first time point corresponding to the current peak in the data curve according to the acceleration threshold value at the current moment;
and calculating a time difference according to the first time point and the second time point of the last wave crest, and accumulating the current total step number when the time difference is larger than an interval threshold value.
2. The step counting method according to claim 1, wherein the triaxial fusion acceleration value is calculated by the following formula:
the data is a fusion acceleration value, and the acceleration values of the three axial directions of the triaxial acceleration sensor are ACC_X, ACC_Y and ACC_Z respectively.
3. The step counting method according to claim 2, wherein the average acceleration value is calculated by the following formula:
wherein, data smooth Data is the average acceleration value at the current moment 3 Data is the fusion acceleration value at the current moment 0 、data 1 、data 2 The fused acceleration values at the first three moments are respectively obtained.
4. The step counting method according to claim 2, characterized in that the acceleration threshold value at the present moment is calculated by the following formula:
+(1-/>)/>
wherein,for the acceleration threshold at time K, when k=0,/is>=/>,/>Is a filtering parameter.
5. The step counting method of claim 4, wherein the calculating of the first time point and the second time point includes:
determining a maximum acceleration threshold value and a minimum acceleration threshold value at the current moment according to the acceleration threshold value at the current moment and a preset jitter amplitude;
searching a first time point corresponding to the current peak in the data curve according to the maximum acceleration threshold value at the current moment;
and searching a second time point corresponding to the last wave crest in the data curve according to the minimum acceleration threshold value of the current moment.
6. The step counting method according to claim 1, wherein after calculating the time difference from the first time point and the second time point of the last peak, the method further comprises:
acquiring body parameter information and motion state of a current user;
and calculating the step frequency of the current user according to the body parameter information and the motion state, and determining the interval threshold according to the step frequency.
7. The pacing method of any one of claims 1-6, wherein the method further includes:
stopping accumulating the total step number when the time difference is larger than a detection threshold value, and judging whether the total step number is larger than a step counting threshold value or not;
if the total step number is larger than the step counting threshold value, updating the total step number to a register.
8. A step counting device, comprising:
the acquisition unit is used for acquiring three axial acceleration values of the triaxial acceleration sensor based on the sampling frequency and calculating triaxial fusion acceleration values;
the computing unit is used for computing an average acceleration value according to the fusion acceleration value at the current moment and the fusion acceleration values at the first three moments so as to obtain a data curve of the average acceleration value;
the searching unit is used for searching a first time point corresponding to the current peak in the data curve according to the acceleration threshold value of the current moment;
and the accumulation unit is used for calculating the time difference according to the first time point and the second time point of the last wave crest, and accumulating the current total step number when the time difference is larger than the interval threshold value.
9. A terminal, the terminal comprising: memory, a processor, wherein the memory has stored thereon an application handler, which when executed by the processor, implements the steps of the step counting method according to any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the storage medium stores a plurality of instructions adapted to be loaded by a processor for performing the step counting method of any one of claims 1 to 7.
CN202311697295.8A 2023-12-12 2023-12-12 Step counting method, step counting device, terminal and storage medium Active CN117387655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311697295.8A CN117387655B (en) 2023-12-12 2023-12-12 Step counting method, step counting device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311697295.8A CN117387655B (en) 2023-12-12 2023-12-12 Step counting method, step counting device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN117387655A true CN117387655A (en) 2024-01-12
CN117387655B CN117387655B (en) 2024-03-15

Family

ID=89468829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311697295.8A Active CN117387655B (en) 2023-12-12 2023-12-12 Step counting method, step counting device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN117387655B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008250963A (en) * 2007-03-30 2008-10-16 Matsushita Electric Works Ltd Pedometer
CN102654405A (en) * 2011-03-04 2012-09-05 美新半导体(无锡)有限公司 Gait counting method and device based on acceleration sensor
US20130085711A1 (en) * 2011-09-30 2013-04-04 Apple Inc. Techniques for improved pedometer readings
US20130138394A1 (en) * 2011-11-29 2013-05-30 Seiko Epson Corporation State detecting device, electronic apparatus, and program
CN103954295A (en) * 2014-05-04 2014-07-30 中国科学院计算技术研究所 Step-counting method based on acceleration sensor
CN105509762A (en) * 2014-09-30 2016-04-20 深圳市冠旭电子有限公司 Step counting method and device based on three axis accelerometer
CN106297196A (en) * 2016-09-23 2017-01-04 深圳摩登时代科技有限公司 A kind of switch, smart host and earthquake early-warning system
CN106767888A (en) * 2016-11-15 2017-05-31 皖西学院 A kind of meter based on Wave crest and wave trough detection walks algorithm
CN111854738A (en) * 2020-06-22 2020-10-30 厦门亿联网络技术股份有限公司 Human motion state detection method and device based on three-axis accelerometer
CN113008242A (en) * 2021-03-19 2021-06-22 深圳市慧鲤科技有限公司 User behavior data processing method, device, equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008250963A (en) * 2007-03-30 2008-10-16 Matsushita Electric Works Ltd Pedometer
CN102654405A (en) * 2011-03-04 2012-09-05 美新半导体(无锡)有限公司 Gait counting method and device based on acceleration sensor
US20130085711A1 (en) * 2011-09-30 2013-04-04 Apple Inc. Techniques for improved pedometer readings
US20130138394A1 (en) * 2011-11-29 2013-05-30 Seiko Epson Corporation State detecting device, electronic apparatus, and program
CN103954295A (en) * 2014-05-04 2014-07-30 中国科学院计算技术研究所 Step-counting method based on acceleration sensor
CN105509762A (en) * 2014-09-30 2016-04-20 深圳市冠旭电子有限公司 Step counting method and device based on three axis accelerometer
CN106297196A (en) * 2016-09-23 2017-01-04 深圳摩登时代科技有限公司 A kind of switch, smart host and earthquake early-warning system
CN106767888A (en) * 2016-11-15 2017-05-31 皖西学院 A kind of meter based on Wave crest and wave trough detection walks algorithm
CN111854738A (en) * 2020-06-22 2020-10-30 厦门亿联网络技术股份有限公司 Human motion state detection method and device based on three-axis accelerometer
CN113008242A (en) * 2021-03-19 2021-06-22 深圳市慧鲤科技有限公司 User behavior data processing method, device, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ZIHAO TANG; YAO GUO; XIANGQUN CHEN: "Self-Adaptive Step Counting on Smartphones under Unrestricted Stepping Modes", 2016 IEEE 40TH ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE, 25 August 2016 (2016-08-25) *
毕京学,汪云甲,曹鸿基,等: "一种波峰波谷检测的智能手机计步算法", 中国惯性技术学报, vol. 28, no. 3, 30 June 2020 (2020-06-30) *
王文杰;李军;: "基于手机加速度传感器的计步算法设计", 工业控制计算机, vol. 29, no. 01, 31 January 2016 (2016-01-31) *

Also Published As

Publication number Publication date
CN117387655B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN106786962B (en) Charging control method and device and terminal
CN108073458B (en) Memory recovery method, mobile terminal and computer-readable storage medium
WO2018166204A1 (en) Method for controlling fingerprint recognition module, and mobile terminal and storage medium
CN109246291B (en) Mobile terminal and sleep reminding method and device
US20190387449A1 (en) Terminal Behavior Triggering Method and Terminal
CN107219951B (en) Touch screen control method and device, storage medium and terminal equipment
CN110147742B (en) Key point positioning method, device and terminal
US10324134B2 (en) Method and device for ascertaining required charging time
CN108492837B (en) Method, device and storage medium for detecting audio burst white noise
CN111651030B (en) Sensor detection method and device, storage medium and mobile terminal
CN107066090B (en) Method for controlling fingerprint identification module and mobile terminal
CN106682189B (en) File name display method and device
CN108388400B (en) Operation processing method and mobile terminal
CN115985323B (en) Voice wakeup method and device, electronic equipment and readable storage medium
CN112612552A (en) Application program resource loading method and device, electronic equipment and readable storage medium
CN110851014B (en) Touch recognition method and device, storage medium and terminal equipment
CN110277097B (en) Data processing method and related equipment
CN111443764A (en) Separation state processing method and electronic equipment
CN117387655B (en) Step counting method, step counting device, terminal and storage medium
CN111027406B (en) Picture identification method and device, storage medium and electronic equipment
CN106657278B (en) Data transmission method and device and computer equipment
CN109561415B (en) NFC function detection method and device, storage medium and mobile terminal
CN109660664B (en) Event processing method, device and storage medium
CN111887174B (en) Method, device and system for collecting favorite position information of pet
CN111443889B (en) Volume adjusting method and system, storage medium and terminal equipment thereof

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