An online learnable wearable quasi-periodic motion count method, program, device and storage medium
By constructing template functions through online learning and utilizing the singular values and singular vectors of the multi-axis accelerometer data analysis matrix, the noise interference problem in quasi-periodic motion statistics of wearable devices was solved, achieving higher accuracy in motion count statistics, adapting to individual differences and allowing for periodic adjustments.
Patent Information
- Application Number
- CN202411951068.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Existing wearable devices are susceptible to noise interference when counting quasi-periodic movements, and the accuracy of counting sporadic movements is not high, which affects the accuracy of indoor navigation and health status information.
Template functions are constructed through online learning, analysis matrices are built using multi-axis accelerometer data, singular values and singular vectors are solved, detection thresholds are determined, data filtering is performed, and the number of peak and trough combinations is counted as the number of actions. Template functions can be updated regularly to adapt to individual differences and user needs.
It improves the accuracy of exercise count statistics, reduces the impact of noise interference, accurately records non-continuous movements, adapts to individual wearer differences, and adjusts statistical results through user evaluation.
Smart Images

Figure CN119867734B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of wearable action frequency counting, and particularly relates to a wearable quasi-periodic action frequency counting method, program, device and storage medium capable of online learning. BACKGROUND
[0002] Wearable action counting devices based on micro-electro-mechanical system (MEMS) (mainly accelerometers and gyroscopes) are widely used in human or animal motion analysis, indoor navigation, health monitoring and management, etc. The actions generally counted are quasi-periodic (not strictly periodic due to the difficulty of completely consistent action amplitude and span) during continuous motion, such as walking and running step counting.
[0003] A data acquisition device equipped with an accelerometer and a gyroscope is worn on a part that can be affected by the action. When the wearer performs the above continuous action, the acceleration and gyroscope data values change obviously quasi-periodically (not strictly periodically due to the difficulty of completely consistent action amplitude and span) over time. This quasi-periodic change is caused by continuous rhythmic repetitive action. Existing action frequency counting methods are mainly developed based on the above characteristics. For example, autocorrelation analysis method, finite state machine method, zero speed detection method, and wave peak detection method, etc. Generally, in order to eliminate false positive data caused by other actions or environmental vibrations of the wearer from being counted into the action frequency, the above methods determine whether the number of peaks (action frequency) in the observation window reaches a set threshold number to decide whether to count the action frequency. Although this method eliminates the influence of other actions or environmental vibrations, it also excludes sporadic motion counts from counting, i.e. if the actual action frequency in the observation window is less than the threshold number, it will be missed. This will not be conducive to obtaining more accurate action frequency statistics, which will affect the deviation of indoor navigation, health status, etc. Although more complex pattern recognition methods can be used to identify actions first and then count the action frequency, the calculation complexity is large and difficult to deploy on wearable devices. Therefore, it is necessary to propose a more accurate action frequency counting method. SUMMARY
[0004] The present application aims to solve the problem of wearable devices being susceptible to noise interference for quasi-periodic action (such as walking, running step counting, and chewing frequency counting) statistics, and the low accuracy of sporadic action frequency statistics, and provides a wearable quasi-periodic action frequency counting method, program, device and storage medium capable of online learning.
[0005] A wearable quasi-periodic action frequency counting method capable of online learning, comprising the following steps:
[0006] Step 1: when the wearer wears the wearable device for the first time, the wearer completes the specified action within the specified time, the data is collected by the wearable device, and the data is preprocessed and zero-mean processed; the data collected during the sustained motion of the wearer is identified by the initial template function stored in the wearable device;
[0007] Step 2: select the data of the statistical action after pre-processing and zero-mean processing during sustained motion, construct the selected data into an analysis matrix, solve the singular value and singular vector of the analysis matrix, and subtract the mean value of the first left singular vector from the updated template function; determine the detection threshold according to the updated template function;
[0008] Step 3: the wearable device collects data in real time during the wearer's motion, and pre-processes and zero-mean processes the data; for the processed data in the calculation period, filter the data by the updated template function, and count the number of wave peak and wave trough combinations that meet the detection threshold, denoted as the number of action occurrences.
[0009] Further, the wearable device carries a multi-axis accelerometer and an initial template function, and the multi-axis accelerometer is used to collect data; the initial template function is specifically:
[0010] Collect multi-axis accelerometer data of multiple same type wearers under known sustained motion, non-sustained motion and no motion conditions to form a decision tree, and the decision tree is updated using a machine learning process; determine whether the collected multi-axis accelerometer data is data during sustained motion by the initial template function under the condition that the motion of the new wearer is unknown.
[0011] Further, the data is pre-processed and zero-mean processed, specifically:
[0012] According to the acceleration data collected by the multi-axis accelerometer, the combined acceleration modulus value is calculated to obtain x1=[x1(1), x1(2),..., x1(t),...], t is the data time domain serial number;
[0013] The zero-mean data x s is obtained by zero-mean processing the combined acceleration modulus value data x1.
[0014] x s =x1-x′1
[0015] Where x′1 is obtained by mean filtering x1, and the filtering window length is not less than 4 times the length of the action.
[0016] Further, in step 2, the data x1 = [x1(1), x1(2), ..., x1(l), ..., x1(L)] of the statistical action after preprocessing and zero-mean processing during continuous movement are selected and constructed into an M×N dimensional analysis matrix A; where M is the data length corresponding to one movement cycle, N is the number of movement cycles analyzed, and N>M, L>M×N.
[0017] Furthermore, in step 2, the first left singular vector v1 of the analysis matrix A is selected and its mean is subtracted. The template function g;
[0018]
[0019] The detection threshold r is:
[0020]
[0021] Where l1(g) and l2(g) are the l1 norm and l2 norm of the template function g; r0 is the ratio of the first singular value of the analysis matrix A to the sum of all singular values.
[0022] Furthermore, in step 3, the data x after preprocessing and zero-mean processing within the calculation period... s Calculate x s The convolution with the template function g yields the filtered data y = [y(1), y(2), ..., y(t), ..., y(T)]; if y(t) < -r and y(t+1) > r, then the combination of y(t) and y(t+1) is recorded as the number of times an action occurs.
[0023] Furthermore, if the wearer changes, or the wearable device's self-assessment of the number of actions is lower than expected, step 1 is repeated to retrain the template function.
[0024] A computer device / equipment / system includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described online learnable wearable quasi-periodic motion count method.
[0025] A computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the above-described online learnable wearable quasi-periodic motion count method.
[0026] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the above-described online learnable wearable quasi-periodic motion count method.
[0027] The beneficial effects of the present application are:
[0028] The present application selects the data of the statistical action during the continuous movement and constructs an analysis matrix, uses the singular vector and singular value of the analysis matrix to construct a template function, uses the template function to perform template function filtering on the collected real-time data, and counts the number of wave peak and wave valley combinations that meet the threshold requirement in the filtered data, which is recorded as the number of action occurrences. The present application can reduce the influence of other movements on the required statistical action by using template function filtering, accurately record the number of occurrences of non-continuous actions, and improve the accuracy of action statistics; the template function is obtained by online data training, which can eliminate individual differences of the wearer, and the action number statistics result can be evaluated periodically or according to user instructions, such as retraining the template function if it is lower than expected. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 The present application is a general flowchart.
[0030] Figure 2 The present application is a human walking step number statistics template function graph (worn on the wrist) in an embodiment.
[0031] Figure 3 The present application is a waveform and detection threshold graph of processed three-axis acceleration sensor data corresponding to continuous walking and scattered walking in an embodiment (worn on the wrist). DETAILED DESCRIPTION
[0032] The present application will be further described below in conjunction with the drawings.
[0033] The present application proposes a wearable quasi-periodic motion number statistics method that can learn online to solve the problem that the wearable device is susceptible to noise interference when counting periodic actions (such as the number of steps when walking or running, and the number of chewing times), and the accuracy of scattered action number statistics is not high.
[0034] The present application uses a template function to perform template function filtering on a multi-axis accelerometer, and counts the number of wave peak and wave valley combinations that meet the threshold requirement in the filtered data, which is recorded as the number of action occurrences. The template function is obtained by online data training. The present application selects the multi-axis accelerometer data of the required statistical action during the continuous movement and constructs an analysis matrix, and then uses the singular vector and singular value of the analysis matrix to construct a template function. The action number statistics result can be evaluated periodically or according to user instructions. If the expected value is not changed, the template function is not changed. If the evaluation result is lower than expected, the template function is retrained.
[0035] A wearable quasi-periodic motion number statistics method that can learn online, comprising the following steps:
[0036] Step 1: when the wearer wears the wearable device for the first time, the wearer completes the specified action within the specified time, and the data is collected by the wearable device, and the data is preprocessed and zero-mean processed; the data collected during the wearer's sustained motion is identified by the initial template function stored in the wearable device;
[0037] The wearable device carries a multi-axis accelerometer and an initial template function, and the multi-axis accelerometer is used to collect data;
[0038] The initial template function is specifically:
[0039] Collect multi-axis accelerometer data of multiple same type wearers in known sustained motion, non-sustained motion and no motion conditions to form a decision tree, and the decision tree is updated using a machine learning process; the collected multi-axis accelerometer data is determined to be data during sustained motion by the initial template function under the condition that the motion of the new wearer is unknown;
[0040] The data is preprocessed and zero-mean processed, specifically:
[0041] According to the acceleration data collected by the multi-axis accelerometer, the resultant acceleration modulus value is calculated to obtain x1=[x1(1), x1(2),..., x1(t),...], t is the data time domain serial number;
[0042] The zero-mean data x s is obtained by zero-mean processing the resultant acceleration modulus value data x1;
[0043] x s =x1-x′1
[0044] Where x′1 is obtained by mean filtering x1, and the filtering window length is not less than 4 times the length of the action;
[0045] Step 2: select the data x1=[x1(1), x1(2),..., x1(l),..., x1(L)] of the statistical action during sustained motion after preprocessing and zero-mean processing, and construct an MxN-dimensional analysis matrix A; where M is the data length corresponding to one motion period, N is the number of analyzed motion periods, and N>M, L>MxN;
[0046] Solve the singular value and singular vector of the analysis matrix A, subtract the mean value of the first left singular vector v1 of the analysis matrix A to obtain the template function g:
[0047]
[0048] According to the updated template function, the detection threshold r is determined as:
[0049]
[0050] wherein, l1(g) and l2(g) are the l1 norm and l2 norm of the template function g; r0 is the ratio of the first singular value of the analysis matrix A to the sum of all singular values.
[0051] Step 3: During the wearer's movement, the wearable device collects data in real time, and performs pre-processing and zero-mean processing on the data; for the pre-processed and zero-mean processed data x s in the calculation period s , the convolution of x x and the template function g is calculated to obtain filtered data y = [y(1), y(2),..., y(t),..., y(T)]; if y(t) < -r and y(t+1) > r, then y(t) and y(t+1) are combined to represent the number of times of occurrence of an action; the number of combinations of wave peaks and wave troughs in the filtered data that meet the detection threshold is counted, and is denoted as the number of occurrences of actions.
[0052] If the wearer changes or the wearable device self-evaluates the action number statistical result to be lower than expected, step 1 is re-executed to retrain the template function.
[0053] Embodiment 1:
[0054] This embodiment takes the step count of a wearable device worn on the wrist as an example to illustrate the process, and the data sampling rate is 150 Hz.
[0055] 1. Data pre-processing
[0056] Three-axis acceleration data is collected, and the combined acceleration modulus is calculated,
[0057]
[0058] wherein, a x (t), a y (t), and a z (t) are the data of the x-axis, y-axis, and z-axis of the three-axis accelerometer at time t, respectively, and t represents the time domain sampling number. The mean filter is performed on x1, and the filter window length is 256 data points to obtain x′1, and then the zero-mean data x s = x1-x′1 is calculated.
[0059] 2. Collect 20 same type of wearers with different heights, body shapes, and action frequencies under the conditions of known continuous walking, non-continuous walking, and no movement, and pre-process the data. 100 groups of data are collected for each condition, and a decision tree is formed by using a machine learning method. The decision tree can determine whether the collected multi-axis accelerometer data is continuous walking data under the condition that the movement of the new wearer is unknown.
[0060] 3. For initial wear or when the template function needs to be updated, perform template function training.
[0061] Using the configured decision tree, select the data x1=[x1(1),x1(2),...,x1(l),...,x1(L)] during the continuous walking period and construct an M×N dimensional analysis matrix A; where M is the data length corresponding to one movement cycle, N is the number of movement cycles analyzed, and N>M, L>M×N;
[0062] To find the singular values and singular vectors of the analysis matrix A, subtract its mean from the first left singular vector v1 of the analysis matrix A. For template function g:
[0063]
[0064] Calculate the ratio r0 of the first singular value of analysis matrix A to the sum of all singular values of analysis matrix A, and then calculate the detection threshold r:
[0065]
[0066] 4. Step count operation
[0067] After the template function is trained, the wearable device collects data in real time during the wearer's exercise, and performs preprocessing and zero-mean normalization on the data; for the preprocessed and zero-mean normalized data x within the computation cycle s Calculate x s The convolution with the template function g yields the filtered data y = [y(1), y(2), ..., y(t), ..., y(T)]. If y(t) < -r and y(t+1) > r, then the combination of y(t) and y(t+1) is recorded as the number of times an action occurs. The number of peak and trough combinations that satisfy the detection threshold in the filtered data is counted and recorded as the number of times an action occurs.
[0068] like Figure 3 The image shows the waveform and detection threshold diagram of the triaxial accelerometer data after processing during continuous walking and sporadic steps. A clear "trough-peak-trough" pattern can be observed in the continuous walking and sporadic step data segments.
[0069] 5. Statistical Result Evaluation and Template Function Update
[0070] Replace the wearer with someone of significantly different body type and activate the step counting result evaluation function.
[0071] The device's default setting period, user button operations on the device, and wireless command settings are used to evaluate the statistical results of the number of actions.
[0072] The data segment of the wearer walking continuously more than 100 steps is selected by using the decision tree, the motion frequency of the selected data segment is calculated by using the conventional motion frequency statistical method (for example, the peak-valley detection method, the autocorrelation analysis method), and is compared with the calculation result of the "step number statistical operation" to obtain a difference of 11%. The template function training module is automatically started, and the evaluation is re-performed until the difference between the two results is less than 5%.
[0073] The data of the required statistical action during the continuous motion is selected and constructed into an analysis matrix, the singular vector and the singular value of the analysis matrix are used to construct a template function, the collected real-time data is filtered by using the template function, and the number of peak-valley combinations meeting the threshold requirement in the filtered data is counted as the action occurrence frequency. The template function filtering can reduce the influence of other motions on the required statistical action, and can accurately record the occurrence frequency of the non-continuous action, thereby improving the accuracy of the action statistics. The template function is obtained by online data training, and can eliminate the individual differences (such as height, body shape, action frequency, etc.) of the wearer, and can periodically or according to the user instruction to evaluate the action frequency statistical result. If the evaluation result is lower than the expected result, the template function can be re-trained, and the influence of the reduced adaptability of the original template function caused by the habit and the change of physical quality can be eliminated.
[0074] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An online learnable wearable quasi-periodic motion count method, characterized by, The method comprises the following steps: Step 1: when the wearer wears the wearable device for the first time, the wearer completes the specified action within the specified time, and the wearable device collects data, and performs pre-processing and zero-mean processing on the data; Through the initial template function stored in the wearable device, the data collected during the sustained motion of the wearer is identified; Step 2: select the data of the statistical action after pre-processing and zero-mean processing during sustained motion, construct the selected data into an analysis matrix, solve the singular value and singular vector of the analysis matrix, and subtract the mean value of the first left singular vector from the updated template function; according to the updated template function, determine the detection threshold; Step 3: the wearable device collects data in real time during the wearer's motion, and performs pre-processing and zero-mean processing on the data; for the processed data in the calculation period, filter the data through the updated template function, and count the number of wave peak and wave trough combinations that meet the detection threshold in the filtered data, which is recorded as the number of action occurrences.
2. The online learnable wearable quasi-periodic motion count method according to claim 1, wherein: The wearable device carries a multi-axis accelerometer and an initial template function, and the multi-axis accelerometer is used to collect data; the initial template function is specifically: Collect multi-axis accelerometer data of multiple same type wearers under known sustained motion, non-sustained motion and no motion conditions to form a decision tree, and the decision tree is updated using a machine learning process; through the initial template function, it is determined whether the collected multi-axis accelerometer data is data during sustained motion under the condition that the motion of the new wearer is unknown.
3. The online learnable wearable quasi-periodic motion count method according to claim 2, wherein: The pre-processing and zero-mean processing of the data is specifically: According to the acceleration data collected by the multi-axis accelerometer, a resultant acceleration module value is calculated to obtain , t is a data time domain serial number; For the sum of the acceleration module data The zero mean value data is obtained by performing zero mean value processing ; wherein, is obtained by performing mean filtering, and the filtering window length is not less than 4 times the duration of the first action.
4. The online learnable wearable quasi-periodic motion count method according to claim 1, wherein: The selected statistical action in step 2 is the data after preprocessing and zero mean processing during continuous motion , and an MxN dimensional analysis matrix A is constructed; wherein M is the data length corresponding to one motion period, N is the number of motion periods analyzed, and N>M, and L>MxN.
5. The wearable online learnable quasi-periodic motion count method according to claim 4, wherein: The first left singular vector of the analysis matrix A is selected in step 2 Subtracting the mean value Is a template function g; Detection threshold Is: wherein, and is the norm and norm of the template function g; is the ratio of the first singular value of the analysis matrix A to the sum of all singular values.
6. The wearable online learnable quasi-periodic motion count method according to claim 5, wherein: The step 3 in the above formula is to calculate the data after pre-processing and zero-mean processing in the calculation period , calculate the convolution of the template function g to obtain the filtered data ; if , , then and are combined as the number of times of action occurrence.
7. The wearable online learnable quasi-periodic motion count method according to claim 1, wherein: If the wearer changes or the wearable device self-evaluation action frequency statistical result is lower than expected, step 1 is re-executed to retrain the template function.
8. A computer device comprising a memory, a processor, and a computer program stored on the memory, wherein: The processor executes the computer program to implement the steps of the method of any one of claims 1 to 7.
9. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that: The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Ballistocardiogram signal denoising method based on multi-channel singular spectrum analysis
CN113786191A
Fitness exercise detection method, electronic equipment and storage medium
CN115645886A