Step counting methods, devices, equipment and storage media

By constructing a sampling matrix and unit basis vectors to detect leg raising and lowering movements, the problem of inflexible detection and high power consumption in existing pedometers when powered on is solved, and accurate step counting is achieved even when power is off.

CN115540899BActive Publication Date: 2025-10-31BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110744360.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2025-10-31
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

In existing technologies, pedometers need to perform detection while the system is powered on, resulting in poor detection flexibility, inaccuracy, and high power consumption.

Method used

By acquiring sampling data from multiple sensors, constructing a sampling matrix and unit basis vectors, detecting leg lifting and lowering movements, and achieving step counting, it can even accurately count steps when the system is powered off.

Benefits of technology

It improves the flexibility and accuracy of step counting while reducing system power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115540899B_ABST
    Figure CN115540899B_ABST
Patent Text Reader

Abstract

This application discloses a step counting method, apparatus, device, and storage medium. The method includes: acquiring sampling data from i sets of sensors on a target object, where i ≥ 3; constructing a sampling matrix and a unit basis vector based on the sampling data from the i sets of sensors; detecting leg raising and lowering movements of the target object based on the sampling matrix and the unit basis vector; and counting steps on the target object based on the leg raising and lowering movements. This technical solution is not limited to software detection methods and can accurately determine leg raising and lowering movements based on sensor-detected sampling data. It can achieve accurate step counting even when the system is powered off, making step counting highly flexible and reducing system power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention generally relates to the field of terminal device technology, and specifically to a step counting method, apparatus, device, and storage medium. Background Technology

[0002] With the development of science and technology and the increasing prevalence of Micro Electro Mechanical Systems (MEMS) sensors, more and more electronic devices such as pedometers, mobile phones, and smartwatches are equipped with gyroscopes and accelerometers, thus adding more and more functions, such as step counting. By counting the user's steps, electronic devices can help users collect motion information and analyze the user's movement status.

[0003] Currently, related technologies use internal system software detection for step counting. However, this method requires the system to be powered on for step counting, resulting in poor detection flexibility, inaccurate detection, and high power consumption. Summary of the Invention

[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a step counting method, apparatus, device and storage medium.

[0005] Firstly, this application provides a step counting method, including:

[0006] Acquire sampling data from i sets of sensors on the object to be detected, where i ≥ 3;

[0007] Based on the sampling data from the i sets of sensors, construct a sampling matrix and a unit basis vector;

[0008] Based on the sampling matrix and the unit basis vector, the leg raising and lowering movements of the object to be detected are detected;

[0009] The steps of the object to be detected are counted based on the leg-raising and leg-lowering actions.

[0010] Secondly, this application provides a step counting device, comprising:

[0011] The acquisition module is used to acquire sampling data from i sets of sensors on the object to be detected, where i ≥ 3;

[0012] A construction module is used to construct a sampling matrix and a unit basis vector based on the sampling data from the i sets of sensors;

[0013] The detection module is used to detect the leg raising and lowering movements of the object to be detected based on the sampling matrix and the unit basis vector.

[0014] The step counting module is used to count the steps of the object to be detected based on the leg lifting action and the leg lowering action.

[0015] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the step counting method described above.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the step counting method described above.

[0017] The step counting method, apparatus, device, and storage medium provided in this application acquire sampling data from i sets of sensors on the object to be detected, and construct a sampling matrix and unit basis vector based on the sampling data from i sets of sensors. Based on the sampling matrix and unit basis vector, the step counting of the object is detected by detecting the leg raising and lowering movements. This technical solution is not limited to software detection methods and can accurately determine the leg raising and lowering movements based on the sampling data detected by sensors. It can achieve accurate step counting even when the system is powered off, making step counting highly flexible and reducing system power consumption. Attached Figure Description

[0018] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0019] Figure 1 A flowchart illustrating the step counting method provided in this application embodiment;

[0020] Figure 2 This is a schematic diagram illustrating the relationship between the Acc-x axis and sampling time, provided in an embodiment of this application.

[0021] Figure 3 This is a schematic diagram illustrating the relationship between the Acc-y axis and sampling time, provided in an embodiment of this application.

[0022] Figure 4 This is a schematic diagram illustrating the relationship between the Acc-z axis and sampling time, provided in an embodiment of this application.

[0023] Figure 5 A schematic diagram illustrating the relationship between the Gyr-x axis and sampling time provided in this application embodiment;

[0024] Figure 6 This is a schematic diagram illustrating the relationship between the Gyr-y axis and sampling time, provided in an embodiment of this application.

[0025] Figure 7This is a schematic diagram illustrating the relationship between the Gyr-z axis and sampling time, provided in an embodiment of this application.

[0026] Figure 8 This is a schematic diagram illustrating the relationship between Pressure data and sampling time provided in an embodiment of this application.

[0027] Figure 9 This is a schematic diagram illustrating the relationship between light-sensing data and sampling time provided in an embodiment of this application;

[0028] Figure 10 This is a schematic diagram illustrating the relationship between the Compass x-axis and sampling time, provided in an embodiment of this application.

[0029] Figure 11 This is a schematic diagram illustrating the relationship between the Compass-y axis and sampling time, provided in an embodiment of this application.

[0030] Figure 12 This is a schematic diagram illustrating the relationship between the Compass-z axis and sampling time, provided in an embodiment of this application.

[0031] Figure 13 This is a schematic diagram illustrating the relationship between the Grv-x-axis and sampling time, provided in an embodiment of this application.

[0032] Figure 14 This is a schematic diagram illustrating the relationship between the Grv-y axis and sampling time, provided in an embodiment of this application.

[0033] Figure 15 This is a schematic diagram illustrating the relationship between the Grv-z axis and sampling time, provided in an embodiment of this application.

[0034] Figure 16 This is a schematic diagram illustrating the relationship between the Rot-x axis and sampling time, provided in an embodiment of this application.

[0035] Figure 17 This is a schematic diagram illustrating the relationship between the Rot-y axis and sampling time, provided in an embodiment of this application.

[0036] Figure 18 This is a schematic diagram illustrating the relationship between the Rot-z axis and sampling time, provided in an embodiment of this application.

[0037] Figure 19 This is a schematic diagram illustrating the relationship between the Ori-x axis and sampling time, provided in an embodiment of this application.

[0038] Figure 20 This is a schematic diagram illustrating the relationship between the Ori-y axis and sampling time, provided in an embodiment of this application.

[0039] Figure 21 This is a schematic diagram illustrating the relationship between the Ori-z axis and sampling time, provided in an embodiment of this application.

[0040] Figure 22 A flowchart illustrating the method for detecting the leg-raising and lowering motion of an object to be detected, provided in an embodiment of this application;

[0041] Figure 23 A flowchart illustrating the method for determining the motion path of an object to be detected according to an embodiment of this application;

[0042] Figure 24 A flowchart illustrating the method for determining motion data of an object to be detected provided in an embodiment of this application;

[0043] Figure 25 This is a schematic diagram of the pedometer device provided in the embodiments of this application;

[0044] Figure 26 This is a schematic diagram of the structure of a pedometer device provided in another embodiment of this application;

[0045] Figure 27 This is a schematic diagram of the structure of a computer system provided in an embodiment of this application. Detailed Implementation

[0046] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0047] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0048] Understandably, with technological advancements and improved living standards, MEMS sensors, due to their advantages such as small size, light weight, low power consumption, and low cost, have become indispensable components in electronic devices and are now widely used. MEMS sensors can be used to count steps, providing guidance data for users' health and training.

[0049] It should be noted that MEMS is a new interdisciplinary field that integrates microelectronics and precision machining. Its goal is to integrate information acquisition, processing and execution to form a multifunctional micro system that can be integrated into a large-scale system, thereby significantly improving the system's automation, intelligence and reliability.

[0050] As mentioned in the background section, related technologies use internal system software detection for step counting. However, this approach requires the system to be powered on for step counting, resulting in poor detection flexibility, inaccurate detection, and high power consumption.

[0051] To address the aforementioned shortcomings, this application provides a step counting method. Compared with related technologies, this technical solution is not limited by software detection methods and can accurately determine the leg lifting and lowering actions based on the sampling data detected by sensors. It can also achieve accurate step counting even when the system is powered off, making step counting more flexible and reducing system power consumption.

[0052] The step counting method provided in this application can be applied to step counting detection scenarios on a terminal. Optionally, in the exemplary embodiments described below, the terminal can be a mobile terminal, also known as a user equipment (UE), mobile station (MS), etc. A terminal is a device that provides voice and / or data connectivity to a user, or a chip located within that device, such as a handheld device with wireless connectivity.

[0053] Optionally, the aforementioned terminals may include smartphones, tablets, PDAs, laptops, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, and other wearable devices such as smartwatches, smart bracelets, and smart glasses. This application does not impose specific limitations on these devices. The terminals may internally incorporate various sensor elements, such as accelerometers, gyroscopes, barometers, light sensors, magnetometers, MEMS sensors, and one or more other sensors.

[0054] For ease of understanding and explanation, the following will use... Figures 1 to 27 This application provides a detailed description of the step counting method, apparatus, device, and storage medium provided in its embodiments.

[0055] Figure 1 This is a flowchart illustrating the step counting method provided in an embodiment of this application, as shown below. Figure 1 As shown, this step counting method is applied in the terminal and includes:

[0056] S101. Obtain the sampling data of i sets of sensors for the object to be detected, where i ≥ 3.

[0057] Specifically, the sampling data from the aforementioned i sets of sensors is collected by the sensors inside the terminal during the user's leg-raising and lowering movements. i represents the number of sensors; the more sensors, the more accurate the step counting. These sensors can be placed on one or both hands or feet of the user, or they can be attached to wearable clothing or directly to the skin via signal lines, as long as they can collect sampling data from the user. The sensors can include one or more of the following: an accelerometer, a gyroscope, and a magnetic field sensor. Optionally, the accelerometer can be a three-axis accelerometer, the gyroscope can be a three-axis gyroscope, and the magnetic field sensor can be a three-axis magnetic field sensor.

[0058] It should be noted that, please refer to Figures 2-21 As shown, when the sensor is placed on the hand, it can detect the sampling data corresponding to the lifting and releasing actions. The sampling data may include, for example, Acc lifting and releasing action sampling data, Gyr angular acceleration sampling data, Pressure lifting and releasing action sampling data, lifting and releasing light sensing value, Compass lifting and releasing sampling data, Grv lifting and releasing sampling data, Rot lifting and releasing sampling data, and Ori lifting and releasing sampling data.

[0059] The aforementioned Acc (hand-raising and releasing) action sampling data can be obtained through an accelerometer, including Acc-x axis, Acc-y axis, and Acc-z axis hand-raising and releasing action data, which can include acceleration values ​​corresponding to different directions such as the x, y, and z axes. The aforementioned Gyr angular acceleration sampling data can be obtained through a gyroscope, including Gyr-x axis, Gyr-y axis, and Gyr-z axis angular acceleration. The aforementioned Pressure (hand-raising and releasing) action sampling data can be obtained through a barometer, including the detected air pressure value. The aforementioned hand-raising and releasing light sensor value can be obtained through a light sensor, including the detected air pressure value. The aforementioned Compass (hand-raising and releasing) action sampling data can be obtained through a magnetic field sensor, including Compass-x axis, Compass-y axis, and Compass-z axis hand-raising and releasing action data, which can include the corresponding magnetic field strength in the x, y, and z axis directions. The aforementioned Grv hand-raising and releasing sampling data includes amplitude information for the Gyr-x, Gyr-y, and Gyr-z axes. The aforementioned Rot hand-raising and releasing sampling data can include amplitude information for the Rot-x, Rot-y, and Rot-z axes. The aforementioned Ori hand-raising and releasing sampling data can include amplitude information for the Ori-x, Ori-y, and Ori-z axes.

[0060] S102. Based on the sampling data of the i-th group of sensors, construct the sampling matrix and the unit basis vector.

[0061] Specifically, after obtaining the sampling data from i sets of sensors for the object to be detected, the data points in the sampling data of each set of sensors can be determined based on the sampling data of i sets of sensors. Each set of sensor sampling data includes j data points, where j ≥ 3. Then, based on the j data points corresponding to each set of sensors, the row vector and column vector of the sampling matrix are determined, and the sampling matrix is ​​constructed according to a preset rule. This sampling matrix can be represented by the following formula:

[0062]

[0063] Where i represents the number of sensors, j represents the number of data points included in the sampling data of each sensor group, and S ij This represents the j-th data point in the sampling data of the i-th sensor group. Each row vector represents the sampling data of a group of sensors. For example, the sampling data corresponding to Acc-x, Acc-y, Acc-z, Gyr-x, Gyr-y, and Gyr-z are each represented as a row vector. Data points from sensors of the same type are represented as the same column vector, and the data points change over time. For example, the row vector of Acc-x could include S... 11 ,S 12 ,...S 1j Elements such as...

[0064] Since the trend of the sampled data points from lowest to highest and back to lowest is a cycle, if the number of column elements of a row vector is less than 3, it is impossible to determine that the sampling matrix is ​​a complete action. Therefore, the number of column vectors j must be greater than or equal to 3. If the number of row vectors is less than three, the step counting may be inaccurate based on the detection results of one or two sensors. Therefore, the number of row vectors must be greater than or equal to 3.

[0065] It should be noted that since each sensor comes from a different manufacturer, the sampling rate varies depending on the characteristics of the sensor's internal circuitry. To accurately determine whether a leg is raised or lowered, data points need to be sampled using the highest sampling rate among all sensors, or all sensors should be uniformly set to a sampling rate of f, where f = n * j. Here, the sampling rate f refers to the number of data points sampled per unit time, expressed in Hz; n represents the sampling frequency; and j represents the number of data points.

[0066] It can be understood that a periodic movement, such as taking a step which includes lifting and lowering the leg, constitutes a movement cycle, and therefore the column vector must include at least one movement cycle. Normalizing each row vector of the above sampling matrix constructs a unit column vector, which can be represented by the following formula:

[0067] E j =[e1……e j ] T

[0068] Among them, e j E represents the j-th sampled element. j This represents a unit column vector. The magnitude of this unit column vector is 1, i.e., |e1|. 2 +|e2| 2 +……+|e j | 2 =1.

[0069] For any row vector, we can determine the trend of change between its preceding and following elements. For example, an upward and a downward trend represent one cycle. Each row vector represents sampling data corresponding to a sensor type, and each detected cycle is counted as one step. For the elements in the aforementioned unit column vector, if the preceding element is less than the following element, then... If the data shows an increasing trend, it can be detected as a leg-raising motion; if the preceding element is greater than the following element, that is... If the data shows a decreasing trend, it can be detected as a leg-releasing movement.

[0070] Furthermore, each column vector of the sampling matrix can be normalized to construct a unit row vector, which can be expressed by the following formula:

[0071] E i =[e1……e i ]

[0072] Among them, e i E represents the i-th sampled element. i This represents a unit row vector. The magnitude of this unit row vector is 1, i.e., |e1|. 2 +|e2| 2 +……+|e i | 2 =1, and

[0073] S103. Based on the sampling matrix and unit basis vectors, detect the leg raising and lowering actions of the object to be detected.

[0074] S104. Count the steps taken by the subject based on the leg raising and lowering movements.

[0075] Optionally, based on the above embodiments, please refer to... Figure 22 As shown, step S103 above may include the following method steps:

[0076] S201. Based on the sampling matrix and unit column vector, determine the leg lifting and lowering distance vector of the object to be detected.

[0077] S202. Compare the distance vector between the raised and lowered legs with the preset judgment threshold vector to determine the first quantity value.

[0078] S203. Calculate the matrix operation results based on the distance vector between the raised and lowered legs and the unit row vector.

[0079] S204. Based on the matrix operation result and the first quantity value, detect the leg raising and lowering actions of the object to be detected.

[0080] In this step, after obtaining the sampling matrix, unit column vector, and unit column vector, the leg-raising and lowering distance vector of the object to be detected can be determined based on the sampling matrix and unit column vector, which can be expressed by the following formula:

[0081]

[0082] Among them, R i e represents the distance vector between the raised and lowered legs. j E represents the j-th sampled element. j S represents a unit column vector. ij This represents the j-th data point in the sampling data of the i-th sensor group, and the leg-raising and lowering distance vector includes i leg-raising and lowering element values.

[0083] After determining the leg-raising and lowering distance vector of the object to be detected, the leg-raising and lowering distance vector is compared with the preset judgment threshold vector to determine the first quantity value.

[0084] It should be noted that the aforementioned judgment threshold vector is pre-trained based on a large amount of sample data of leg raising and lowering movements. This includes judgment thresholds corresponding to each of the i groups of sensors. The judgment thresholds for each sensor may be the same or different. For example, with 10 sensor types, including sensor1, sensor2, ..., sensor10, by collecting 10,000 sample data points corresponding to 10,000 walking actions of a sample object, with each sample data point including both leg raising and lowering movements, it is determined that sensor1 must have a value greater than 1 to identify it as a leg raising movement; otherwise, it is identified as a leg lowering movement. Similarly, sensor2 must have a value greater than 2 to identify it as a leg raising movement; otherwise, it is identified as a leg lowering movement. Thus, 1 and 2 are determined as the judgment thresholds for sensor1 and sensor2, respectively. Similarly, the judgment thresholds for each of the 10 sensor types can be obtained, and these 10 judgment thresholds are then combined to obtain the judgment threshold vector.

[0085] Optionally, in the process of comparing the leg-raising distance vector with a preset judgment threshold vector to determine the first quantity value, each of the i leg-raising element values ​​in the leg-raising distance vector can be compared with the corresponding judgment threshold, and the number of elements whose leg-raising element values ​​are greater than the corresponding judgment threshold can be determined from the i leg-raising element values, and then the number of elements is used as the first quantity value.

[0086] After obtaining the first quantity value, a matrix operation result is calculated based on the leg lift / lowering distance vector and the unit row vector. Then, based on the matrix operation result and the first quantity value, the leg lift and lowering actions of the object to be detected are detected. Optionally, a second quantity value can be determined first based on the first quantity value and the number of sensors. Then, the matrix operation result is compared with the second quantity value. When the matrix operation result is greater than or equal to the second quantity value, the object to be detected is detected as lifting a leg; when the matrix operation result is less than the second quantity value, the object to be detected is detected as lowering a leg. This can be expressed by the following formula:

[0087]

[0088] Where R represents the result of the matrix operation, m represents the first quantity value, i represents the number of sensors, and e i E represents the i-th sampled element. i Represents a unit row vector, e j E represents the j-th sampled element. j S represents a unit column vector. ij This represents the j-th data point in the sampling data of the i-th sensor group. R represents the second quantity value.i This represents the distance vector between the raised and lowered legs.

[0089] In this step, after detecting the leg-raising movement in the first half of the cycle, the leg-lowering movement can be detected using a similar detection method. After detecting the leg-raising and leg-lowering movements, each leg-raising and leg-lowering movement is counted as one step. Thus, by detecting one leg-raising and leg-lowering movement, one step count is completed. Furthermore, by detecting the number of leg-raising and leg-lowering movements, the step count of the subject under test can be achieved.

[0090] It should be noted that the above detection of leg raising and lowering movements involves a sensor on one leg. If the sensor is on both legs, data features can be extracted from the sensors on each leg separately. Data from one sensor can be used to count one leg raising and lowering movement, while the data from the stationary leg remains unchanged within the cycle. Similarly, the above method for counting steps is also applicable when the sensors are located on one or both hands.

[0091] The step counting method provided in this application acquires sampling data from i sets of sensors on the object to be detected, and constructs a sampling matrix and unit basis vectors based on the sampling data. Based on the sampling matrix and unit basis vectors, it detects the leg raising and lowering movements of the object to be detected, and counts steps based on these movements. This technical solution is not limited to software detection methods and can accurately determine leg raising and lowering movements based on the sampling data detected by sensors. It can achieve accurate step counting even when the system is powered off, making step counting highly flexible and reducing system power consumption.

[0092] Furthermore, as an optional implementation method, based on the above embodiments, Figure 23 This is a flowchart illustrating the method for determining the distance traveled, as provided in the embodiments of this application. Figure 23 As shown, the method includes:

[0093] S301. Record the period value of the motion of the object to be detected according to the preset fluctuation frequency corresponding to the sensor.

[0094] S302. Obtain the gender, height, and weight data of the object to be tested.

[0095] S303. Based on the gender, height, and weight data of the subject to be detected and the pre-trained distance model, determine the stride length of the subject to be detected.

[0096] S304. Based on the step length and period value, determine the movement distance of the object to be detected.

[0097] In this embodiment, the stride length and cadence differ for users of different genders, ages, heights, and weights. After counting the steps of the target, the period value of the target's movement can be recorded according to the preset fluctuation frequency of the sensor, and the target's gender, height, and weight data can be obtained. Based on the target's gender, height, and weight data and the pre-trained distance model, the target's stride length is determined, and the target's distance traveled is determined based on the stride length and period value.

[0098] Specifically, based on the sampling period f of the fused sensor, the periodic signal T of the fused sensor can be determined. Then, according to the fluctuation frequency F of the periodic signal T, where f = nF, the periodic value t of the motion of the object to be detected can be recorded. After obtaining the gender, height, and weight data of the object to be detected, the step length l of the object to be detected can be determined based on the gender, height, and weight data of the object to be detected and the pre-trained distance model. Then, the step length l and the periodic value t are multiplied to determine the distance D of the object to be detected, D = t * l.

[0099] It should be noted that the above-mentioned distance model can be constructed through the following steps: first, collect data on the gender, height, weight, and step length of the sample objects, and then determine the distance model to be trained based on the data on gender, height, weight, and step length. Finally, calculate the model parameters in the distance model to be trained to obtain the distance model.

[0100] For example, data on gender (s), height (h), and weight (w) of 10,000 sample objects can be collected, and the step length (l) data corresponding to each sample object can be statistically analyzed. Then, the gender (s), height (h), and weight (w) data can be used as independent variables, and the step length (l) data can be used as dependent variables to obtain the change of step length with age, gender, and weight data. The data can be plotted in a coordinate system to obtain its trend. For example, the distance model to be trained can be determined as l = s * (a * h + b * w). Then, the gender (s), height (h), weight (w), and step length (l) data of three sample objects can be taken and substituted into the above distance model to be trained to calculate the model parameters a and b in the distance model to be trained l = s * (a * h + b * w), thereby obtaining the distance model.

[0101] In this embodiment, the model coefficients of the distance model can be determined, thereby constructing the corresponding distance model. It has high universality and accurately counts the movement distance of the subject based on the individual data of the subject, thereby realizing the distance statistics function.

[0102] Furthermore, as an optional implementation method, based on the above embodiments, Figure 24 This is a flowchart illustrating the method for determining motion data provided in an embodiment of this application, as shown below. Figure 24As shown, the method includes:

[0103] S401. Determine the motion state of the object to be detected based on the fluctuation frequency.

[0104] In this embodiment, the motion state of the object to be detected can be determined based on the fluctuation frequency, which includes running, walking, and labor. For example, when the fluctuation frequency is greater than a first preset frequency threshold, its motion state can be determined to be labor; when the fluctuation frequency is not greater than the first preset frequency threshold but greater than a second preset frequency threshold, its motion state can be determined to be running; and when the fluctuation frequency is not greater than the second preset frequency threshold, its motion state can be determined to be walking. Different motion states consume different amounts of energy. Walking consumes the least energy, running consumes the next most, and labor consumes the most.

[0105] S402. Based on the gender, height, and weight data of the subject to be tested and the energy model pre-trained in motion, determine the total energy consumed by the subject to be tested in motion.

[0106] S403. Based on the total energy consumed, determine the motion data of the object to be detected.

[0107] In this embodiment, after determining the motion state of the object to be detected, the object's gender, height, and weight data can be obtained. Based on the object's gender, height, and weight data and a pre-trained energy model in the motion state, the total energy consumed by the object in the motion state is determined, and the object's motion data is determined based on the total energy consumed. Optionally, the above-mentioned motion data may be data such as a recommended exercise plan for the object to be detected.

[0108] Specifically, the gender S, weight w, and height h of the subject to be tested can be obtained. Based on the gender S, weight w, and height h of the subject to be tested, as well as the energy consumption per unit under the above-mentioned exercise state e, the pre-trained energy model for that exercise state can be determined based on the energy consumption per unit e. The gender S, weight w, and height h data of the subject to be tested are substituted into the energy model corresponding to that exercise state to obtain the total energy consumption E of the subject to be tested under the exercise state.

[0109] It should be noted that the above energy model can be constructed through the following steps: First, obtain the energy consumed per unit distance of the sample object, and collect the sample object's gender, height, weight data and total energy consumed per unit distance. Then, based on the gender, height, weight data, energy consumed per unit distance and total energy consumed per unit distance, determine the energy model to be trained, and calculate the model parameters in the energy model to be trained to obtain the energy model.

[0110] For example, data on gender (s), height (h), and weight (w) of 10,000 sample subjects can be collected, and their corresponding step length data (l) can be calculated. For example, the step length can be a distance of one kilometer. The unit energy consumption (e) and total energy consumption (E) of a sample subject moving one kilometer (l) under a certain motion state can be detected using a standard energy detection device. The total energy consumption (E) of the sample subject is obtained by multiplying the distance (l) by the unit energy consumption (e). Then, the data on gender (s), height (h), weight (w), and unit energy consumption (e) are used as independent variables, and the total energy consumption is used as the dependent variable to obtain the change of total energy consumption with age, gender, and weight data. The data can be plotted on a coordinate system to obtain its trend. For example, the energy model to be trained can be determined as E = l*e = s*(a*h+b*w)*e, where the unit energy consumption (e) varies with different motion states. Then, we can take the gender s, height h, weight w, and energy consumption per unit of three sample objects, and substitute these three data into the energy model to be trained. We can then calculate the model parameters a and b of the energy model E = l*e = s*(a*h+b*w)*e, thereby obtaining the energy model corresponding to this motion state. Similarly, we can construct the energy models corresponding to different motion states through the above steps.

[0111] This embodiment can determine the model coefficients of the energy model, thereby accurately constructing the energy model with high universality. It can also accurately calculate the total energy consumption of the subject under different exercise states based on the detected exercise state and the subject's personal data, thus providing data guidance for users' health and exercise data recommendations. Furthermore, it can personalize specific exercise detection based on the subject's personal data, further enhancing the user experience.

[0112] It should be noted that although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0113] on the other hand, Figure 25 This is a schematic diagram of a pedometer device provided in an embodiment of this application. Figure 25 As shown, the device may include:

[0114] The acquisition module 510 is used to acquire the sampling data of i sets of sensors of the object to be detected, where i ≥ 3;

[0115] Module 520 is used to construct a sampling matrix and a unit basis vector based on the sampling data from the i sets of sensors;

[0116] Detection module 530 is used to detect the leg raising and lowering movements of the object to be detected based on the sampling matrix and unit basis vectors;

[0117] The step counting module 540 is used to count the steps of the object to be detected based on the leg lifting and lowering movements.

[0118] Optional, such as Figure 26 As shown, the above-mentioned building module 520 includes:

[0119] The first determining unit 521 is used to determine the data points in the sampling data of each group of sensors in the sampling data of i groups of sensors. The sampling data of each group of sensors includes j data points, j≥3.

[0120] The second determining unit 522 is used to determine the row vector and column vector of the sampling matrix based on the j data points corresponding to each group of sampled data;

[0121] The first construction unit 523 is used to construct a sampling matrix according to the row vector and column vector and a preset rule;

[0122] The second building unit 524 is used to normalize each row vector of the sampling matrix to build a unit column vector;

[0123] The third building unit 525 is used to normalize each column vector of the sampling matrix to build a unit row vector.

[0124] Optionally, the above detection module 530 includes:

[0125] The third determining unit 531 is used to determine the leg lifting and lowering distance vector of the object to be detected based on the sampling matrix and the unit column vector;

[0126] The fourth determining unit 532 is used to compare the leg lifting distance vector with a preset judgment threshold vector to determine the first quantity value;

[0127] Calculation unit 533 is used to calculate matrix operation results based on the leg lifting distance vector and the unit row vector;

[0128] The detection unit 534 is used to detect the leg raising and lowering movements of the object to be detected based on the matrix operation result and the first quantity value.

[0129] Optionally, the fourth determining unit 532 mentioned above is specifically used for:

[0130] Determine i elements of the leg-raising / lowering distance vector;

[0131] Compare each of the i leg-raising and lowering element values ​​with the corresponding judgment threshold;

[0132] Determine the number of elements whose leg-raising / lowering element values ​​are greater than the corresponding judgment threshold from the i leg-raising / lowering element values;

[0133] Use the number of elements as the first quantity value.

[0134] Optionally, the detection unit 534 described above is specifically used for:

[0135] The second quantity value is determined based on the first quantity value and the number of sensors;

[0136] Compare the matrix operation result with the second quantity value;

[0137] When the result of the matrix operation is greater than or equal to the second quantity value, the object to be detected is a leg-raising action;

[0138] When the result of the matrix operation is less than the second quantity value, the object to be detected is a leg-releasing action.

[0139] Optionally, the above-mentioned device is also used for:

[0140] Record the period value of the motion of the object to be detected based on the preset fluctuation frequency corresponding to the sensor.

[0141] Obtain the gender, height, and weight data of the subject to be tested;

[0142] Based on the gender, height, and weight data of the subject to be detected and a pre-trained distance model, the stride length of the subject to be detected is determined.

[0143] Based on the step length and period value, the movement distance of the object to be detected is determined.

[0144] Optionally, the route model is constructed through the following steps:

[0145] Collect data on the gender, height, weight, and stride length of the sample subjects;

[0146] Based on gender, height, weight data, and stride length data, determine the distance model to be trained;

[0147] Calculate the model parameters in the route model to be trained to obtain the route model.

[0148] Optionally, the above-mentioned device is also used for:

[0149] The motion state of the object to be detected is determined based on the fluctuation frequency;

[0150] Based on the gender, height, and weight data of the subject to be tested, and a pre-trained energy model in motion, the total energy consumed by the subject to be tested in motion is determined.

[0151] Based on the total energy consumed, the motion data of the object to be detected is determined.

[0152] Optionally, the energy model is constructed through the following steps:

[0153] Obtain the energy consumed per unit distance of the sample object during its movement;

[0154] Collect data on the gender, height, weight, and total energy expenditure of the sample participants during their exercise journey;

[0155] Based on gender, height, weight data, energy expenditure per unit of exercise, and total energy expenditure during the exercise distance, determine the energy model to be trained.

[0156] Calculate the model parameters in the energy model to be trained to obtain the energy model.

[0157] It is understood that the functions of each functional module of the step counting device provided in this embodiment can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, and will not be repeated here.

[0158] on the other hand, Figure 27 This application provides a schematic diagram of the hardware structure of a terminal device according to an embodiment of the present application. The terminal device provided in this application includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the peripheral function implementation method of the terminal device as described above. Reference is made below. Figure 27 , Figure 27 This is a schematic diagram of the computer system structure of the terminal device according to an embodiment of this application.

[0159] like Figure 27 As shown, the computer system 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1302 or programs loaded from storage portion 1303 into random access memory (RAM) 1303. The RAM 1303 also stores various programs and data required for the operation of the system 1300. The CPU 1301, ROM 1302, and RAM 1303 are interconnected via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0160] The following components are connected to I / O interface 1305: an input section 1306 including a keyboard, mouse, etc.; an output section 1307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN card, modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to I / O interface 1305 as needed. Removable media 1311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1310 as needed so that computer programs read from them can be installed into storage section 1308 as needed.

[0161] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a machine-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1303, and / or installed from removable medium 1311. When the computer program is executed by central processing unit (CPU) 1301, it performs the functions defined above in the system of this application.

[0162] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, 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 disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0163] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0164] The units or modules described in the embodiments of this application can be implemented in software or hardware. The described units or modules can also be housed in a processor; for example, it can be described as: a processor including: an acquisition module, a construction module, a detection module, and a step counting module. The names of these units or modules do not necessarily limit the unit or module itself; for example, the acquisition module can also be described as "for acquiring sampling data from i sets of sensors of the object to be detected, where i ≥ 3".

[0165] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium stores one or more programs, which, when used by one or more processors, execute the step-counting method described in this application:

[0166] Acquire sampling data from i sets of sensors on the object to be detected, where i ≥ 3;

[0167] Based on the sampling data from the i sets of sensors, construct a sampling matrix and a unit basis vector;

[0168] Based on the sampling matrix and the unit basis vector, the leg raising and lowering movements of the object to be detected are detected;

[0169] The steps of the object to be detected are counted based on the leg-raising and leg-lowering actions.

[0170] In summary, the step counting method, apparatus, device, and storage medium provided in this application acquire sampling data from i sets of sensors on the object to be detected, construct a sampling matrix and a unit basis vector based on the sampling data, detect the leg raising and lowering actions of the object to be detected based on the sampling matrix and the unit basis vector, and count steps based on the leg raising and lowering actions. This technical solution is not limited to software detection methods and can accurately determine the leg raising and lowering actions based on the sampling data detected by sensors. It can achieve accurate step counting even when the system is powered off, making step counting highly flexible and reducing system power consumption.

[0171] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A step counting method, characterized in that, The method includes: Acquire sampling data from i sets of sensors on the object to be detected, where i ≥ 3; Based on the sampling data from the i sets of sensors, construct a sampling matrix and a unit basis vector; Based on the sampling matrix and the unit basis vector, the leg raising and lowering movements of the object to be detected are detected, including: Based on the sampling matrix and the unit column vector, the leg raising and lowering distance vector of the object to be detected is determined; the leg raising and lowering distance vector is compared with a preset judgment threshold vector to determine a first quantity value; based on the leg raising and lowering distance vector and the unit row vector, the matrix operation result is calculated; based on the matrix operation result and the first quantity value, the leg raising and lowering actions of the object to be detected are detected. The steps of the object to be detected are counted based on the leg-raising and leg-lowering actions.

2. The method according to claim 1, characterized in that, The unit basis vectors include unit column vectors and unit row vectors. Based on the sampling data from the i sets of sensors, a sampling matrix and unit basis vectors are constructed, including: Determine the data points in the sampling data of each group of sensors in the i-th group of sensors, wherein the sampling data of each group of sensors includes j data points, j≥3; Based on the j data points corresponding to each group of sampled data, determine the row vector and column vector of the sampling matrix; Based on the row vectors and column vectors, the sampling matrix is ​​constructed according to a preset rule; Normalize each row vector of the sampling matrix to construct the unit column vector; The unit row vector is constructed by normalizing each column vector of the sampling matrix.

3. The method according to claim 1, characterized in that, The judgment threshold vector includes i judgment thresholds corresponding to each of the i groups of sensors. The leg-lifting distance vector is compared with the preset judgment threshold vector to determine a first quantity value, including: Determine i elements of the leg-raising / lowering distance vector; Each of the i leg-lifting element values ​​is compared with its corresponding judgment threshold. Determine the number of elements whose leg-raising / lowering element values ​​are greater than the corresponding judgment threshold from the i leg-raising / lowering element values; The number of elements is taken as the first quantity value.

4. The method according to claim 1, characterized in that, Based on the matrix operation result and the first quantity value, the leg raising and lowering movements of the object to be detected are detected, including: Based on the first quantity value and the number of sensors, determine the second quantity value; Compare the matrix operation result with the second quantity value; When the result of the matrix operation is greater than or equal to the second quantity value, the object to be detected is detected as raising its leg. When the result of the matrix operation is less than the second quantity value, the object to be detected is detected as a leg-releasing action.

5. The method according to claim 1, characterized in that, After counting steps on the object to be detected, the method further includes: Record the period value of the motion of the object to be detected based on the preset fluctuation frequency corresponding to the sensor. Obtain the gender, height, and weight data of the object to be tested; Based on the gender, height, and weight data of the subject to be detected and the pre-trained distance model, the stride length of the subject to be detected is determined; Based on the movement step length and the period value, the movement distance of the object to be detected is determined.

6. The method according to claim 5, characterized in that, The route model is constructed through the following steps: Collect data on the gender, height, weight, and stride length of the sample subjects; Based on the gender, height, weight data, and stride length data, determine the distance model to be trained; The model parameters in the route model to be trained are calculated to obtain the route model.

7. The method according to claim 6, characterized in that, After counting steps on the object to be detected, the method further includes: The motion state of the object to be detected is determined based on the fluctuation frequency. Based on the gender, height, and weight data of the subject to be tested and the energy model pre-trained in the exercise state, the total energy consumed by the subject to be tested in the exercise state is determined. Based on the total energy consumed, the motion data of the object to be detected is determined.

8. The method according to claim 7, characterized in that, The energy model is constructed through the following steps: Obtain the energy consumed per unit distance of the sample object during the motion path; Collect data on the gender, height, weight, and total energy expenditure of the sample subjects during the exercise distance; Based on the gender, height, weight data, energy consumption per unit distance, and total energy consumption during the exercise, determine the energy model to be trained; The model parameters in the energy model to be trained are calculated to obtain the energy model.

9. A step counting device, characterized in that, The device includes: The acquisition module is used to acquire sampling data from i sets of sensors on the object to be detected, where i ≥ 3; A construction module is used to construct a sampling matrix and a unit basis vector based on the sampling data from the i sets of sensors; The detection module is used to detect the leg raising and lowering movements of the object to be detected based on the sampling matrix and the unit basis vector, including: Based on the sampling matrix and the unit column vector, the leg raising and lowering distance vector of the object to be detected is determined; the leg raising and lowering distance vector is compared with a preset judgment threshold vector to determine a first quantity value; based on the leg raising and lowering distance vector and the unit row vector, the matrix operation result is calculated; based on the matrix operation result and the first quantity value, the leg raising and lowering actions of the object to be detected are detected. The step counting module is used to count the steps of the object to be detected based on the leg lifting action and the leg lowering action.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the step counting method as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the step counting method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Walking state based step counting method

    CN108253992A

  • Step counting recognition method, device and equipment and readable storage medium

    CN111982149A