Displacement detection method and electronic equipment
By using three-axis acceleration data and a neural network model to estimate the heading angle, the high power consumption problem of the gyroscope in inertial navigation is solved, low-power displacement detection is achieved, and long-term operation of the device is ensured.
Patent Information
- Application Number
- CN202410316013.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2025-09-19
AI Technical Summary
The high power consumption of gyroscopes in inertial navigation technology leads to excessive power consumption of electronic devices, affecting device endurance.
By using three-axis acceleration data to determine the user's heading angle, and using a neural network model to estimate the heading angle, the dependence on the gyroscope and magnetic sensor is reduced, and power consumption is reduced.
This reduces the power consumption of displacement detection without increasing computational complexity, ensuring that the device can operate around the clock.
Smart Images

Figure CN120668112A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic equipment, and more specifically, to a displacement detection method and electronic equipment. Background Art
[0002] 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.
[0003] 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.
[0004] 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
[0005] The present application provides a displacement detection method and electronic equipment, which can reduce the power consumption of displacement detection.
[0006] 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.
[0007] 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.
[0008] 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.
[0009] 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.
[0010] 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.
[0011] 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.
[0012] 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.
[0013] 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.
[0014] 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.
[0015] 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.
[0016] 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.
[0017] 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.
[0018] 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.
[0019] 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.
[0020] 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.
[0021] 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.
[0022] 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.
[0023] 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.
[0024] 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.
[0025] 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.
[0026] 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.
[0027] 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
[0028] Figure 1 This is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0029] Figure 2 This is a software structure block diagram of the electronic device provided in the embodiment of the present application.
[0030] Figure 3 It is a schematic flow chart of the displacement detection method provided in an embodiment of the present application.
[0031] Figure 4 Schematic diagram of the coordinate axes of the electronic device provided in an embodiment of the present application.
[0032] Figure 5 This is a waveform diagram of a comprehensive acceleration provided in an embodiment of the present application.
[0033] Figure 6 This is a waveform diagram of three-axis acceleration and y-axis angular velocity during turning provided by an embodiment of the present application.
[0034] Figure 7 This is a schematic diagram of a sliding window provided in an embodiment of the present application.
[0035] Figure 8 This is a structural diagram of a neural network model provided in an embodiment of the present application.
[0036] Figure 9 This is a schematic diagram of data segment division provided in an embodiment of the present application.
[0037] Figure 10 A schematic diagram of a displacement radius provided in an embodiment of the present application is shown.
[0038] Figure 11 This is a schematic block diagram of an electronic device provided in an embodiment of the present application.
[0039] Figure 12 A schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The technical solution in this application will be described below with reference to the accompanying drawings.
[0041] Figure 1 : The figure shows a schematic diagram of the structure of the 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.
[0042] 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.
[0043] 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.
[0044] 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.
[0045] 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.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G applied on the electronic device 100.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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 .
[0057] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .
[0058] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
[0059] The distance sensor 180F is used to measure distance.
[0060] 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.
[0061] Figure 2 This is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.
[0062] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0063] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0064] like Figure 2 As shown, 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.
[0065] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0066] 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.
[0067] 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.
[0068] The system library can include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0069] 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.
[0070] Figure 3 A displacement detection method provided in an embodiment of the present application is shown, which can reduce the power consumption of displacement detection. The method includes:
[0071] S310: Acquire a plurality of three-axis acceleration data collected by an electronic device carried by a user.
[0072] 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.
[0073] 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.
[0074] The electronic device can collect the three-axis acceleration of the electronic device through the acceleration sensor at a set sampling frequency and record the sampling timestamp of the three-axis acceleration obtained each time. Figure 4 As shown, taking the electronic device as a mobile phone as an example, a coordinate system can be established with the width direction of the electronic device as the x-axis, the length direction of the electronic device as the y-axis, and the direction perpendicular to the screen of the electronic device as the z-axis. The three-axis acceleration data includes acceleration data along the x-axis, y-axis, and z-axis.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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).
[0085] 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.
[0086] 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.
[0087] In one embodiment, the integrated acceleration a′ i It can be calculated by the following formula
[0088]
[0089]
[0090] 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.
[0091] 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.
[0092] 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:
[0093]
[0094] 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.
[0095] 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.
[0096] 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.
[0097] Figure 5 A waveform diagram of a comprehensive acceleration provided in an embodiment of the present application is schematically shown, wherein the horizontal axis represents time and the vertical axis represents comprehensive acceleration. Figure 5Multiple peaks and troughs can be seen in the waveform. 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. Therefore, the timestamps corresponding to the troughs can be used as the counting time points for each step.
[0098] 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.
[0099] 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.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] In the embodiment of the present application, the heading angle of each step is determined only by the three-axis acceleration data without using the gyroscope data. There is a certain correspondence between the three-axis acceleration data and the heading angle. Figure 6 A schematic diagram of a three-axis acceleration change curve and a y-axis angular velocity change curve is shown. When the y-axis angular velocity has obvious peaks or troughs, it indicates that there is a clear turn. Figure 6 It can be seen that when the y-axis angular velocity curve has obvious peaks or troughs ( Figure 6 The two peaks and troughs on the y-axis angular velocity change curve are schematically circled in the figure. The three-axis acceleration data (mainly the x-axis acceleration and the y-axis acceleration) has certain fluctuations. In other words, the relevant characteristics of the heading angle can be obtained through the three-axis acceleration data.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] 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.
[0109] Specifically, the training process of the neural network model may include the following steps:
[0110] S1, input the reference three-axis acceleration data into the original neural network model to obtain the training heading angle.
[0111] 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.
[0112] 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.
[0113] 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.
[0114] 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.
[0115] 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.
[0116] 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.
[0117] The sliding step of the sliding window can be 1 (1 step), taking N as 5 as an example, Figure 7 Schematic diagram of a sliding window provided in an embodiment of the present application. Figure 7 As shown, sliding window 1 includes the three-axis acceleration data from steps 1 to 11. The number of three-axis acceleration data points for each step is consistent after zero padding. The sliding window is centered on the three-axis acceleration data from step 6, and the heading angle for step 6 can be output. When the window slides forward one step, the sliding window center becomes the three-axis acceleration data from step 7, and the heading angle for step 7 can be output. As the sliding window continues to slide, the heading angles for subsequent steps can be output. Because the context information for each step is also input into the neural network model through the sliding window when processing the acceleration data, the obtained heading angle for that step is more accurate.
[0118] 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.
[0119] When a sliding window is used as input data, when training the neural network, the input dimension of the neural network can be consistent with that introduced when actually using the neural network to determine the heading angle. Figure 8 FIG1 shows a schematic structural diagram of a neural network model provided in an embodiment of the present application. Figure 8 As shown in the figure, the three components of the three-axis acceleration are input into the neural network model respectively, and can pass through the convolution layer, pooling layer, convolution layer, and pooling layer respectively. Then, the three-axis components are processed together by 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.
[0120] 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.
[0121] Figure 9 A schematic diagram of input data provided by an embodiment of the present application is shown in FIG. Figure 9 As shown, data segment 1 and data segment 2 include equal amounts of triaxial acceleration data. Combined with the step counting time point, each data segment can be divided into steps. It can be seen that the amount of triaxial acceleration data included in each step is different ( Figure 9(Different lengths are used to replace the different numbers of three-axis accelerations included asynchronously). Data segment 1 includes three-axis acceleration data for part of step 1, part of step 2, step 3, step 4, and part of step 5, and data segment 2 includes three-axis acceleration data for part of step 5, part of step 6, step 7, step 8, and part of step 9. The pedometer time point can be regarded as the end timestamp of a step, and data segment 1 includes the end timestamps of step 1, step 2, step 3, and step 4, that is, the end timestamp of four steps; or the pedometer time point can be regarded as the start timestamp of a step, and data segment 1 includes the start timestamps of step 2, step 3, step 4, and step 5, that is, the start timestamp of four 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 considered as the start timestamp, the heading angle output by data segment 1 can be equally divided into steps 2, 3, 4, and 5. That is, the heading angles of steps 2, 3, 4, and 5 are all 1 / 4 of heading angle 1. When the step counting time point is considered as the end timestamp, the heading angle output by data segment 1 can be equally divided into steps 1, 2, 3, and 4. That is, the heading angles of steps 1, 2, 3, and 4 are all 1 / 4 of heading angle 1. Similarly, for data segment 2, when the step counting time point is the start timestamp or end timestamp, heading angle 2 is equally divided into steps 6, 7, 8, and 9, or equally divided into steps 5, 6, 7, and 8, respectively. Similar settings can be made for other data segments to obtain the heading angle of each step in each data segment.
[0122] 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.
[0123] 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).
[0124] 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.
[0125] 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.
[0126] 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).
[0127] In one embodiment, the single step length step_len can be calculated by the following formula:
[0128]
[0129] 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.
[0130] 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.
[0131] 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.
[0132] 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,
[0133] 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.
[0134] The displacement trajectory can be calculated using the single-step step length and heading angle using the following formula:
[0135]
[0136]
[0137] 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.
[0138] In one embodiment, for example, in a device discovery scenario, if a 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 device's displacement radius 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, such as Figure 10 As shown, the maximum circumscribed circle of the trajectory can be taken with the displacement starting point as the center, 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 available device list. If it is outside the preset range, the device can be removed from the available device list.
[0139] 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.
[0140] 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.
[0141] 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.
[0142] Figure 11 1 shows a schematic block diagram of an electronic device 1000 provided by the present application, such as Figure 11 As shown, the electronic device 1000 includes an acquisition module 1010 and a processing module 1020 .
[0143] 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.
[0144] 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.
[0145] 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.
[0146] 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.
[0147] 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.
[0148] 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.
[0149] 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.
[0150] In one embodiment, a sampling frequency of the plurality of three-axis acceleration data is less than or equal to 100 Hz.
[0151] Figure 12 A schematic block diagram of an electronic device 1100 provided in an embodiment of the present application is shown. Figure 12 The electronic device 1100 shown may correspond to the electronic device described above. Specifically, the electronic device 1100 may be Figure 1Specific example of an electronic device in the embodiment. The electronic device 1100 includes: a processor 1120. In an 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 method, operation or function of the aforementioned embodiment. Optionally, the electronic device 1100 may further 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 to each other through a bus 1140. Among them, the communication interface 1130 is used to support the electronic device to communicate with other devices, etc., and the memory 1110 is used to store program codes and data of the electronic device. The processor 1120 calls the code or data stored in the memory 1110 to implement the corresponding operation. The memory 1110 may be coupled to the processor or not. The coupling in the embodiment of the present application is an indirect coupling or communication connection between electronic devices, units or modules, which may be electrical, mechanical or other forms, and is used for information exchange between electronic devices, units or modules.
[0152] Among them, the processor 1120 can 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 can implement or execute the various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can 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 so on. The communication interface 1130 can be a transceiver, a circuit, a bus, a module or other type of communication interface. The bus 1140 can be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0153] 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.
[0154] 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.
[0155] 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.
[0156] 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.
[0157] 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.
[0158] 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.
[0159] 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.
