Indoor positioning method and device, electronic equipment and storage medium
By integrating accelerometers, gyroscopes and barometers into wearable devices, combined with strap-inert inertial solution and motion scene analysis, the problem of inaccurate indoor positioning is solved and high-precision indoor positioning is achieved.
Patent Information
- Application Number
- CN202510509078.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-05-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, when positioning indoors, satellite signals are blocked by objects such as walls, resulting in inaccurate positioning.
Wearable devices are used to integrate accelerometer, gyroscope and barometer, and speed information and predict position are obtained through short-distance inertia solution, combined with barometer data to determine the motion scene and position error, and make two corrections to improve positioning accuracy.
By correcting velocity errors and position errors, the inertia accumulation errors can be reduced, the accuracy of indoor positioning is improved, and positioning inaccurate caused by relying on satellite signals can be avoided.
Smart Images

Figure CN120027802A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of positioning technology, and in particular to an indoor positioning method, an indoor positioning device, an electronic device and a computer-readable storage medium. Background Art
[0002] Nowadays, people spend most of their time indoors, and indoor positioning has important significance and commercial prospects in fields such as fire rescue, large-scale safety conferences, and petroleum and petrochemical plants. Therefore, there is a certain demand for positioning indoor personnel. When related technologies are used to position indoor personnel, satellite signals are blocked by objects such as walls, etc., resulting in inaccurate positioning when positioning indoor personnel. Summary of the invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide an indoor positioning method, an indoor positioning device, an electronic device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0004] In order to solve the above problems, an embodiment of the present invention discloses an indoor positioning method, which is applied to a wearable device; the wearable device is provided with an accelerometer, a gyroscope and a barometer, and the method includes: Acquire first detection data of the accelerometer and second detection data of the gyroscope; Performing strapdown inertial solution on the first detection data of the accelerometer and the second detection data of the gyroscope to obtain speed information and predicted position information of the user; Determine a velocity error according to the first detection data of the accelerometer, the second detection data of the gyroscope and the velocity information, and correct the predicted position information of the user according to the velocity error to obtain corrected position information; Acquire third detection data of the barometer, and determine a movement scene of the user according to the first detection data of the accelerometer and the third detection data of the barometer; Acquire an indoor map where the user is located, and determine a position error according to the sports scene and the indoor map; The corrected position information is corrected again according to the position error to obtain the target position information of the user.
[0005] Optionally, determining the position error according to the motion scene and the indoor map includes: Acquire the marking information in the indoor map; the marking information is the marking information of each marking point in the indoor map; the each marking point includes: each elevator entrance and each staircase entrance; A position error is determined according to the corrected position information and the marking information in the indoor map.
[0006] Optionally, determining the position error according to the corrected position information and the marking information in the indoor map includes: When it is detected that the motion scene is switched, determining the distance between the corrected position and each of the marking points according to the corrected position information and the marking information in the indoor map; The shortest distance between the corrected position and each of the marking points is determined as the position error.
[0007] Optionally, determining the velocity error according to the first detection data of the accelerometer, the second detection data of the gyroscope and the velocity information includes: Determine, according to the first detection data of the accelerometer and the second detection data of the gyroscope in the plurality of gait cycles, the speed corresponding to the static state in the plurality of gait cycles; The difference between the speed information and the speed corresponding to the static state is determined as a speed error.
[0008] Optionally, determining the movement scene of the user according to the first detection data of the accelerometer and the third detection data of the barometer includes: Determining the motion state of the user according to the first detection data of the accelerometer; determining a height change state of the user according to third detection data of the barometer; A motion scene of the user is determined according to the motion state of the user and the height change state of the user.
[0009] Optionally, determining the motion state of the user according to the first detection data of the accelerometer includes: Determining acceleration data within a preset time window according to first detection data of the accelerometer within the preset time window; Determining a variance value of a resultant acceleration within the preset time window according to the acceleration data within the preset time window; When the variance value of the combined acceleration within the preset time window is greater than the preset combined acceleration variance value, determining that the motion state of the user is a non-stationary state; When the variance value of the combined acceleration within the preset time window is less than or equal to the preset combined acceleration variance value, it is determined that the motion state of the user is a stationary state.
[0010] Optionally, determining the height change state of the user according to the third detection data of the barometer includes: Determine the altitude data within the preset time window according to the third detection data of the barometer within the preset time window; Determining a height variance value within the preset time window according to the height data within the preset time window; When the height variance value within the preset time window is greater than the preset height variance value, determining the height change state of the user according to the height data within the preset time window; When the height variance value within the preset time window is less than or equal to the preset height variance value, it is determined that the height change state of the user is unchanged.
[0011] Optionally, determining the height change state of the user according to the height data within the preset time window includes: When the altitude data within the preset time window is increasing, determining that the altitude change state of the user is an altitude increase; When the altitude data within the preset time window is decreasing, it is determined that the altitude change state of the user is altitude descent.
[0012] The embodiment of the present invention further discloses an indoor positioning device, which is applied to a wearable device; the wearable device is provided with an accelerometer, a gyroscope and a barometer, and the device comprises: An acquisition module, used for acquiring first detection data of the accelerometer and second detection data of the gyroscope; A solution module, used for performing strapdown inertial solution on the first detection data of the accelerometer and the second detection data of the gyroscope to obtain speed information and predicted position information of the user; a first correction module, configured to determine a velocity error according to the first detection data of the accelerometer, the second detection data of the gyroscope and the velocity information, and to correct the predicted position information of the user according to the velocity error to obtain corrected position information; a first determining module, configured to obtain the third detection data of the barometer, and determine the movement scene of the user according to the first detection data of the accelerometer and the third detection data of the barometer; A second determination module is used to obtain an indoor map where the user is located, and determine a position error according to the sports scene and the indoor map; The second correction module is used to correct the corrected position information again according to the position error to obtain the target position information of the user.
[0013] Optionally, the second determining module includes: The acquisition submodule is used to acquire the marking information in the indoor map; the marking information is the marking information of each marking point in the indoor map; the each marking point includes: each elevator entrance and each staircase entrance; The first determination submodule is used to determine the position error according to the corrected position information and the marking information in the indoor map.
[0014] Optionally, the first determining submodule includes: A first determining unit, configured to determine, when detecting that the motion scene is switched, the distance between the corrected position and each of the marking points according to the corrected position information and the marking information in the indoor map; The second determining unit is used to determine the shortest distance between the corrected position and each of the marking points as the position error.
[0015] Optionally, the first correction module includes: A second determination submodule, configured to determine a speed corresponding to a static state in a plurality of gait cycles according to the first detection data of the accelerometer and the second detection data of the gyroscope in the plurality of gait cycles; The third determination submodule is used to determine the difference between the speed information and the speed corresponding to the static state as a speed error.
[0016] Optionally, the first determining module includes: a fourth determination submodule, configured to determine the motion state of the user according to the first detection data of the accelerometer; a fifth determining submodule, configured to determine a height change state of the user according to third detection data of the barometer; The sixth determination submodule is used to determine the movement scene of the user according to the movement state of the user and the height change state of the user.
[0017] Optionally, the fourth determining submodule includes: A third determining unit, configured to determine acceleration data within a preset time window according to first detection data of the accelerometer within the preset time window; a fourth determining unit, configured to determine a variance value of a resultant acceleration within the preset time window according to the acceleration data within the preset time window; a fifth determining unit, configured to determine that the motion state of the user is a non-stationary state when the variance value of the combined acceleration within the preset time window is greater than a preset combined acceleration variance value; The sixth determining unit is configured to determine that the motion state of the user is a stationary state when the variance value of the combined acceleration within the preset time window is less than or equal to a preset combined acceleration variance value.
[0018] Optionally, the fifth determining submodule includes: a seventh determining unit, configured to determine the altitude data within the preset time window according to the third detection data of the barometer within the preset time window; an eighth determining unit, configured to determine a height variance value within the preset time window according to the height data within the preset time window; a ninth determining unit, configured to determine, when the height variance value within the preset time window is greater than the preset height variance value, a height change state of the user according to the height data within the preset time window; The tenth determining unit is configured to determine that the height change state of the user is unchanged when the height variance value within the preset time window is less than or equal to the preset height variance value.
[0019] Optionally, the ninth determining unit includes: A first determining subunit is used to determine that the user's altitude change state is an altitude increase when the altitude data within the preset time window is increasing; The second determining subunit is configured to determine that the user's altitude change state is a height decrease when the altitude data within the preset time window is decreasing.
[0020] The present invention also discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the indoor positioning method as described above when executing the computer program.
[0021] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the indoor positioning method as described above are implemented.
[0022] The embodiments of the present invention include the following advantages: In an embodiment of the present invention, after the wearable device obtains the first detection data of the accelerometer and the second detection data of the gyroscope, the first detection data and the second detection data can be strapdown inertial solved to obtain the user's speed information and predicted position information, and then the speed error is determined according to the first detection data, the second detection data and the speed information, and the predicted position information of the user is corrected according to the speed error to obtain the corrected position information, and then the third detection data of the barometer is obtained, and the user's motion scene is determined according to the first detection data and the third detection data, and the position error is determined according to the motion scene and the indoor map where the user is located, and finally the corrected position information is corrected again according to the position error to obtain the user's target position information, so that when the wearable device locates the indoor user, the predicted position of the user obtained by the strapdown inertial solution is corrected twice by the speed error and the position error, thereby reducing the inertial cumulative error and improving the accuracy of indoor positioning. Secondly, when positioning the indoor user, it is not necessary to locate based on the satellite signal, so as to avoid the inaccurate positioning caused by the satellite signal being blocked by objects such as walls. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flowchart of the steps of an indoor positioning method provided by an embodiment of the present invention; Figure 2 is a schematic diagram of a relationship of motion scene switching provided by an embodiment of the present invention; Figure 3 It is a structural block diagram of an indoor positioning device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0025] When the related technology locates people indoors, the satellite signal is blocked by objects such as walls, etc., so the positioning obtained when locating people indoors is not accurate. In order to solve the above technical problems, the present invention provides an indoor positioning method, the core concept of which is that after the wearable device obtains the first detection data of the accelerometer and the second detection data of the gyroscope, the first detection data and the second detection data can be strapdown inertial solution to obtain the user's speed information and predicted position information, and then the speed error is determined according to the first detection data, the second detection data and the speed information, and the predicted position information of the user is corrected according to the speed error to obtain the corrected position information, and then the third detection data of the barometer is obtained, and the user's motion scene is determined according to the first detection data and the third detection data, and the position error is determined according to the motion scene and the indoor map where the user is located, and finally the corrected position information is corrected again according to the position error to obtain the user's target position information, so that when the wearable device locates the indoor user, the predicted position of the user obtained by the strapdown inertial solution is corrected twice by the speed error and the position error, thereby reducing the inertial cumulative error and improving the positioning accuracy. Secondly, when positioning the indoor user, it is not necessary to locate based on the satellite signal, so as to avoid the inaccurate positioning caused by the satellite signal being blocked by objects such as walls.
[0026] Reference Figure 1 , shows a flowchart of the steps of an indoor positioning method provided by an embodiment of the present invention, the method is applied to a wearable device, the wearable device is provided with an accelerometer, a gyroscope and a barometer, and the method may specifically include the following steps: Step 101: Acquire first detection data of the accelerometer and second detection data of the gyroscope.
[0027] In an embodiment of the present invention, the wearable device can be embedded in the heel of the user, and a MEMS-IMU (Micro-Electro-Mechanical System Inertial Measurement Unit) sensor and a barometer can be provided in the wearable device, and the MEMS-IMU sensor can be composed of an accelerometer and a gyroscope. When the wearable device locates the user, the first detection data of the accelerometer and the second detection data of the gyroscope can be obtained in real time, or the first detection data of the accelerometer and the second detection data of the gyroscope can be obtained according to a certain period. The first detection data may include: acceleration and specific force, and the second detection data may include: angular velocity.
[0028] Step 102: performing strapdown inertial solution on the first detection data of the accelerometer and the second detection data of the gyroscope to obtain speed information and predicted position information of the user.
[0029] In an embodiment of the present invention, after obtaining the first detection data of the accelerometer and the second detection data of the gyroscope, the first detection data of the accelerometer and the second detection data of the gyroscope can be strapdown inertial solution in real time, so as to obtain the speed information and predicted position information of the user. Among them, the speed information and predicted position information of the user obtained can be the real-time speed information and predicted position information of the user. In the present invention, when the first detection data of the accelerometer and the second detection data of the gyroscope are strapdown inertial solution, the posture information of the user can also be obtained.
[0030] Specifically, the strapdown inertia solution can be performed using the following formula (1) to obtain the user's posture information, speed information, and predicted position information: Formula (1) in, The data detected by the sensor in the wearable device in the present invention is the data in the carrier coordinate system, which is equivalent to the wearable device. The navigation coordinate system is a fixed coordinate system used to define the position and direction of the target. The data in the navigation coordinate system is converted from the data in the carrier coordinate system. is the anti-synthetic matrix formed by the angular velocity in the second detection data of the gyroscope, It is the differential of the posture matrix converted from the carrier coordinate system to the navigation coordinate system; the differential of the posture matrix converted from the carrier coordinate system to the navigation coordinate system represents the user's posture information. is the specific force in the carrier coordinate system, is the Earth's gravity field vector, It is the differential of the three-dimensional speed in the navigation coordinate system, and the differential of the three-dimensional speed in the navigation coordinate system represents the speed information of the user. is the three-dimensional velocity in the navigation coordinate system, It is the three-dimensional position in the navigation coordinate system, and the three-dimensional position in the navigation coordinate system represents the position information of the user.
[0031] Step 103, determining a velocity error according to the first detection data of the accelerometer, the second detection data of the gyroscope and the velocity information, and correcting the predicted position information of the user according to the velocity error to obtain corrected position information.
[0032] In an embodiment of the present invention, after obtaining the speed information and predicted position information of the user, a ZUPT (Zero Velocity Update) detection can be performed based on the first detection data of the accelerometer and the second detection data of the gyroscope, that is, a periodic detection of the ground contact of the sensor fixed foot during the user's walking process is performed. According to the first detection data of the accelerometer, the second detection data of the gyroscope and the speed information, the speed error is determined, and then the predicted position information of the user is corrected according to the speed error to obtain the corrected position information.
[0033] In one embodiment, determining the speed error based on the first detection data of the accelerometer, the second detection data of the gyroscope, and the speed information may include: determining the speed corresponding to the static state in multiple gait cycles based on the first detection data of the accelerometer and the second detection data of the gyroscope in multiple gait cycles; and determining the difference between the speed information and the speed corresponding to the static state as the speed error.
[0034] Specifically, the first detection data of the accelerometer and the second detection data of the gyroscope in multiple gait cycles can be obtained first, and then the speed corresponding to the static state in the multiple gait cycles can be determined. For example, the gait cycle number is recorded as m, and after the static state is determined according to the first detection data of the accelerometer and the second detection data of the gyroscope, the static state in the mth gait cycle is recorded as Stan m The speed error is determined as the difference between the speed information and the speed corresponding to the static state. m The actual walking speed should be zero, but the speed information obtained by strapdown inertia solution is not zero. Then the difference between the speed information and the speed corresponding to the static state can be taken as the speed error. The speed error can be obtained by the following formula (2): Formula (2) in, is the speed error, Indicates the i-th sample in the static state when the gait cycle is m, i is an integer between 1 and last, and the value of last can be different for different gait cycles. For example: in the m-th gait cycle, assuming that the user's speed information obtained by the strapdown inertia solution in the static state is [0.1, 0.2, 0] m / s, while theoretically the speed corresponding to the static state should be zero, therefore, Should be [0.1,0.2,0]m / s.
[0035] After the speed error is obtained, the predicted position information of the user can be corrected according to the speed error to obtain corrected position information, thereby increasing the accuracy of the user's positioning.
[0036] Specifically, the velocity error is used as the observation quantity, and the EKF (Extended Kalman Filter) is used to correct the user's predicted position information. The 15-dimensional error state vector in the EKF is defined as follows: ,in, is the error state vector in EKF, which represents the estimated error of variables such as position, velocity, and attitude. represents the three-dimensional position error vector, represents the three-dimensional velocity error vector, represents the 3D posture error vector, represents the three-dimensional accelerometer bias vector, Represents the three-dimensional gyroscope drift vector.
[0037] Step 104: Acquire the third detection data of the barometer, and determine the movement scene of the user according to the first detection data of the accelerometer and the third detection data of the barometer.
[0038] In an embodiment of the present invention, after obtaining the corrected position information, the third detection data of the barometer can be obtained. The third detection data can be the height value of the air pressure. When the wearable device obtains the third detection data of the barometer, it can be obtained in real time or according to a certain period. After obtaining the third detection data of the barometer, the user's movement scene can be determined based on the first detection data of the accelerometer and the third detection data of the barometer. In the present invention, the user's movement scenes can include: standing still on flat ground, walking on flat ground, going up in an elevator, going down in an elevator, going up stairs, and going down stairs.
[0039] In one embodiment, determining the user's motion scene based on the first detection data of the accelerometer and the third detection data of the barometer may include: determining the user's motion state based on the first detection data of the accelerometer; determining the user's altitude change state based on the third detection data of the barometer; and determining the user's motion scene based on the user's motion state and the user's altitude change state.
[0040] In one embodiment, determining the motion state of the user based on the first detection data of the accelerometer may include: determining the acceleration data within the preset time window based on the first detection data of the accelerometer within the preset time window; determining the variance value of the combined acceleration within the preset time window based on the acceleration data within the preset time window; when the variance value of the combined acceleration within the preset time window is greater than the preset combined acceleration variance value, determining that the motion state of the user is a non-stationary state; when the variance value of the combined acceleration within the preset time window is less than or equal to the preset combined acceleration variance value, determining that the motion state of the user is a stationary state.
[0041] Specifically, when determining the user's motion state, the variance value of the combined acceleration within the preset window time can be used as a judgment criterion. When the variance value of the combined acceleration within the preset time window is greater than the preset combined acceleration variance value, it indicates that the user is in a non-stationary state. When the variance value of the combined acceleration within the preset time window is less than or equal to the preset combined acceleration variance value, it indicates that the user is in a stationary state. The variance value of the combined acceleration within the preset window time can be calculated by the following formula (3): Formula (3) in, represents the variance value of the combined acceleration within the preset window time, n represents the number of sampling points, that is, the number of times the first detection data is obtained within the preset window time, Represents the acceleration data of the i-th sample.
[0042] In one embodiment, determining the user's altitude change state based on the third detection data of the barometer may include: determining the altitude data within the preset time window based on the third detection data of the barometer within the preset time window; determining the altitude variance value within the preset time window based on the altitude data within the preset time window; when the altitude variance value within the preset time window is greater than the preset altitude variance value, determining the user's altitude change state based on the altitude data within the preset time window; when the altitude variance value within the preset time window is less than or equal to the preset altitude variance value, determining the user's altitude change state as unchanged altitude.
[0043] Specifically, when determining the height change state of the user, the height variance value within the preset window time can be used as a judgment reference. When the height variance value within the preset time window is greater than the preset height variance value, it indicates that the user is in a height change state. When the height variance value within the preset time window is less than or equal to the preset height variance value, it indicates that the user is in a constant height state. The height variance value within the preset window time can be calculated by the following formula (4): Formula (4) in, represents the height variance value within the preset time window, n represents the number of sampling points, that is, the number of times the third detection data is obtained within the preset window time, Indicates the height value of the i-th sample.
[0044] In one embodiment, determining the user's altitude change status based on altitude data within a preset time window may include: when the altitude data within the preset time window is increasing, determining the user's altitude change status is an altitude increase; when the altitude data within the preset time window is decreasing, determining the user's altitude change status is an altitude decrease.
[0045] Specifically, when the altitude variance value within the preset time window is greater than the preset altitude variance value, the user's altitude change state can be determined based on the increase or decrease of the altitude data within the preset time window. When the altitude data within the preset time window is increasing, it can be determined that the user's altitude change state is an altitude increase. When the altitude data within the preset time window is decreasing, it can be determined that the user's altitude change state is an altitude decrease.
[0046] In the embodiment of the present invention, after the user's motion state and the user's height change state are determined, the user's motion scene can be determined according to the user's motion state and the user's height change state.
[0047] Specifically, when the user's motion state is a stationary state and the user's height change state is a constant height, then the user's motion scene can be determined as being stationary on flat ground; when the user's motion state is a non-stationary state and the user's height change state is a constant height, then the user's motion scene can be determined as walking on flat ground; when the user's motion state is a stationary state and the user's height change state is an increase in height, then the user's motion scene can be determined as going up in an elevator; when the user's motion state is a stationary state and the user's height change state is a decrease in height, then the user's motion scene can be determined as going down in an elevator; when the user's motion state is a non-stationary state and the user's height change state is an increase in height, then the user's motion scene can be determined as going up the stairs; when the user's motion state is a non-stationary state and the user's height change state is a decrease in height, then the user's motion scene can be determined as going down the stairs.
[0048] Step 105: Obtain an indoor map where the user is located, and determine a position error according to the sports scene and the indoor map.
[0049] In the embodiment of the present invention, after the user's motion scene is determined, an indoor map where the user is located may be obtained, and the position error may be determined according to the user's motion scene and the indoor map.
[0050] In one embodiment, determining the position error based on the motion scene and the indoor map can include: obtaining marking information in the indoor map; the marking information is marking information of each marking point in the indoor map; each marking point includes: each elevator entrance and each upstairs and downstairs entrance; determining the position error based on the corrected position information and the marking information in the indoor map.
[0051] Specifically, the wearable device can obtain the indoor map where the user is located, and obtain the corresponding marking information from the indoor map, which is the marking information of each elevator entrance and each upstairs and downstairs entrance in the indoor map, and then determine the position error based on the corrected position information and the marking information in the indoor map.
[0052] In one embodiment, determining the position error based on the corrected position information and the marking information in the indoor map may include: when a motion scene switch is detected, determining the distance between the corrected position and each marking point based on the corrected position information and the marking information in the indoor map; and determining the minimum distance between the corrected position and each marking point as the position error.
[0053] Specifically, when it is detected that the user's motion scene switches, for example, when the user's motion scene switches from being stationary on the ground to walking down the stairs, the distance from the corrected position to the nearest mark point can be determined, that is, the minimum distance between the corrected position and each mark point can be determined, and then the distance is determined as the position error. Figure 2 As shown, a schematic diagram of the relationship of motion scene switching provided in an embodiment of the present invention is shown. The present invention can calculate the position error by the following formula (5): Formula (5) in, represents the position error, represents the corrected position, Indicates the closest marker to the corrected position.
[0054] For example: the user's corrected position is [10.2,5.3,0], and the nearest marker point after the specific correction is [10.5.0]. The calculated position error is [0.2, 0.3, 0].
[0055] Step 106: Correct the corrected position information again according to the position error to obtain the target position information of the user.
[0056] In the embodiment of the present invention, after determining the position error, the corrected position information can be corrected again according to the position error, thereby obtaining the user's target position information, that is, the user's actual position, to further increase the accuracy of the user's positioning.
[0057] Specifically, the present invention can use the determined position error as an observation quantity and use EKF to correct the corrected position information again. The 15-dimensional error state vector in the EKF is defined as follows: ,in, is the error state vector in EKF, which represents the estimated error of variables such as position, velocity, and attitude. represents the three-dimensional position error vector, represents the three-dimensional velocity error vector, represents the 3D posture error vector, represents the three-dimensional accelerometer bias vector, Represents the three-dimensional gyroscope drift vector.
[0058] In an embodiment of the present invention, when the wearable device receives a positioning end instruction, the accelerometer, gyroscope, and barometer in the wearable device stop collecting data, that is, stop positioning the user.
[0059] In an embodiment of the present invention, the first detection data of the accelerometer and the second detection data of the gyroscope are obtained; the first detection data of the accelerometer and the second detection data of the gyroscope are subjected to strapdown inertial solution to obtain the speed information and predicted position information of the user; the speed error is determined according to the first detection data of the accelerometer, the second detection data of the gyroscope and the speed information, and the predicted position information of the user is corrected according to the speed error to obtain the corrected position information; the third detection data of the barometer is obtained, and the motion scene of the user is determined according to the first detection data of the accelerometer and the third detection data of the barometer; the indoor map where the user is located is obtained, and the position error is determined according to the motion scene and the indoor map; the corrected position information is corrected again according to the position error to obtain the target position information of the user. Therefore, when the wearable device locates the indoor user, the predicted position of the user obtained by strapdown inertial solution is corrected twice by the speed error and the position error, which reduces the inertial cumulative error and improves the positioning accuracy. Secondly, when the indoor user is located, it is not necessary to locate based on the satellite signal, so as to avoid the inaccurate positioning caused by the satellite signal being blocked by objects such as walls.
[0060] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0061] Reference Figure 3 , shows a structural block diagram of an indoor positioning device provided by an embodiment of the present invention, the device is applied to a wearable device, the wearable device is provided with an accelerometer, a gyroscope and a barometer, and the device may specifically include the following modules: An acquisition module 301 is used to acquire first detection data of the accelerometer and second detection data of the gyroscope; A solution module 302, used for performing strapdown inertial solution on the first detection data of the accelerometer and the second detection data of the gyroscope to obtain speed information and predicted position information of the user; A first correction module 303, configured to determine a velocity error according to the first detection data of the accelerometer, the second detection data of the gyroscope and the velocity information, and to correct the predicted position information of the user according to the velocity error to obtain corrected position information; A first determination module 304 is used to obtain the third detection data of the barometer, and determine the movement scene of the user according to the first detection data of the accelerometer and the third detection data of the barometer; A second determination module 305 is used to obtain an indoor map where the user is located, and determine a position error according to the sports scene and the indoor map; The second correction module 306 is used to correct the corrected position information again according to the position error to obtain the target position information of the user.
[0062] In one embodiment, the second determining module 305 includes: The acquisition submodule is used to acquire the marking information in the indoor map; the marking information is the marking information of each marking point in the indoor map; the each marking point includes: each elevator entrance and each staircase entrance; The first determination submodule is used to determine the position error according to the corrected position information and the marking information in the indoor map.
[0063] In one embodiment, the first determining submodule includes: A first determining unit, configured to determine, when detecting that the motion scene is switched, the distance between the corrected position and each of the marking points according to the corrected position information and the marking information in the indoor map; The second determining unit is used to determine the shortest distance between the corrected position and each of the marking points as the position error.
[0064] In one embodiment, the first correction module 303 includes: A second determination submodule, configured to determine a speed corresponding to a static state in a plurality of gait cycles according to the first detection data of the accelerometer and the second detection data of the gyroscope in the plurality of gait cycles; The third determination submodule is used to determine the difference between the speed information and the speed corresponding to the static state as a speed error.
[0065] In one embodiment, the first determining module 304 includes: a fourth determination submodule, configured to determine the motion state of the user according to the first detection data of the accelerometer; a fifth determining submodule, configured to determine a height change state of the user according to third detection data of the barometer; The sixth determination submodule is used to determine the movement scene of the user according to the movement state of the user and the height change state of the user.
[0066] In one embodiment, the fourth determining submodule includes: A third determining unit, configured to determine acceleration data within a preset time window according to first detection data of the accelerometer within the preset time window; a fourth determining unit, configured to determine a variance value of a resultant acceleration within the preset time window according to the acceleration data within the preset time window; a fifth determining unit, configured to determine that the motion state of the user is a non-stationary state when the variance value of the combined acceleration within the preset time window is greater than a preset combined acceleration variance value; The sixth determining unit is configured to determine that the motion state of the user is a stationary state when the variance value of the combined acceleration within the preset time window is less than or equal to a preset combined acceleration variance value.
[0067] In one embodiment, the fifth determining submodule includes: a seventh determining unit, configured to determine the altitude data within the preset time window according to the third detection data of the barometer within the preset time window; an eighth determining unit, configured to determine a height variance value within the preset time window according to the height data within the preset time window; a ninth determining unit, configured to determine, when the height variance value within the preset time window is greater than the preset height variance value, a height change state of the user according to the height data within the preset time window; The tenth determining unit is configured to determine that the height change state of the user is unchanged when the height variance value within the preset time window is less than or equal to the preset height variance value.
[0068] In one embodiment, the ninth determining unit includes: A first determining subunit is used to determine that the user's altitude change state is an altitude increase when the altitude data within the preset time window is increasing; The second determining subunit is configured to determine that the user's altitude change state is a height decrease when the altitude data within the preset time window is decreasing.
[0069] In an embodiment of the present invention, an acquisition module is used to acquire first detection data of an accelerometer and second detection data of a gyroscope; a solution module is used to perform strapdown inertial solution on the first detection data of the accelerometer and the second detection data of the gyroscope to obtain speed information and predicted position information of a user; a first correction module is used to determine a speed error based on the first detection data of the accelerometer, the second detection data of the gyroscope and the speed information, and to correct the predicted position information of the user based on the speed error to obtain corrected position information; a first determination module is used to acquire third detection data of a barometer, and to determine a motion scene of the user based on the first detection data of the accelerometer and the third detection data of the barometer; a second determination module is used to acquire an indoor map of the user, and to determine a position error based on the motion scene and the indoor map; a second correction module is used to correct the corrected position information again based on the position error to obtain the target position information of the user. Therefore, when the wearable device locates the indoor user, it corrects the predicted position of the user obtained by the strapdown inertial solution twice through the speed error and position error, thereby reducing the cumulative inertial error and improving the positioning accuracy. Secondly, when positioning the indoor user, there is no need to rely on satellite signals for positioning, avoiding inaccurate positioning caused by the satellite signal being blocked by objects such as walls.
[0070] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0071] An embodiment of the present invention further provides an electronic device, including: It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned indoor positioning method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0072] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned indoor positioning method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0073] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0074] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0075] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0076] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0077] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0078] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0079] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0080] The indoor positioning method, indoor positioning device, electronic device and computer-readable storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. An indoor positioning method, characterized in that: The method is applied to a wearable device; The wearable device is provided with an accelerometer, a gyroscope and a barometer, and the method comprises: Acquire first detection data of the accelerometer and second detection data of the gyroscope; Performing strapdown inertial solution on the first detection data of the accelerometer and the second detection data of the gyroscope to obtain speed information and predicted position information of the user; Determine a velocity error according to the first detection data of the accelerometer, the second detection data of the gyroscope and the velocity information, and correct the predicted position information of the user according to the velocity error to obtain corrected position information; Acquire third detection data of the barometer, and determine a motion scene of the user according to the first detection data of the accelerometer and the third detection data of the barometer; Acquire an indoor map where the user is located, and determine a position error according to the sports scene and the indoor map; The corrected position information is corrected again according to the position error to obtain the target position information of the user.
2. The indoor positioning method according to claim 1, characterized in that: The determining of the position error according to the motion scene and the indoor map includes: Acquire the marking information in the indoor map; the marking information is the marking information of each marking point in the indoor map; the each marking point includes: each elevator entrance and each staircase entrance; A position error is determined according to the corrected position information and the marking information in the indoor map.
3. The indoor positioning method according to claim 2, characterized in that: The determining of the position error according to the corrected position information and the marking information in the indoor map includes: When it is detected that the motion scene is switched, determining the distance between the corrected position and each of the marking points according to the corrected position information and the marking information in the indoor map; The shortest distance between the corrected position and each of the marking points is determined as the position error.
4. The indoor positioning method according to claim 1, characterized in that: The determining of the velocity error according to the first detection data of the accelerometer, the second detection data of the gyroscope and the velocity information comprises: Determine, according to the first detection data of the accelerometer and the second detection data of the gyroscope in the plurality of gait cycles, the speed corresponding to the static state in the plurality of gait cycles; The difference between the speed information and the speed corresponding to the static state is determined as a speed error.
5. The indoor positioning method according to claim 1, characterized in that: The determining the movement scene of the user according to the first detection data of the accelerometer and the third detection data of the barometer includes: Determining the motion state of the user according to the first detection data of the accelerometer; determining a height change state of the user according to third detection data of the barometer; A motion scene of the user is determined according to the motion state of the user and the height change state of the user.
6. The indoor positioning method according to claim 5, characterized in that: The determining the motion state of the user according to the first detection data of the accelerometer includes: Determining acceleration data within a preset time window according to first detection data of the accelerometer within the preset time window; Determining a variance value of a resultant acceleration within the preset time window according to the acceleration data within the preset time window; When the variance value of the combined acceleration within the preset time window is greater than the preset combined acceleration variance value, determining that the motion state of the user is a non-stationary state; When the variance value of the combined acceleration within the preset time window is less than or equal to the preset combined acceleration variance value, it is determined that the motion state of the user is a stationary state.
7. The indoor positioning method according to claim 5, characterized in that: The step of determining the height change state of the user according to the third detection data of the barometer includes: Determine the altitude data within the preset time window according to the third detection data of the barometer within the preset time window; Determining a height variance value within the preset time window according to the height data within the preset time window; When the height variance value within the preset time window is greater than the preset height variance value, determining the height change state of the user according to the height data within the preset time window; When the height variance value within the preset time window is less than or equal to the preset height variance value, it is determined that the height change state of the user is unchanged.
8. The indoor positioning method according to claim 7, characterized in that: The step of determining the height change state of the user according to the height data within the preset time window includes: When the altitude data within the preset time window is increasing, determining that the altitude change state of the user is an altitude increase; When the altitude data within the preset time window is decreasing, it is determined that the altitude change state of the user is altitude descent.
9. An indoor positioning device, characterized in that: The device is applied to wearable devices; The wearable device is provided with an accelerometer, a gyroscope and a barometer, and the device comprises: An acquisition module, used for acquiring first detection data of the accelerometer and second detection data of the gyroscope; A solution module, used for performing strapdown inertial solution on the first detection data of the accelerometer and the second detection data of the gyroscope to obtain speed information and predicted position information of the user; a first correction module, configured to determine a velocity error according to the first detection data of the accelerometer, the second detection data of the gyroscope and the velocity information, and to correct the predicted position information of the user according to the velocity error to obtain corrected position information; a first determining module, configured to obtain the third detection data of the barometer, and determine the movement scene of the user according to the first detection data of the accelerometer and the third detection data of the barometer; A second determination module is used to obtain an indoor map where the user is located, and determine a position error according to the sports scene and the indoor map; The second correction module is used to correct the corrected position information again according to the position error to obtain the target position information of the user.
10. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the indoor positioning method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the indoor positioning method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Indoor pedestrian 3D positioning method based on UWB / IMU / barometer
CN109974694A
Three-dimensional pedestrian navigation method based on main and auxiliary IMUs and barometer
CN110146079A
Zero-speed detection method, pedestrian inertial navigation method and device, and storage medium
CN110715659A
Indoor positioning method and device based on multi-source sensor fusion
CN118201069A
Cited By
Indoor positioning method and helmet
CN121594867A
Indoor positioning method and helmet
CN121594867B