Displacement detection method and electronic device
By utilizing three-axis acceleration data and neural network models, the problem of high power consumption of the gyroscope is solved, low-power displacement detection is achieved, and the device's battery life and trajectory detection accuracy are improved.
Patent Information
- Application Number
- PCT/CN2025/081792
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-19
- Filing Date
- 2025-03-11
- Publication Date
- 2025-09-25
AI Technical Summary
In existing inertial navigation technology, the high power consumption of gyroscopes leads to high energy consumption of electronic devices, affecting the battery life and efficiency of the equipment.
By using three-axis acceleration data combined with a neural network model, the user's heading angle and step counting time point are determined to achieve displacement detection, reducing dependence on gyroscopes and magnetic sensors, thereby reducing power consumption.
It achieves low-power all-weather displacement detection, improving the endurance of electronic devices and the accuracy of trajectory information.
Smart Images

Figure CN2025081792_25092025_PF_FP_ABST
Abstract
Description
Displacement detection method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 19, 2024, with application number 202410316013.3 and application name “Displacement Detection Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of electronic equipment, and more specifically, to a displacement detection method and electronic equipment. Background Art
[0003] With the rapid development of mobile communication technology, displacement detection technology is being applied in more and more fields. For example, it can be used to determine the trajectory or track of users in the field of sports and health, or to perceive the environmental switching of devices in the field of the Internet of Things (IoE) of smart terminals.
[0004] Displacement detection through inertial navigation technology is widely used in various electronic devices. Inertial navigation technology is a technology that detects displacement through data collected by inertial navigation elements such as acceleration sensors, gyroscope sensors and magnetic sensors.
[0005] However, due to the high power consumption of the gyroscope, the above solution may cause high power consumption of the electronic device when it is continuously running. Summary of the Invention
[0006] The present application provides a displacement detection method and electronic equipment, which can reduce the power consumption of displacement detection.
[0007] In a first aspect, a displacement detection method is provided, comprising: obtaining a plurality of three-axis acceleration data collected by an electronic device carried by a user; determining a pedometer time point of each step of the user and a heading angle of each step of the user based on the plurality of three-axis acceleration data; and determining trajectory information of the electronic device based on the pedometer time point of each step of the user and the heading angle of each step of the user.
[0008] The heading angle of each step can be a relative heading angle of each step relative to the previous step, or can be an absolute heading angle of each step. The absolute heading angle can be calculated from the relative heading angle.
[0009] Since the embodiment of the present application uses three-axis acceleration data to determine the heading angle without using devices such as gyroscopes or magnetic sensors, the power consumption of the device is reduced, and the method can operate around the clock with low power consumption.
[0010] In combination with the first aspect, in certain implementations of the first aspect, determining the heading angle of each step of the user based on the multiple three-axis acceleration data includes: inputting the multiple three-axis acceleration data into a first model to obtain the heading angle of each step of the user, the first model is a model trained based on at least one first sample data, and the first sample data includes reference three-axis acceleration data and reference trajectory information corresponding to the reference three-axis acceleration data.
[0011] In combination with the first aspect, in certain implementations of the first aspect, inputting the multiple three-axis acceleration data into the first model to obtain the heading angle of each step of the user includes: sampling the multiple three-axis acceleration data using a sliding window to generate a first sampling window, the first sampling window including the three-axis acceleration data of the first step, the three-axis acceleration data of N steps before the first step, and the three-axis acceleration data of N steps after the first step, where N is an integer greater than or equal to 1; inputting the data of the first sampling window into the first model to obtain a first heading angle, the first heading angle being the relative heading angle of the first step relative to the step before the first step, and the heading angle of each step of the user including the first heading angle.
[0012] In this embodiment, the first sampling window is used as the input of the neural network model in units of steps, and the first step is the step at the center of the sliding window. Since the context of the first step is considered during input, the output first heading angle is more accurate.
[0013] In combination with the first aspect, in certain implementations of the first aspect, inputting the multiple three-axis accelerations into the first model to obtain the heading angle of each step of the user includes: dividing the multiple three-axis acceleration data into multiple data segments, and the number of three-axis acceleration data in the multiple data segments is equal; inputting the data of the first data segment into the first model to obtain the second heading angle corresponding to the first data segment, and the first data segment belongs to the multiple data segments; determining the number of step counting time points corresponding to the first data segment; determining the first heading angle based on the second heading angle and the number of step counting time points corresponding to the first data segment, the first heading angle being the relative heading angle of each step corresponding to the first data segment relative to the previous step, and the heading angle of each step of the user includes the first heading angle.
[0014] In this embodiment, the neural network model input is segmented according to the number of triaxial acceleration data points. This allows the calculation of the total heading angle for each step at the step counting time point corresponding to the data segment. This total heading angle can be evenly divided among the steps corresponding to the step counting time point, thus reducing the heading angle error caused by inaccurate step counting time points. Furthermore, by increasing the window length, more feature information can be obtained, making the heading angle more accurate.
[0015] In combination with the first aspect, in certain implementations of the first aspect, determining the trajectory information of the electronic device based on the pedometer time point of each step of the user and the heading angle of each step of the user includes: determining the step length of each step of the user based on the pedometer time point of each step of the user and the sampling interval of the multiple three-axis acceleration data; determining the trajectory information of the electronic device based on the step length of each step of the user and the heading angle of each step of the user.
[0016] The sampling interval and the number of non-zero triaxial acceleration data points at each step can be used to calculate the duration of each step, further determining the cadence, which in turn determines the step length. The step length and heading angle of each step can be used to calculate the user's motion trajectory.
[0017] In combination with the first aspect, in certain implementations of the first aspect, determining the pedometer time point of each step of the user based on the multiple three-axis acceleration data includes: determining multiple comprehensive accelerations corresponding to the multiple three-axis acceleration data based on the multiple three-axis acceleration data; and determining the pedometer time point of each step of the user based on the multiple comprehensive accelerations.
[0018] When determining the pedometer time point, the integrated acceleration corresponding to each of the three-axis accelerations collected can be calculated, and the pedometer time point, that is, the start timestamp or end timestamp of each step, can be determined based on the waveform of the integrated acceleration.
[0019] In combination with the first aspect, in certain implementations of the first aspect, the multiple three-axis acceleration data are obtained by preprocessing the original three-axis acceleration data collected from the acceleration sensor, and the preprocessing includes at least one of the following: downsampling processing, high-pass filtering processing and low-pass filtering processing.
[0020] In combination with the first aspect, in some implementations of the first aspect, a sampling frequency of the plurality of three-axis acceleration data is less than or equal to 100 Hz.
[0021] The sampling frequency can be 100 Hz, 50 Hz, 25 Hz, etc. Lowering the sampling frequency of the processed three-axis acceleration can reduce the processing overhead. If the sampling frequency is higher, the calculated displacement trajectory can be more accurate.
[0022] Optionally, the sampling frequency may also be greater than 100 Hz. The higher the sampling frequency, the more accurate the calculation, and the lower the sampling frequency, the lower the processing overhead of the electronic device.
[0023] In combination with the first aspect, in certain solid line embodiments of the first aspect, the trajectory information of the electronic device includes a maximum displacement radius of the electronic device; and the method further includes: determining a state of the electronic device based on the trajectory information of the electronic device.
[0024] In this embodiment, when the maximum displacement radius of the electronic device exceeds a preset threshold, the electronic device is removed from the available device list. When it is less than the preset threshold, the electronic device is updated to the available device list. This facilitates interaction with the electronic device and makes device status detection more accurate.
[0025] In a second aspect, an electronic device is provided, comprising a processor and a memory; the memory stores a computer program; the processor is configured to call the computer program stored in the memory to execute the method described in the first aspect or any one of the implementations of the first aspect.
[0026] According to a third aspect, a computer storage medium is provided, wherein the computer-readable storage medium includes a computer program. When the computer program runs on a terminal, the terminal executes the method according to the first aspect or any one of the implementations of the first aspect.
[0027] In a fourth aspect, a computer program product is provided. When a terminal reads and executes the computer program product, the terminal executes the method described in the first aspect or any one of the implementations of the first aspect.
[0028] In a fifth aspect, a chip is provided, which is connected to a memory and is used to read and execute a software program stored in the memory to implement the method described in the first aspect or any one of the implementation methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0030] FIG2 is a block diagram of the software structure of the electronic device provided in an embodiment of the present application.
[0031] FIG3 is a schematic flow chart of a displacement detection method provided in an embodiment of the present application.
[0032] FIG4 is a schematic diagram of coordinate axes of an electronic device provided in an embodiment of the present application.
[0033] FIG5 is a waveform diagram of a comprehensive acceleration provided in an embodiment of the present application.
[0034] FIG6 is a waveform diagram of three-axis acceleration and y-axis angular velocity during turning provided by an embodiment of the present application.
[0035] FIG7 is a schematic diagram of a sliding window provided in an embodiment of the present application.
[0036] FIG8 is a structural diagram of a neural network model provided in an embodiment of the present application.
[0037] FIG9 is a schematic diagram of a data segment division provided in an embodiment of the present application.
[0038] FIG10 shows a schematic diagram of a displacement radius provided in an embodiment of the present application.
[0039] FIG11 is a schematic block diagram of an electronic device provided in an embodiment of the present application.
[0040] FIG12 is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solution in this application will be described below with reference to the accompanying drawings.
[0042] 1 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0043] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0044] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0045] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0046] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0047] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0048] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0049] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0050] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G applied on the electronic device 100.
[0051] The wireless communication module 160 can provide wireless communication solutions for application on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
[0052] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0053] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0054] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), or a display panel made of one of the following materials: organic light-emitting diode (OLED), active-matrix organic light-emitting diode (AMOLED), flexible light-emitting diode (FLED), MiniLED, MicroLed, Micro-oLed, or quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.
[0055] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0056] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0057] The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
[0058] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .
[0059] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
[0060] The distance sensor 180F is used to measure distance.
[0061] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. system, system, System, etc. The embodiment of this application is based on a layered architecture Taking the system as an example, the software structure of the electronic device 100 is exemplarily described.
[0062] Figure 2 is a software structure diagram of the electronic device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer, from top to bottom. The application layer can include a series of application packages.
[0063] As shown in FIG2 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
[0064] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0065] As shown in Figure 2, the application framework layer may include window manager service (WMS), content provider, activity manager service (AMS), package manager service (PMS), view system, phone manager, resource manager, notification manager, etc.
[0066] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0067] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0068] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0069] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).
[0070] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0071] FIG3 shows a displacement detection method provided by an embodiment of the present application, which can reduce power consumption of displacement detection. The method includes:
[0072] S310: Acquire a plurality of three-axis acceleration data collected by an electronic device carried by a user.
[0073] S320: Determine a step counting time point and a heading angle of each step of the user based on the plurality of three-axis acceleration data.
[0074] S330: Determine the trajectory information of the electronic device according to the step counting time point of each step of the user and the heading angle of each step of the user.
[0075] An electronic device can collect its triaxial acceleration using an accelerometer at a set sampling frequency and record the sampling timestamp of each triaxial acceleration. As shown in Figure 4, taking a mobile phone as an example, a coordinate system can be established with the width of the device as the x-axis, the length of the device as the y-axis, and the direction perpendicular to the screen as the z-axis. The triaxial acceleration data includes acceleration data along the x-axis, y-axis, and z-axis.
[0076] In an embodiment of the present application, the three-axis acceleration data in S310 can be either the original three-axis acceleration data obtained from the acceleration sensor, or the data obtained by preprocessing the original acceleration data. The preprocessing can include at least one of downsampling processing, high-pass filtering processing, and low-pass filtering processing.
[0077] For example, the original three-axis acceleration data after downsampling and high-pass and low-pass filtering can be used to determine the pedometer time point, and the original three-axis acceleration data or the downsampling data can be used to determine the heading angle; for another example, the data after downsampling and high-pass filtering and / or low-pass filtering can be used to determine the pedometer time point and heading angle; for another example, the original three-axis acceleration data can be used to determine the pedometer time point and heading angle.
[0078] For example, the original three-axis acceleration data collected at any time is: (a x ,a y ,a z ), where a x is the acceleration along the x-axis, a y is the acceleration along the y-axis, a z is the acceleration along the z-axis.
[0079] In one embodiment of the present application, downsampling can be performed by taking one acceleration data from each plurality of three-axis acceleration data. For example, one three-axis acceleration data can be taken from each four three-axis acceleration data. In another embodiment, multiple three-axis acceleration data can be formed into one three-axis acceleration data by linear fitting or averaging. For example, one three-axis acceleration data can be obtained by fitting four adjacent three-axis acceleration data, or one three-axis acceleration data can be obtained by averaging four three-axis acceleration data. Through the downsampling process, the amount of data to be processed can be reduced. For example, if the sampling frequency of the original three-axis acceleration data is 100Hz, the sampling frequency can be reduced to 50Hz or 25Hz through the downsampling process.
[0080] High-pass filtering removes low-frequency or DC components from triaxial acceleration data, allowing high-frequency components to pass through. High-pass filtering removes gravity components and slowly changing background noise, while retaining rapidly changing or high-frequency dynamic acceleration signals.
[0081] Low-pass filtering removes high-frequency components from triaxial acceleration data, allowing low-frequency or DC components to pass through. Low-pass filtering removes high-frequency noise and rapidly changing disturbances, such as power supply noise, thermal noise, and electromagnetic interference.
[0082] The user's normal walking frequency is usually 0.5Hz to 2Hz, that is, the user's walking speed is usually between 2 seconds for one step and 1 second for two steps. In one embodiment, the cutoff frequency of the low-pass filter can be slightly higher than the walking frequency, for example, 2.5Hz, 2.8Hz, 3Hz, etc.
[0083] High-pass filtering and / or low-pass filtering can be performed by a Butterworth filter set in the electronic device; or a filter may not be set in the electronic device, but the high-pass filtering and / or low-pass filtering of the three-axis acceleration data can be performed by the processor operation of the electronic device.
[0084] In an embodiment of the present application, the execution of S310 to S330 can be performed by processing the three-axis acceleration data in segments, for example, acquiring three-axis acceleration data once every 10 seconds and processing the three-axis acceleration data collected for 10 seconds at a time. If the original sampling frequency of the acceleration sensor is 100 Hz, then every 1000 three-axis acceleration data are processed once, and subsequent processing can directly use these 1000 three-axis acceleration data for processing, or can also be processed by any of downsampling, high-pass filtering, and low-pass filtering before subsequent processing.
[0085] In S320 , the step counting time point may include a start timestamp or an end timestamp of each step (the end timestamp of the previous step is approximately equal to the start timestamp of the next step).
[0086] In some embodiments, the step counting time point may also include a timestamp that is not synchronized with the same relative moment, such as a timestamp when the user's foot is at the highest point in the air. This application does not limit this.
[0087] In order to reduce errors, the three-axis acceleration data used to determine the step counting time point of each step may be processed by high-pass filtering and / or low-pass filtering. Schematically, a batch of data processed before high-pass filtering and / or low-pass filtering includes n (wherein each three-axis acceleration data includes acceleration components corresponding to three axes), and the n three-axis acceleration data include: (a x1 ,a y1 ,a z1 ),(a x2 ,a y2 ,a z2 ),(a x3 ,a y3 ,a z3 )…(a xn ,a yn ,a zn ), where a xi is the acceleration component along the x-axis, a yi is the acceleration component along the y-axis, a zi is the acceleration component along the z-axis, and i is any positive integer from 1 to n. The above n three-axis acceleration data can be expressed as (a x1 ,a x2 ,a x3 …a xn ), (a y1 ,a y2 ,a y3 …a yn ), (a z1 ,a z2 ,a z3 …a zn ), the acceleration components of the three axes are subjected to high-pass filtering and / or low-pass filtering respectively, and are expressed as (a′ x1 ,a′ x2 ,a′ x3 …a′ xn ), (a′ y1 ,a′ y2 ,a′ y3 …a′ yn ), (a′ z1 ,a′ z2 ,a′ z3 …a′zn ), then n integrated accelerations can be determined based on the acceleration components of the three axes.
[0088] In one embodiment, the integrated acceleration a′ i It can be calculated by the following formula
[0089] Wherein, i is any positive integer from 2 to n, h is a weight factor, 0<h<1, for example, h can be a value such as 0.2, 0.3, 0.4, etc., h can represent a smoothing factor. The larger h is, the higher the correlation between the value of the integrated acceleration at the current sampling moment and the integrated acceleration at the previous sampling moment can be. By setting the value of h, the present and past information can be effectively balanced.
[0090] By using the above formula, we can calculate the n comprehensive accelerations corresponding to n acceleration data: a′1, a′2…a′ n ,Through these integrated accelerations, we can draw a graph to estimate the gait and divide the steps.
[0091] In another embodiment, the integrated acceleration can be the acceleration modulus calculated from the three-axis acceleration, and the integrated acceleration a′ i It can be calculated by the following formula:
[0092] The integrated acceleration corresponding to each triaxial acceleration data is not limited to being calculated by the above two methods. For example, in some embodiments, the integrated acceleration may also be the average value of the three components of the triaxial acceleration, etc., which will not be repeated here.
[0093] After the integrated acceleration is calculated, a integrated acceleration waveform can be obtained according to the calculated n integrated accelerations, where the abscissa of the waveform is time and the ordinate is the integrated acceleration.
[0094] When a person walks normally, electronic devices can move with the body. Walking is a process of lifting the leg, landing, and then moving horizontally. The accelerometer's values change accordingly, and this change is regular. This regularity is reflected in the integrated acceleration waveform, so the time point of each step can be obtained from this waveform.
[0095] Figure 5 schematically illustrates a waveform diagram of a comprehensive acceleration provided by an embodiment of the present application, where the horizontal axis represents time and the vertical axis represents comprehensive acceleration. Figure 5 shows multiple peaks and troughs. A peak corresponds to the moment when the foot is at its highest point in the air, a trough corresponds to the moment when the foot lands, and the interval between two troughs corresponds to a step. Thus, the timestamps corresponding to the troughs can be used as the counting time points for each step through the waveform diagram.
[0096] Alternatively, the steps may be divided not according to the troughs, for example, peak detection may be performed, and the timestamp corresponding to the peak may be used as the time point for dividing the asynchronous steps. This application does not impose any limitation on this.
[0097] When performing peak or trough detection, in order to enhance the accuracy of detection, only peaks greater than a threshold or troughs less than a threshold may be used as step counting time points.
[0098] The n acceleration data can be divided into acceleration data of each step according to the step counting time point of each step. For example, the n acceleration data can be divided into m steps: step0, step1, step2...stepm, where each step includes multiple acceleration data.
[0099] The heading angle of each step in S320 can be a relative heading angle, that is, the angular offset of each step relative to the previous step. When the user is exercising, the direction of the first step can be used as the x-axis, the course angle of step 1 can be 0 degrees, the angular offset of step 2 relative to step 1 can be the heading angle of step 2, the angular offset of step 3 relative to step 2 can be the heading angle of step 3, and so on. The angular offset of step n relative to step n-1 can be the heading angle of step n.
[0100] Alternatively, the heading angle of each step in S320 may be an absolute heading angle. The absolute heading angle may be determined after determining the relative heading angle of each step relative to the previous step in a certain manner. The absolute heading angle may be the angle of a step relative to the x-axis, where the x-axis may be schematically represented as the direction of step 1. The following describes the process of obtaining the relative heading angle using a neural network model.
[0101] In an embodiment of the present application, there is no need to use gyroscope data but only the three-axis acceleration data to determine the heading angle of each step. There is a certain correspondence between the three-axis acceleration data and the heading angle. Figure 6 shows a schematic diagram of a three-axis acceleration change curve and a y-axis angular velocity change curve. When there are obvious peaks or troughs in the y-axis angular velocity, it indicates that there is an obvious turn. It can be seen from Figure 6 that when there are obvious peaks or troughs in the y-axis angular velocity curve (the two peaks and troughs on the y-axis angular velocity change curve are schematically circled in Figure 6), the three-axis acceleration data (mainly the x-axis acceleration and the y-axis acceleration) have certain fluctuations. In other words, the relevant characteristics of the heading angle can be obtained through the three-axis acceleration data.
[0102] The embodiment of the present application can use a neural network model to learn the corresponding features to estimate the heading angle of each step. The neural network model can be trained using reference three-axis acceleration data and corresponding reference trajectory information as a training set.
[0103] The reference three-axis acceleration data can be the original three-axis acceleration data of the user during movement collected by the acceleration sensor, or it can be the three-axis acceleration data obtained after the original three-axis acceleration data is processed by downsampling, filtering, etc. The reference trajectory information can be either the heading angle of each step calculated in advance, or the trajectory coordinates and corresponding timestamps of each sampling point, so that the reference heading angle of each step can be determined by the trajectory information. The reference pedometer time point is the start timestamp or end timestamp of each step in the movement process or the timestamp of other asynchronous relative moments. The asynchronous pedometer time point can be determined by referring to the three-axis acceleration data (for example, the reference pedometer time point can be determined according to the waveform diagram of the integrated acceleration as described above), or the pedometer time point can also be predetermined by other data.
[0104] By referring to the trajectory information and the step counting time point, the reference heading between any two sampling points or the reference heading angle between any two steps can be calculated. Combined with the reference heading angle, the relationship between the heading angle and the reference acceleration data can be learned in a supervised manner. Finally, the trained neural network model can be used to input the corresponding three-axis acceleration data to obtain the heading angle of each step.
[0105] In order to make the estimation of the heading angle at each step more accurate, schematically, a long short term memory network (LSTM) can be used to estimate the heading angle at each step.
[0106] Before training, the parameters of the neural network model can be randomly set. During the training phase, the parameters of the neural network model can be updated in the direction of reducing the loss function.
[0107] Specifically, the training process of the neural network model may include the following steps:
[0108] S1, input the reference three-axis acceleration data into the original neural network model to obtain the training heading angle.
[0109] S2, based on the error between the training heading angle and the reference heading angle, adjusts the parameters in the original neural network model to minimize the error.
[0110] In some embodiments, multiple sets of reference three-axis acceleration data can be input into the neural network model in S1 to obtain the training heading angles of each step corresponding to the multiple sets of three-axis acceleration data. In S2, the parameters of the neural network model can be adjusted according to the error between the training heading angles of each step corresponding to each set of reference three-axis acceleration data and the calculated reference heading angle to minimize the overall error.
[0111] In other embodiments, a set of training data may be output each time S1 is run, and after S2, the adjusted parameter values may be used to return to continue executing S1 and S2 until the obtained error gradually converges to obtain a trained neural network model.
[0112] To improve the adaptability of the neural network model, the data used for training can be collected in different scenarios. For example, electronic devices of different brands, sizes, and types can be used, and the electronic devices can be in different postures when collecting the training data. Users can have different walking postures and habits, such as users of different ages, heights, weights, and genders.
[0113] When using a trained neural network model to determine the heading angle of each step of the user, in one embodiment, the three-axis acceleration data can be sampled through a sliding window to obtain a first sampling window. The data input of the first sampling window can be used to output the heading angle of the first step. The first sampling window may include the three-axis acceleration data of the first step, the three-axis acceleration data of N steps before the first step, and the three-axis acceleration data of N steps after the first step.
[0114] At this time, the input dimension of the neural network model is: (timewindow, stepwindow, 3). timewindow can represent the number of steps corresponding to the three-axis acceleration data included in the sliding window. stepwindow represents the standard number of acceleration data for each step. Since the user's walking speed may change, the actual three-axis acceleration of each step after calibration by the step counting time point may be different. A larger stepwindow value can be set. Schematically, the value can be 200, 400, etc. When the actual three-axis acceleration of a step is less than the stepwindow, the standard number is reached by padding with zeros. For example, zero padding can be performed after the actual three-axis acceleration data of each step so that the total data volume of the step reaches the stepwindow value, or zero padding can be performed before or at both ends of the actual three-axis acceleration data of each step. This application does not limit this. 3 represents the dimension of each acceleration data (each acceleration data includes components of three dimensions: x-axis, y-axis, and z-axis). According to the above input dimensions, the length of the entire sliding window, winlen, can be timewindow*stepwindow. The sliding window includes the actual three-axis acceleration data and may also include padded zeros. In actual operation, the step to be processed can be aligned with the center of the sliding window to output the heading angle of the step to be processed.
[0115] The sliding step size of the sliding window can be 1 (1 step). Taking N as 5 as an example, Figure 7 is a schematic diagram of a sliding window provided in an embodiment of the present application. As shown in Figure 7, sliding window 1 includes three-axis acceleration data from step 1 to step 11. The number of three-axis acceleration data in each step is consistent after zero padding. The center of the sliding window is the three-axis acceleration data of step 6, and the heading angle of step 6 can be output; when the window slides forward one step of data, the center of the sliding window becomes the three-axis acceleration data of step 7, and the heading angle of step 7 can be output. When the sliding window continues to slide, the heading angles of other steps can continue to be output. Since the context information of each step is also input into the neural network model through the sliding window when processing the acceleration data of each step, the obtained heading angle of the step is more accurate.
[0116] It should be understood that the sliding window introduced above includes the three-axis acceleration data of the first step located at the center of the window and N steps before the first step and N steps after the first step. In some embodiments, the sliding window may include the three-axis acceleration data of the first step located at the starting position of the window and several steps after the first step, or the data in the sliding window may include the three-axis acceleration data of the first step located at the end position of the window and several steps before the first step, or the sliding window includes the three-axis acceleration data of the first step and N steps before the first step and M steps after the first step (N≠M). This application does not limit the position of the three-axis acceleration data of the first step in the sliding window, as long as the sliding window obtains the input data to the neural network model in steps.
[0117] When a sliding window is used as the input data, when the neural network is trained, the input dimension of the neural network can be consistent with the description when the neural network is actually used to determine the heading angle. Figure 8 shows a schematic structural diagram of a neural network model provided in an embodiment of the present application. As shown in Figure 8, the three components of the three-axis acceleration are respectively input into the neural network model, and can be successively passed through the convolution layer, pooling layer, convolution layer, and pooling layer, and then the three-axis components are processed together through two LSTM layers to output the first heading angle. After the sliding window continues to slide, the heading angle of each step can be output.
[0118] In another embodiment, when determining heading angle, the neural network model input may not be a sliding window as described above. Instead, the three-axis acceleration data over a period of time may be divided into multiple data segments, where each data segment contains an equal amount of three-axis acceleration data. Combined with the step counting time points, the number of steps included in each data segment can be obtained.
[0119] FIG9 shows a schematic diagram of the input data provided by an embodiment of the present application. As shown in FIG9 , data segment 1 and data segment 2 include equal amounts of three-axis acceleration data. Each data segment can be divided into steps in combination with the step counting time point. It can be seen that the amount of three-axis acceleration data included in each step is different (different lengths are used in FIG9 to replace the different amounts of three-axis acceleration included asynchronously). Data segment 1 includes a portion of step 1, step 2, step 3, step 4, and a portion of step 5 three-axis acceleration data, and data segment 2 includes a portion of step 5, step 6, step 7, step 8, and a portion of step 9 three-axis acceleration data. The step counting time point can be regarded as the end timestamp of the step, then data segment 1 includes the end timestamps of step 1, step 2, step 3, and step 4, that is, the end timestamp of 4 steps; or the step counting time point can be regarded as the start timestamp of the step, then data segment 1 includes the start timestamps of step 2, step 3, step 4, and step 5, that is, the start timestamp of 4 steps. Data segment 2 can similarly include the end timestamps of step 5, step 6, step 7, and step 8, or the start timestamps of step 6, step 7, step 8, and step 9. After the three-axis acceleration data is input into the neural network model, a heading angle 1 can be output for data segment 1, and another heading angle 2 can be output for data segment 2. When the step counting time point is regarded as the start timestamp, the heading angle output from data segment 1 can be divided equally among step 2, step 3, step 4, and step 5, that is, the heading angles of step 2, step 3, step 4, and step 5 are all 1 / 4 of heading angle 1; when the step counting time point is regarded as the end timestamp, the heading angle output from data segment 1 can be divided equally among step 1, step 2, step 3, and step 4, that is, the heading angles of step 1, step 2, step 3, and step 4 are all 1 / 4 of heading angle 1. Similarly, for data segment 2, heading angle 2 is divided equally into steps 6, 7, 8, and 9, or equally into steps 5, 6, 7, and 8, when the step counting time points are the start and end timestamps, respectively. Similarly, other data segments can be set similarly to obtain the heading angle of each step in each data segment.
[0120] Before using the neural network model, the neural network model also needs to be trained. During training, the reference three-axis acceleration data and the corresponding trajectory information can be used as training data. The reference three-axis acceleration data can be similarly divided into multiple data segments of equal length when input, and for different data segments, the heading angle of the trajectory corresponding to the data segment can be calculated through the trajectory information. The heading angle can be the angle offset value between the first step and the last step when the step counting time point is regarded as the start timestamp or the end timestamp. The neural network model can be supervised trained through the angle offset value so that the heading angle output by the model is close to the calculated heading angle, thereby obtaining the final trained neural network model.
[0121] Compared to predicting heading angle using steps as input to the neural network model, predicting heading angle using triaxial acceleration data as a unit is more sensitive to multi-step, small angle changes during displacement detection. By increasing the window size (the amount of data included in each data segment), more features can be extracted. This method can also eliminate errors introduced by improper segmentation of acceleration data (e.g., inaccurate step counting time points).
[0122] Through the above two methods, the heading angle of each step can be obtained. The heading angle can be the angular offset value of the step relative to the previous step.
[0123] In S330, the trajectory information of the electronic device can be the displacement trajectory of the electronic device (e.g., a trajectory equation represented by a function, etc.), or can be information obtained by further processing the displacement trajectory, such as a maximum displacement radius, coordinates of a displacement endpoint, etc., which is not limited in this application. The following mainly describes the steps of S330 by calculating the displacement trajectory.
[0124] Combining the amount of triaxial acceleration data and the sampling interval of each step, the single-step duration step_time = sam_time * len(acc) can be calculated, where sam_time is the sampling interval and len(acc) is the number of triaxial acceleration data included in each step (the number of non-zero acceleration data).
[0125] In one embodiment, the single step length step_len can be calculated by the following formula:
[0126] In the above formula, c is a hyperparameter. In one embodiment, the hyperparameter c can be determined by the following steps. For example, a single-step duration step_time and a single-step step length step_len are obtained by calculating a large number of true value trajectories, and the hyperparameter is calculated according to the above formula.
[0127] The single-step length calculated in the above formula is positively correlated with the inverse of the single-step duration, that is, the step frequency.
[0128] It should be understood that the single-step stride length can also be calculated using other formulas. For example, factors such as the user's leg length (for example, estimating the user's leg length by height) can be considered when calculating the stride length. This application does not limit this.
[0129] After determining the relative heading angle of each step, Calculate the absolute heading angle at step k in is the relative heading angle of the i-th step,
[0130] In one embodiment of the present application, the relative heading angle may have a direction, and a positive direction may be set, for example, counterclockwise rotation is a positive direction, and clockwise rotation is a negative direction. If the heading of the current step rotates clockwise relative to the heading of the previous step, the relative heading angle is negative. If the heading of the current step rotates counterclockwise relative to the heading of the previous step, the relative heading angle is positive. Thus, the absolute heading angle can be obtained by accumulating the relative heading angles of each step through the above formula.
[0131] The displacement trajectory can be calculated using the single-step step length and heading angle using the following formula:
[0132] Among them, x k+1 and y k+1 are the horizontal and vertical coordinates of the user at the start of step k+1, x k and y k are the horizontal and vertical coordinates of the user at the start of step k, step_len k is the step length of the kth step.
[0133] In one embodiment, for example, in a device discovery scenario, when the device is within a preset displacement radius within a certain period of time (e.g., 2 minutes, 5 minutes), the device can be maintained or added to the list of available devices, thereby facilitating interaction with the device through messages. If the displacement radius of the device exceeds the preset range within a certain period of time, the device can be removed from the list of available devices, thereby saving overhead. In this scenario, attention is paid to the displacement radius of the device within a period of time. As shown in FIG10 , the maximum circumscribed circle of the trajectory with the displacement starting point as the center can be obtained, and the radius of the circumscribed circle is the displacement radius of interest. The circumscribed circle and the displacement trajectory are not tangent to the displacement end point B. The displacement radius is compared with the preset threshold. If it is within the preset range, the device can be updated to the list of available devices. If it is outside the preset range, the device can be removed from the list of available devices.
[0134] It should be understood that in the embodiments of the present application, the relative heading angle is directly outputted through the neural network model. In some embodiments, the neural network model can be trained to directly output the angular offset value of a certain step relative to a fixed direction. For example, the direction of the first step during movement can be used as a fixed direction, thereby outputting the angular offset value of a certain step relative to the fixed direction as the heading angle of the step. Alternatively, the neural network model can be trained using the relative heading angle, but a module can be added to the neural network model to calculate the absolute heading angle of each step separately through the relative heading angle and output it. For specific details, please refer to the above embodiment of the heading angle as a relative angular offset value from the previous step, which will not be repeated here.
[0135] The technical solution of the embodiment of the present application does not need to limit the posture of the electronic device, that is, there is no need to restrict the placement of the device on the waist, torso, etc., and the device does not need to remain relatively fixed to the body, which expands the application scenarios of the embodiment of the present application.
[0136] The displacement detection method provided in the embodiments of the present application can be used, for example, in the field of device interconnection to monitor the online and offline operation of devices. Since there is no need to use a gyroscope sensor and acceleration data is used to estimate the heading angle, the position of the device can be accurately located. When the device moves to a different space, the device's position status can be updated in a timely manner without the need for frequent broadcast signals. When the displacement detection scheme of the embodiments of the present application is applied to device position detection, the maximum displacement radius of the device during the entire movement process can be focused on, without having to pay attention to the starting and end points.
[0137] FIG11 shows a schematic block diagram of an electronic device 1000 provided in the present application. As shown in FIG11 , the electronic device 1000 includes an acquisition module 1010 and a processing module 1020 .
[0138] Specifically, the acquisition module 1010 is used to obtain multiple three-axis acceleration data collected by the electronic device 1000 carried by the user; the processing module 1020 is used to: determine the pedometer time point of each step of the user and the heading angle of each step of the user based on the multiple three-axis acceleration data; determine the trajectory information of the electronic device 1000 based on the pedometer time point of each step of the user and the heading angle of each step of the user.
[0139] In one embodiment, the processing module 1020 is used to: input the multiple three-axis acceleration data into a first model to obtain the heading angle of each step of the user, the first model is a model trained based on at least one first sample data, and the first sample data includes reference three-axis acceleration data and reference trajectory information corresponding to the reference three-axis acceleration data.
[0140] In one embodiment, the processing module 1020 is used to: sample the multiple three-axis acceleration data using a sliding window to generate a first sampling window, where the first sampling window includes the three-axis acceleration data of the first step, the three-axis acceleration data of N steps before the first step, and the three-axis acceleration data of N steps after the first step, where N is an integer greater than or equal to 1; input the data of the first sampling window into the first model to obtain a first heading angle, where the first heading angle is a relative heading angle of the first step relative to the step before the first step, and the heading angle of each step of the user includes the first heading angle.
[0141] In one embodiment, the processing module 1020 is used to: divide the multiple three-axis acceleration data into multiple data segments, and the number of three-axis acceleration data in the multiple data segments is equal; input the data of the first data segment into the first model to obtain the second heading angle corresponding to the first data segment, and the first data segment belongs to the multiple data segments; determine the number of pedometer time points corresponding to the first data segment; determine the first heading angle based on the second heading angle and the number of pedometer time points corresponding to the first data segment, and the first heading angle is the relative heading angle of each step corresponding to the first data segment relative to the previous step, and the heading angle of each step of the user includes the first heading angle.
[0142] In one embodiment, the processing module 1020 is used to: determine the step length of each step of the user based on the step counting time point and the sampling interval of the three-axis acceleration data; determine the trajectory information of the electronic device based on the step length of each step of the user and the heading angle of each step of the user.
[0143] In one embodiment, the processing module 1020 is used to: determine a plurality of integrated accelerations corresponding to the plurality of three-axis acceleration data according to the plurality of three-axis acceleration data; and determine a step counting time point of each step of the user according to the plurality of integrated accelerations.
[0144] In one embodiment, the plurality of three-axis acceleration data are obtained by preprocessing the original three-axis acceleration data collected from the acceleration sensor, and the preprocessing includes at least one of the following: downsampling processing, high-pass filtering processing, and low-pass filtering processing.
[0145] In one embodiment, a sampling frequency of the plurality of three-axis acceleration data is less than or equal to 100 Hz.
[0146] Figure 12 shows a schematic block diagram of an electronic device 1100 provided in an embodiment of the present application. The electronic device 1100 shown in Figure 12 may correspond to the electronic device described above. Specifically, the electronic device 1100 may be a specific example of the electronic device in Figure 1 . The electronic device 1100 includes a processor 1120. In the embodiment of the present application, the processor 1120 is used to implement corresponding control and management operations. For example, the processor 1120 is used to support the electronic device 1100 in executing the methods, operations, or functions of the aforementioned embodiments. Optionally, the electronic device 1100 may also include a memory 1110 and a communication interface 1130. The processor 1120, the communication interface 1130, and the memory 1110 may be interconnected or connected via a bus 1140. The communication interface 1130 is used to support communication between the electronic device and other devices, and the memory 1110 is used to store program code and data for the electronic device. The processor 1120 calls the code or data stored in the memory 1110 to implement corresponding operations. The memory 1110 may or may not be coupled to the processor. The coupling in the embodiments of the present application is an indirect coupling or communication connection between electronic devices, units or modules, which can be electrical, mechanical or other forms, and is used for information exchange between electronic devices, units or modules.
[0147] The processor 1120 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like. The communication interface 1130 may be a transceiver, circuit, bus, module, or other type of communication interface. The bus 1140 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, and the like. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, FIG12 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0148] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0149] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0150] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0151] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0152] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0153] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0154] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A displacement detection method, characterized in that: include: Acquire multiple three-axis acceleration data collected by an electronic device carried by a user; Determining a step counting time point of each step of the user and a heading angle of each step of the user according to the multiple three-axis acceleration data; The trajectory information of the electronic device is determined according to the step counting time point of each step of the user and the heading angle of each step of the user.
2. The method according to claim 1, characterized in that Determining the heading angle of each step of the user according to the plurality of three-axis acceleration data includes: The multiple three-axis acceleration data are input into a first model to obtain the heading angle of each step of the user, wherein the first model is a model trained based on at least one first sample data, and the first sample data includes reference three-axis acceleration data and reference trajectory information corresponding to the reference three-axis acceleration data.
3. The method according to claim 2, characterized in that Inputting the plurality of three-axis acceleration data into the first model to obtain the heading angle of each step of the user includes: Sampling the plurality of three-axis acceleration data using a sliding window to generate a first sampling window, wherein the first sampling window includes the three-axis acceleration data of the first step, the three-axis acceleration data of N steps before the first step, and the three-axis acceleration data of N steps after the first step, where N is an integer greater than or equal to 1; The data of the first sampling window is input into the first model to obtain a first heading angle, where the first heading angle is a relative heading angle of the first step relative to the step before the first step, and the heading angles of each step of the user include the first heading angle.
4. The method according to claim 2, characterized in that Inputting the multiple three-axis accelerations into the first model to obtain the heading angle of each step of the user includes: Dividing the plurality of triaxial acceleration data into a plurality of data segments, wherein the number of triaxial acceleration data in the plurality of data segments is equal; inputting data of a first data segment into the first model to obtain a second heading angle corresponding to the first data segment, wherein the first data segment belongs to the plurality of data segments; Determining the number of step counting time points corresponding to the first data segment; The first heading angle is determined based on the second heading angle and the number of step counting time points corresponding to the first data segment. The first heading angle is the relative heading angle of each step corresponding to the first data segment relative to the previous step, and the heading angle of each step of the user includes the first heading angle.
5. The method according to any one of claims 1 to 4, characterized in that Determining the trajectory information of the electronic device according to the step counting time point of each step of the user and the heading angle of each step of the user includes: Determining the step length of each step of the user according to the step counting time point of each step of the user and the sampling interval of the plurality of three-axis acceleration data; The trajectory information of the electronic device is determined according to the step length of each step of the user and the heading angle of each step of the user.
6. The method according to any one of claims 1 to 5, characterized in that Determining the step counting time point of each step of the user according to the multiple three-axis acceleration data includes: Determining, based on the plurality of three-axis acceleration data, a plurality of integrated accelerations corresponding to the plurality of three-axis acceleration data; A step counting time point of each step of the user is determined based on the multiple integrated accelerations.
7. The method according to any one of claims 1 to 6, characterized in that The plurality of three-axis acceleration data are obtained by preprocessing the original three-axis acceleration data collected from the acceleration sensor, wherein the preprocessing includes at least one of the following: downsampling processing, high-pass filtering processing, and low-pass filtering processing.
8. The method according to any one of claims 1 to 7, characterized in that The sampling frequency of the plurality of triaxial acceleration data is less than or equal to 100 Hz.
9. An electronic device, characterized in that: including processor and memory; The memory stores a computer program; The processor is configured to call the computer program stored in the memory to execute the method according to any one of claims 1 to 8.
10. A computer storage medium, characterized in that The computer-readable storage medium includes a computer program, and when the computer program is run on a terminal, the terminal is caused to execute the method according to any one of claims 1 to 8.
11. A computer program product, characterized in that When a terminal reads and executes the computer program product, the terminal is enabled to perform the method according to any one of claims 1 to 8.
12. A chip, characterized in that: The chip is connected to a memory and is used to read and execute a software program stored in the memory to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for determining pedestrian direction in any posture and electronic equipment
CN107917707A
Pedestrian track plotting method, navigation method and device, handheld terminal and medium
CN111435083A
User trajectory drawing method and device, computer equipment and storage medium
CN111754605A
Waist-loaded course angle calculation method based on stacked LSTM
CN113449265A
Positioning method, device, equipment and medium
CN117451039A