CN116943130A - Counting method, counting device, counting equipment and storage medium - Google Patents

Counting method, counting device, counting equipment and storage medium Download PDF

Info

Publication number
CN116943130A
CN116943130A CN202210391664.XA CN202210391664A CN116943130A CN 116943130 A CN116943130 A CN 116943130A CN 202210391664 A CN202210391664 A CN 202210391664A CN 116943130 A CN116943130 A CN 116943130A
Authority
CN
China
Prior art keywords
signal
determining
target
interval
value
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
CN202210391664.XA
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.)
Guangdong Coros Sports Technology Co Ltd
Original Assignee
Guangdong Coros Sports 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 Guangdong Coros Sports Technology Co Ltd filed Critical Guangdong Coros Sports Technology Co Ltd
Priority to CN202210391664.XA priority Critical patent/CN116943130A/en
Publication of CN116943130A publication Critical patent/CN116943130A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B71/00Games or sports accessories not covered in groups A63B1/00 - A63B69/00
    • A63B71/06Indicating or scoring devices for games or players, or for other sports activities
    • A63B71/0619Displays, user interfaces and indicating devices, specially adapted for sport equipment, e.g. display mounted on treadmills
    • A63B71/0669Score-keepers or score display devices
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B71/00Games or sports accessories not covered in groups A63B1/00 - A63B69/00
    • A63B71/06Indicating or scoring devices for games or players, or for other sports activities
    • A63B71/0619Displays, user interfaces and indicating devices, specially adapted for sport equipment, e.g. display mounted on treadmills
    • A63B2071/0658Position or arrangement of display
    • A63B2071/0661Position or arrangement of display arranged on the user
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B2220/00Measuring of physical parameters relating to sporting activity
    • A63B2220/17Counting, e.g. counting periodical movements, revolutions or cycles, or including further data processing to determine distances or speed

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Physical Education & Sports Medicine (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The invention discloses a counting method, a counting device, counting equipment and a storage medium. The method comprises the following steps: quaternion calculation is carried out on the acceleration data and the gyroscope data, and a four-dimensional space attitude signal is obtained; determining a peak position sequence or a trough position sequence corresponding to each dimension according to the intensity of the four-dimensional space attitude signal; partitioning the four-dimensional space attitude signal according to the wave crest position sequence or the wave trough position sequence to obtain interval signals corresponding to each dimension; determining a target motion feature vector according to the interval signal; and determining an action count value according to the target motion characteristic vector. According to the technical scheme, the characteristic of the reciprocating change of the spatial posture of the equipment in the process of the strength training action is utilized to periodically detect a certain description signal of the spatial posture, so that the reciprocating change of the spatial posture is counted, and counting statistics of the strength training action is correspondingly carried out.

Description

Counting method, counting device, counting equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of intelligent wearable equipment, in particular to a counting method, a counting device, counting equipment and a storage medium.
Background
The base group of the current exercise is larger, and in order to achieve scientific exercise effect, the exercise executives pay attention to the duration of the exercise and the number of actions. The existing counting method depends on the established fitness training actions, can make constraint and assumption on action execution, and neglects subjectivity of people. On the other hand, acceleration and gyroscope signals in the existing counting method cannot intuitively describe the strength training actions, and the accuracy of counting can be affected to a certain extent due to inaccurate period determination of some repeated strength training actions.
Disclosure of Invention
The embodiment of the invention provides a counting method, a counting device, counting equipment and a storage medium, which can realize counting statistics of single-type and stable repeated strength training actions without depending on any given body-building strength training actions.
According to an aspect of the present invention, there is provided a counting method including:
quaternion calculation is carried out on the acceleration data and the gyroscope data, and a four-dimensional space attitude signal is obtained;
determining a peak position sequence or a trough position sequence corresponding to each dimension according to the intensity of the four-dimensional space attitude signal;
Partitioning the four-dimensional space attitude signal according to the wave crest position sequence or the wave trough position sequence to obtain interval signals corresponding to each dimension;
determining a target motion feature vector according to the interval signal;
and determining an action count value according to the target motion characteristic vector.
According to another aspect of the present invention, there is provided a counting device comprising:
the resolving module is used for resolving quaternion of the acceleration data and the gyroscope data to obtain a four-dimensional space attitude signal;
the first determining module is used for determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the intensity of the four-dimensional space attitude signal;
the partitioning module is used for partitioning the four-dimensional space attitude signal according to the wave crest position sequence or the wave trough position sequence to obtain interval signals corresponding to all dimensions;
the second determining module is used for determining a target motion characteristic vector according to the interval signal;
and the third determining module is used for determining an action count value according to the target motion characteristic vector.
According to another aspect of the present invention, there is provided an electronic apparatus including:
At least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the counting method according to any one of the embodiments of the invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to perform a counting method according to any one of the embodiments of the present invention.
According to the embodiment of the invention, the quaternion calculation is carried out on the acceleration data and the gyroscope data to obtain four-dimensional space attitude signals, a peak position sequence or a trough position sequence corresponding to each dimension is determined according to the intensity of the four-dimensional space attitude signals, the four-dimensional space attitude signals are partitioned according to the peak position sequence or the trough position sequence to obtain interval signals corresponding to each dimension, the target motion feature vector is determined according to the interval signals, and the action count value is determined according to the target motion feature vector. According to the embodiment of the invention, the IMU sensor signal is converted into the quaternion domain capable of describing the spatial gesture of the equipment, the acceleration and gyroscope signals which cannot intuitively describe the force training action are converted into gesture fluctuation signals capable of spatially representing the change of the action direction, the counting detection rate of weak and shaking periodic actions is improved, and particularly for a high-weight force training scene, the counting failure caused by slow action and muscle shaking is reduced.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
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 will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a counting method in an embodiment of the invention;
FIG. 2 is a flow chart of another counting method in an embodiment of the invention;
FIG. 3 is a schematic diagram of a sliding window update rule according to an embodiment of the present invention;
FIG. 4a is a schematic diagram of a pseudo-peak in an embodiment of the invention;
FIG. 4b is a schematic illustration of a false trough in an embodiment of the present invention;
FIG. 5 is a schematic diagram of a method for calculating an overlap ratio in an embodiment of the present invention;
FIG. 6 is a schematic diagram of a counting device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device implementing a counting method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a counting method in an embodiment of the present invention, where the method may be applied to counting, and the method may be performed by a counting device in an embodiment of the present invention, where the device may be implemented in software and/or hardware, as shown in fig. 1, and the method specifically includes the following steps:
and S101, performing quaternion calculation on the acceleration data and the gyroscope data to obtain a four-dimensional space attitude signal.
It should be noted that the acceleration data may be data obtained by windowing raw data of the axis of the acceleration sensor 3, and the raw data of the axis of the acceleration sensor 3 may be data output by the acceleration sensor, which is a device for measuring acceleration force by sensing acceleration and converting the acceleration into an electrical signal. The gyro data may be raw data of the axis of the gyro sensor 3, in particular, data output by the gyro sensor, which is a device for measuring or maintaining azimuth and angular velocity. In the embodiment of the invention, the acceleration sensor and the gyroscope sensor can be IMU (Inertial Measurement Unit ) sensors on the intelligent watch/bracelet, and the aim of counting is achieved by measuring the direction and the acceleration force to judge whether the intelligent watch/bracelet equipment moves or not. The acceleration data and the gyroscope data can be acquired by adopting the same sampling frequency, and the collected data is matched with the type of exercise performed by the user, so that the walking number, the calorie consumption and the like of the user are monitored. The IMU sensor is a device for measuring three-axis attitude angles (or angular rates) and accelerations of an object, and in general, the IMU sensor is composed of three single-axis accelerometers and three single-axis gyroscopes, the accelerometers detect acceleration signals of the object on independent three axes of a carrier coordinate system, the gyroscopes detect angular velocity signals of the carrier relative to a navigation coordinate system, and the attitude of the object can be calculated after the signals are processed.
The quaternion calculation refers to performing attitude calculation on acceleration data and gyroscope data by using a quaternion method, and quaternion can represent a euler axis and a required rotation angle in time when rigid body attitude transformation.
The four-dimensional space attitude signal may be a signal obtained by performing quaternion calculation on the acceleration data and the gyroscope data.
Specifically, acquiring the initial data of the 3-axis of the acceleration sensor and the initial data of the 3-axis of the gyroscope sensor, performing windowing processing on the initial data of the 3-axis of the acceleration sensor to obtain acceleration data, and performing quaternion calculation on the acceleration data and the initial data of the 3-axis of the gyroscope sensor to obtain a four-dimensional space attitude signal.
The quaternion calculation is carried out on the acceleration 3-axis signal and the gyroscope 3-axis signal, the sensor signal is converted into the equipment space gesture fluctuation signal which can describe the force training action, the reciprocating action of the force training corresponds to the fluctuation repetition of the space gesture signal, and the weak and jittery action signal is changed into the obvious and stable space gesture signal.
S102, determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the intensity of the four-dimensional space attitude signal.
The peak position sequence may be a sequence formed by using a four-dimensional spatial posture signal as all the peak positions in the wave signal, and the trough position sequence may be a sequence formed by using a four-dimensional spatial posture signal as all the trough positions in the wave signal.
In the actual operation process, signals in different dimensions of the four-dimensional space attitude signals after calculation are respectively used as fluctuation signals for describing the space attitude change, and peaks and troughs in the fluctuation signals represent the periodic starting points or the periodic ending points of the space attitude reciprocation. Therefore, finding peaks and troughs on the fluctuation signals of each dimension of the four-dimensional spatial attitude signal is a key for determining the spatial attitude reciprocating interval.
Specifically, the four-dimensional space attitude signal is subjected to windowing processing to obtain a four-dimensional space attitude signal in the window, second-order difference is carried out on the four-dimensional space attitude signal in the window to obtain the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window, namely, the positions of the wave crest and the wave trough, the height difference reference value corresponding to the window is determined according to the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window (preferably, 1/6 of the difference value between the maximum value and the minimum value can be used as the height difference reference value), and the wave crest position sequence or the wave trough position sequence corresponding to each dimension is determined according to the height difference reference value corresponding to each window.
And S103, partitioning the four-dimensional space attitude signal according to the peak position sequence or the trough position sequence to obtain interval signals corresponding to all dimensions.
The section signal may be a signal of each section obtained by dividing the four-dimensional spatial posture signal.
Specifically, after determining the peak position sequence or the trough position sequence corresponding to each dimension, partitioning the four-dimensional space attitude signal by taking the peak position sequence or the trough position sequence as a demarcation point, so as to obtain a section signal corresponding to each dimension.
S104, determining a target motion characteristic vector according to the interval signal.
It should be noted that the target motion feature vector may be a motion feature vector corresponding to a motion feature of counting based on interval signal extraction, and may be used to describe a signal change characteristic of a reciprocating motion on the original acceleration data layer.
Specifically, the confidence coefficient of the adjacent interval signal is obtained, and the target motion feature vector is extracted for the continuous and stable high-confidence interval signal.
S105, determining an action count value according to the target motion characteristic vector.
The action count value may be a count value of an action currently being performed by the user.
Specifically, an action fingerprint is determined, and an overlapping area of the target motion feature vector and the action fingerprint is checked to determine an action count value.
According to the embodiment of the invention, the quaternion calculation is carried out on the acceleration data and the gyroscope data to obtain four-dimensional space attitude signals, a peak position sequence or a trough position sequence corresponding to each dimension is determined according to the intensity of the four-dimensional space attitude signals, the four-dimensional space attitude signals are partitioned according to the peak position sequence or the trough position sequence to obtain interval signals corresponding to each dimension, the target motion feature vector is determined according to the interval signals, and the action count value is determined according to the target motion feature vector. According to the embodiment of the invention, the IMU sensor signal is converted into the quaternion domain capable of describing the spatial gesture of the equipment, the acceleration and gyroscope signals which cannot intuitively describe the force training action are converted into gesture fluctuation signals capable of spatially representing the change of the action direction, the counting detection rate of weak and shaking periodic actions is improved, and particularly for a high-weight force training scene, the counting failure caused by slow action and muscle shaking is reduced.
Example two
Fig. 2 is a flowchart of another counting method according to an embodiment of the present invention, which is optimized based on the above-mentioned embodiment. In this embodiment, quaternion calculation may be performed on the acceleration data and the gyroscope data, and the four-dimensional spatial attitude signal obtained may be specifically expressed as: acquiring acceleration data and gyroscope data; carrying out window division processing on the acceleration data to obtain acceleration data in a window; and performing quaternion calculation on the acceleration data and the gyroscope data in the window to obtain a four-dimensional space attitude signal.
Meanwhile, in the second embodiment, the peak position sequence or the trough position sequence corresponding to each dimension determined according to the strength of the four-dimensional spatial gesture signal may be further described as: carrying out window division processing on the four-dimensional space attitude signals to obtain four-dimensional space attitude signals in the window; obtaining the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window; determining a height difference reference value corresponding to the window according to the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window; and determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the height difference reference value corresponding to each window.
Specifically, in the second embodiment, determining the target motion feature vector according to the interval signal may be further performed as: acquiring confidence coefficient of adjacent interval signals; and determining the average value of the motion characteristic vectors of each interval signal in the target space gesture signal as a target motion characteristic vector, wherein the target space gesture signal comprises a preset number of continuous adjacent interval signals with confidence degrees larger than a confidence degree threshold value.
Further, in the second embodiment, determining the action count value according to the target motion feature vector may be specifically expressed as: and if the overlapping proportion of the motion characteristic vector and the target motion fingerprint vector is greater than or equal to a proportion threshold value, counting the motions corresponding to the target motion fingerprint vector.
As shown in fig. 2, another counting method in the embodiment of the present invention specifically includes the following steps:
s201, acquiring acceleration data and gyroscope data.
Specifically, the same sampling frequency can be used for collecting the initial data of the acceleration sensor 3 axis and the initial data of the gyroscope sensor 3 axis of the IMU sensor on the intelligent watch/bracelet.
In the actual operation process, the sampling frequency of the original acceleration data will influence whether the key information of the common fast/slow strength training actions can be truly restored. Considering that the counting method provided by the embodiment of the invention is applied to the intelligent watch/bracelet with limited storage and calculation speed, on the premise of considering both power consumption and performance, the sampling rate of the acceleration is preferably determined to be 25Hz, namely 25 acceleration x-axis sampling values, 25 acceleration y-axis sampling values and 25 acceleration z-axis sampling values are obtained per second.
S202, carrying out windowing processing on the acceleration data to obtain acceleration data in a window.
It can be known that the windowing process can be a process of setting a window with a fixed duration, processing data in the window, and then sliding the window according to a set step length, so as to realize the process of the whole data.
In the actual operation process, considering the duration of a single action in a single group of action in daily engaged strength training actions and the possible repeated times of a certain action in the single group of training, the data windowing size of the raw data of the 3-axis of the acceleration sensor influences whether enough continuous action information can be observed in a window. By counting a certain scale of real user data sets, the length of a data window is preferably determined to be 15 seconds, namely, the original data of the 3-axis of the acceleration sensor is cached, and the caching length corresponds to the action duration of 15 seconds. To ensure that the complete motion signal is observed as much as possible within a single window, the windowing process preferably uses a 1 second sliding update rule at the same time.
Fig. 3 is a schematic diagram of a sliding window updating rule according to an embodiment of the present invention. As shown in fig. 3, the length of the data window is set to 15 seconds, and the sliding windows are sequentially t1, t2 and t3, that is, the start time of the sliding windows of the acceleration x-axis, the y-axis and the z-axis at the time t1 is 15 seconds, the start time of the sliding windows of the acceleration x-axis, the y-axis and the z-axis at the time t2 is 16 seconds, and the start time of the sliding windows of the acceleration x-axis, the y-axis and the z-axis at the time t3 is 2 seconds and the end time of the sliding windows is 17 seconds according to the 1 second sliding update rule.
In the actual operation process, under the condition that the original data of the acceleration sensor 3 axis with the size of the data window being fully filled is obtained, the low-pass filtering with the cut-off frequency not lower than 2.5Hz can be respectively carried out on the original data of the acceleration sensor 3 axis so as to remove the interference caused by the measurement noise and the action jitter of the signals. The selection of a specific low-pass filtering method will affect the speed of the filtering convergence, the distortion of the signal waveform and the storage calculation overhead. Preferably, the low-pass filtering method selects Butterworth low-pass filtering with the order of 2, and cuts off the first 8 filtered data in the filtering execution process so as to shield miscounting caused by jitter of signal waveforms in the filtering convergence process.
In the data windowing processing and filtering preprocessing provided by the embodiment of the invention, key parameters and settings are determined based on comprehensive real strength training users and data set optimization.
And S203, performing quaternion calculation on the acceleration data and the gyroscope data in the window to obtain a four-dimensional space attitude signal.
Specifically, quaternion calculation is performed on the obtained acceleration data after low-pass filtering and the gyroscope data with the same sampling frequency, and a complementary filtering means is adopted for quaternion calculation to obtain a four-dimensional space attitude signal with the same frequency, which can be used Making a representation in which->And->Each representing a spatial pose signal of a dimension of the four-dimensional spatial pose signal. The four-dimensional spatial attitude signal includes 4 dimensions, and the spatial attitude signal in each dimension can be +.>(i represents the number of dimensions, i=0, 1,2, 3), wherein,/-is>First data representing the spatial attitude signal in each dimension, and so on, +.>N-th data representing the spatial pose signal in each dimension, n representing the length of any dimension after the quaternion solution.
S204, carrying out windowing processing on the four-dimensional space attitude signals to obtain four-dimensional space attitude signals in the window.
In the actual operation process, due to the four-dimensional space attitude signal after the solutionThere may be a direct current component and a low frequency drift, so that a high-pass filtering process may be performed on the spatial pose signal of each dimension of the four-dimensional spatial pose signal. After the real user data set with a certain scale is optimized, the cut-off frequency of the high-pass filtering is preferably determined to be 0.2Hz, waveform distortion and storage calculation cost are comprehensively considered, and the high-pass filtering method adopts the Bart Wo Zigao with the order of 2.
Then, the four-dimensional space attitude signal which is preprocessed by high-pass filtering The spatial attitude signals of each dimension are subjected to windowing respectively, and the length of the data window is ensured to ensure that at least 2 complete action signals can be seen in a single window. Through statistics on a real user data set of a certain scale, it is preferable to determine that the length of the data window is 6 seconds, and the windowing process simultaneously adopts a 1 second sliding update rule, where the specific sliding update rule is consistent with the method in step S202, and the determination of the sliding step length of 1 second is based on the consideration of reducing the counting delay as much as possible, which is not described in detail herein. It should be noted that the sliding step length can be adjusted for different hardware computing execution speeds and application requirements, but should not be greater than 1/2 of the data window length.
After the processing of the steps, the spatial attitude signals in all dimensions are processed(i represents the number of dimensions, i=0, 1,2, 3) the spatial attitude signal in each dimension obtained by high-pass filtering can be represented by Q i ={q i0 ,q i1 ,…,q i(n-1) I represents the number of dimensions, i=0, 1,2,3, where q i0 First data representing a spatial attitude signal in each dimension obtained by high-pass filtering, and the likePush, q i(n-1) N-th data representing the spatial attitude signal in each dimension obtained by performing the high-pass filtering process, n representing +_ for the spatial attitude signal in each dimension >(i represents the number of dimensions, i=0, 1,2, 3) the quaternion after the high-pass filtering process is performed, and the length of any dimension is calculated. It should be noted that the size of n is equal to 150 in this operation, that is, 25 times 6, where 25 is the acceleration and the sampling rate of the gyroscope is 25hz and 6 is the length of the determination data window.
S205, obtaining the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window.
Specifically, the four-dimensional space attitude signalAs a wave signal describing the change of the spatial pose, respectively, the peaks and troughs in such wave signal characterize the periodic start or end of the spatial pose reciprocation. Thus, in four dimensions the spatial attitude signal +.>Finding peaks and troughs on the fluctuation signals of each dimension is a key for determining the space attitude reciprocating interval. Four-dimensional spatial gesture signal in window +.>Spatial attitude signal Q of each dimension of (2) i ={q i0 ,q i1 ,…,q i(n-1) Second order difference is carried out on the (i represents the number of dimensions, i=0, 1,2,3, n represents the length of any dimension after the quaternion solution of the spatial attitude signal in each dimension is carried out on the spatial attitude signal in each dimension so as to determine four-dimensional spatial attitude signals in a window->The maximum and minimum of the intensity of (2) four-dimensional spatial pose signal within the window +. >The maximum and minimum of the intensity of (c) are peaks and troughs in the possible fluctuating signal.
S206, determining a height difference reference value corresponding to the window according to the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window.
Wherein the level difference reference value may be a minimum level difference reference value between the set peaks and valleys.
In particular, for four-dimensional spatial pose signals within a windowStatistics of the maximum and minimum values of (2), preferably, the four-dimensional spatial attitude signal within the window can be made +.>1/6 of the difference between the maximum and minimum values of (a) is used as the height difference reference value corresponding to the window, namely the minimum height difference reference value between the wave crest and the wave trough.
S207, determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the height difference reference value corresponding to each window.
Specifically, a point with larger amplitude is searched near the possible peak position of the fluctuation signal and used as a peak, a point with smaller amplitude is searched near the possible trough position of the fluctuation signal and used as a trough, the height difference between the peak and the trough is compared with a height difference reference value, and a peak position sequence and a trough position sequence which meet the definition of the peak and the trough are further screened. Wherein the peak position sequence can be used (i represents the number of dimensions, i=0, 1,2, 3), wherein,/-is>Representing peak position of first peak in peak position sequenceInformation, and so on, ++>Representing the +.>Peak position information of individual peaks, < >>The number of elements representing the peak position sequence; the sequence of trough positions can be used +.>(i represents the number of dimensions, i=0, 1,2, 3), wherein,/-is>Trough position information representing the first trough in the trough position sequence, and so on, ++>Representing the +.>Trough position information of the trough, ->The number of elements representing the sequence of trough locations.
Further, determining the peak position sequence or the trough position sequence corresponding to each dimension according to the height difference reference value corresponding to each window may specifically include the following steps:
a1, determining a target set according to the height difference reference value corresponding to each window.
It should be noted that, the target set may be a set formed by all the peak position information and the trough position information determined according to the height difference reference value corresponding to each window. Wherein, the target set comprises: peak position information and trough position information.
It should be explained that the peak position information may be position information of all existing peaks in the wave signal, and the trough position information may be position information of all existing troughs in the wave signal.
Specifically, for four-dimensional spatial attitude signals within a window as a wave signalEach dimension wave signal Q of (2) i ={q i0 ,q i1 ,…,q i(n-1) And (i represents the number of dimensions, i=0, 1,2,3, n represents the length of any dimension after the quaternion solution of the spatial attitude signals in each dimension is performed with high-pass filtering, and then all the peaks and the troughs are preliminarily determined.
B1, determining the amplitude difference value between adjacent peaks and troughs according to the peak position information and the trough position information.
Wherein the amplitude difference may be the difference in signal amplitude between adjacent peaks and troughs.
Specifically, the amplitude difference between adjacent peaks and troughs is calculated according to the peak position information and the trough position information.
And C1, determining the position information to be deleted according to the amplitude value difference between the adjacent wave crests and wave troughs.
It should be noted that the position information to be deleted may be peak position information and/or trough position information to be deleted. The position information to be deleted comprises: pseudo-peak position information and/or pseudo-trough position information.
It should be explained that the pseudo peak position information may be position information of a peak having a smaller amplitude than that of the two adjacent peaks, and the pseudo trough position information may be position information of a trough having a larger amplitude than that of the two adjacent troughs.
In the actual operation process, it is possible that part of the initially determined peaks and troughs are the cycle start points or end points of sub-action fragments in the space gesture reciprocation process, so that further screening and checking of the peak and trough position information in the target set are required.
Fig. 4a is a schematic diagram of a pseudo-peak in an embodiment of the present invention, where A, C and E are peaks and B and D are valleys, as shown in fig. 4 a. The actual point A is the single cycle starting point of a certain strength training action and is the only peak position in the cycle, but all determined peak positions comprise the point C besides the point A, and the point is a pseudo peak. The embodiment of the invention designs a determination rule of pseudo wave crest position information suitable for a strength training action signal, and the specific rule is as follows:
calculating amplitude differences between adjacent peaks and troughs, and judging that the peaks C in the second group and the third group are false peaks when the amplitude differences (between A and B) of the first group and the amplitude differences (between E and D) of the fourth group are obviously larger than the amplitude differences (between C and B) of the second group and the amplitude differences (between C and D) of the third group.
FIG. 4B is a schematic diagram of a pseudo-trough in an embodiment of the present invention, where A ', C ' and E ' are all troughs and B ' and D ' are all peaks, as shown in FIG. 4B. The actual point A ' is the single cycle starting point of a certain strength training action and is the only trough position in the cycle, but all the determined trough positions comprise the point C ' besides the point A ', and the point is the false trough. The embodiment of the invention designs a determination rule of false trough position information suitable for a strength training action signal, and the specific rule is as follows:
and calculating the amplitude difference between the adjacent peaks and the troughs, and judging the trough C ' in the second group and the third group as false trough when the amplitude difference (the amplitude difference between B ' and A ') between the first group of peaks and the trough and the amplitude difference (the amplitude difference between D ' and E ') between the fourth group of peaks and the trough are obviously larger than the amplitude difference (the amplitude difference between B ' and C ') between the second group of peaks and the trough and the amplitude difference (the amplitude difference between D ' and C ') between the third group of peaks and the trough.
Preferably, the "obvious" criterion used in the above two determination rules is 1.62, i.e. the difference in amplitude of the larger set of peaks and valleys is 1.62 times the difference in amplitude of the smaller set of peaks and valleys.
And D1, determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the target set and the position information to be deleted.
Specifically, by the two determination rules, the peak positions used for marking the start point or the end point of a single period of the periodic action in a single window are determined, and the peak position sequence corresponding to each dimension can be { p } i0 ,p i1 ,…,p i(m-1) I represents the number of dimensions, i=0, 1,2,3, where p i0 Representing peak position information of a first peak in a peak position sequence corresponding to each dimension according to the target set and the position information to be deleted, and so on, p i(m-1) And (3) determining the peak position information of the mth peak in the peak position sequence corresponding to each dimension according to the target set and the position information to be deleted, wherein m represents the number of the peak position information after the operation of removing the pseudo peak and the pseudo trough. The determined trough position sequence corresponding to each dimension can be used { v } i0 ,v i1 ,…,v i(k-1) And (i represents the number of dimensions, i=0, 1,2, 3), where v i0 Representing trough position information of a first trough in a trough position sequence corresponding to each dimension according to the target set and the position information to be deleted, and so on, v i(k-1) And the wave trough position information of the kth wave trough in the wave trough position sequence corresponding to each dimension is determined according to the target set and the position information to be deleted, and k represents the number of wave trough position information after the operation of removing the pseudo wave crest and the pseudo wave trough.
In the actual operation process, because of the window sliding updating strategy, adjacent windows can determine the starting point or the end point of a single period of the same action, namely, the positions of peaks possibly deviate, so that the peaks which are originally at the same position among different windows need to be checked and combined, and the rule of combining adjacent peaks is as follows:
for any adjacent 4 peak positions { p } i0 ,p i1 ,p i2 ,p i3 (where i represents the number of dimensions, i=0, 1,2, 3) should ensure that the interval length between adjacent peaks is uniform, i.e. 4 peak positions { p } i0 ,p i1 ,p i2 ,p i3 I denotes the number of dimensions, i=0, 1,2, 3) constituting 3 intervals, the length of 3 intervals being denoted as { l } 0 ,l 1 ,l 2 Then when the interval length l formed by the middle 2 adjacent peaks 1 Is obviously smaller than the length l of the left and right adjacent sections 0 And l 2 At the time, peak p as the right boundary of this section i2 (i represents the number of dimensions, i=0, 1,2, 3) will be culled from the sequence of peak positions.
The peak position sequence after the cross-window combination is determined as { p } i0 ,p i1 ,…,p i(M-1) I denotes the number of dimensions, i=0, 1,2, 3), where p i0 Peak position information representing the first peak in the sequence of peak positions combined across windows, and so on, p i(M-1) And representing the peak position information of the M-th peak in the peak position sequence after cross-window combination, wherein M is the number of the peak position information in the updated peak position sequence.
The embodiment of the invention extracts the wave crest position information on the spatial gesture fluctuation signals of each dimension of the four-dimensional spatial gesture signal, superimposes the pseudo peak and pseudo valley removing strategies, and simultaneously combines the wave crest position information among cross windows, thereby effectively determining the starting point or the end point position of the force training action cycle.
And S208, partitioning the four-dimensional space attitude signal according to the peak position sequence or the trough position sequence to obtain interval signals corresponding to all dimensions.
For example, the following describes a case where the four-dimensional spatial gesture signal is partitioned according to the peak position sequence, and a section signal corresponding to each dimension is obtained.
Specifically, through the steps, the wave crest position sequence { p } for marking the starting point or the end point of a single periodic action is respectively found on the 4-dimensional space gesture fluctuation signals of the four-dimensional space gesture signal i0 ,p i1 ,…,p i(M-1) (where i represents the number of dimensions, i=0, 1,2,3, m is the number of peak position information in the updated peak position sequence), and the determined peak position sequence is used as a demarcation point for dividing the window data of the low-pass filtered acceleration data, so as to obtain a group 4 interval signal { L } 0 ,L 1 ,L 2 ,L 3 Each family of interval signals L i The determination of (i=0, 1,2, 3) is based on the reciprocal fluctuation characteristics of the four-dimensional spatial pose signal for each dimension, i.e., from the sequence { p } of peak positions in this dimension i0 ,p i1 ,…,p i(M-1) And (where i represents the number of dimensions, i=0, 1,2,3, m is the number of peak position information in the updated peak position sequence). Wherein the family of interval signals corresponding to each dimension is formed by an acceleration 3-axis interval signal { L } ix ,L iy ,L iz And (i) represents the number of dimensions, i=0, 1,2, 3). Taking the x-axis as an example, wherein the acceleration x-axis is the interval signal L ix According to { p } i0 ,p i1 ,…,p i(M-1) The position of the peak of the frequency (i represents the number of dimensions, i=0, 1,2,3, M is the number of pieces of peak position information in the updated peak position sequence) is divided into M section signals on the x-axis of acceleration as an index valueCan be made ofComposition, wherein i represents the number of dimensions, i=0, 1,2,3, j represents the j-th interval, j=0, 1, …, m+1, where M is the number of interval signals on the x-axis of acceleration, where p ij And p i(j+1) For the sequence { p } of 2 wave peak positions adjacent in each dimension of the ith four-dimensional space attitude signal i0 ,p i1 ,…,p i(M-1) The element in (i represents the number of dimensions, i=0, 1,2,3, m is the number of interval signals on the x-axis of acceleration) determines the original acceleration interval signal.
S209, obtaining the confidence coefficient of the adjacent interval signals.
In this embodiment, the confidence of the adjacent interval signal may be the confidence of the similarity and stability of the adjacent interval signal.
In the actual operation process, the consistency or gradual change of the motion speed of the two adjacent actions of the single group is considered in the execution process of the daily strength training actions, so that the confidence level used for evaluating the stability of the signals of the adjacent intervals is realized based on the time length of the signals of the adjacent intervals.
Further, the confidence of acquiring the adjacent interval signal may be specifically the following steps:
a2, acquiring the duration time of the adjacent interval signal and the cross correlation coefficient of the adjacent interval signal.
Wherein the duration of the adjacent interval signal may be the time length of the adjacent interval signal. In particular, the duration of adjacent interval signals may be from the start time of the first signal of an interval to the end time of the last signal of the interval.
It should be noted that the cross-correlation coefficient may be a cross-correlation coefficient obtained by performing cross-correlation calculation on two adjacent interval signals.
Specifically, the acceleration x-axis in the i-th dimension of the four-dimensional spatial attitude signal is described as an example. Setting adjacent interval signals of acceleration And->The duration of (a) is +.>And->Where i denotes the number of dimensions, i=0, 1,2,3, j denotes the j-th interval, j=0, 1, …, m+1 (where M is the number of interval signals on the x-axis of acceleration), if the ratioWhen the ratio is greater than or equal to a certain threshold T1 and greater than or equal to a certain threshold T2 (T1 is smaller than T2)Is forcedly modified to 1; if the ratio is->When the ratio is greater than or equal to a certain threshold T1 and less than a certain threshold T2 (T1 is less than T2), the ratio +.>Is forcedly modified to 0. The advantage of this design is to ensure that the difference in time length does not affect the magnitude of the confidence level in the case where the adjacent two action execution periods differ little.
For 2 adjacent interval signals, there is typically a difference in signal time length. The embodiment of the invention adopts the interpolation resampling of the sequence with shorter signal length, and expands the length of the sequence to be consistent with the sequence with longer length. Under the condition of consistent length, performing cross-correlation calculation on the interval signal subjected to the interpolation resampling and the interval signal adjacent to the interval signal to obtain cross-correlation coefficients of two adjacent interval signals, wherein the cross-correlation coefficient of the jth interval and the jth+1th interval can be R j(j+1) A representation is made, where j represents the j-th interval, j=0, 1, …, m+1 (where M is the number of interval signals on the x-axis of acceleration). It should be noted that in case the cross-correlation coefficient is smaller than 0, it will be forcefully modified to 0, i.e. statistically negative cross-correlation coefficient is considered strictly uncorrelated.
And B2, determining the confidence coefficient of the adjacent interval signal according to the duration time of the adjacent interval signal and the cross-correlation coefficient of the adjacent interval signal.
Specifically, taking the acceleration x axis in the ith dimension of the four-dimensional spatial attitude signal as an example after the duration of the adjacent interval signal and the cross-correlation coefficient of the adjacent interval signal are obtained, the confidence that the similarity and stability of the adjacent interval signal are comprehensively considered is defined as:
wherein P is conf Representing the confidence of the adjacent interval signals,and->For two adjacent interval signals of acceleration,and->Respectively acceleration adjacent interval signals->And->Duration of R j(j+1) For adjacent interval signal->And->I represents the number of dimensions, i=0, 1,2,3, j represents the j-th interval, j=0, 1, …, m+1 (where M is the number of interval signals on the x-axis of acceleration).
Since the division of the interval signal is extracted after sliding the window, a certain interval signal may be in the middle of the current window or at the tail of the previous sliding window, so that the same interval signal may have different confidence in different sliding windows. The embodiment of the invention considers that the confidence coefficient is mainly used for measuring the periodicity and the stability of the action execution, so that the confidence coefficient from the signal of the interval to the current maximum is always selected as the input of the subsequent steps.
The confidence degree calculation for the stability of the fusion action duration and the consistency of the action form is carried out on the adjacent interval signals, the similarity and the stability of the front action period and the rear action period are quantized into probability models, and the dependence on the manually set rules can be reduced.
S210, determining the average value of the motion characteristic vectors of each interval signal in the target space gesture signal as a target motion characteristic vector.
In this embodiment, the target spatial pose signal may be a continuous stable high confidence interval signal. The target space attitude signal comprises a preset number of continuous adjacent interval signals with confidence degrees larger than a confidence degree threshold value.
The preset number may be the logarithm of the continuous adjacent interval signal preset according to the actual situation, and preferably, the preset number may be 4 pairs. The confidence threshold may be a value of confidence of the adjacent interval signal preset according to actual conditions, and preferably, the confidence threshold may be 0.8.
The motion feature vector may be a vector representation of motion features of the acceleration 3-axis section signal within the section.
Specifically, the average value of the motion feature vector of each interval signal in the target space gesture signal is calculated, and the average value of the motion feature vector of each interval signal in the target space gesture signal is determined to be the target motion feature vector.
Further, before determining the average value of the motion feature vector of each interval signal in the target spatial pose signal as the target motion feature vector, the method further includes:
a3, acquiring a 90-minute numerical value and a 10-minute numerical value of each interval signal in the target space attitude signal.
The 90-bit value may include a 90-bit value of an acceleration x-axis, a 90-bit value of an acceleration y-axis, and a 90-bit value of an acceleration z-axis of each section signal in the target spatial gesture signal, and the 10-bit value may include a 10-bit value of an acceleration x-axis, a 10-bit value of an acceleration y-axis, and a 10-bit value of an acceleration z-axis of each section signal in the target spatial gesture signal.
Specifically, the motion characteristics of signals of 3 axes in the section are calculated on 3 axes of the acceleration sensor data according to the division of the section signals, and the characteristics for describing the motion include: the 90 and 10 decimal values for the x-axis of acceleration, the 90 and 10 decimal values for the y-axis of acceleration, and the 90 and 10 decimal values for the z-axis of acceleration.
And B3, determining the motion characteristic vector of each interval signal in the target space attitude signal according to the 90-bit numerical value and the 10-bit numerical value of each interval signal in the target space attitude signal.
Specifically, the motion feature vector of each section signal in the target spatial posture signal determined according to the 90-bit numerical value and the 10-bit numerical value of each section signal in the target spatial posture signal may be expressed as:
wherein,,a motion feature vector is represented, i represents a dimension number, i=0, 1,2,3, j represents a j-th section, j=0, 1, …, m+1 (where M is the number of section signals on the acceleration X-axis), frc (c, X) represents a calculated c-bit value for the signal X, that is, frc (90, X) represents a 90-bit value on the acceleration X-axis, frc (10, X) represents a 10-bit value on the acceleration X-axis, frc (90, y) represents a 90-bit value on the acceleration y-axis, frc (10, y) represents a 10-bit value on the acceleration y-axis, frc (90, z) represents a 90-bit value on the acceleration z-axis, and frc (10, z) represents a 10-bit value on the acceleration z-axis.
Further, the confidence of acquiring the adjacent interval signal may be specifically the following steps:
a4, if at least two target space attitude signals exist, obtaining the significance factor of each target space attitude signal.
In this embodiment, the saliency factor may be a factor used to describe the degree of confidence that accompanies each dimension of the target spatial pose signal, and the saliency factor should be represented as the saliency of the motion within that interval in the quadrant of the target spatial pose signal.
Specifically, for each dimension of the target spatial pose signal, if, over a certain dimension, and only if the confidence of a consecutive preset number (preferably, the preset number may be 4) of interval signals exceeds a confidence threshold (preferably, the confidence threshold may be 0.8), that dimension is considered as an alternative target spatial pose signal dimension for count tracking. When more than 1 alternative dimension exists at the same time, the alternative dimension with the largest sum of the signal significance factors of each interval under a single dimension is selected as the dimension of the target space gesture signal for counting and tracking finally determined.
The reason why the above principle is adopted in the embodiment of the present invention is that, in the case of approaching measures for describing the motion periodicity and stability, it is quite conservative to select a dimension that can describe the motion more significantly.
The process of obtaining the saliency factor of each target space attitude signal is as follows: when the confidence degrees of the target space gesture signals in 4 dimensions are similar, reasonable target space gesture signal dimensions are selected as the basis of tracking and matching counting, and a significance factor accompanying the confidence degrees in the target space gesture signal dimensions needs to be described, wherein the significance factor is expressed in the significance of actions in the interval division under the target space gesture signal quadrant.
Further, the obtaining the saliency factor of each target space gesture signal may be specifically the following steps:
a. and obtaining the difference value between the 75-minute value and the 25-minute value of each interval signal in each target space attitude signal.
The 75-bit value may include a 75-bit value of an acceleration x-axis, a 75-bit value of an acceleration y-axis, and a 75-bit value of an acceleration z-axis of each section signal in the target spatial gesture signal, and similarly, the 25-bit value may include a 25-bit value of an acceleration x-axis, a 25-bit value of an acceleration y-axis, and a 25-bit value of an acceleration z-axis of each section signal in the target spatial gesture signal.
Specifically, the difference between the 75-minute value and the 25-minute value of each axis of the acceleration sensor data in the section is calculated. This fractional difference quantifies the significance of the fluctuation of an axis of acceleration within this interval segment, and the significance factor ultimately used to characterize the interval signal is defined as the maximum of the 3-axis fractional differences of acceleration.
b. The sum of the differences of the 75-and 25-ary values of the interval signals in the target spatial pose signal is determined as a significance factor of the target spatial pose signal.
Specifically, the saliency factor for the jth interval division in the ith dimension can be expressed as:
wherein,,representing the significance factor in the jth interval division in the ith dimension, +.>Significance factor for the jth interval division in the ith dimension of the acceleration x-axis,/->Significance factor for the jth interval division in the ith dimension of the acceleration y-axis,/->A significance factor at the jth interval division in the ith dimension of the acceleration z-axis is represented, i represents the number of dimensions, i=0, 1,2,3, j represents the jth interval, j=0, 1, …, m+1 (where M is the number of interval signals in the acceleration x-axis).
Wherein the significance factorThe calculation formula of (2) is as follows:
wherein,,representing the significance factor at the jth interval division in the ith dimension of the acceleration X-axis, frc (c, X) represents the calculation of the c-score value for signal X, i.e.>Representing interval signals75-decimal places of>Representing interval signal +.>I represents the number of dimensions, i=0, 1,2,3, j represents the j-th interval, j=0, 1, …, m+1 (where M is the number of interval signals on the x-axis of the acceleration).
Wherein the significance factorThe calculation formula of (2) is as follows:
wherein,,representing the significance factor at the jth interval division in the ith dimension of the acceleration y-axis, frc (c, X) representing the computation of the c-score value for signal X I.e. +.>Representing interval signals75-decimal places of>Representing interval signal +.>I represents the number of dimensions, i=0, 1,2,3, j represents the j-th interval, j=0, 1, …, m+1 (where M is the number of interval signals on the x-axis of the acceleration).
Wherein the significance factorThe calculation formula of (2) is as follows:
wherein,,representing the significance factor at the jth interval division in the ith dimension of the acceleration X-axis, frc (c, X) represents the computation of the c-split value for signal X. I.e. < ->Representing interval signals75-decimal places of>Representing interval signal +.>I represents the number of dimensions, i=0, 1,2,3, j represents the j-th interval, j=0, 1, …, m+1 (where M is the number of interval signals on the x-axis of the acceleration).
In the method, a significance factor is introduced into a target space attitude signal dimension strategy for tracking matching and counting, segmentation of an original acceleration signal is realized at a period starting point or an end point of space attitude change, and the significance degree of an interval signal caused by segmentation in different dimensions is compared to be used as a basis for selecting the dimension of the target space attitude signal.
The quantile-based significance factor and the action characteristic provided by the embodiment of the invention respectively play a role in determining the quadrant axis of tracking matching counting and describing the motion specificity, and have the characteristics of small calculated amount and small storage consumption.
And B4, determining the average value of the motion characteristic vectors of each interval signal in the target space attitude signals with the largest significance factor in the at least two target space attitude signals as a target motion characteristic vector.
Preferably, in the above-mentioned process of determining the dimensions of the target spatial gesture signal for count tracking, the mean value of the motion feature vectors of the first 4 interval signals in the selected target spatial gesture signal quadrant is calculated as a target motion feature vector (may also be referred to as an action fingerprint) for describing the signal variation characteristics of the reciprocating action on the original acceleration data plane.
Specifically, the calculation mode of the target motion feature vector is as follows:
wherein fv is fingerprint The motion feature vector of the object is represented,mean value of frc (90, x) is shown, frc (90, x) is the 90-decimal place value of the acceleration x-axis, +.>Mean value of frc (10, x), frc (10, x) 10-decimal place of the acceleration x-axis, +.>Mean value of frc (90, y) is shown, frc (90, y) is the 90-decimal place value of the acceleration y-axis, +.>Represents the mean value of frc (10, y), frc (10, y) represents the 10-minute value of the acceleration y-axis,mean value of frc (90, z), frc (90, z) 90-ary value of acceleration z-axis, ++>The mean value of frc (10, z) is shown, and frc (10, z) is the 10-decimal value of the acceleration z-axis.
The clustering of the embodiment of the invention is realized based on the motion characteristic vector extracted by the interval signal, the key information of the latest stable and repeated actions is automatically obtained in statistics and stored as the fingerprints for subsequent matching, and the distinguishing degree between different actions is reserved on the premise that complex clustering operation is not adopted in the determination of the action fingerprints.
S211, if the overlapping proportion of the motion characteristic vector and the target motion fingerprint vector is greater than or equal to a proportion threshold, counting the motion corresponding to the target motion fingerprint vector.
The target motion fingerprint vector may be the target motion feature vector.
The overlapping ratio may be a ratio of overlapping areas of the motion feature vector and the target motion fingerprint vector.
The ratio threshold may be a value of a ratio of the overlapping area of the motion feature vector and the target motion fingerprint vector, which is preset according to the actual situation, and this embodiment is not limited thereto.
Fig. 5 is a schematic diagram of a method for calculating an overlap ratio in an embodiment of the present invention. As shown in fig. 5, { frc 90, frc10} of the motion feature vector (i.e., the motion feature vector) of the new section signal is calculated, { frc 90, frc10} of the stored motion fingerprint (i.e., the target motion fingerprint vector) is calculated, and the overlapping ratio of { frc 90, frc10} of the motion feature vector (i.e., the motion feature vector) and the motion fingerprint (i.e., the target motion fingerprint vector) of the new section signal is calculated.
Specifically, fingerprint matching and probability output estimation are carried out on the subsequent interval signals. After determining the dimension of the target spatial gesture signal to be tracked, the subsequent counting process of the strength training actions only needs to do steps S201 to S210 on the dimension of the target spatial gesture signal that has been selected.
Motion feature vector derived for motion features of subsequently calculated new interval signalVector fv corresponding to target motion fingerprint fingerprint And checking the overlapping area. If the overlapping proportion of the motion characteristic vector and the target motion fingerprint vector is greater than or equal to a proportion threshold value, counting the motions corresponding to the target motion fingerprint vector; if the overlapping proportion of the motion characteristic vector and the target motion fingerprint vector is smaller than the proportion threshold value, the motion of the new interval signal is not matched with the target motion fingerprint, and the counting of the motion is stopped.
In addition, for the interval signal conforming to the action characteristic, the corresponding confidence level P is further checked conf Only the interval signal with the confidence degree larger than the confidence degree threshold value is accepted and the counting is continued, otherwise, the interval signal is not counted in the counting statistics.
The fingerprint matching and estimated probability output provided by the embodiment of the invention calculates simpler overlapping area proportion of the motion characteristics, fuses confidence and action macro form factors, obtains the action matching probability, and realizes quantitative statistics on the strength training count in a probability mode. The output probability of fingerprint matching provided by the embodiment of the invention converts the counting problem into the pattern matching problem, realizes statistics of action counting in a quantized probability mode, and improves the counting accuracy in a probability output mode in a time dimension.
The force training counting method based on the application space posture reciprocation characteristic of the IMU sensor on the intelligent watch/bracelet, provided by the invention, does not depend on any given body-building force training action, does not restrict or presume action execution, mainly processes storage and calculation cost required by steps and calculation links, and is suitable for implementation on embedded equipment with limited resources. According to the embodiment of the invention, the IMU sensor signal is converted into the quaternion domain capable of describing the spatial gesture of the equipment, so that the acceleration and gyroscope signals which cannot intuitively describe the force training action are converted into gesture fluctuation signals capable of spatially representing the change of the action direction, the counting detection rate of weak and shaking periodic actions is improved, and particularly for a high-weight force training scene, the counting failure caused by slow action and muscle shaking is reduced.
Example III
Fig. 6 is a schematic structural diagram of a counting device in an embodiment of the invention. This embodiment may be applied to counting situations, and the apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in any device that provides a counting function, as shown in fig. 6, where the counting apparatus specifically includes: a resolving module 301, a first determining module 302, a partitioning module 303, a second determining module 304 and a third determining module 305.
The resolving module 301 is configured to perform quaternion resolving on the acceleration data and the gyroscope data to obtain a four-dimensional spatial attitude signal;
a first determining module 302, configured to determine a peak position sequence or a trough position sequence corresponding to each dimension according to the intensity of the four-dimensional spatial gesture signal;
the partitioning module 303 is configured to partition the four-dimensional spatial gesture signal according to the peak position sequence or the trough position sequence, so as to obtain a section signal corresponding to each dimension;
a second determining module 304, configured to determine a target motion feature vector according to the interval signal;
a third determining module 305 is configured to determine an action count value according to the target motion feature vector.
Optionally, the resolving module 301 includes:
the first acquisition unit is used for acquiring acceleration data and gyroscope data;
the first windowing processing unit is used for windowing the acceleration data to obtain acceleration data in a window;
and the resolving unit is used for resolving quaternion of the acceleration data and the gyroscope data in the window to obtain a four-dimensional space attitude signal.
Optionally, the first determining module 302 includes:
The second windowing processing unit is used for carrying out windowing processing on the four-dimensional space attitude signals to obtain four-dimensional space attitude signals in the window;
the second acquisition unit is used for acquiring the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window;
the first determining unit is used for determining a height difference reference value corresponding to the window according to the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window;
and the second determining unit is used for determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the height difference reference value corresponding to each window.
Optionally, the second determining unit is specifically configured to:
determining a target set according to the height difference reference value corresponding to each window, wherein the target set comprises: wave crest position information and wave trough position information;
determining amplitude difference values between adjacent peaks and troughs according to the peak position information and the trough position information;
determining position information to be deleted according to amplitude difference values between adjacent wave crests and wave troughs, wherein the position information to be deleted comprises: pseudo-peak position information and/or pseudo-trough position information;
and determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the target set and the position information to be deleted.
Optionally, the second determining module 304 includes:
the third acquisition unit is used for acquiring the confidence coefficient of the adjacent interval signal;
and a third determining unit, configured to determine, as a target motion feature vector, a mean value of motion feature vectors of each interval signal in the target spatial gesture signal, where the target spatial gesture signal includes a preset number of consecutive adjacent interval signals with confidence degrees greater than a confidence degree threshold.
Optionally, the third obtaining unit is specifically configured to:
acquiring the duration time of the adjacent interval signal and the cross-correlation coefficient of the adjacent interval signal;
and determining the confidence level of the adjacent interval signal according to the duration time of the adjacent interval signal and the cross-correlation coefficient of the adjacent interval signal.
Optionally, the second determining module 304 further includes:
a fourth obtaining unit, configured to obtain a 90-bit numerical value and a 10-bit numerical value of each section signal in the target spatial gesture signal before determining a mean value of motion feature vectors of each section signal in the target spatial gesture signal as the target motion feature vector;
and the fourth determining unit is used for determining the motion characteristic vector of each interval signal in the target space gesture signal according to the 90-bit numerical value and the 10-bit numerical value of each interval signal in the target space gesture signal before determining the average value of the motion characteristic vector of each interval signal in the target space gesture signal as the target motion characteristic vector.
Optionally, the third determining unit includes:
the acquisition subunit is used for acquiring the significance factor of each target space attitude signal if at least two target space attitude signals exist;
and the determining subunit is used for determining the average value of the motion characteristic vector of each interval signal in the target space gesture signal with the largest significance factor in the at least two target space gesture signals as a target motion characteristic vector.
Optionally, the acquiring subunit is specifically configured to:
acquiring a difference value between a 75-minute value and a 25-minute value of each interval signal in each target space attitude signal;
and determining the sum of the difference value of the 75-bit numerical value and the 25-bit numerical value of the interval signal in the target space posture signal as a significance factor of the target space posture signal.
Optionally, the third determining module 305 is specifically configured to:
and if the overlapping proportion of the motion characteristic vector and the target motion fingerprint vector is greater than or equal to a proportion threshold value, counting the motions corresponding to the target motion fingerprint vector.
The counting method provided by the embodiment of the invention can be used for executing the corresponding functional module and beneficial effect of the executing method.
Example IV
Fig. 7 shows a schematic diagram of an electronic device 40 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a Read Only Memory (ROM) 42, a Random Access Memory (RAM) 43, etc., in which the memory stores a computer program executable by the at least one processor, and the processor 41 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 42 or the computer program loaded from the storage unit 48 into the Random Access Memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 may also be stored. The processor 41, the ROM 42 and the RAM 43 are connected to each other via a bus 44. An input/output (I/O) interface 45 is also connected to bus 44.
Various components in electronic device 40 are connected to I/O interface 45, including: an input unit 46 such as a keyboard, a mouse, etc.; an output unit 47 such as various types of displays, speakers, and the like; a storage unit 48 such as a magnetic disk, an optical disk, or the like; and a communication unit 49 such as a network card, modem, wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 41 may be various general and/or special purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 41 performs the respective methods and processes described above, such as the counting method:
quaternion calculation is carried out on the acceleration data and the gyroscope data, and a four-dimensional space attitude signal is obtained;
determining a peak position sequence or a trough position sequence corresponding to each dimension according to the intensity of the four-dimensional space attitude signal;
Partitioning the four-dimensional space attitude signal according to the wave crest position sequence or the wave trough position sequence to obtain interval signals corresponding to each dimension;
determining a target motion feature vector according to the interval signal;
and determining an action count value according to the target motion characteristic vector.
In some embodiments, the counting method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 48. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 40 via the ROM 42 and/or the communication unit 49. When a computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the counting method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the counting method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (13)

1. A counting method, comprising:
quaternion calculation is carried out on the acceleration data and the gyroscope data, and a four-dimensional space attitude signal is obtained;
determining a peak position sequence or a trough position sequence corresponding to each dimension according to the intensity of the four-dimensional space attitude signal;
partitioning the four-dimensional space attitude signal according to the wave crest position sequence or the wave trough position sequence to obtain interval signals corresponding to each dimension;
determining a target motion feature vector according to the interval signal;
and determining an action count value according to the target motion characteristic vector.
2. The method of claim 1, wherein the quaternion calculation of the acceleration data and the gyroscope data to obtain a four-dimensional spatial attitude signal comprises:
acquiring acceleration data and gyroscope data;
carrying out window division processing on the acceleration data to obtain acceleration data in a window;
and performing quaternion calculation on the acceleration data in the window and the gyroscope data to obtain a four-dimensional space attitude signal.
3. The method of claim 2, wherein determining a sequence of peak locations or a sequence of trough locations corresponding to each dimension from the intensity of the four-dimensional spatial pose signal comprises:
Carrying out window division processing on the four-dimensional space attitude signals to obtain four-dimensional space attitude signals in a window;
obtaining the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window;
determining a height difference reference value corresponding to the window according to the maximum value and the minimum value of the intensity of the four-dimensional space attitude signal in the window;
and determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the height difference reference value corresponding to each window.
4. A method according to claim 3, wherein determining a sequence of peak or valley positions for each dimension based on the height difference reference value for each window comprises:
determining a target set according to the height difference reference value corresponding to each window, wherein the target set comprises: wave crest position information and wave trough position information;
determining amplitude difference values between adjacent peaks and troughs according to the peak position information and the trough position information;
determining position information to be deleted according to amplitude difference values between adjacent wave crests and wave troughs, wherein the position information to be deleted comprises: pseudo-peak position information and/or pseudo-trough position information;
And determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the target set and the position information to be deleted.
5. The method of claim 4, wherein determining a target motion feature vector from the interval signal comprises:
acquiring confidence coefficient of adjacent interval signals;
and determining the average value of the motion characteristic vectors of each interval signal in the target space gesture signal as a target motion characteristic vector, wherein the target space gesture signal comprises a preset number of continuous adjacent interval signals with confidence degrees larger than a confidence degree threshold value.
6. The method of claim 5, wherein obtaining confidence levels for adjacent interval signals comprises:
acquiring the duration time of the adjacent interval signal and the cross-correlation coefficient of the adjacent interval signal;
and determining the confidence level of the adjacent interval signal according to the duration time of the adjacent interval signal and the cross-correlation coefficient of the adjacent interval signal.
7. The method of claim 5, further comprising, prior to determining the mean of the motion feature vectors for each of the interval signals in the target spatial pose signal as the target motion feature vector:
Acquiring a 90-bit numerical value and a 10-bit numerical value of each interval signal in the target space attitude signal;
and determining the motion characteristic vector of each interval signal in the target space attitude signal according to the 90-bit numerical value and the 10-bit numerical value of each interval signal in the target space attitude signal.
8. The method of claim 5, wherein determining the mean of the motion feature vectors for each of the interval signals in the target spatial pose signal as the target motion feature vector comprises:
if at least two target space attitude signals exist, acquiring a significance factor of each target space attitude signal;
and determining the average value of the motion characteristic vectors of each interval signal in the target space gesture signals with the maximum significance factors in the at least two target space gesture signals as a target motion characteristic vector.
9. The method of claim 8, wherein obtaining a saliency factor for each target spatial pose signal comprises:
acquiring a difference value between a 75-minute value and a 25-minute value of each interval signal in each target space attitude signal;
and determining the sum of the difference value of the 75-bit numerical value and the 25-bit numerical value of the interval signal in the target space posture signal as a significance factor of the target space posture signal.
10. The method of claim 1, wherein determining an action count value from the motion feature vector comprises:
and if the overlapping proportion of the motion characteristic vector and the target motion fingerprint vector is greater than or equal to a proportion threshold value, counting the motions corresponding to the target motion fingerprint vector.
11. A counting device, comprising:
the resolving module is used for resolving quaternion of the acceleration data and the gyroscope data to obtain a four-dimensional space attitude signal;
the first determining module is used for determining a wave crest position sequence or a wave trough position sequence corresponding to each dimension according to the intensity of the four-dimensional space attitude signal;
the partitioning module is used for partitioning the four-dimensional space attitude signal according to the wave crest position sequence or the wave trough position sequence to obtain interval signals corresponding to all dimensions;
the second determining module is used for determining a target motion characteristic vector according to the interval signal;
and the third determining module is used for determining an action count value according to the target motion characteristic vector.
12. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
The one or more programs, when executed by the one or more processors, cause the processor to implement the counting method of any one of claims 1-10.
13. A computer readable storage medium containing a computer program, on which the computer program is stored, characterized in that the program, when executed by one or more processors, implements the counting method according to any one of claims 1-10.
CN202210391664.XA 2022-04-14 2022-04-14 Counting method, counting device, counting equipment and storage medium Pending CN116943130A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210391664.XA CN116943130A (en) 2022-04-14 2022-04-14 Counting method, counting device, counting equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210391664.XA CN116943130A (en) 2022-04-14 2022-04-14 Counting method, counting device, counting equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116943130A true CN116943130A (en) 2023-10-27

Family

ID=88456895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210391664.XA Pending CN116943130A (en) 2022-04-14 2022-04-14 Counting method, counting device, counting equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116943130A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312997A (en) * 2023-11-21 2023-12-29 乾程电力有限公司 Intelligent diagnosis method and system for power management system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312997A (en) * 2023-11-21 2023-12-29 乾程电力有限公司 Intelligent diagnosis method and system for power management system
CN117312997B (en) * 2023-11-21 2024-03-08 乾程电力有限公司 Intelligent diagnosis method and system for power management system

Similar Documents

Publication Publication Date Title
Klein et al. StepNet—Deep learning approaches for step length estimation
WO2017000563A1 (en) Real-time location method and system for intelligent device, and determination method for movement posture of mobile phone
CN109883423B (en) Positioning method, system, equipment and storage medium based on Kalman filtering
CN105910601B (en) A kind of indoor ground magnetic positioning method based on Hidden Markov Model
CN109579853A (en) Inertial navigation indoor orientation method based on BP neural network
CN107917707B (en) Method and device for determining pedestrian direction under any posture and electronic equipment
CN110118560A (en) A kind of indoor orientation method based on LSTM and Multi-sensor Fusion
CN111595344B (en) Multi-posture downlink pedestrian dead reckoning method based on map information assistance
SE1350894A1 (en) Method and system for determining performance indicators for periodic movements
JP2016134182A (en) Wrist-worn pedometer with multi-axis inertial sensor
CN116943130A (en) Counting method, counting device, counting equipment and storage medium
CN107289966A (en) Method and apparatus for counting step number
Qin et al. Compensating the NLoS occlusion errors of UWB for pedestrian localization with MIMU
CN109035303B (en) SLAM system camera tracking method and device, and computer readable storage medium
CN107632966B (en) Motion trajectory determination method and electronic equipment
CN107392106B (en) Human activity endpoint detection method based on double thresholds
CN115127581B (en) Running data monitoring method and device, terminal equipment and storage medium
CN114739412B (en) Pedestrian gait real-time detection method and device based on smart phone
CN116465412A (en) Improved PDR indoor positioning method based on LSTM and attention mechanism
Truong et al. Nonparametric regression-based step-length estimation for arm-swing walking using a smartphone
CN113032028B (en) Air mouse awakening method and device, electronic equipment and storage medium
CN115727871A (en) Track quality detection method and device, electronic equipment and storage medium
US20220218230A1 (en) System and method of detecting walking activity using waist-worn inertial sensors
CN114674317A (en) Self-correcting dead reckoning system and method based on activity recognition and fusion filtering
CN115155044A (en) Method, device, equipment and medium for determining swimming turn-around time

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