CN117451074A - Step counting method, wearable device and readable storage medium - Google Patents

Step counting method, wearable device and readable storage medium Download PDF

Info

Publication number
CN117451074A
CN117451074A CN202311313927.6A CN202311313927A CN117451074A CN 117451074 A CN117451074 A CN 117451074A CN 202311313927 A CN202311313927 A CN 202311313927A CN 117451074 A CN117451074 A CN 117451074A
Authority
CN
China
Prior art keywords
combined acceleration
sampling point
acceleration data
points
combined
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.)
Pending
Application number
CN202311313927.6A
Other languages
Chinese (zh)
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.)
Shenzhen Xiaoche Technology Co ltd
Original Assignee
Shenzhen Xiaoche Technology 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 Shenzhen Xiaoche Technology Co ltd filed Critical Shenzhen Xiaoche Technology Co ltd
Priority to CN202311313927.6A priority Critical patent/CN117451074A/en
Publication of CN117451074A publication Critical patent/CN117451074A/en
Pending legal-status Critical Current

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

Abstract

The invention provides a step counting method, wearable equipment and a readable storage medium, wherein the step counting method comprises the steps of obtaining triaxial acceleration data of an accelerometer in a preset time period, converting the triaxial acceleration data into combined acceleration data, and amplifying the combined acceleration data by 10 times; smoothing and filtering the combined acceleration data; and determining the step number in a preset time period according to the smooth filtered combined acceleration data, wherein the combined acceleration mean value of the front and rear sampling points is adopted to replace the combined acceleration value of the extreme points in the smooth filtering processing. The embodiment of the invention amplifies the combined acceleration data by 10 times, reduces the decimal stored by floating point data in the combined acceleration calculation result, and reduces the occupation of storage space; and in the smoothing filtering process, the sum acceleration value of the extreme points is replaced by the sum acceleration mean value of the front sampling point and the rear sampling point, so that burrs in the sum acceleration waveform can be removed, and the accuracy of step number identification is improved.

Description

Step counting method, wearable device and readable storage medium
Technical Field
The invention belongs to the field of electronic equipment, and particularly relates to a step counting method, wearable equipment and a readable storage medium.
Background
Along with the development of technology and the improvement of living demands, at present, wearable devices such as intelligent watches and bracelets are more and more popular, and the wearable devices such as intelligent watches and intelligent bracelets have functions which are not possessed by traditional watches, such as functions of displaying, communicating, playing music, surfing the internet, physiological monitoring and the like.
Wearable devices are often employed in the prior art for step counting. When a person walks normally, both horizontal and vertical accelerations are generated. When stepping, the gravity center rises and accelerates forwards, the vertical direction has upward acceleration, and the horizontal direction has forward acceleration. When the foot is retracted, the gravity center falls back and decelerates, the vertical direction has downward acceleration, and the horizontal direction has backward acceleration. Such acceleration changes may be plotted as a sine (cosine) like curve, reflected on a triaxial Accelerometer of the wearable device, and the ACC (Accelerometer) signal may also exhibit a similar curve, which may be recorded as one step per cycle. However, the existing wearable device has low step counting precision, and is easy to generate false step counting on some continuously-shaking vehicles for some special scenes such as bath, clothes washing and hand washing.
Disclosure of Invention
An object of embodiments of the present disclosure is to provide a step counting method, a wearable device, and a readable storage medium, which can improve step counting accuracy and reduce occupation of storage space.
In a first aspect, an embodiment of the present disclosure provides a step counting method, including:
acquiring triaxial acceleration data of an accelerometer in a preset time period, converting the triaxial acceleration data into combined acceleration data, and amplifying the combined acceleration data by 10 times;
smoothing and filtering the combined acceleration data;
determining the step number in the preset time period according to the smooth filtered combined acceleration data,
the smoothing filtering processing is performed on the combined acceleration data, and the smoothing filtering processing comprises the following steps:
and determining peak points and concave points in the combined acceleration data, and replacing the combined acceleration values of the peak points and the concave points with the combined acceleration average value of the previous sampling point and the next sampling point.
According to a first aspect of the present disclosure, converting the triaxial acceleration data into combined acceleration data and amplifying the combined acceleration data by 10 times includes: and converting the triaxial acceleration data output by the accelerometer into gravitational acceleration data.
According to a first aspect of the disclosure, determining peak points and valley points in the combined acceleration data includes:
determining a first sampling point of which the combined acceleration value is respectively larger than a previous sampling point and a later sampling point in the combined acceleration data;
and determining the first sampling point as a peak point in response to the non-continuous increase of the combined acceleration value of the first i sampling points of the first sampling point or the non-continuous decrease of the combined acceleration value of the last j sampling points of the first sampling point.
According to a first aspect of the disclosure, determining peak points and valley points in the combined acceleration data includes:
determining a second sampling point of which the combined acceleration value is smaller than the previous sampling point and the latter sampling point in the combined acceleration data respectively,
and determining the second sampling point as a concave point in response to the non-continuous decrease of the combined acceleration value of the first u sampling points of the second sampling point or the non-continuous increase of the combined acceleration value of the last v sampling points of the second sampling point.
According to a first aspect of the present disclosure, replacing the combined acceleration value of the peak point and the concave point with the combined acceleration mean value of the previous sampling point and the subsequent sampling point, and then further includes: and carrying out moving average processing on the combined acceleration data.
According to a first aspect of the present disclosure, converting triaxial acceleration data into resultant acceleration data and amplifying the resultant acceleration data by 10 times, includes: the combined acceleration value of each sampling point in the triaxial acceleration data is determined by adopting the following formula:
wherein A represents the combined acceleration value, and x, y and z represent the acceleration values of three axes respectively.
According to a first aspect of the present disclosure, determining a number of steps in a preset time period from smoothly filtered combined acceleration data includes:
extracting the combined acceleration data of a plurality of sampling points in a preset time period according to a calculation window sliding forwards along with time, and identifying peaks and troughs of target sampling points in the calculation window, wherein the step length of the calculation window sliding along with time is the time difference between 2 sampling points;
counting the number of wave crests and wave troughs in a preset time period;
and determining the number of steps in a preset time period according to the number of wave crests and the number of wave troughs.
According to a first aspect of the present disclosure, peak-to-trough identification of a target sampling point within a computation window includes:
responding to the fact that the combined acceleration value of the target sampling point is larger than the combined acceleration value of the previous sampling point and the combined acceleration value of the latter sampling point respectively, and determining the target sampling point as a suspected peak, wherein the combined acceleration value of the target sampling point is larger than a preset value;
And determining the target sampling point as a suspected trough in response to the fact that the combined acceleration value of the target sampling point is smaller than the combined acceleration value of the previous sampling point and the combined acceleration value of the latter sampling point respectively.
According to a first aspect of the present disclosure, peak-to-trough identification of a target sampling point within a computation window includes:
responding to gradual increase of the combined acceleration values of the first M sampling points of the suspected wave crest and gradual decrease of the combined acceleration values of the last N sampling points of the suspected wave crest, and determining the suspected wave crest as a wave crest, wherein M is more than or equal to 2, and N is more than or equal to 2;
and responding to gradual decrease of the combined acceleration values of the first L sampling points of the suspected wave crest and gradual increase of the combined acceleration values of the last S sampling points of the suspected wave crest, and determining the suspected wave crest as the wave crest, wherein L is more than or equal to 2, and S is more than or equal to 2.
According to a first aspect of the disclosure, the window length of the window is calculated to be W, wherein W is greater than or equal to M+N+1, and W is greater than or equal to L+S+1;
the number of sampling points between the target sampling point and the first sampling point in the calculation window is greater than M and greater than L; the number of sampling points between the target sampling point and the last sampling point in the calculation window is greater than N and greater than S.
According to a first aspect of the present disclosure, determining the number of steps in a preset time period according to the number of peaks and the number of valleys includes:
Determining a lesser of the number of peaks and the number of valleys;
taking the smaller value as the step number of the preset time period in response to the smaller value being smaller than or equal to the preset value; the number of steps of the preset time period is set to 0 in response to the smaller value being greater than the preset value.
In a second aspect, embodiments of the present disclosure also provide a wearable device comprising a processor, a memory, and an accelerometer, the accelerometer and the memory being connected to the processor by a bus, wherein,
a memory for storing program code for execution by the processor;
and the processor is used for calling the program codes stored in the memory and executing the method.
In a fourth aspect, embodiments of the present disclosure also provide a readable storage medium having instructions stored thereon that, when executed on a wearable device, cause the wearable device to perform the above-described method.
In the step counting method provided by the embodiment of the disclosure, three-axis acceleration data of an accelerometer in a preset time period are obtained, the three-axis acceleration data are converted into combined acceleration data, and the combined acceleration data are amplified by 10 times; smoothing and filtering the combined acceleration data; and determining the step number in a preset time period according to the smooth filtered combined acceleration data, wherein the combined acceleration mean value of the front and rear sampling points is adopted to replace the combined acceleration value of the extreme points in the smooth filtering processing. The combined acceleration data is amplified by 10 times, so that the decimal which is mainly stored by floating point type data in the combined acceleration calculation result is reduced, the data is stored by integer type data, and the occupation of the storage space can be reduced. And in the smoothing filtering process, the sum acceleration value of the extreme points is replaced by the sum acceleration mean value of the front and rear sampling points, burrs in the sum acceleration waveform can be removed, a smoother waveform is provided for the subsequent step counting process, and the step number identification accuracy is 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 embodiments or the description of the prior art 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 block diagram of a wearable device provided by an embodiment of the present disclosure;
FIG. 2 is a three-axis schematic diagram of an accelerometer provided by embodiments of the present disclosure;
FIG. 3 is a flow chart of a step counting method provided by an embodiment of the present disclosure;
fig. 4 is a specific flowchart of step S303 in fig. 3;
fig. 5 is a flowchart of a step counting method provided in a specific application embodiment of the present disclosure.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
Fig. 1 provides an embodiment of a wearable device. The wearable device 100 provided by embodiments of the present disclosure is a portable device that is worn on a user's wrist and may include, but is not limited to, a smart watch, a smart bracelet, a smart wristband, and the like. In this embodiment, a smart watch is taken as an example for explanation.
Referring to fig. 1, wearable device 100 may include one or more processors 101, memory 102, display 103, communication module 104, sensor module 105, audio module 106, speaker 107, microphone 108, motor 109, keys 110, power management module 111, battery 112, indicator 113. The components may be connected and communicate by one or more communication buses or signal lines.
Processor 101 is the ultimate execution unit of information processing, program execution, and may execute an operating system or application programs to perform various functional applications and data processing of wearable device 100. Processor 101 may include one or more processing units, for example, processor 101 may include a central processor (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), an image signal processor (Image Signal Processing, ISP), a sensor hub processor or communication processor (Central Processor, CP) application processor (Application Processor, AP), and so forth. In some embodiments, the processor 101 may include one or more interfaces. The interface is used to couple a peripheral device to the processor 101 to transfer instructions or data between the processor 101 and the peripheral device.
Memory 102 may be used to store computer executable program code that includes instructions. The memory 102 may include a stored program area and a stored data area. The storage program area may store, among other things, an operating system, an application program required for at least one function, etc., such as a motion tracking application, a heart rate tracking application, etc. The stored data area may store data created during use of the wearable device 100, such as movement parameters of each movement of the user and physiological parameters of the user, such as number of steps, stride, pace, heart rate, blood oxygen, blood glucose concentration, etc. The memory 102 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, universal flash memory (universal flash storage, UFS), and the like. The operating system may include, but is not limited to, an android (android) operating system, an apple operating system (ios), or an embedded system. Applications may include contacts, phones, email clients, instant messaging, browsers, personal sports, image management, audiovisual players, calendars, add-ons (e.g., weather, stock, calculator, clock, dictionary), custom add-ons, searches, notes, maps, and so forth.
The display screen 103 is used to display a graphical user interface (Graphical User Interface, GUI) that may include graphics, text, icons, video, and any combination thereof. The display 103 may also display an interface including a list of application icons, and the display 103 may also display a dial interface including time information and other information, which is a main interface (primary interface) of the wearable device 100. The display 103 may be a liquid crystal display, an organic light emitting diode display, or the like. When the display screen 103 is a touch display screen, the display screen 103 can collect a touch signal at or above the surface of the display screen 103 and input the touch signal as a control signal to the processor 101.
The wireless communication module 104 may support the wearable device 100 to communicate with a network and other devices through wireless communication techniques. The wireless communication module 104 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. The wireless communication module 104 includes an antenna, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, and so forth. The communication module 104 of the wearable device 100 may include one or more of a cellular mobile communication module, a short-range wireless communication module, a wireless internet module, a location information module. The cellular mobile communication module may transmit or receive wireless signals based on a technical standard of mobile communication, and any mobile communication standard or protocol may be used, including but not limited to global system for mobile communications (GSM), code Division Multiple Access (CDMA), code division multiple access 2000 (CDMA 2000), wideband CDMA (WCDMA), time division synchronous code division multiple access (TD-SCDMA), long Term Evolution (LTE), LTE-a (long term evolution-advanced), etc. The wireless internet module may transmit or receive wireless signals via a communication network according to a wireless internet technology, including Wireless LAN (WLAN), wireless fidelity (Wi-Fi), wi-Fi direct, digital Living Network Alliance (DLNA), wireless broadband (WiBro), etc. The short-range wireless communication module may transmit or receive wireless signals according to short-range communication technologies including bluetooth, radio Frequency Identification (RFID), infrared data communication (IrDA), ultra Wideband (UWB), zigBee, near Field Communication (NFC), wireless fidelity (Wi-Fi), wi-Fi direct, wireless USB (wireless universal serial bus), and the like. The location information module may acquire the location of the wearable device 100 based on a Global Navigation Satellite System (GNSS), which may include one or more of a Global Positioning System (GPS), a global satellite navigation system (Glonass), a beidou satellite navigation system, and a galileo satellite navigation system.
The sensor module 105 is used to measure physical quantities or to detect the operational state of the wearable smart device. The sensor module 105 may include an accelerometer 105A, a gyroscope sensor 105B, a barometric pressure sensor 105C, a magnetic sensor 105D, a bio-signal sensor 105E, a proximity sensor 105F, an ambient light sensor 105G, a touch sensor 105H, and the like. The sensor module 105 may also include control circuitry for controlling one or more sensors included in the sensor module 105.
Among other things, accelerometer 105A may detect the magnitude of acceleration of wearable device 100 in various directions. The magnitude and direction of gravity can be detected when the wearable device 100 is stationary. Accelerometer 105A may also be used to identify the pose of wearable device 100, for applications such as landscape switching, pedometer, etc. Accelerometer 105A may also be used for gesture recognition of the user, for example, to identify whether the user has raised his wrist. In some embodiments, accelerometer 105A may be used to monitor the user's walking and to count the number of steps of the user, and may also be used to detect strides, stride frequency, speed profiles, etc. during walking.
The gyro sensor 105B may be used to determine a motion pose of the wearable device 100. In some embodiments, the angular velocity of the wearable device 100 about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 105B. The accelerometer 105A and the gyroscopic sensor 105B may be used, alone or in combination, to identify movement of a user, such as to identify that the user is in a stationary state, a light movement state, a medium movement state, or a high movement state.
The air pressure sensor 105C is used to measure air pressure. In some embodiments, wearable device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 105C, aiding in positioning and navigation.
The magnetic sensor 105D includes a hall sensor, or magnetometer, or the like, may be used to determine the user's position.
The bio-signal sensor 105E is used to measure vital sign information of the user, including but not limited to a photoplethysmographic sensor, an electrocardiogram sensor, an electromyography sensor, an electroencephalogram sensor, an iris scan sensor, a fingerprint scan sensor, a temperature sensor. For example, the wearable device 100 may acquire the photo volume signal of the user through the photo volume pulse wave sensor to calculate information such as the heart rate or the blood oxygen saturation of the user. For example, the wearable device 100 may obtain changes in electrical activity produced by the user's heart via an electrocardiogram sensor. In some embodiments, wearable device 100 may determine whether the user is asleep by acquiring the sleep state of the user from vital sign information acquired by bio-signal sensor 105E and motion information acquired by accelerometer 105A, gyroscope sensor 105B.
The proximity sensor 105F is used to detect the presence of an object in the vicinity of the wearable device 100 without any physical contact. In some embodiments, the proximity sensor 105F may include a light emitting diode and a light detector. The wearable device 100 detects whether it is worn using a light detector, and when sufficient reflected light is detected, it may be determined that the wearable device 100 is worn.
The ambient light sensor 105G is used to sense ambient light level. In some embodiments, the wearable device 100 may adaptively adjust the display 103 brightness according to the perceived ambient light level to reduce power consumption. In some embodiments, ambient light sensor 105G may also cooperate with a proximity sensor to detect whether wearable device 100 is in a pocket to prevent false touches.
A touch sensor 105H, the touch sensor 105H being configured to detect a touch operation acting thereon or thereabout, also referred to as a "touch device". The touch sensor 105H may be disposed on the display 103, and the touch sensor 105H and the display 103 form a touch screen.
The audio module 106, speaker 107, and microphone 108 provide audio functions or the like between the user and the wearable device 100, such as listening to music or talking. The audio module 106 converts the received audio data into an electrical signal, sends the electrical signal to the speaker 107, and converts the electrical signal into sound by the speaker 107; or the microphone 108 converts the sound into an electrical signal and sends the electrical signal to the audio module 106, and the audio module 106 converts the audio electrical signal into audio data. Wherein the microphone 108 is also operable to detect the user's breath sounds to detect the user's breathing frequency.
The motor 109 may convert the electrical signal into mechanical vibration to produce a vibration effect. The motor 109 may be used for vibration alerting of incoming calls, messages, or for touch vibration feedback.
The keys 110 include a power-on key, a volume key, etc. The keys 110 may be mechanical keys 110 (physical buttons) or touch keys. The keys 110 may also be rotational input buttons and the processor 101 may change the user interface on the display screen 103 based on the user's rotation of the rotational input buttons.
The indicator 113 is used to indicate the status of the wearable device 100, for example to indicate a state of charge, a change in power, and may also be used to indicate a message, missed call, notification, etc. The indicator 113 may be a light mounted on the wearable device 100 housing.
The battery 112 is used to provide power to the various components of the wearable device 100. The power management module 111 is used for charge and discharge management of the battery 112, and monitoring parameters such as battery capacity, battery cycle number, battery health status (whether leakage, impedance, voltage, current, and temperature). In some embodiments, the power management module 111 may charge the wearable device 100 by wired or wireless means.
It should be understood that in some embodiments, the wearable device 100 may be comprised of one or more of the foregoing components, and the wearable device 100 may include more or fewer components than illustrated, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Fig. 2 is a three-axis schematic diagram of an accelerometer provided by an embodiment of the present disclosure. As shown in fig. 2, the accelerometer may acquire acceleration data of the wearable device in three directions about the X, Y, Z axis. When a person walks normally, both horizontal and vertical accelerations are generated. When stepping, the gravity center rises and accelerates forwards, the vertical direction has upward acceleration, and the horizontal direction has forward acceleration. When the foot is retracted, the gravity center falls back and decelerates, the vertical direction has downward acceleration, and the horizontal direction has backward acceleration. Such acceleration changes may be plotted as a sine (cosine) like curve, reflected on the X, Y, Z axis data of the accelerometer of the wearable device. When the wearable device is worn on the wrist of a user, the acceleration change of walking mainly reflects in the acceleration data of the X axis and the Y axis, and a small amount of acceleration change reflects in the acceleration data of the Z axis, so that the step counting can be performed through the X, Y, Z triaxial combined acceleration waveform, but the peaks and the troughs of triaxial signals of the accelerometer are not synchronous, the triaxial combined acceleration can form a pseudo peak and a pseudo trough, and various noise signals are contained in the acquired acceleration signals and can also generate the pseudo peak and the pseudo trough, so that the influence of the pseudo peak and the pseudo trough on the step counting precision is required to be removed in the step counting process.
Fig. 3 is a flowchart of a step counting method provided in an embodiment of the present disclosure. The step counting method is applicable to a wearable device as shown in fig. 1. The step counting method comprises the following steps:
s301, acquiring triaxial acceleration data of the accelerometer in a preset time period, converting the triaxial acceleration data into combined acceleration data, and amplifying the combined acceleration data by 10 times.
Where the tri-axis acceleration data output by the accelerometers is typically binary data, different accelerometers have different ranges, resolutions (sensitivities), and different sampling frequencies. For example, common ranges of acceleration include + -2 g, + -4 g, + -8 g, + -16 g, and so forth; the resolution of the accelerometer represents the minimum input acceleration increment which can be sensed by the accelerometer in a set range, and is generally represented by data conversion accuracy, and usually comprises 8bit,12bit,14bit,16bit and the like; the sampling frequency of the accelerometer refers to the number of samples per unit time, for example, an accelerometer with a sampling frequency of 25HZ samples 25 points per second and an accelerometer with a sampling frequency of 50HZ samples 50 points per second.
To be compatible with different accelerometers, converting the tri-axis acceleration data into the combined acceleration data includes: the binary three-axis acceleration data output by the accelerometer is converted into actual gravitational acceleration data.
Specifically, the following formula may be used to obtain actual gravitational acceleration data.
In equation (one), G represents the actual gravitational acceleration value, V represents the actual reading of the accelerometer for a certain axis, C represents the maximum reading of the accelerometer, and R represents the range of the accelerometer. Taking an accelerometer with a measuring range of +/-2 g and a resolution of 8bit as an example, the maximum reading of the accelerometer is 256, and if the actual reading of a certain axis of a certain sampling point is 64, the acceleration value of the axis is-1 g; if the actual reading is 192, then the acceleration value of the shaft is 1g.
After the triaxial acceleration data are converted into actual gravitational acceleration data, determining the combined acceleration value of each sampling point in the triaxial acceleration data by adopting a formula (II):
wherein A represents the combined acceleration value, and x, y and z represent the acceleration values of three axes respectively. The sum acceleration value is the result of the evolution operation, and may have decimal, and decimal is stored in floating point data, resulting in larger power consumption and occupying storage space; in this embodiment, the combined acceleration value is multiplied by 10, that is, amplified by 10 times, so that the decimal in the calculation result is reduced, the data can be stored as integer data, the occupation of the storage space can be reduced, the subsequent data processing is convenient, and the operation speed can be improved.
In addition, the fractional portion of the combined acceleration data may be removed by a rounding function (rounding) after the combined acceleration data is amplified by 10 times in response to the combined acceleration value still existing by a fraction after the amplification by 10 times. The combined acceleration value is amplified by 10 times, so that the decimal after the integer is removed has little influence on the subsequent calculation accuracy, the occupation of the storage space can be reduced, the subsequent data processing is convenient, and the calculation speed can be improved.
S302, smoothing and filtering the combined acceleration data. Specifically, the smoothing filter processing for the combined acceleration data includes: and determining peak points and concave points in the combined acceleration data, and replacing the combined acceleration values of the peak points and the concave points with the combined acceleration average value of the previous sampling point and the next sampling point. The aim of the step is to remove local peak burrs and local concave points in the combined acceleration waveform, so that the combined acceleration waveform is smoother.
Wherein determining peak points in the combined acceleration data comprises: determining a first sampling point of which the total acceleration value is respectively larger than a previous sampling point and a later sampling point in the total acceleration data; and determining the first sampling point as a peak point in response to the non-continuous increase of the combined acceleration value of the first i sampling points of the first sampling point or the non-continuous decrease of the combined acceleration value of the last j sampling points of the first sampling point. i, j is a positive integer greater than 1. That is, if the value of the combined acceleration of the sampling points at a certain moment is larger than the values at two sides of the combined acceleration, the sampling points may be peak burrs or peaks; if the total acceleration value of the first i sampling points of the sampling points is not continuously increased, or if the total acceleration value of the last j sampling points of the sampling points is not continuously reduced, the sampling points are peak points, and smoothing processing is needed. Thus, it is possible to avoid smoothing the acceleration peak generated by walking in the combined acceleration data, and to smooth only the peak burr.
Wherein determining a depression point in the combined acceleration data comprises: determining a second sampling point of which the combined acceleration value is smaller than the previous sampling point and the latter sampling point in the combined acceleration data respectively; and determining the second sampling point as a concave point in response to the non-continuous decrease of the combined acceleration value of the first u sampling points of the second sampling point or the non-continuous increase of the combined acceleration value of the last v sampling points of the second sampling point. u, v is a positive integer greater than 1. That is, if the value of the combined acceleration of the sampling points at a certain moment is smaller than the values at two sides of the value, the sampling points may be local pits or wave troughs; if the total acceleration value of the first i sampling points of the sampling points is not continuously reduced, or if the total acceleration value of the last j sampling points of the sampling points is not continuously increased, the sampling points are concave points, and smoothing processing is needed. Thus, it is possible to avoid smoothing the acceleration trough due to walking in the combined acceleration data, and smoothing only the partial depression.
The combined acceleration value of the peak point and the concave point is replaced by the combined acceleration average value of the previous sampling point and the next sampling point, and the smoothing filtering processing can be performed by adopting the following formula:
Wherein A is k Represents the combined acceleration value after the filtering at the moment k, A k-1 A represents the combined acceleration value of the sampling point before the k moment k+1 Is the combined acceleration value of the sampling point after the k moment. That is, the combined acceleration value of the extreme point is replaced by the combined acceleration mean value of the two sampling points before and after the extreme point. Thus, peak burrs and partial depressions in the combined acceleration waveform can be reduced by smoothing filter processing, reducing noise effects, which may be generated by slight hand shake of the user, such as when the user is writing,Striking a keyboard, riding a car, or swaying irregularly during walking, etc. And peak burrs of the combined acceleration waveform can be removed in advance through smoothing filtering, so that the calculated amount in peak and trough calculation is reduced.
In some embodiments, replacing the combined acceleration value of the peak point and the concave point with the combined acceleration mean value of the previous sampling point and the subsequent sampling point further comprises: and performing moving average processing on the combined acceleration data. For example, a moving window with a fixed length may be designated, the combined acceleration value of the first sampling point is replaced by the combined acceleration average value of all sampling points in the window, then the window is moved, the moving step length of the window is 1, and the data processing in the window is repeatedly performed and the window is continuously moved according to time, so that the smoothing processing of the combined acceleration data is completed, the smoothing processing of the combined acceleration data can be further performed, and the influence of the pseudo wave crest and the pseudo wave trough on the step counting precision can be reduced.
S303, determining the step number in a preset time period according to the smooth filtered combined acceleration data.
In the step counting method provided by the embodiment of the disclosure, the combined acceleration data is amplified by 10 times, the decimal which is mainly stored by floating point type data in the combined acceleration calculation result is reduced, the data is stored by integer type data, and the occupation of a storage space can be reduced; and if the decimal still exists after the combined acceleration value is amplified by 10 times, the occupation of the storage space can be reduced by removing the decimal after the integer, and the influence of the decimal after the integer is removed on the precision is small because the combined acceleration value is amplified by 10 times, so that the step counting precision is improved. And in the smoothing filtering process, the sum acceleration value of the extreme points is replaced by the sum acceleration mean value of the front and rear sampling points, burrs in the sum acceleration waveform can be removed, a smoother waveform is provided for the subsequent step counting process, and the step number identification accuracy is improved.
Fig. 4 is a specific flowchart of step S303 in fig. 3. A flow chart for determining a number of steps in a preset time period according to the smoothed and filtered combined acceleration data, comprising:
s401, extracting the combined acceleration data of a plurality of sampling points in a preset time period according to a calculation window sliding forward along with time, and identifying wave crests and wave troughs of target sampling points in the calculation window, wherein the step length of the calculation window sliding along with time is the time difference between 2 sampling points. Specifically, for a section of combined acceleration data converted from triaxial acceleration data, a calculation window sliding along time may be used to identify peaks and troughs of the section of combined acceleration data. The calculation window has fixed window length and sliding step length, corresponding combined acceleration data are extracted according to the window length, peak and trough identification is carried out on target sampling points in the calculation window, after data processing of one calculation window is completed, the calculation window slides forwards for 1 step along with time, and peak and trough identification of the next calculation window is carried out. The step length of sliding the calculation window along with time is the sampling time difference between 2 sampling points, namely, 1 sampling point is slid forwards each time, and the target sampling point is a preset fixed position point in the calculation window.
In a specific application example, the accelerometer with the frequency of 50HZ outputs acceleration data of 50 sampling points per second, the window length of the calculation window can be preset to be 15 sampling points, the step length of sliding the calculation window along with time is the sampling time difference between 2 sampling points, and the target sampling point is the 7 th sampling point in the calculation window. If the peak and trough identification is carried out on the combined acceleration data within 1 second, firstly, the combined acceleration data of the first 15 sampling points (1 st to 15 th sampling points) in 50 sampling points are extracted according to the window length of a calculation window, the 7 th point is determined as a target sampling point, and the peak and trough identification is carried out on the 7 th point in the calculation window; after the processing is finished, sliding the calculation window forward by 1 sampling point, and continuously identifying the wave crest and the wave trough in the next calculation window (the 2 nd to 16 th sampling points); and slide the calculation window continuously in this way until the last calculation window is processed (36 th to 50 th sampling points).
In step S401, performing peak-to-valley recognition on the target sampling point in the calculation window includes: setting the target sampling point as a suspected peak in response to the fact that the combined acceleration value of the target sampling point is larger than the combined acceleration value of the previous sampling point and the combined acceleration value of the next sampling point respectively, and the combined acceleration value of the target sampling point is larger than a preset value; and setting the target sampling point as a suspected trough in response to the fact that the combined acceleration value of the target sampling point is smaller than the combined acceleration value of the previous sampling point and the combined acceleration value of the latter sampling point respectively. The identification of the suspected wave crest and the suspected wave trough is similar to the extreme point identification process in the smoothing filtering process, and is carried out through the combined acceleration values of the front sampling point and the rear sampling point, wherein the difference is that the combined acceleration value of the sampling point needs to be larger than a preset value when the wave crest is identified.
Specifically, the following formula may be used to identify the suspected peaks.
(A k-1 <A k )&(A k >A k+1 )&(A k >min_peak) … … (equation four)
The identification of suspected valleys may be performed using the following formula.
(A k-1 >A k )&(A k <A k+1 ) … … (formula five)
Wherein A is k The combined acceleration value A of the sampling point at the moment k after being filtered k-1 A represents the combined acceleration value of the sampling point before the k moment k+1 Is the combined acceleration value of the sampling point after the k moment. min_peak represents a preset peak minimum. Specifically, all sampling points in the calculation window can be traversed in sequence, peak and trough recognition is performed on all sampling points in the calculation window through the formula, and finally suspected peaks and suspected troughs are determined.
The method for identifying the wave crest and the wave trough of the target sampling point in the calculation window further comprises the following steps:
responding to gradual increase of the combined acceleration values of the first M sampling points of the suspected wave crest and gradual decrease of the combined acceleration values of the last N sampling points of the suspected wave crest, and determining the suspected wave crest as a wave crest, wherein M is more than or equal to 2, and N is more than or equal to 2; and responding to gradual decrease of the combined acceleration values of the first L sampling points of the suspected wave crest and gradual increase of the combined acceleration values of the last S sampling points of the suspected wave crest, and determining the suspected wave crest as the wave crest, wherein L is more than or equal to 2, and S is more than or equal to 2. Where M, N, L, S is an empirical value, can be trained from a large number of data samples.
In this embodiment, the number of times the combined acceleration value becomes large and the number of times it is reduced in the sliding time window may be counted to determine the peak and the trough. Specifically, the following formula may be used to determine the number of times the combined acceleration value becomes large and the number of times it is reduced:
wherein A is k The combined acceleration value, t, of the filtered sampling points at the moment k i Representing the combined acceleration modulus A k The number of times that becomes large; t is t d Representing the combined acceleration modulus A k Reduced number of times. And when a suspected peak is identified, A k Number of times t of decrease d Reset to 0 and re-count a k Reduced number of times; when a suspected trough is identified, A is k Number of times t of increase i Reset to 0 and re-count a k Increased number of times. After the suspected wave crest is identified, by counting the suspected wave crest before A k Increased number of times, A after the suspected peak k Reduced number of times, if A k The number of increases is greater than M, and A k If the number of times of reduction is greater than N, determining the suspected wave crest as the wave crest; after the suspected trough is identified, by statistics, A before the suspected trough k Reduced number of times, after suspected trough A k The suspected trough may be determined to be a trough by increasing the number of times.
Preferably, the window length of the calculation window is W, wherein W is equal to or greater than M+N+1, and W is equal to or greater than L+S+1. Specifically, for example, M is 4 sampling points, N is 3 sampling points, L is 5 sampling points, S is 3 sampling points, and the window length needs to be set to 9 sampling points or more. Thereby avoiding that the window length is too short to correctly identify the peaks and valleys. And the number of sampling points between the target sampling point and the first sampling point in the calculation window is more than M and more than L; the number of sampling points between the target sampling point and the last sampling point in the calculation window is greater than N and greater than S.
S402, counting the number of wave crests and wave troughs in a preset time period.
Specifically, taking a 50HZ accelerometer as an example, the accelerometer outputs acceleration data of 50 sampling points per second, the window length of a preset calculation window is 15 sampling points, the first calculation window is the first 15 sampling points (1 st to 15 th sampling points), the last calculation window is the last 15 sampling points (36 th to 50 th sampling points), and the sliding step length of the calculation window is 1 sampling point, so that peak and trough identification can be performed on 1 second data through 36 sampling windows, and after all the peaks and troughs of the 36 sampling windows are identified, all the peaks and all the troughs identified by 1 second data are counted.
S403, determining the number of steps in a preset time period according to the number of wave crests and the number of wave troughs.
In some embodiments, determining the number of steps in the preset time period according to the number of peaks and the number of valleys comprises: determining a lesser of the number of peaks and the number of valleys; taking the smaller value as the step number of the preset time period in response to the smaller value being smaller than or equal to the preset value; the number of steps of the preset time period is set to 0 in response to the smaller value being greater than the preset value. Specifically, for example, for acceleration data within 1 second, 5 peaks and 3 valleys are identified, and the number of valleys is smaller, the number of valleys is taken as the number of steps identified within 1 second. Because there may be multiple false peaks with similar vibration amplitudes near the peaks or multiple false valleys with similar vibration amplitudes near the valleys, which may be identified as true peaks or valleys, the present disclosure employs smaller values for the peaks and valleys as step number outputs, reducing identification errors due to the false peaks and valleys. After determining the smaller value of the number of peaks and the number of troughs, whether the smaller value is smaller than the preset value or not is needed to be considered, and in general, the maximum speed of human fast running is 1 second and 4 steps, the maximum step number in 1 second can be preset to be 4 steps, if the smaller value of the number of peaks and the number of troughs in 1 second is larger than 4, the data is possibly noise, such as the action of fast hand throwing, tooth brushing and the like of a user, and the data is discarded. Thus, the embodiment of the disclosure can reduce noise generated by other non-walking activities of the user in the step counting process.
In some embodiments, the number of steps may be determined based on the number of peaks alone or the number of valleys alone, i.e., the peaks or valleys are output as the number of steps.
In this embodiment, the wearable device extracts the combined acceleration data of the preset time period according to the calculation window sliding along with time, performs peak-to-valley identification on the target sampling point in the calculation window, and if the peak or the valley corresponding to the step is generated at the start or the end position of the preset time period, can identify according to the acceleration data before the preset time period and the acceleration data after the preset time period. For example, the sampling frequency of the accelerometer is 50HZ, the preset time period is 1 second, the window length of the calculation window is 15 sampling points, the target sampling point is the 6 th sampling point in the calculation window, and the accelerometer outputs 1 time of data per second. For 1 second data, the first calculation window is 1 st to 15 th sampling points, the peak and trough identification starts from 6 th sampling point, and for the first 5 sampling points, the peak and trough identification can be performed by using the first 1 second data; the last calculation window is 36 th to 50 th sampling points, and the target sampling point of the last calculation window is 41 st sampling point, so that the peak and trough identification can be performed on the 42 th to 50 th sampling points by using acceleration data of the next second. Therefore, for a sampling point before a target sampling point in a first calculation window in a preset time period, carrying out peak-trough recognition based on acceleration data before the preset time period; and for the sampling point after the target sampling point in the last calculation window in the preset time period, carrying out peak and trough recognition based on the acceleration data after the preset time period, so that step number omission can be avoided.
In the step counting method provided by the embodiment of the disclosure, firstly three-axis acceleration data in a preset time period are converted into total acceleration data, then the total acceleration data are extracted according to a calculation window sliding forward along with time, peak and trough recognition is carried out on target sampling points in the calculation window, the step length of the calculation window sliding along with time is the time difference between 2 sampling points, finally the number of peaks and the number of troughs of a plurality of sliding time windows in the preset time period are counted, and the step number in the preset time period is determined according to the number of peaks and the number of troughs. In the embodiment of the disclosure, only a single target sampling point in a sliding time window is identified by wave crest and wave trough, so that the calculation complexity is reduced, the step number can be rapidly output, and the sliding step length of the sliding time window is the time difference between 2 sampling points, so that each sampling point in a preset time period is identified by wave crest and wave trough, the step number is determined based on the total wave crest and wave trough number in the preset time period, and step number omission is avoided.
Fig. 5 is a flowchart of a step counting method provided in a specific application embodiment of the present disclosure, which can be applied to the wearable device 100 shown in fig. 1. The step counting method comprises the following steps:
S501, acquiring triaxial acceleration data of an accelerometer in a preset time period. The accelerometer data includes X, Y, Z triaxial respective acceleration data. The normal acceleration data outputs three-axis acceleration data once per second, and the preset time period may be set to 1 second for quick output of the number of steps. The preset time period may also be set to an integer multiple of 1 second in other embodiments.
S502, three-axis acceleration data are converted into combined acceleration data. Specifically, the acceleration data may be calculated and combined using the above formula (two).
S503, smoothing and filtering the combined acceleration data. Specifically, the above formula (III) and the moving average may be adopted to perform smoothing filter processing on the combined acceleration data.
S504, extracting the combined acceleration data according to the calculation window sliding along with time. The calculation window has a fixed window length and a fixed step length, and the sliding step length is the time between two sampling points, namely, the calculation window slides forwards by one sampling point each time. Specifically, for example, the data in the preset time period includes 50 sampling points, the window length is 15 sampling points, and the first calculation window is 1 st to 15 th sampling points; after the first calculation window is processed, the calculation window is slid forward by 1 sampling point, and the next calculation window (the 2 nd to 16 th sampling points) is processed continuously.
S505, determining whether the target sampling point in the calculation window is a peak. If yes, go to step S507; otherwise, the process advances to step S506. The target sampling point is a sampling point at a preset position in the calculation window, for example, the window length is 15 sampling points, and the 6 th, 7 th, 8 th or other sampling points can be used as the target sampling point. Determining whether the target sampling point is a peak may be performed using the above formula (four) and formula (six).
S506, determining whether the target sampling point in the calculation window is a trough. If yes, go to step S508; otherwise, the flow advances to step S509. Specifically, determining whether the target sampling point is a trough may be performed using the above formula (five) and formula (six). The step S505 and the step S506 may be performed simultaneously or sequentially. In practice, two indexes may be established for identifying peaks and troughs, respectively.
S507, the number of peaks is increased by 1, and the process proceeds to step S509.
S508, the trough number is added with 1, and the process proceeds to step S509.
S509, judging whether the combined acceleration data in the preset time period is completely identified. If yes, go to step 411, otherwise go to step S510.
S510, the calculation window slides forward for 1 step, and returns to step S505.
S511, counting the number of wave crests and the number of wave troughs in a preset time period, and determining the smaller wave crest number and the smaller wave trough number;
s512, determining whether the smaller of the number of peaks and the number of valleys is greater than a preset value. If yes, step S513 is entered, otherwise step S514 is entered. Specifically, generally speaking, the maximum speed of fast running of a human being is 1 second and 4 steps, the maximum number of steps in 1 second can be preset to be 4 steps, if the smaller value of the number of peaks and the number of valleys in 1 second is greater than 4, the data may be noise, for example, the data is discarded when the user is fast to throw hands, brush teeth and the like.
S513, the number of steps in the preset period is set to 0.
S514, the smaller of the number of peaks and the number of valleys is used as the step number of the preset time period.
In this embodiment, the step number of the user in the preset time period can be obtained through steps S501 to S514, and the step number of the preset time period can be accumulated into the previous step number, so that the step number of the user in the longer time period can be obtained. For example, when the user performs outdoor running to perform step counting, the step numbers in a plurality of time periods from the running start to any time point in running can be accumulated to acquire the step numbers of the running process in real time; for example, when the user performs a step counting daily, the number of steps of a plurality of time periods divided according to the method from the beginning of one day to the current time range may be accumulated to obtain the current number of steps of the user.
It is noted that the above-described figures are merely schematic illustrations of processes involved in a method according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Exemplary embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon instructions capable of implementing the above-described methods of the present specification. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a wearable device to perform the steps according to the various exemplary embodiments of the disclosure described in the "exemplary methods" section of this specification, when the program product is run on a terminal device, e.g. any one or more of the steps of fig. 3 to 5 may be performed.
It should be noted that the computer readable storage medium shown in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable storage medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Furthermore, the program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (11)

1. A method of step counting, comprising:
acquiring triaxial acceleration data of an accelerometer in a preset time period, converting the triaxial acceleration data into combined acceleration data, and amplifying the combined acceleration data by 10 times;
smoothing and filtering the combined acceleration data;
determining the step number in the preset time period according to the smooth filtered combined acceleration data,
the smoothing filtering processing is performed on the combined acceleration data, and the smoothing filtering processing comprises the following steps:
and determining peak points and concave points in the combined acceleration data, and replacing the combined acceleration values of the peak points and the concave points with the combined acceleration average value of the previous sampling point and the next sampling point.
2. The stepping method of claim 1, wherein converting said three-axis acceleration data into combined acceleration data and amplifying said combined acceleration data by a factor of 10, comprises: and converting the triaxial acceleration data output by the accelerometer into gravitational acceleration data.
3. The step counting method according to claim 1, wherein determining peak points and valley points in the combined acceleration data comprises:
determining a first sampling point of which the combined acceleration value is respectively larger than a previous sampling point and a later sampling point in the combined acceleration data;
and determining the first sampling point as a peak point in response to the non-continuous increase of the combined acceleration value of the first i sampling points of the first sampling point or the non-continuous decrease of the combined acceleration value of the last j sampling points of the first sampling point.
4. The step counting method according to claim 1, wherein determining peak points and valley points in the combined acceleration data comprises:
determining a second sampling point of which the combined acceleration value is smaller than the previous sampling point and the latter sampling point in the combined acceleration data respectively;
and determining the second sampling point as a concave point in response to the non-continuous decrease of the combined acceleration value of the first u sampling points of the second sampling point or the non-continuous increase of the combined acceleration value of the last v sampling points of the second sampling point.
5. The step counting method according to claim 1, wherein the combined acceleration value of the peak point and the depression point is replaced by the combined acceleration average value of the previous sampling point and the subsequent sampling point, and further comprising: and carrying out moving average processing on the combined acceleration data.
6. The stepping method of claim 1, wherein converting said three-axis acceleration data into combined acceleration data and amplifying said combined acceleration data by a factor of 10, comprises: and determining the combined acceleration value of each sampling point in the triaxial acceleration data by adopting the following formula:
wherein A represents the combined acceleration value, and x, y and z represent the acceleration values of three axes respectively.
7. The step counting method according to claim 1, wherein determining the number of steps in the preset time period from the smoothed filtered combined acceleration data comprises:
extracting the combined acceleration data of a plurality of sampling points in the preset time period according to a calculation window sliding forwards along with time, and identifying wave crests and wave troughs of target sampling points in the calculation window, wherein the step length of the calculation window sliding along with time is the time difference between 2 sampling points;
counting the number of wave crests and wave troughs in the preset time period;
and determining the number of steps in the preset time period according to the number of wave crests and the number of wave troughs.
8. The step counting method according to claim 7, wherein the step of identifying the peak and trough of the target sampling points in the calculation window includes:
Responding to the fact that the combined acceleration value of the target sampling point is larger than the combined acceleration value of the previous sampling point and the combined acceleration value of the latter sampling point respectively, and the combined acceleration value of the target sampling point is larger than a preset value, and determining the target sampling point as a suspected peak;
and determining the target sampling point as a suspected trough in response to the fact that the combined acceleration value of the target sampling point is smaller than the combined acceleration value of the previous sampling point and the combined acceleration value of the latter sampling point respectively.
9. The step counting method according to claim 8, wherein performing peak-to-valley recognition on the target sampling points within the calculation window includes:
responding to gradual increase of the combined acceleration values of the first M sampling points of the suspected wave crest and gradual decrease of the combined acceleration values of the last N sampling points of the suspected wave crest, and determining the suspected wave crest as a wave crest, wherein M is more than or equal to 2, and N is more than or equal to 2;
and responding to gradual decrease of the combined acceleration values of the first L sampling points of the suspected wave crest, and gradual increase of the combined acceleration values of the last S sampling points of the suspected wave crest, and determining the suspected wave crest as a wave crest, wherein L is more than or equal to 2, and S is more than or equal to 2.
10. A wearable device comprising a processor, a memory, and an accelerometer, the accelerometer and the memory being connected to the processor by a bus, wherein,
the memory is used for storing program codes executed by the processor;
the processor being adapted to invoke the program code stored in the memory and to perform the method according to any of claims 1 to 8.
11. A readable storage medium having instructions stored thereon, which when executed on a wearable device, cause the wearable device to perform the method of any of claims 1 to 9.
CN202311313927.6A 2023-10-11 2023-10-11 Step counting method, wearable device and readable storage medium Pending CN117451074A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311313927.6A CN117451074A (en) 2023-10-11 2023-10-11 Step counting method, wearable device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311313927.6A CN117451074A (en) 2023-10-11 2023-10-11 Step counting method, wearable device and readable storage medium

Publications (1)

Publication Number Publication Date
CN117451074A true CN117451074A (en) 2024-01-26

Family

ID=89580753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311313927.6A Pending CN117451074A (en) 2023-10-11 2023-10-11 Step counting method, wearable device and readable storage medium

Country Status (1)

Country Link
CN (1) CN117451074A (en)

Similar Documents

Publication Publication Date Title
US11557395B2 (en) Portable exercise-related data apparatus
CN107260178B (en) Portable monitoring device and method of operating the same
US9641991B2 (en) Systems and methods for determining a user context by correlating acceleration data from multiple devices
KR20170001377A (en) Method and Apparatus for Providing Workout Guide Information
US11331003B2 (en) Context-aware respiration rate determination using an electronic device
KR20180047654A (en) Method for recognizing user activity and electronic device for the same
US20170227375A1 (en) Calibration of a primary pedometer device using a secondary pedometer device
US20190076063A1 (en) Systems and methods of ski activity detection
US11051720B2 (en) Fitness tracking for constrained-arm usage
CN117037657A (en) Display control method, intelligent watch and readable medium
CN114176573A (en) Intelligent exercise recommendation method and device and electronic equipment
CN114532992B (en) Method, device and system for detecting nap state and computer readable storage medium
CN117451074A (en) Step counting method, wearable device and readable storage medium
CN114912065A (en) Method and device for calculating movement distance, wearable device and medium
CN117503051A (en) Sleep detection method, wearable device and readable medium
CN114209298A (en) PPG sensor control method and device and electronic equipment
CN117462081A (en) Sleep detection method, wearable device and readable medium
JP5655721B2 (en) Biological information processing apparatus and biological information processing method
CN112911363A (en) Track video generation method, terminal device and computer-readable storage medium
KR20170026811A (en) Apparatus and method for activity recognition using smart phone and an embedded accelerometer sensor of smart watch
CN116483304A (en) Display control method, wrist wearing equipment and readable medium
WO2019061543A1 (en) State determination method and portable device
CN107928629B (en) Portable monitoring device and method of operating the same
CN115200606A (en) Movement distance calculation method and wearable device
CN115316969A (en) Body energy estimation method, wearable device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination