CN111142687B - Walking detection method and device - Google Patents

Walking detection method and device Download PDF

Info

Publication number
CN111142687B
CN111142687B CN201811360864.9A CN201811360864A CN111142687B CN 111142687 B CN111142687 B CN 111142687B CN 201811360864 A CN201811360864 A CN 201811360864A CN 111142687 B CN111142687 B CN 111142687B
Authority
CN
China
Prior art keywords
angular velocity
threshold
terminal
walking
detection
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.)
Active
Application number
CN201811360864.9A
Other languages
Chinese (zh)
Other versions
CN111142687A (en
Inventor
廖学文
齐以星
郑德舜
张腾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to PCT/CN2019/113163 priority Critical patent/WO2020088352A1/en
Publication of CN111142687A publication Critical patent/CN111142687A/en
Application granted granted Critical
Publication of CN111142687B publication Critical patent/CN111142687B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors

Abstract

The application relates to the technical field of terminals, and discloses a walking detection method and device, which are used for improving the accuracy of walking detection. The method comprises the following steps: the terminal obtains a plurality of continuous triaxial angular velocities through detection of the sensor module; determining, by a processor, a plurality of angular velocity modulus values corresponding to a plurality of consecutive triaxial angular velocities; the method comprises the steps that on the basis of detection time of three-axis angular velocity, a plurality of angular velocity module values and four time periods form corresponding relations; the four time periods are determined by the terminal according to the first threshold and the second threshold according to the detection time sequence; judging that a plurality of continuous angular velocity module values meet the conditions through a processor, and determining that the user finishes one-step walking; the conditions include: the angular velocity module value corresponding to the first time period is smaller than a first threshold, the angular velocity module value corresponding to the second time period is not smaller than the first threshold and not larger than a second threshold, the angular velocity module value corresponding to the third time period is larger than the second threshold, and the angular velocity module value corresponding to the fourth time period is not smaller than the first threshold and not larger than the second threshold.

Description

Walking detection method and device
The present application claims priority of chinese patent application entitled "a walking detection method and apparatus" filed by chinese patent office on 2018, 11/02/8, application No. 201811299883.5, the entire contents of which are incorporated herein by reference.
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a walking detection method and device.
Background
With the rapid development of communication technology, the rapid increase of data services and multimedia services, Location Based Services (LBS) are gaining more attention, however, in complex environments such as forests, canyons, mines, power hubs, tunnels and underground, Global Positioning System (GPS), global navigation satellite system (GLONASS), Beidou satellite navigation system (BDS) and the like have problems due to sheltering and electromagnetic interference, and the like, which cause unavailability.
In order to realize positioning in a complex environment, a Pedestrian Dead Reckoning (PDR) method based on inertial navigation is generally adopted, specifically, when a pedestrian walks, a terminal is influenced by the walking of the pedestrian to generate three-axis acceleration, the terminal performs walking detection through a Peak Detection (PD) method, that is, whether the pedestrian completes one-step walking is determined by detecting whether an acceleration mode peak point of the three-axis acceleration meeting a certain peak-valley difference condition exists, and after the pedestrian completes one-step walking, the position of the pedestrian after one-step walking is determined by combining a walking direction, a walking step length and the like, so that the positioning accuracy is directly influenced by the accuracy of walking detection.
However, in the walking process of the pedestrian, the pedestrian usually performs a hand shaking action with the same frequency as the step frequency when walking, so that the motion characteristics of the terminal and the motion characteristics of the trunk of the pedestrian are greatly different, and further, the detection result of walking detection according to the triaxial acceleration is inaccurate.
Disclosure of Invention
The application provides a walking detection method and a walking detection device, which are used for solving the problem that walking detection is inaccurate when a terminal is in a whipping mode with the same frequency as a step frequency along the advancing direction of a user.
In a first aspect, the present application provides a walking detection method, which may be implemented by a terminal, and includes: the terminal obtains a plurality of continuous triaxial angular velocities through detection of the sensor module; the terminal determines a plurality of angular velocity module values corresponding to the plurality of continuous triaxial angular velocities through a processor; the method comprises the steps that on the basis of detection time of a plurality of continuous triaxial angular velocities, a plurality of angular velocity modulus values and four time periods form corresponding relations; the four time periods are determined by the terminal according to a first threshold value and a second threshold value according to a detection time sequence; the terminal judges that the plurality of continuous angular velocity module values meet the conditions through the processor, and determines that the user finishes one-step walking; the conditions include: the angular velocity module value corresponding to a first time period is smaller than the first threshold, the angular velocity module value corresponding to a second time period is not smaller than the first threshold and not larger than the second threshold, the angular velocity module value corresponding to a third time period is larger than the second threshold, and the angular velocity module value corresponding to a fourth time period is not smaller than the first threshold and not larger than the second threshold. In the application, the characteristics that the angular velocity module value of the triaxial angular velocity of the terminal has better same-frequency periodicity with the walking step frequency of a user and has more stable amplitude compared with the acceleration module value of the triaxial acceleration under the condition that the terminal is in a whipping mode with the same frequency as the step frequency along the advancing direction of the user are fully utilized; meanwhile, the conversion process of the angular velocity module values of the three-axis angular velocity caused by whipping with the same frequency as the step frequency in the one-step walking process is detected, instead of only detecting a certain value of the angular velocity module values of the three-axis angular velocity in the one-step walking process, so that the accuracy of walking detection is ensured.
In one possible design, the terminal low-pass filters the plurality of consecutive three-axis angular velocities through a low-pass filter. The cut-off frequency of the low-pass filtering is slightly larger than the step frequency, and the design is favorable for eliminating noise and improving the accuracy of walking detection; of course, the terminal may not be provided with a low-pass filter, and the terminal implements low-pass filtering on the plurality of continuous three-axis angular velocities through the operation of the processor.
In one possible design, the method further includes: the terminal receives a positioning signal through a wireless communication module; and when the terminal determines that the signal intensity of the positioning signal is smaller than a third threshold value, determining the position of the user after the one-step walking through the processor according to the initial position, the advancing direction and the advancing step length of the one-step walking. By the method, when positioning signals such as a GPS are unavailable, accurate positioning of a user is achieved based on walking detection.
In one possible design, the terminal determines the direction of travel by: the terminal obtains a plurality of continuous triaxial accelerations and a plurality of continuous course angles through detection of the sensor module in a sampling time period; the terminal determines a plurality of horizontal plane accelerations corresponding to the plurality of continuous three-axis accelerations through the processor, performs Principal Component Analysis (PCA) on the plurality of horizontal plane accelerations based on detection time of the plurality of continuous three-axis accelerations, and determines a motion axis of the horizontal plane corresponding to the one-step walking, wherein the motion axis indicates two motion axis directions on the horizontal plane; and the terminal determines the direction of the target motion axis, which has an included angle with the average course angle of the continuous course angles not more than 90 degrees, as the advancing direction through the processor. By the mode, the characteristic that the motion axis of the terminal on the horizontal plane and the moving direction of the user on the horizontal plane are on the same straight line under the condition that the terminal is in a whipping mode with the same frequency as the step frequency along the moving direction of the user is fully utilized, and the problem that the moving direction is deviated due to the fact that the moving direction is determined only according to the course angle of the terminal and the moving direction of the user on the horizontal plane is caused by the fact that the top end of the terminal is deviated from the moving direction of the user on the horizontal plane is solved.
In one possible design, the terminal low-pass filters the plurality of consecutive three-axis accelerations with a low-pass filter. The cut-off frequency of the low-pass filtering is slightly larger than the step frequency, and the design is favorable for eliminating noise and determining the accuracy of the traveling direction; of course, the terminal may not be provided with a low-pass filter, and the terminal implements low-pass filtering on the plurality of continuous triaxial accelerations through calculation of the processor.
In one possible design, the conditions further include: and the terminal detects that the duration of obtaining the plurality of continuous triaxial angular velocities is not less than a fourth threshold value. The fourth threshold value can be set to be slightly shorter than the minimum time required for normally completing the one-step walking, and in this way, the false detection of completing the one-step walking of the user is avoided.
In one possible design, the conditions further include: and the difference value between the maximum angular velocity module value and the minimum angular velocity module value in the plurality of angular velocity module values determined by the terminal is not greater than a fifth threshold value. The fifth threshold value can be set to be slightly larger than the difference value between the maximum angular velocity module value and the minimum angular velocity module value of the three-axis angular velocity in the process of normally finishing one-step walking, and by means of the mode, the false detection of finishing one-step walking of the user is avoided.
In one possible design, the terminal may determine the first threshold and the second threshold by: according to
Figure BDA0001867298020000021
Determining the first threshold; and, according to
Figure BDA0001867298020000031
Determining the second threshold; wherein thrv (i) represents the first threshold, thrp (i) represents the second threshold, i represents the i-th walking completed, i is a natural number; maxi-fMaximum angular velocity module, max, determined for walk i-fi-gMaximum angular velocity modulus, min, determined for the i-g walki-fMinimum angular velocity module, min, determined for the i-f walki-gMinimum module of angular velocity, thrp, determined for the i-g th walk0、thrv0A, b, c and d are constants, f < g < N, and f, g and N are positive integers. By the mode, the accuracy of walking detection can be ensured when walking detection is carried out on different users at different times.
In one possible design, the a and d are 1/3 and the b and c are 1/6. In this way, the reasonable determination of the first threshold and the second threshold is facilitated, and the accuracy of walking detection is improved.
In one possible design, f is 2 and g is 4. In this way, the reasonable determination of the first threshold and the second threshold is facilitated, and the accuracy of walking detection is improved.
In a second aspect, the present application provides a walking detection device having the functionality to implement the method of the first aspect and any one of the possible designs described above. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the device may be a chip or an integrated circuit.
In one possible design, the apparatus includes a transceiver and a processor for executing a set of programs, and when the programs are executed, the apparatus may perform the method of the first aspect and any one of the possible designs.
In one possible design, the apparatus further includes a memory for storing a program executed by the processor.
In one possible design, the device is a terminal.
In a third aspect, the present application provides a computer storage medium storing a computer program comprising instructions for performing the method of the first aspect or any one of the possible designs of the first aspect.
In a fourth aspect, the present application provides a computer program product comprising instructions which, when run on a terminal, cause the terminal to perform the method of the first aspect described above or any one of the possible designs of the first aspect.
In a fifth aspect, a chip is provided, where the chip is connected to a memory, and is configured to read and execute a software program stored in the memory, so as to implement the method in the first aspect or any one of the possible designs of the first aspect.
Drawings
Fig. 1 is a schematic structural diagram of a terminal provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a walking detection process provided in an embodiment of the present application;
fig. 3 is a schematic diagram illustrating an angular velocity module value variation of a triaxial angular velocity of a terminal provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a finite state transition of a terminal according to an embodiment of the present application;
fig. 5 is a schematic diagram of a positioning process provided in an embodiment of the present application;
FIG. 6 is a schematic illustration of another positioning process provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of a testing environment provided in an embodiment of the present application;
FIG. 8 is a schematic illustration of a positioning track provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of a walking detection device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of another terminal according to an embodiment of the present application.
Detailed Description
The application provides a walking detection method and a walking detection device, aiming at carrying out walking detection by utilizing the characteristics that the angular velocity module value of the triaxial angular velocity detected by a terminal has better same periodicity with the step frequency and more stable amplitude relative to the acceleration module value of the triaxial acceleration under the whipping mode that the frequency is the same as the step frequency in the advancing direction of a user, so as to improve the accuracy of the walking detection. In the present application, the method and the device are based on the same inventive concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be referred to each other, and repeated details are not repeated.
The terminal related to the embodiment of the present application is also referred to as User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), and so on, and at present, the terminal may be: mobile phone (mobile phone), tablet computer, palm computer, wearable device (such as smart watch, smart bracelet, pedometer, etc.), wherein the terminal includes but is not limited to carrying a mobile phone (mobile phone), tablet computer, palm computer, wearable device (such as smart watch, smart bracelet, pedometer, etc.)
Figure BDA0001867298020000041
Or other operating systems, a possible application scenario in the present application is that the terminal performs the same-frequency whipping with the stride frequency along the user traveling direction, for example: the terminal is a mobile phone forWhen a user walks, the user performs hand shaking action with the same frequency as the step frequency, and the mobile phone is held in the hand of the user; or the terminal is an intelligent bracelet, the user performs hand throwing action with the same frequency as the step frequency when walking, the intelligent bracelet is worn on the wrist of the user, and the like; in addition, it is conceivable that the walking detection scheme of the present application is also applicable in a scenario where the user is fixed to the lower leg or foot of the user while walking.
In the description of the embodiments of the present application, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance, nor order.
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
The various embodiments disclosed in the present application can be applied to a terminal, and fig. 1 shows the structure of the terminal by way of example. As shown in fig. 1, the terminal 100 may include: the processor 110, the memory 120, the USB interface 130, the charging management module 140, the power management module 141, the battery 142, the antenna 1, the wireless communication module 150, the sensor module 160, and the like. The sensor module 160 may include a gyro sensor 160A, a direction sensor 160B, a magnetic field sensor 160C, an acceleration sensor 160D, a gravity sensor 160F, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation to the terminal 100. In other embodiments of the present application, terminal 100 may include more or fewer components than shown in FIG. 1, or some components may be combined, some components may be split, or a different arrangement of components. The components of fig. 1 may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a controller, a memory, a baseband processor, and the like. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be, among other things, a neural center and a command center of the terminal 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include a universal asynchronous receiver/transmitter (UART) interface, a general-purpose input/output (GPIO) interface, and/or a Universal Serial Bus (USB) interface, etc.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 150.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the wireless communication module 150, the sensor module 160, and the like. The GPIO interface may also be configured as a UART interface or the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface may be used to connect a charger to charge the terminal 100, or may be used to transmit data between the terminal 100 and a peripheral device.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an exemplary illustration, and does not limit the structure of the terminal 100. In other embodiments of the present application, the terminal 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via a USB interface. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the terminal 100. The charging management module 140 may also supply power to the terminal through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the memory 120, the wireless communication module 150, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the terminal 100 may be implemented by the antenna 1, the wireless communication module 150, a modem processor, a baseband processor, and the like.
The wireless communication module 150 may provide a solution for wireless communication including a Wireless Local Area Network (WLAN), a Global Navigation Satellite System (GNSS), and the like applied to the terminal 100. The wireless communication module 150 may be one or more devices integrating at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via the antenna 1, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 150 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 1 to radiate the electromagnetic waves. The GNSS may include GPS, GLONASS, BDS, quasi-zenith satellite system (QZSS), and/or Satellite Based Augmentation System (SBAS).
The memory 120 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the terminal 100 and data processing by executing instructions stored in the memory 120. The memory 120 may include a program storage area and a data storage area. Wherein the storage program area may store an operating system, an application program required for at least one function, and the like. The storage data area may store data created during use of the terminal 100, and the like. Further, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The gyro sensor 160A is also called an angular velocity sensor, and unlike an acceleration sensor, a physical quantity for measurement is a rotational angular velocity at the time of the terminal 100 being deflected or tilted, and can be used to determine the motion attitude of the terminal 100. In some embodiments, the angular velocity of terminal 100 about three axes (i.e., the X, Y, and Z axes) may be determined by gyroscope sensor 160A. The gyro sensor 160A may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 160A detects a shake angle of the terminal 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the terminal 100 by a reverse movement, thereby achieving anti-shake. The gyro sensor 160A can also be used for a motion sensing game scene or the like.
The direction sensor 160B senses information about the euler angle of the terminal 100, that is, information about the heading angle, the pitch angle, and the roll angle of the terminal 100. In some embodiments, the terminal 100 uses the heading angle determined by the direction sensor 160B for positioning and navigation.
Magnetic field sensor 160C is also known as a magnetometer. The terminal 100 may detect magnetic field strengths in various directions (generally, three axes) in the current attitude of the terminal 100 by using the magnetic field sensor 160C, and may calculate attitude information of the terminal 100 with respect to the geomagnetic field according to the three axes of magnetic field strengths, so as to determine the attitude of the terminal.
The acceleration sensor 160D is a sensor capable of measuring acceleration, and generally includes a mass, a damper, an elastic element, a sensing element, and an adjustment circuit; in the acceleration process, the acceleration sensor 160D obtains an acceleration value by using newton's second law through measurement of the inertial force applied to the mass block. The acceleration sensor 160D may detect the magnitude of acceleration of the terminal 100 in various directions (generally, three axes), and may be used for a shock recognition related function (e.g., pedometer, tap), etc.
The gravity sensor 160E is used to detect the magnitude of gravitational acceleration of the terminal 100 in various directions (typically three axes). The method can be used for solving the inclination angle of the terminal 100 relative to the horizontal plane according to the three-axis gravity acceleration, and can be used for recognizing the terminal gesture (such as horizontal and vertical screen switching, related games, magnetic field sensor gesture calibration) and the like.
The following describes the routine walking detection method performed in the present application in detail, taking the walking detection performed in the terminal 100 as an example.
[ EXAMPLES one ]
First embodiment introduces a walking detection process provided in an embodiment of the present application, and the following describes in detail a walking detection process provided in the first embodiment with reference to fig. 2, as described in fig. 2, a process executed by the terminal 100 includes the following steps:
s201: the terminal obtains a plurality of continuous three-axis angular velocities detected by the gyro sensor 160A.
In the actual application process, the terminal samples the triaxial angular velocity of the terminal detected by the gyro sensor 160A at a set sampling frequency, and records a sampling time stamp of the triaxial angular velocity obtained by each sampling. Optionally, in order to avoid that the set sampling frequency is too low and affects the walking detection effect, the set sampling frequency is not lower than 50Hz, such as 50Hz, 60Hz, and the like.
In addition, because the frequency of normal walking of the user is usually 0.5Hz to 2Hz, that is, the pace of the user is usually between one step walking of 2s and two steps walking of 1s, optionally, after the terminal samples the gyro sensor 160A to obtain a plurality of triaxial angular velocities, the terminal performs low-pass filtering on the sampled triaxial angular velocities to eliminate noise interference, wherein the cut-off frequency of the low-pass filtering is slightly greater than the pace frequency, for example, 2.5Hz, 2.8Hz, and the like; specifically, the low-pass filtering of the sampled three-axis angular velocities by the terminal may be implemented by a low-pass filter provided in the terminal, for example, by a butterworth filter provided in the terminal; alternatively, the low-pass filter is not provided in the terminal, and the terminal performs low-pass filtering on the plurality of three-axis angular velocities obtained by sampling through the operation of the processor 110.
S202: the terminal determines, through the processor 110, a plurality of angular velocity modulus values corresponding to the plurality of consecutive triaxial angular velocities. The method comprises the steps that on the basis of detection time of a plurality of continuous triaxial angular velocities, a plurality of angular velocity modulus values and four time periods form corresponding relations; the four time periods are determined by the terminal according to the first threshold and the second threshold in the detection time sequence.
S203: the terminal determines, through the processor 110, that the plurality of continuous angular velocity mode values satisfy the condition, and determines that the user completes one-step walking. The conditions include: the angular velocity module value corresponding to a first time period is smaller than the first threshold, the angular velocity module value corresponding to a second time period is not smaller than the first threshold and not larger than the second threshold, the angular velocity module value corresponding to a third time period is larger than the second threshold, and the angular velocity module value corresponding to a fourth time period is not smaller than the first threshold and not larger than the second threshold.
As shown in fig. 3, it is a schematic diagram of angular velocity module value changes corresponding to three-axis angular velocities of the terminal in a whip mode in which the terminal performs a frequency step in a user's traveling direction, where for determining the angular velocity module value corresponding to the three-axis angular velocity, the processor 110 of the terminal may determine the angular velocity module value according to a formula
Figure BDA0001867298020000071
Realizing that | | | gyro | | is angular velocity module value, gyrox、gyroyAnd gyrozThe three-axis angular velocity is the X-axis angular velocity, the Y-axis angular velocity and the Z-axis angular velocity in the three-axis angular velocity respectively. Terminal carried along userAnd when the terminal swings forwards or backwards once along the advancing direction, the angular velocity module value of the triaxial angular velocity of the terminal rises and falls once, and shows fluctuation corresponding to the swing once. Referring to fig. 4, in the present application, an angular velocity module value (input) is used as a detection quantity, the input of a terminal in a primary wave is changed, and finite state machine partitioning (FSM) is performed according to a first threshold (Thrv) and a second threshold (Thrp) and according to a detection time sequence of a triaxial angular velocity for determining the angular velocity module value, where Thrv is smaller than Thrp, and specifically, the angular velocity module value in the primary wave is divided into four long-term states, namely a valley state (S0), a preparatory motion state (S1), a peak state (S2) and a leaving peak state (S3), where in the S0 state, input is smaller than Thrv; in the S1 state, input is not less than Thrv and not more than Thrp; in S2 state, input is greater than Thrp; in the S3 state, input is not less than Thrv and not more than Thrp; in addition, a transient state, the end-of-walk state (S4) can be divided, wherein the S4 state is a critical state between the S3 state and the S0 state, and is also a special state of the S3 state, and in the S4 state, input is equal to Thrv.
Optionally, a complete fluctuation relates to four states, i.e., the S0 state, the S1 state, the S2 state, and the S3 state, so that in order to reduce the consumption of resources of the processor 110, when walking detection is performed, the terminal samples the three-axis angular velocity of the terminal detected by the gyro sensor 160A, and the obtained continuous three-axis angular velocity is not less than 4.
The terminal performs walking detection based on the four states of the S0 state, the S1 state, the S2 state and the S3 state, and specifically, the terminal determines, through the processor 110, a plurality of inputs corresponding to a plurality of continuous triaxial angular velocities obtained by detection, and determines, based on the detection times of the plurality of continuous triaxial angular velocities, a detection time period in which the input is less than Thrv according to Thrv and Thrp and in the detection time sequence, as a first time period (S0 state); determining a detection period in which input is not less than Thrv and not more than Thrp as a second period (S1 state); determining a detection period in which input is greater than Thrp as a third period (S2 state); determining a detection time period in which input is not less than Thrv and not greater than Thrp as a fourth time period (S3 state), determining that the user completes one-step walking when determining that the detection time for obtaining a plurality of continuous three-axis angular velocities includes the first time period, the second time period, the third time period, and the fourth time period satisfying the above conditions, and after determining that the user completes one-step walking, detecting whether the user completes the next-step walking based on the plurality of continuous three-axis angular velocities obtained by detecting with the gyro sensor 160A after determining that the user completes the one-step walking. Compared with the conventional PD method for walking detection, the walking detection method provided in the embodiment of the present application is implemented based on the S0 state, the S1 state, the S2 state, and the S3 state in the terminal swing process, and may also be referred to as a swing-mode finite state machine (SFSM) walking detection method.
For example: based on the time sequence of obtaining the plurality of continuous triaxial angular velocities by detection, the processor 110 of the terminal determines a plurality of inputs corresponding to the plurality of continuous triaxial angular velocities as follows: 0.9, 0.1, 0.6, 1.4, 2.1, 2.9 and 3.6, Thrv of 1.5 and Thrp of 3.5, in (rad/s), the processor 110 of the terminal detects that 0.9 is less than 1.5, and determines that the detection time of the triaxial angular velocity corresponding to 0.9 is in the first time period; detecting that 0.1 is smaller than 1.5, and determining that the detection time of the triaxial angular velocity corresponding to 1.1 is in a first time period; detecting that 0.6 is smaller than 1.5, and determining that the detection time of the triaxial angular velocity corresponding to 0.6 is in a first time period; detecting that 1.4 is smaller than 1.5, and determining that the detection time of the triaxial angular velocity corresponding to 1.4 is in a first time period; detecting that 2.1 is not less than 1.5 and not more than 3.5, determining that the detection time of the triaxial angular velocity corresponding to 2.1 is located in a second time period, wherein the angular velocity modulus is changed from 1.4 to 2.1, a transition from the first time period (S0 state) to the second time period (S1 state) exists, and determining that the detection time of the triaxial angular velocity corresponding to 0.9 to the detection time of the triaxial angular velocity corresponding to 1.4 is the first time period by the processor 110; similarly, the processor 110 determines the detection time of the triaxial angular velocity corresponding to 2.1 to the detection time of the triaxial angular velocity corresponding to 2.9 as the second time period, and at this time, the detection time of the terminal for detecting and obtaining a plurality of continuous triaxial angular velocities only includes the first time period and the second time period, and the processor 110 of the terminal cannot determine that the user completes one-step walking.
As the detection time increases, the number of the plurality of consecutive triaxial angular velocities detected and obtained by the terminal through the gyro sensor 160A increases, and based on the time sequence of detecting and obtaining the plurality of consecutive triaxial angular velocities, the processor 110 of the terminal determines a plurality of inputs corresponding to the plurality of consecutive triaxial angular velocities as follows: 0.9, 0.1, 0.6, 1.4, 2.1, 2.9, 3.6, 4.4, 4.9, 4.3, 3.7, 3.1, 2, 1.4, there is a transition (1.4-2.1) from the first time period (S0 state) to the second time period (S1 state), and the processor 110 determines the detection time of the triaxial angular velocity corresponding to 0.9 to the detection time of the triaxial angular velocity corresponding to 1.4 as the first time period; there is a transition (2.9-3.6) from the second period (S1 state) to the third period (S2 state), and the processor 110 determines the detection time of the 2.1 corresponding triaxial angular velocity to the detection time of the 2.9 corresponding triaxial angular velocity as the second period; there is a transition (3.7-3.1) from the third period (S2 state) to the fourth period (S3 state), and the processor 110 determines the detection time of the three-axis angular velocity corresponding to 3.6 to the detection time of the three-axis angular velocity corresponding to 3.7 as the third period; there is a transition (2-1.4) from the fourth period (S3 state) to the first period (S0 state), the processor 110 determines that the detection time of the three-axis angular velocity corresponding to 3.1 to the detection time of the three-axis angular velocity corresponding to 2 is the fourth period, at this time, the first period, the second period, the third period, and the fourth period are included in the detection time in which the terminal detects and obtains a plurality of consecutive three-axis angular velocities, and the processor 110 of the terminal determines that the user completes one-step walking.
Of course, if the processor 110 of the terminal detects that input is equal to 1.5(S4 state) in the fourth period (S3 state), it may also be determined that the fourth period (S3 state) is shifting to another period, and the terminal determines that the terminal shifts to the detection time of the three-axis angular velocity corresponding to the fourth period to the detection time of the three-axis angular velocity corresponding to the 1.5 as the fourth period.
In addition, in the present application, the processor 110 of the terminal detects and determines the first time period, the second time period, the third time period, and the fourth time period included in the detection times for detecting and obtaining the plurality of continuous triaxial angular velocities according to the detection time sequence for detecting and obtaining the plurality of continuous triaxial angular velocities, and according to the value ranges of the plurality of inputs corresponding to the plurality of continuous triaxial angular velocities and the inputs of the first time period, the second time period, the third time period, and the fourth time period, and according to the sequence of the first time period, the second time period, the third time period, and the fourth time period, for example: based on the time sequence of obtaining the plurality of continuous triaxial angular velocities by detection, the processor 110 of the terminal determines a plurality of inputs corresponding to the plurality of continuous triaxial angular velocities as follows: 0.9, 0.1, 0.6, 1.4, 2.1, 2.9, 1, wherein the detection time of the triaxial angular velocity corresponding to 2.9 is located in the second time period, and the input range where 1 does not satisfy the second time period is not less than 1.5 and not more than 3.5, there is a transition from the second time period to other time periods, and according to the sequence of the first time period, the second time period, the third time period and the fourth time period, the processor 110 first determines whether 1 satisfies the input range of the third time period is not less than 3.5; if not, continuously judging whether the value range of the angular speed modulus of the fourth time period is not less than 1.5 and not more than 3.5 or not according to the judgment result 1; if the first time interval does not satisfy the first time interval, the method continues to judge whether 1 satisfies the first time interval, that is, the angular velocity mode range is smaller than 1.5, and satisfies the first time interval, and determines the transition from the second time interval (S1 state) to the first time interval (S0 state).
Because the step frequency of the normal walking of the user is usually 0.5 Hz-2 Hz, that is, the time for the user to walk in one step is usually not less than 0.5s, in order to prevent the noise interference from generating false detection, the condition for determining that the user finishes walking in one step may further include: the terminal detects that the duration of obtaining a plurality of continuous triaxial angular velocities is not less than a fourth threshold (thr _ time). Wherein the value of thr _ time is less than 0.5s, for example, 0.25 s. For the duration of obtaining a plurality of continuous triaxial angular velocities by the terminal detection, the duration corresponding to the end time (endTime (i-1)) of the user completing the previous walking to the current time (endTime (i)) may be determined according to the start time of the terminal performing triaxial angular velocity sampling on the walking, which may also be referred to as the time period corresponding to the end time (i-1)) of the user completing the previous walking, that is, the condition for determining that the user completes the one-step walking further includes: endTime (i) -endTime (i-1) ≧ thr _ time.
When normally walking because of the user, the difference value of the biggest angular velocity modulus value that the terminal detected corresponding at every turn whipping and the minimum angular velocity modulus value is in certain within range, and in order to prevent that the very big peak value that appears from when turning from producing the influence to walking detection's accuracy, the very big peak value appears in this application to the turn process and discerns and rejects, confirms that the condition that the user accomplished one step of walking can also include: the terminal determines to detect and obtain a plurality of continuous triaxial angular velocities, and a difference between a maximum angular velocity module value (max) and a minimum angular velocity module value (min) in the corresponding plurality of angular velocity module values is not greater than a fifth threshold value (thr _ pv), where an exemplary thr _ pv may be 7 and has a unit of (rad/s), that is, determining that the user completes one-step walking condition further includes: max-min is less than or equal to thr _ pv.
Optionally, in order to save resources of the processor 110, the processor 110 of the terminal only determines that the detection time for obtaining a plurality of continuous triaxial angular velocities includes a first time period, a second time period, a third time period, and a fourth time period, and determines that the end time (i) -end time (i-1) is not less than thr _ time and the end time (i) -end time (i-1) is not less than thr _ time, if the determination results are yes, it is determined that the user completes one-step walking, otherwise, the terminal obtains a plurality of continuous triaxial angular velocities through re-detection by the gyroscope sensor 160A, and performs walking detection.
In order to improve the walking detection precision, optionally, in step S201, after the terminal obtains the three-axis angular velocity through detection of the gyro sensor 160A, the processor 110 of the terminal may further convert the obtained three-axis angular velocity into a navigation coordinate system, because an X axis of a northeast celestial coordinate system (ENU) coincides with a long half axis of an earth ellipsoid (east direction), a Y axis coincides with a short half axis of the earth ellipsoid (north direction), and an XOY plane formed by the X axis and the Y axis of the northeast celestial coordinate system and a coordinate system pole (O) is a horizontal plane on which the user walks, the navigation coordinate system of the terminal in the present application selects a northwest coordinate system.
In addition, in the present application, if the terminal converts the three-axis angular velocity obtained by sampling the three-axis angular velocity detected by the self gyro sensor 160A into the navigation coordinate system, if the terminal low-pass filters the obtained plurality of continuous three-axis angular velocities, after the processor of the terminal converts the obtained plurality of continuous three-axis angular velocities into the navigation coordinate system.
Specifically, the terminal still performs sampling at a sampling frequency for sampling the three-axis angular velocity detected by the self-gyro sensor 160A, for example: and 50Hz, carrying out co-frequency sampling on the triaxial gravitational acceleration detected by the self gravity sensor 160F and the triaxial magnetic field strength detected by the magnetic field sensor 160C. In addition, when the sampling frequencies supported by the gyroscope sensor 160A, the gravity sensor 160F and the gravity sensor 160F are different, a subtractive sampling method can be adopted, a sensor with the slowest sampling frequency is selected as a reference sensor, for each sampling of the reference sensor, other sensor sampling values closest to the sampling time stamp of the reference sensor are selected as the same-sequence sampling values of the sampling, and the non-same-sequence sampling values are deleted to ensure that the sampling frequencies of the sensors are equal.
For each sampling of the three-axis angular velocity, the processor 110 of the terminal calculates a rotation matrix between the carrier coordinate system and the navigation coordinate system according to the three-axis gravitational acceleration and the three-axis magnetic field strength of the sampling, for example, a unit vector of a certain sampling three-axis gravitational acceleration is a ═ a (a ═ a)x Ay Az)TThe unit vector formed by the three-axis magnetic field intensity is E ═ E (E)x EyEz)TLet H E × A, M be a × H, the rotation matrix between the carrier coordinate system and the navigation coordinate system
Figure BDA0001867298020000101
Can be based on the rotation matrix C at the momentbBy using S ═ Cb·SbConverting the three-axis angular velocity into a navigation coordinate system, wherein SbThe original value is sampled for the secondary gyro sensor 160A and S is the value in the converted navigation coordinate system.
In addition, the amplitude and the speed of the hand shaking action performed by different users during walking are different, and the amplitude and the speed of the hand shaking action performed by the same user during walking at different times are different.
Optionally, the terminal determines the first threshold and the second threshold by the following method, according to
Figure BDA0001867298020000102
Determining a first threshold; and the number of the first and second groups,
according to
Figure BDA0001867298020000103
Determining a second threshold;
wherein thrv (i) represents the first threshold, thrp (i) represents the second threshold, i represents the i-th walking completed, i is a natural number; maxi-fMaximum angular velocity module, max, determined for walk i-fi-gMaximum angular velocity modulus, min, determined for the i-g walki-fMinimum angular velocity module, min, determined for the i-f walki-gMinimum module of angular velocity, thrp, determined for the i-g th walk0、thrv0A, b, c and d are constants, f < g < N, and f, g and N are positive integers. Alternatively, two trisections of the peak and trough values of the angular velocity mode values may be approximately selected for the determination of the first and second threshold values, i.e., let a and d be 1/3, and b and c be 1/6; in addition, the closer the current detected one-step walking is to the historical one-step walking, the more similar the change characteristics of the triaxial acceleration of the terminal are, that is, the more similar the change characteristics of the angular velocity module value corresponding to the terminal are, f can be made to be 2, and g can be made to be 4, so as to ensure the accuracy of walking detection, wherein thrp0Can be 1.5, etc., thrv 01, etc.
[ example two ]
A second embodiment introduces a positioning process provided in the embodiment of the present application, where a specific positioning process is implemented based on walking detection in the first embodiment, and repeated parts are not described again, and the positioning process provided in the second embodiment is described in detail below with reference to fig. 5, and as shown in fig. 5, a process executed by the terminal 100 includes the following steps:
s501: the terminal obtains a plurality of continuous three-axis angular velocities detected by the gyro sensor 160A.
S502: the terminal determines, through the processor 110, a plurality of angular velocity modulus values corresponding to the plurality of consecutive triaxial angular velocities. The method comprises the steps that on the basis of detection time of a plurality of continuous triaxial angular velocities, a plurality of angular velocity modulus values and four time periods form corresponding relations; the four time periods are determined by the terminal according to the first threshold and the second threshold in the detection time sequence.
S503: the terminal determines that the plurality of continuous angular velocity module values satisfy the condition through the processor 110, and determines that the user completes one-step walking. The conditions include: the angular velocity module value corresponding to a first time period is smaller than the first threshold, the angular velocity module value corresponding to a second time period is not smaller than the first threshold and not larger than the second threshold, the angular velocity module value corresponding to a third time period is larger than the second threshold, and the angular velocity module value corresponding to a fourth time period is not smaller than the first threshold and not larger than the second threshold.
S504: the terminal determines the position of the user after the one-step walking according to the initial position, the traveling direction and the traveling step length of the one-step walking through the processor 110.
In indoor environments such as mines, tunnels and the underground, or sheltered environments such as forests and canyons, the situation that the positioning signals which can be used for positioning such as GPS, Beidou satellite navigation and Wi-Fi are weak in strength and even cannot detect the positioning signals exists, the terminal performs positioning based on walking detection, and the position of a user is updated.
Specifically, the terminal is connected with the wireless communication systemThe signal module 150 receives the positioning signal, and when the signal strength of the positioning signal is determined to be less than the third threshold and not available, the processor 110 of the terminal takes the last position determined according to the positioning signal as the starting position (px) for positioning based on walking detection0,py0) And according to the detected number of steps (i) corresponding to each walking step, the advancing direction orien and the advancing step length L, the position of the user after the walking step is completed is located, and specifically, the processor 110 of the terminal can be according to
Figure BDA0001867298020000111
Iteratively updating the position of the user to realize the positioning of the user, wherein (px)i,pyi) Orien (i) is the traveling direction (included angle relative to the X axis of the navigation coordinate system) of the step i walking, and L is the traveling step length.
In the embodiment of the present application, the step length of travel may be input to the terminal by a user of the terminal, for example, the user may walk along a straight line for a certain distance, record a walking distance (d) and a step number M, determine the step length of travel according to L ═ d/M, input the determined step length of travel to the terminal, receive the step length of travel input by the user by the terminal, and store the step length of travel to the memory 120; in addition, in the embodiment of the present application, the direction of travel of each step may be a direction indicated by an average heading angle of heading angles detected within a time period in which the user completes detection corresponding to the walking to obtain a plurality of continuous three-axis angular velocities, and the direction may be taken as the direction of travel.
Since the travel direction is determined by the heading angle, it is necessary that the terminal tip strictly points to the travel direction during travel, and actually, the terminal tip hardly points to the travel direction strictly during travel, and there is an error in the direction indicated by the average heading angle as the travel direction.
Optionally, when the terminal is whipped in a whipping mode in which the terminal is in the same frequency as the step frequency along the user's traveling direction, the movement axis of the terminal on the horizontal plane is on the same straight line with the traveling direction of the user on the horizontal plane; the moving direction can be approximately represented according to the course angle, the included angle between the moving direction and the moving direction is usually not more than 90 degrees, the terminal can determine the moving direction according to the moving axis of the terminal on the horizontal plane and the detected course angle so as to improve the positioning accuracy, and the description is given by taking the example that the terminal determines the moving direction of the ith step, wherein i is a natural number and represents the ith step of walking completed by the user.
Specifically, the terminal performs same-frequency sampling on the triaxial acceleration detected by the triaxial acceleration sensor 160D and the course angle detected by the direction sensor 160B at the sampling frequency for sampling the gyroscope sensor 160A, the magnetic field sensor 160C and the gravity sensor 160F, the terminal samples the triaxial acceleration of the terminal in the current attitude, and the terminal determines the rotation matrix C according to the triaxial acceleration and the triaxial magnetic field strength obtained by each samplingbThe three-axis acceleration obtained by each sampling is resolved, and the three-axis acceleration obtained by each sampling is converted into a navigation coordinate system, so that the acceleration of the corresponding horizontal plane obtained by each sampling of the terminal 100, namely the X-axis acceleration and the Y-axis acceleration of the corresponding horizontal plane, is determined.
For the ith walking, the terminal performs PCA processing on the X-axis acceleration and the Y-axis acceleration of a plurality of corresponding horizontal planes obtained in the sampling time period corresponding to the ith walking through the processor 110, and determines a movement axis corresponding to the ith walking. The specific process is as follows:
the terminal arranges the X-axis acceleration and the Y-axis acceleration of the corresponding horizontal plane obtained in the sampling time period corresponding to the ith walking in time sequence by the processor 110 (X is the time sequence of the acceleration1,y1)、(x2,y2)……(xN,yN) Obtaining the X-axis acceleration sequence X ═ (X)1,x2,......xN) Y-axis acceleration sequence Y ═ Y1,y2,......yN). Then using the formula
Figure BDA0001867298020000121
Calculating to obtain the covariance of the X sequence and the Y sequence to obtain a covariance matrix
Figure BDA0001867298020000122
Then, the eigenvalue lambda of the covariance matrix C is calculated1、λ21≥λ2). Characteristic value lambda1、λ2Corresponding feature vectors are respectively
Figure BDA0001867298020000123
Wherein
Figure BDA0001867298020000124
And
Figure BDA0001867298020000125
indicate two directions of the same straight line, will
Figure BDA0001867298020000126
And/or
Figure BDA0001867298020000127
The straight line indicated, determined as the axis of motion,
Figure BDA0001867298020000128
and
Figure BDA0001867298020000129
the two directions indicated are determined as two movement axis directions.
Meanwhile, the terminal averages the course angles obtained in the sampling time period corresponding to the ith walking to obtain an average course angle, and determines the direction of the motion axis with the included angle of the average course angle not more than 90 degrees as the advancing direction.
In this embodiment of the application, the sampling time period corresponding to the ith walking may be corresponding to the ith walking, and the terminal detects a time period for obtaining a plurality of continuous three-axis angular velocities through the gyroscope sensor 160A, such as [ endTime (i-1), endTime (i) ], where endTime (i-1) is a starting time of the terminal for sampling the three-axis angular velocities during the ith walking, and may also be referred to as an end time of the terminal for determining that the user completes the ith walking, endTime (i) is a time of the terminal for determining that the user completes the ith walking, and if i is 1, endTime (i-1) is a time of the terminal for detecting that the positioning signal is smaller than the first threshold.
Because the motion axes of the terminal corresponding to the horizontal direction are usually similar when the terminal swings forwards or backwards in the advancing direction of the user once, in order to improve the accuracy of determining the advancing direction, the sampling time period corresponding to the ith walking is [ beginntime (i), endtime (i)]Wherein
Figure BDA00018672980200001210
beginmarwitime (1) is the time when the terminal 100 detects that the positioning signal is less than the third threshold.
Optionally, the terminal may further determine an average direction (orien _ ave) indicated by the heading angle obtained in the sampling time period corresponding to the ith walking, and determine the traveling direction according to whether an included angle between orien _ ave and two directions of the motion axis indicated by the motion axis is not greater than 90 degrees. The average direction calculation method is as follows:
Figure BDA00018672980200001211
wherein, yaw (j) represents a j-th course angle sampling value in the ith walking, and N is the sampling time within a second sampling time period corresponding to the ith walking; the value field of atan2 function is (-pi, pi)]Defined based on an arctangent function with a value range (-pi/2, pi/2) defined as:
Figure BDA0001867298020000131
wherein y in atan2(y, x) represents
Figure BDA0001867298020000132
x represents
Figure BDA0001867298020000133
The travel direction determination method is as follows:
the angles β 1 and β 1 between orien _ ave and the two motion axis directions orien _ move1 and orien _ move2 are calculated respectively, and the motion axis direction having an angle smaller than 90 degrees with orien _ ave is selected as the traveling direction, wherein if a special case of atan2(y, x) being undefined, the motion axis direction in the interval [0, 180 ° ] between the two motion axis directions orien _ move1 and orien _ move2 can be selected as the traveling direction.
Optionally, for the ith walking, the terminal converts a plurality of continuous triaxial accelerations detected and obtained in a sampling time period corresponding to the ith walking into a plurality of triaxial angular velocities in a navigation coordinate system for low-pass filtering, where a cut-off frequency of the low-pass filtering is slightly greater than 2Hz, such as 2.5Hz and 3 Hz.
Based on the first embodiment and the second embodiment, fig. 6 is a schematic diagram of a positioning process provided in the embodiments of the present application, the terminal performs common-frequency sampling on the acceleration sensor 160D, the gyroscope sensor 160A, the gravity sensor 160F, the magnetic field sensor 160C, and the direction sensor 160B to obtain a three-axis acceleration, a three-axis angular velocity, a three-axis gravity acceleration, a three-axis magnetic field strength, and a heading angle, calculates a rotation matrix between the carrier coordinate system and the navigation coordinate system according to the three-axis gravity acceleration and the three-axis magnetic field strength for each sampling, converts the three-axis acceleration and the three-axis angular velocity into the navigation coordinate system, and performs low-pass filtering on the converted three-axis acceleration and the three-axis angular velocity. The terminal carries out SFSM walking detection according to a triaxial angular velocity sequence obtained by sampling in a first sampling time period, PCA processing is carried out on the triaxial acceleration sequence in the sampling time period corresponding to walking after the user finishes walking, a movement axis corresponding to the walking is determined, two movement directions indicated by the movement axis are judged through a course angular sequence in the sampling time period corresponding to the walking, the movement direction is determined, and the position of the user after the walking is updated according to the initial position and the step length of the walking.
Based on the first embodiment and the second embodiment, the simulation test is performed in the test environment shown in fig. 7, the test terminal 100 is a gorgeous 7 smart phone, the test environment area is 413m × 26.1m, the terminal 100 is placed in a hand and is subjected to the simulation test under a gesture of hand throwing, the SFSM walking detection is adopted, the PCA processing and the heading angle are combined to determine the advancing direction for positioning, the test result positioning track diagram is shown in fig. 8, in the simulation test, the step 84 is actually walked, the step 85 is detected, the positioning error of the advancing direction is determined to be 3.31m according to the heading angle in the prior art, and the positioning error of the advancing direction is determined to be 1.65m by combining the PCA processing and the heading angle in the application. Compared with a method for directly determining the advancing direction by using the course angle, the advancing direction determination in the application can reduce the limit on the terminal posture in the process of shaking and walking of the user. The conventional method requires the tip of the terminal 100 to point strictly in the traveling direction during the traveling of the terminal 100, and the present application only needs to limit the tip of the terminal 100 to be substantially forward or backward, allowing the terminal tip (tip forward) or the terminal tail (tail forward) to have a direction deviation of not more than 90 ° from the traveling direction.
In addition, through simulation experiments, under the gesture that the terminal is placed in the hand to swing, the SFSM walking detection method and the PD walking detection method are used for detecting the number of steps in the 1739-step actual walking process of 6 tests under different swing strengths, the detection accuracy rate of the number of steps of the PD walking detection method is 81.04%, the detection accuracy rate of the number of steps of the SFSM walking detection method is 98.77%, compared with the traditional PD method, the detection accuracy rate is improved by 17.63%, and good detection results are obtained for the following reasons:
firstly, compared with an acceleration module value, the angular velocity module value in the swing mode has better walking same-frequency periodicity and more stable amplitude; secondly, the complete gait is detected through a finite state machine instead of a certain state point in the walking process, so that the walking detection accuracy is improved; thirdly, the stability of the algorithm can be ensured by a method of self-adaptively updating the threshold value of the state of the finite-state machine, and good results can be obtained when walking detection is carried out on different users at different times; fourthly, the maximum peak values generated in the noise false detection and turning process are identified and removed through the peak-valley difference and the one-step duration, and the final detection accuracy is improved.
[ EXAMPLE III ]
Based on the same concept, fig. 9 shows a walking detection device 900 provided by the present application, where the walking detection device 900 is used for performing the operation performed by the terminal in the walking detection. As shown in fig. 9, the walking detection device 900 includes:
a detecting unit 901, configured to detect and obtain a plurality of continuous three-axis angular velocities;
a processing unit 902, configured to determine a plurality of angular velocity modulus values corresponding to the plurality of consecutive triaxial angular velocities; the method comprises the steps that on the basis of detection time of a plurality of continuous triaxial angular velocities, a plurality of angular velocity modulus values and four time periods form corresponding relations; the four time periods are determined according to the first threshold value and the second threshold value according to the detection time sequence;
the processing unit 902 is further configured to determine that the plurality of continuous angular velocity modulus values satisfy a condition, and determine that the user completes one-step walking; the conditions include: the angular velocity module value corresponding to a first time period is smaller than the first threshold, the angular velocity module value corresponding to a second time period is not smaller than the first threshold and not larger than the second threshold, the angular velocity module value corresponding to a third time period is larger than the second threshold, and the angular velocity module value corresponding to a fourth time period is not smaller than the first threshold and not larger than the second threshold.
Optionally, the apparatus further comprises:
a receiving unit 903, configured to receive a positioning signal;
the processing unit 902 is further configured to determine, when it is determined that the signal strength of the positioning signal is smaller than a third threshold, the position of the user after the one-step walking according to the starting position, the traveling direction, and the traveling step length of the one-step walking.
Optionally, the detecting unit 901 is further configured to detect and obtain a plurality of continuous triaxial accelerations and a plurality of continuous heading angles in a sampling time period;
the processing unit 902 is further configured to determine a plurality of horizontal plane accelerations corresponding to the plurality of continuous three-axis accelerations, perform PCA processing on the plurality of horizontal plane accelerations based on detection times of the plurality of continuous three-axis accelerations, and determine a motion axis of the horizontal plane corresponding to the one-step walking, where the motion axis indicates two motion axis directions on the horizontal plane; and determining the target motion axis direction with the included angle of the average course angle of the plurality of continuous course angles not greater than 90 degrees as the advancing direction.
Optionally, the conditions further include: detecting that the duration of obtaining the plurality of continuous triaxial angular velocities is not less than a fourth threshold.
Optionally, the conditions further include: and determining that the difference value between the maximum angular velocity module value and the minimum angular velocity module value in the plurality of angular velocity module values is not greater than a fifth threshold value.
Optionally, the processing unit 902 is further configured to perform operations according to
Figure BDA0001867298020000141
Determining the first threshold; and, according to
Figure BDA0001867298020000151
Determining the second threshold; wherein thrv (i) represents the first threshold, thrp (i) represents the second threshold, i represents the i-th walking completed, i is a natural number; maxi-fMaximum angular velocity module, max, determined for walk i-fi-gMaximum angular velocity modulus, min, determined for the i-g walki-fMinimum angular velocity module, min, determined for the i-f walki-gMinimum module of angular velocity, thrp, determined for the i-g th walk0、thrv0A, b, c and d are constants, f < g < N, and f, g and N are positive integers.
Optionally, a and d are 1/3, b and c are 1/6.
Optionally, f is 2, and g is 4.
Based on the same inventive concept as the walking detection method, the embodiment of the application also provides a terminal.
As shown in fig. 10, terminal 1000 can include memory 1001, processor 1002, and transceiver 1003. The memory 1001, the processor 1002, and the transceiver 1003 are linked by a bus. The memory 1001 is configured to store a computer execution instruction, and when the terminal device 1000 runs, the processor 1002 executes the computer execution instruction stored in the memory 1001 through the transceiver 1003, so that the terminal device 1000 implements any one of the walking detection methods described above, which may refer to the description above and the related description of the drawings, and is not described herein again.
The embodiment of the application provides a computer storage medium, which stores a computer program, wherein the computer program comprises instructions for executing the walking detection method described in the embodiment of the method.
Embodiments of the present application provide a computer program product containing instructions, which, when running on a terminal, enable the terminal to implement the walking detection method described in the above method embodiments.
The embodiment of the application provides a chip, wherein the chip is connected with a memory and is used for reading and executing a software program stored in the memory so as to realize the walking detection method described in the embodiment of the method.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments of the present application can be implemented by hardware, firmware, or a combination thereof. When implemented in software, the functions described above may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. Taking this as an example but not limiting: a computer-readable medium may include a Random Access Memory (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a compact disk Read-Only-on Memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, the method is simple. Any connection is properly termed a computer-readable medium. For example, if software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, the fiber optic cable, the twisted pair, the DSL, or the wireless technologies such as infrared, radio, and microwave are included in the fixation of the medium. Disk and disc, as used in accordance with embodiments of the present application, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
In short, the above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present application are intended to be included within the scope of the present application.

Claims (17)

1. A walking detection method is characterized by comprising the following steps:
the terminal obtains a plurality of continuous triaxial angular velocities through detection of the sensor module;
the terminal determines a plurality of angular velocity module values corresponding to the plurality of continuous triaxial angular velocities through a processor; the method comprises the steps that on the basis of detection time of a plurality of continuous triaxial angular velocities, a plurality of angular velocity modulus values and four time periods form corresponding relations; the four time periods are determined by the terminal according to a first threshold value and a second threshold value according to a detection time sequence;
the terminal judges that the plurality of continuous angular velocity module values meet the conditions through the processor, and determines that the user finishes one-step walking; the conditions include: the angular velocity module value corresponding to a first time period is smaller than the first threshold, the angular velocity module value corresponding to a second time period is not smaller than the first threshold and not larger than the second threshold, the angular velocity module value corresponding to a third time period is larger than the second threshold, and the angular velocity module value corresponding to a fourth time period is not smaller than the first threshold and not larger than the second threshold;
wherein the terminal determines the first threshold and the second threshold by:
according to
Figure FDA0003296847590000011
Determining the first threshold; and the number of the first and second groups,
according to
Figure FDA0003296847590000012
Determining the second threshold;
wherein thrv (i) represents the first threshold, thrp (i) represents the second threshold, i represents the i-th walking completed, i is a natural number; maxi-fMaximum angular velocity module, max, determined for walk i-fi-gMaximum angular velocity modulus, min, determined for the i-g walki-fMinimum angular velocity module, min, determined for the i-f walki-gMinimum module of angular velocity, thrp, determined for the i-g th walk0、thrv0A, b, c and d are constants, f < g < N, and f, g and N are positive integers.
2. The method of claim 1, wherein the method further comprises:
the terminal receives a positioning signal through a wireless communication module;
and when the terminal determines that the signal intensity of the positioning signal is smaller than a third threshold value, determining the position of the user after the one-step walking through the processor according to the initial position, the advancing direction and the advancing step length of the one-step walking.
3. The method of claim 2, wherein the terminal determines the direction of travel by:
the terminal obtains a plurality of continuous triaxial accelerations and a plurality of continuous course angles through detection of the sensor module in a sampling time period;
the terminal determines a plurality of horizontal plane accelerations corresponding to the plurality of continuous three-axis accelerations through the processor, performs Principal Component Analysis (PCA) processing on the plurality of horizontal plane accelerations based on detection time of the plurality of continuous three-axis accelerations, and determines a motion axis of the one-step walking corresponding to a horizontal plane, wherein the motion axis indicates two motion axis directions on the horizontal plane;
and the terminal determines the direction of the target motion axis, which has an included angle with the average course angle of the continuous course angles not more than 90 degrees, as the advancing direction through the processor.
4. The method of claim 1, wherein the conditions further comprise:
and the terminal detects that the duration of obtaining the plurality of continuous triaxial angular velocities is not less than a fourth threshold value.
5. The method of claim 1 or 4, wherein the conditions further comprise:
and the difference value between the maximum angular velocity module value and the minimum angular velocity module value in the plurality of angular velocity module values determined by the terminal is not greater than a fifth threshold value.
6. The method of claim 1, wherein a and d are 1/3 and b and c are 1/6.
7. The method of claim 1, wherein f is 2 and g is 4.
8. A walking detection device, comprising:
the detection unit is used for detecting and obtaining a plurality of continuous three-axis angular velocities;
a processing unit for determining a plurality of angular velocity modulus values corresponding to the plurality of consecutive triaxial angular velocities; the method comprises the steps that on the basis of detection time of a plurality of continuous triaxial angular velocities, a plurality of angular velocity modulus values and four time periods form corresponding relations; the four time periods are determined according to a first threshold value and a second threshold value according to the detection time sequence;
the processing unit is further used for judging that the plurality of continuous angular velocity module values meet the conditions and determining that the user finishes one-step walking; the conditions include: the angular velocity module value corresponding to a first time period is smaller than the first threshold, the angular velocity module value corresponding to a second time period is not smaller than the first threshold and not larger than the second threshold, the angular velocity module value corresponding to a third time period is larger than the second threshold, and the angular velocity module value corresponding to a fourth time period is not smaller than the first threshold and not larger than the second threshold;
wherein the processing unit is further configured to
Figure FDA0003296847590000021
Determining the first threshold; and, according to
Figure FDA0003296847590000022
Determining the second threshold; wherein thrv (i) represents the first threshold, thrp (i) represents the second threshold, i represents the i-th walking completed, i is a natural number; maxi-fMaximum angular velocity module, max, determined for walk i-fi-gMaximum angular velocity modulus, min, determined for the i-g walki-fMinimum angular velocity module, min, determined for the i-f walki-gMinimum module of angular velocity, thrp, determined for the i-g th walk0、thrv0A, b, c and d are constants, f < g < N, and f, g and N are positive integers.
9. The apparatus of claim 8, wherein the apparatus further comprises:
a receiving unit for receiving a positioning signal;
and the processing unit is further configured to determine the position of the user after the one-step walking according to the initial position, the traveling direction and the traveling step length of the one-step walking when it is determined that the signal intensity of the positioning signal is smaller than a third threshold value.
10. The apparatus of claim 9, wherein the detection unit is further configured to detect that a plurality of consecutive triaxial accelerations and a plurality of consecutive heading angles are obtained during a sampling period;
the processing unit is further configured to determine a plurality of horizontal plane accelerations corresponding to the plurality of continuous three-axis accelerations, perform Principal Component Analysis (PCA) processing on the plurality of horizontal plane accelerations based on detection times of the plurality of continuous three-axis accelerations, and determine a motion axis of the one-step walking corresponding to a horizontal plane, where the motion axis indicates two motion axis directions on the horizontal plane; and determining the target motion axis direction with the included angle of the average course angle of the plurality of continuous course angles not greater than 90 degrees as the advancing direction.
11. The apparatus of claim 8, wherein the conditions further comprise: detecting that the duration of obtaining the plurality of continuous triaxial angular velocities is not less than a fourth threshold.
12. The apparatus of claim 8 or 11, wherein the conditions further comprise: and determining that the difference value between the maximum angular velocity module value and the minimum angular velocity module value in the plurality of angular velocity module values is not greater than a fifth threshold value.
13. The apparatus of claim 8, wherein a and d are 1/3 and b and c are 1/6.
14. The apparatus of claim 8, wherein f is 2 and g is 4.
15. A terminal comprising a processor, a transceiver, and a memory;
the memory stores a computer program;
the transceiver is used for transmitting and receiving data;
the processor, for invoking a computer program stored in the memory, to perform the method of any one of claims 1-7 through the transceiver.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a computer program which, when run on a terminal, causes the terminal to perform the method according to any one of claims 1-7.
17. A chip, characterized in that it is connected to a memory for reading and executing a software program stored in said memory for implementing the method according to any one of claims 1 to 7.
CN201811360864.9A 2018-11-02 2018-11-15 Walking detection method and device Active CN111142687B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/113163 WO2020088352A1 (en) 2018-11-02 2019-10-25 Walking detection method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2018112998835 2018-11-02
CN201811299883 2018-11-02

Publications (2)

Publication Number Publication Date
CN111142687A CN111142687A (en) 2020-05-12
CN111142687B true CN111142687B (en) 2022-04-12

Family

ID=70515959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811360864.9A Active CN111142687B (en) 2018-11-02 2018-11-15 Walking detection method and device

Country Status (1)

Country Link
CN (1) CN111142687B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112237427A (en) * 2020-10-14 2021-01-19 北京爱笔科技有限公司 Method and device for detecting steps, detection equipment and computer storage medium
CN112237426A (en) * 2020-10-14 2021-01-19 北京爱笔科技有限公司 Method and device for detecting steps, detection equipment and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102824177A (en) * 2012-07-25 2012-12-19 王哲龙 Three-dimensional human body gait quantitative analysis system and method
CN104406586A (en) * 2014-12-04 2015-03-11 南京邮电大学 Pedestrian navigation device and pedestrian navigation method based on inertial sensor
CN106123911A (en) * 2016-08-06 2016-11-16 深圳市爱康伟达智能医疗科技有限公司 A kind of based on acceleration sensor with the step recording method of angular-rate sensor
CN106705967A (en) * 2016-11-18 2017-05-24 南京邮电大学 Indoor localization method for precision improvement based on pedestrian dead reckoning
CN108634960A (en) * 2018-05-11 2018-10-12 浙江大学 A kind of gait online test method for ectoskeleton wearer

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5974171B2 (en) * 2013-05-15 2016-08-23 旭化成株式会社 Offset estimation apparatus, method, and program
JP5889367B2 (en) * 2014-06-19 2016-03-22 本田技研工業株式会社 Walking assistance device and walking assistance program
US10508920B2 (en) * 2014-11-04 2019-12-17 Xsens Holding B.V. Pedestrian dead reckoning position tracker
WO2017019570A1 (en) * 2015-07-29 2017-02-02 Lattice Semiconductor Corporation Angle and position sensing using arrays of antennas
CN107966161B (en) * 2017-11-09 2020-04-28 内蒙古大学 Walking detection method based on FFT

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102824177A (en) * 2012-07-25 2012-12-19 王哲龙 Three-dimensional human body gait quantitative analysis system and method
CN104406586A (en) * 2014-12-04 2015-03-11 南京邮电大学 Pedestrian navigation device and pedestrian navigation method based on inertial sensor
CN106123911A (en) * 2016-08-06 2016-11-16 深圳市爱康伟达智能医疗科技有限公司 A kind of based on acceleration sensor with the step recording method of angular-rate sensor
CN106705967A (en) * 2016-11-18 2017-05-24 南京邮电大学 Indoor localization method for precision improvement based on pedestrian dead reckoning
CN108634960A (en) * 2018-05-11 2018-10-12 浙江大学 A kind of gait online test method for ectoskeleton wearer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于隐马尔科夫模型的步态识别算法;张向刚、唐海等;《计算机科学》;20160731;第43卷(第7期);第285-289+302页 *

Also Published As

Publication number Publication date
CN111142687A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN107976193B (en) Pedestrian track inference method, device, track inference equipment and storage medium
US10830606B2 (en) System and method for detecting non-meaningful motion
US10652696B2 (en) Method and apparatus for categorizing device use case for on foot motion using motion sensor data
WO2018149324A1 (en) Detection method and terminal device
US20160123738A1 (en) Pedestrian Dead Reckoning Position Tracker
US11035915B2 (en) Method and system for magnetic fingerprinting
US10359289B2 (en) Device state estimation under periodic motion
US10345426B2 (en) Device state estimation under pedestrian motion with swinging limb
US20160097788A1 (en) Pedestrian direction of motion determination system and method
CN111829516B (en) Autonomous pedestrian positioning method based on smart phone
CN106441296A (en) Motion track recording method and user equipment
CN111142687B (en) Walking detection method and device
CN106527670A (en) Hand gesture interaction device
Gong et al. Robust inertial motion tracking through deep sensor fusion across smart earbuds and smartphone
CN108029092A (en) Localization method, device and mobile terminal for mobile terminal
CN109725284B (en) Method and system for determining a direction of motion of an object
CN106527672A (en) Non-contact type character input method
JP7077598B2 (en) Methods, programs, and systems for position-fixing and tracking
US11692829B2 (en) System and method for determining a trajectory of a subject using motion data
US10895626B2 (en) Device state estimation with body-fixed assumption
US10914793B2 (en) Method and system for magnetometer calibration
TWI687705B (en) Method and system for tracking and determining a position of an object
KR101525224B1 (en) A portable terminal of having the auto photographing mode
WO2020088352A1 (en) Walking detection method and device
JP7279731B2 (en) ELECTRONIC DEVICE, MAP MATCHING METHOD AND PROGRAM

Legal Events

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