A positioning method and apparatus, an electronic device, and a storage medium
By comparing the similarity between the detection data of pedestrian motion status and the label data, and then correcting the data, the problem of integral accumulation error in inertial device positioning is solved, and accurate pedestrian positioning is achieved.
Patent Information
- Application Number
- CN202111246457.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-26
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2041-10-26
AI Technical Summary
Existing pedestrian positioning methods based on inertial devices suffer from integral accumulation errors, making it impossible to achieve accurate positioning when the actual state of the pedestrian does not match the corrected parameters.
By acquiring the detection data of the located object, determining its similarity to the tag data, identifying its specific motion state, and correcting the data based on the similarity, the detection data is corrected using the tag data to improve positioning accuracy.
It enables accurate location determination of pedestrians when their actual state is matched, eliminating errors in the positioning process and improving positioning accuracy.
Smart Images

Figure CN116026357B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of positioning technology, and in particular to a positioning method, device, electronic device and storage medium. Background Technology
[0002] In related technologies, pedestrian positioning is typically based on inertial devices (INS). These devices are strapped to the pedestrian's feet, and the location is determined by assessing the pedestrian's state. This approach is not only relatively simple in its application but also suffers from the problem of accumulated integral errors. To address this issue, optimal estimation algorithms can be used to correct the acceleration and angular velocity measured by the inertial device. However, when the pedestrian's actual state does not match the corrected parameters, the distance the pedestrian has traveled cannot be accurately predicted, resulting in inaccurate positioning. Summary of the Invention
[0003] In view of this, the main objective of the embodiments of this application is to provide a positioning method, device, electronic device and storage medium to solve the problem of the inability to accurately locate pedestrians in related technologies.
[0004] To achieve the above objectives, the technical solution of this application embodiment is implemented as follows:
[0005] This application provides a positioning method, the method comprising:
[0006] Acquire first detection data of the located object; the first detection data includes at least one category of data related to the motion state of the located object;
[0007] If the similarity between the first detection data and the first label data corresponding to the first motion state is greater than a set threshold, the location object is determined to be in the first motion state; wherein, the label data represents at least one category of data related to the corresponding motion state;
[0008] The first detection data is corrected based on the first label data to obtain the corrected first detection data.
[0009] The current location of the object is determined based on the corrected first detection data.
[0010] In the above scheme, determining that the positioning object is in a first motion state includes:
[0011] Determine the first similarity between the first detected data and the first labeled data on the data of each category in the at least one category;
[0012] Based on the determined first similarity, a second similarity is determined between the first detection data and the first label data;
[0013] If the second similarity is greater than the set threshold, the location object is determined to be in a first motion state.
[0014] In the above scheme, determining the first similarity between the first detection data and the first label data on the data of each category in the at least one category of data includes:
[0015] Based on the weights corresponding to the data in each of the at least one category, a first similarity between the first detected data and the first labeled data is determined on the data in each of the at least one category.
[0016] In the above scheme, the data of at least one category includes at least one of the following:
[0017] The acceleration of the positioning object;
[0018] The angular velocity of the object being located;
[0019] The speed of movement of the object being located;
[0020] The distance the object moved;
[0021] The number of data collection frames within a set time period.
[0022] In the above scheme, the step of correcting the first detection data based on the first tag data includes:
[0023] Based on the difference between the movement distance of the positioning object in the first detection data and the corresponding movement distance in the first tag data, a first correction amount for the movement distance of the positioning object is determined.
[0024] A second correction amount is determined based on the ratio of the first correction amount to the number of data acquisition frames within a set time period in the first detection data;
[0025] Based on the second correction amount, the movement speed of the positioning object in the first detection data is corrected.
[0026] In the above scheme, before obtaining the first detection data of the located object, the method further includes:
[0027] Collect label data corresponding to each of at least one type of motion state; where,
[0028] The at least one type of motion state includes at least a first motion state.
[0029] In the above scheme, when each of the at least one type of motion states corresponds to a first and a second sub-motion state, after collecting the label data corresponding to each of the at least one type of motion states, the method further includes:
[0030] Based on the movement speed of the located object in the first sub-label data corresponding to each type of label data, a third correction amount for the movement speed of the located object is determined;
[0031] Based on the third correction amount, the movement speed of the positioning object in the second sub-label data corresponding to the corresponding class label data is corrected;
[0032] Based on the movement speed of the located object in the second sub-label data corresponding to the corrected class label data, the movement distance of the located object in the corresponding class label data is updated; wherein...
[0033] The first sub-label data represents the data collected in the first sub-motion state of the corresponding motion state, and the second sub-label data represents the data collected in the second sub-motion state of the corresponding motion state.
[0034] This application embodiment also provides a positioning device, the device comprising:
[0035] An acquisition unit is configured to acquire first detection data of a positioning object; the first detection data includes at least one category of data related to the motion state of the positioning object.
[0036] The first determining unit is configured to determine that the positioning object is in a first motion state when the similarity between the first detection data and the first label data corresponding to the first motion state is greater than a set threshold; wherein the label data represents at least one category of data related to the corresponding motion state;
[0037] The correction unit is used to correct the first detection data based on the first label data to obtain the corrected first detection data;
[0038] The second determining unit is used to determine the current position of the positioning object based on the corrected first detection data.
[0039] This application also provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor, wherein...
[0040] When the processor is used to run the computer program, it performs the steps of any of the above methods.
[0041] This application also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above methods.
[0042] In this embodiment, first detection data of the positioning object is acquired. The first detection data includes data of at least one category related to the motion state of the positioning object. If the similarity between the first detection data and the first label data corresponding to the first motion state is greater than a set threshold, the positioning object is determined to be in the first motion state. The label data represents data of at least one category related to the corresponding motion state. The first detection data is corrected based on the first label data to obtain corrected first detection data. The current position of the positioning object is determined based on the corrected first detection data. Thus, after acquiring the first detection data of the positioning object, the first motion state, which best matches the actual current motion state of the positioning object, is accurately determined based on the first detection data. Correcting the first detection data based on the first label data corresponding to the first motion state ensures that the first label data used for correction is the correction parameter that best matches the actual motion state of the positioning object, thereby eliminating errors in the positioning process and enabling accurate determination of the current position of the positioning object based on the corrected first detection data, thus improving positioning accuracy. Attached Figure Description
[0043] Figure 1 A flowchart illustrating the implementation of the positioning method provided in this application embodiment;
[0044] Figure 2 A schematic diagram illustrating at least one type of motion state provided in the embodiments of this application;
[0045] Figure 3 A schematic diagram illustrating the collection of tag data corresponding to each type of motion state provided in an embodiment of this application;
[0046] Figure 4 This is another schematic diagram illustrating the collection of tag data corresponding to each type of motion state, provided in an embodiment of this application.
[0047] Figure 5 A schematic diagram illustrating the implementation process of the positioning method provided in the application embodiments of this application;
[0048] Figure 6 A schematic diagram of the positioning device provided in the embodiments of this application;
[0049] Figure 7 This is a schematic diagram of the hardware structure of the electronic device according to an embodiment of this application. Detailed Implementation
[0050] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0051] It should be noted that the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.
[0052] Furthermore, in the embodiments of this application, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. The term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the term "at least one" indicates any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0053] Among the relevant technologies, the following are the main methods for pedestrian localization:
[0054] 1. An inertial foot-attached pedestrian positioning method based on self-observation of heading. This method detects the pedestrian's foot motion in real time during the process of calculating the pedestrian's foot pose in an inertial foot-attached pedestrian positioning system to locate the pedestrian. This method requires inertial devices to be attached to the feet, making its application relatively limited.
[0055] 2. Indoor Autonomous Pedestrian Localization Method Based on Micro-Inertial Navigation. This method determines whether a pedestrian is stationary or moving by setting a threshold for the acceleration modulus. The acceleration, velocity, and angular velocity of the stationary state are used as error correction terms to correct the acceleration, velocity, and angular velocity of the moving state, thus solving the problem of integral accumulation error and achieving pedestrian localization. However, when the threshold for the acceleration modulus does not match the pedestrian's current state, it cannot accurately determine whether the pedestrian is stationary or moving, resulting in poor localization accuracy.
[0056] 3. Pedestrian Dead Reckoning (PDR) localization method for mobile intelligent terminals based on multi-sensor fusion. This method predicts pedestrian movement distance using a back propagation (BP) neural network, effectively avoiding the computational errors caused by step count detection and step length estimation in traditional methods. However, when the BP neural network model does not match the pedestrian's current state, it cannot accurately predict the pedestrian's movement distance, resulting in poor localization accuracy.
[0057] In other words, when the corrected parameters or prediction model do not match the actual movement state of the pedestrian, the pedestrian localization method in the relevant technology cannot accurately predict the pedestrian's movement distance, thus making it impossible to accurately locate the pedestrian.
[0058] Based on this, embodiments of this application provide a positioning method, apparatus, electronic device, and storage medium. The method acquires first detection data of a positioning object, which includes data of at least one category related to the motion state of the positioning object. If the similarity between the first detection data and the first tag data corresponding to the first motion state is greater than a set threshold, the positioning object is determined to be in a first motion state. The tag data represents at least one category of data related to the corresponding motion state. The first detection data is corrected based on the first tag data to obtain corrected first detection data. The current position of the positioning object is determined based on the corrected first detection data. Thus, after acquiring the first detection data of the positioning object, the method accurately determines that the first motion state best matches the actual motion state of the positioning object. Correcting the first detection data based on the first tag data corresponding to the first motion state ensures that the first tag data used for correction is the correction parameter that best matches the actual motion state of the positioning object, thereby eliminating errors in the positioning process and enabling accurate determination of the current position of the positioning object based on the corrected first detection data, thus improving positioning accuracy.
[0059] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.
[0060] Figure 1 This is a schematic diagram illustrating the implementation flow of the positioning method provided in an embodiment of this application. Figure 1 As shown, the method includes:
[0061] Step 101: Obtain first detection data of the positioning object; the first detection data includes data of at least one category related to the motion state of the positioning object.
[0062] Here, an inertial device is placed at a specific location on the object being located. For example, if the object is a pedestrian, the inertial device can be placed on the instep, calf, thigh, wrist, or arm. The inertial device is used to acquire the first detection data of the object being located. The first detection data includes at least one category of data related to the motion state of the object being located.
[0063] In practical applications, the return rate of the inertial device is set to 200Hz. Each frame of data acquired by the inertial device includes at least angular velocity and acceleration in the carrier coordinate system. Angular velocity is represented by gyro = [gyro_x + gyro_y + gyro_z], in degrees per second, where gyro_x represents the X-axis angular velocity, gyro_y represents the Y-axis angular velocity, and gyro_z represents the Z-axis angular velocity. Acceleration in the carrier coordinate system is represented by acc. b =[acc_x b acc_y b acc_z b The value is expressed as ], with the unit being meters per square second, where acc_x b The value represents the X-axis acceleration, acc_y b acc_z represents the Y-axis acceleration value. b This represents the acceleration value along the Z-axis. The carrier coordinate system is represented by oxbybzb. The carrier coordinate system is fixed to the carrier, with its origin at the center of the carrier. The oxb axis runs to the right along the carrier's transverse axis; the oyb axis runs forward along the carrier's longitudinal axis; and the ozb axis runs upward along the carrier's vertical axis.
[0064] In one embodiment, the at least one category of data includes at least one of the following:
[0065] The acceleration of the positioning object;
[0066] The angular velocity of the object being located;
[0067] The speed of movement of the object being located;
[0068] The distance the object moved;
[0069] Set the number of data collection frames within a specified time period.
[0070] Here, at least one category of data related to the motion state of the positioning object includes: the acceleration of the positioning object, the angular velocity of the positioning object, the motion distance of the positioning object, and the number of data acquisition frames within a set time period, at least one of these. The set time period can be set to 10s, 20s, or 30s, and the specific value of the set time period can be set according to the actual situation. This application embodiment does not limit this. In practical applications, the number of data acquisition frames within the set time period is the number of times the inertial device samples data within the set time period.
[0071] By defining the specific data content included in at least one category of data, it is easier to accurately determine the motion state of the positioning object based on at least one category of data, thereby improving positioning accuracy.
[0072] Step 102: If the similarity between the first detection data and the first label data corresponding to the first motion state is greater than a set threshold, the location object is determined to be in the first motion state; wherein, the label data represents at least one category of data related to the corresponding motion state.
[0073] Here, if the similarity between the first detection data and the first tag data is greater than a set threshold, it indicates that the first detection data and the first tag data are a good match. Since the first tag data is the tag data corresponding to the first motion state, in this case, it is determined that the positioning object is in the first motion state. The set threshold can be set to 0.7, 0.8, or 0.9, and the specific value of the set threshold can be set according to the actual situation; this embodiment does not limit this. The tag data represents at least one category of data related to the corresponding motion state. Similar to the first detection data, the tag data may also include at least one of the following: the acceleration of the positioning object, the angular velocity of the positioning object, the motion distance of the positioning object, and the number of data acquisition frames within a set time period.
[0074] In one embodiment, determining that the positioning object is in a first motion state includes:
[0075] Determine the first similarity between the first detected data and the first labeled data on the data of each category in the at least one category;
[0076] Based on the determined first similarity, a second similarity is determined between the first detection data and the first label data;
[0077] If the second similarity is greater than the set threshold, the location object is determined to be in a first motion state.
[0078] Here, both the first detection data and the first label data include data from at least one category, and a first similarity is determined between the first detection data and the first label data for each category. Since there is data from at least one category, at least one first similarity will also be determined accordingly.
[0079] After determining at least one first similarity, a second similarity between the first detection data and the first label data is determined based on the at least one first similarity. Specifically, each of the at least one first similarity can be added together to obtain the second similarity.
[0080] If the second similarity is greater than the set threshold, it means that the similarity between the first detection data and the first label data in all categories of data is greater than the set threshold, indicating that the first detection data and the first label data are relatively well matched. In this case, it is determined that the positioning object is in the first motion state.
[0081] For example, the first detection data and the first tag data include two categories of data: the number of data acquisition frames within a set time period and the movement distance of the located object. First, the first similarity between the first detection data and the first tag data in the category of the number of data acquisition frames within the set time period is determined to be 0.55, and the first similarity between the first detection data and the first tag data in the category of the movement distance of the located object is determined to be 0.23. After determining the two first similarities, these two first similarities are added together to obtain a second similarity between the first detection data and the first tag data, which is 0.78. If the threshold is set to 0.7, then in this case, since the second similarity is 0.78, which is greater than 0.7, it is determined that the located object is in a first motion state.
[0082] It should be noted that in practical applications, when determining the motion state of a location object, it is necessary not only to calculate the second similarity between the first detection data and the first label data, but also to calculate the second similarity between the first detection data and the label data corresponding to other motion states. If the calculation result indicates that the second similarity between the first detection data and the first label data is greater than a set threshold, while the second similarity between the first detection data and the label data corresponding to other motion states is not greater than the set threshold, then the location object is determined to be in the first motion state.
[0083] By determining the second similarity between the first detection data and the first label data based on at least one first similarity, and if the second similarity is greater than a set threshold, it is determined that the positioning object is in a first motion state. This can accurately determine the current motion state of the positioning object, making it easier to accurately locate the positioning object.
[0084] In one embodiment, determining the first similarity between the first detected data and the first labeled data on data in each of the at least one category of data includes:
[0085] Based on the weights corresponding to the data in each of the at least one category, a first similarity between the first detected data and the first labeled data is determined on the data in each of the at least one category.
[0086] Here, a weight is pre-assigned to each category of data based on its influence on determining the motion state of the located object. If a category of data has a greater impact on determining the motion state of the located object, then the weight assigned to that category of data will be relatively higher. Based on the weights corresponding to each category of data, the first similarity between the first detection data and the first label data on the data of each category is determined.
[0087] In practical applications, the first similarity between the first detected data and the first labeled data in each category is determined by multiplying the weight corresponding to the data in each category with the first probability corresponding to the data in each category. The first probability is calculated using Bayes' theorem and represents the probability that the data in each category included in the first detected data corresponds to each type of motion state. The formula for calculating the first probability is as follows:
[0088]
[0089] Among them, P(w i ) represents the data belonging to each category in the first detection data. i The prior probability of the class, P(x|w) i ) for in w i P(x) represents the probability that data from each category in the first detection data is collected in the first detection data, and P(w) represents the sum of probabilities that data from each category in the first detection data corresponds to each motion state; i |x) represents the probability that each category of data in the first detection data corresponds to each type of motion state.
[0090] Based on the weights and probabilities corresponding to each category of data, the first similarity between the first detection data and the first label data in each category is calculated. Based on the calculated first similarity, the second similarity between the first detection data and the first label data is determined.
[0091] By determining the first similarity between the first detection data and the first label data in each category based on the weights corresponding to the data in each category, the first similarity can be accurately calculated. Thus, the second similarity between the first detection data and the first label data can be accurately determined based on the first similarity, which facilitates the accurate determination of the motion state of the located object.
[0092] Step 103: Correct the first detection data based on the first tag data to obtain the corrected first detection data.
[0093] Here, if the current motion state of the located object is determined to be the first motion state, then the first detection data is corrected based on the first label data to obtain the corrected first detection data.
[0094] In one embodiment, correcting the first detection data based on the first tag data includes:
[0095] Based on the difference between the movement distance of the positioning object in the first detection data and the corresponding movement distance in the first tag data, a first correction amount for the movement distance of the positioning object is determined.
[0096] A second correction amount is determined based on the ratio of the first correction amount to the number of data acquisition frames within a set time period in the first detection data;
[0097] Based on the second correction amount, the movement speed of the positioning object in the first detection data is corrected.
[0098] Here, the first tag data includes the movement distance move_dist of the located object, which is the standard movement distance corresponding to the first movement state, while the first detection data includes the movement distance of the located object. This is the actual measured movement distance of the located object. To reduce errors, a first correction amount for the movement distance of the located object is obtained based on the difference between the movement distance of the located object in the first detection data and the corresponding movement distance in the first tag data. The formula for calculating the first correction amount is as follows:
[0099]
[0100] After determining the first correction amount for the movement distance of the positioning object, the number of data acquisition frames within a set time period in the first detection data is obtained. Based on the ratio of the first correction amount to the number of data acquisition frames within the set time period in the first detection data, a second correction amount for the movement speed of the positioning object is determined, which means obtaining the second correction amount for the movement speed of the positioning object in each frame of data. The formula for calculating the second correction amount is as follows:
[0101]
[0102] Based on the second correction value, the motion speed of the located object in each frame of the first detection data is... Make corrections to obtain the corrected motion speed of the positioned object. based on Integrating the data yields the current position pos of the object being located. i _lst.
[0103] By correcting the motion speed of the object in the first detection data based on the correction amount of the object's motion speed, the current position of the object can be accurately determined, thus improving the positioning accuracy.
[0104] Step 104: Determine the current position of the positioning object based on the corrected first detection data.
[0105] Here, after correcting the first detection data, the current position of the object is determined based on the corrected first detection data. For example, if the first detection data includes the movement speed of the object, the movement speed of the object included in the first detection data is corrected based on the first tag data, and then the movement speed of the object included in the corrected first detection data is integrated to determine the current position of the object.
[0106] In one embodiment,
[0107] Before acquiring the first detection data of the located object, the method further includes:
[0108] Collect label data corresponding to each of at least one type of motion state; where,
[0109] The at least one type of motion state includes at least a first motion state.
[0110] Here, before acquiring the first detection data of the located object, label data corresponding to each of at least one type of motion state is collected. The at least one type of motion state includes at least the first motion state.
[0111] Figure 2 This is a schematic diagram illustrating at least one type of motion state provided in the embodiments of this application. For example... Figure 2 As shown, at least one type of motion state includes at least one of the following:
[0112] static state;
[0113] Slowly stepping in place;
[0114] Rapid marching in place;
[0115] Walking slowly;
[0116] Normal operation status;
[0117] brisk walking;
[0118] Running.
[0119] These seven motion states were determined based on kinematic principles and extensive experimental results, and represent the motion states exhibited by the object being located during real-time positioning. Among them, the six motion states of slow stepping in place, fast stepping in place, slow walking, normal walking, fast walking, and running share a common characteristic: each of these six motion states has two sub-states: a sub-motion state and a sub-stationary state, and these two sub-states alternate in chronological order. For example, when the inertial device is attached to the instep of the object being located, and the object is in a normal walking motion, the sub-stationary state corresponds to the moment the foot touches the ground, while the motion state during the time from kicking forward until the second touch is the sub-dynamic state. When the inertial device is attached to the wrist of the object being located, the sub-motion state is the motion state during the time from when the hand swings forward to its foremost point, and the state corresponding to the instant the hand turns backward is the sub-stationary state.
[0120] It should be noted that when the object being located is in any of the six sub-motion states, the velocity obtained by the inertial device and the number of data acquisition frames within the set time period are inconsistent. Furthermore, the placement of the inertial device when collecting tag data for each motion state is consistent with its placement during real-time positioning of the object. For example, if the inertial device is strapped to the object's arm during positioning, it should also be strapped to the object's arm when collecting tag data for each motion state.
[0121] Figure 3 This is a schematic diagram illustrating the collection of tag data corresponding to each type of motion state provided in an embodiment of this application, such as... Figure 3 As shown:
[0122] After the inertial devices are powered on, tag data corresponding to each type of motion state is collected sequentially according to time. The specific collection process is as follows:
[0123] Collect data for 30 seconds while the object being located is stationary;
[0124] Collect data for 20 seconds when the target is in a slow, stationary position; collect data for 10 seconds when the target is stationary.
[0125] Data was collected for 20 seconds when the target was in a rapid stepping motion in place, and for 10 seconds when the target was stationary.
[0126] Data was collected for 20 seconds when the target was walking slowly and for 10 seconds when the target was stationary.
[0127] Data was collected for 20 seconds when the object was moving normally, and for 10 seconds when the object was stationary.
[0128] Data was collected for 20 seconds when the target was walking briskly and for 10 seconds when the target was stationary.
[0129] Data was collected for 20 seconds when the target was running and for 10 seconds when the target was stationary.
[0130] Figure 4 This is another schematic diagram illustrating the collection of tag data corresponding to each type of motion state, as provided in an embodiment of this application. Figure 4 As shown:
[0131] The motion states are divided into 7 categories. If it is determined that the positioning object is currently stationary, when collecting tag data for a stationary object, the maximum, minimum, and average values of the three-axis angular velocities need to be found from a set of collected three-axis angular velocities, and these values are then stored in the tag data corresponding to the stationary state. Furthermore, the modulus of a set of collected acceleration data in the carrier coordinate system needs to be taken, and the maximum, minimum, and average values of these modulo values need to be found, and these values are then stored in the tag data corresponding to the stationary state. The formula for calculating the modulus of acceleration data in the carrier coordinate system is as follows:
[0132]
[0133] If it is determined that the object being located is currently in a non-stationary state, that is, when collecting tag data of the object in one of the other six motion states, each motion state is divided into sub-motion states and sub-stationary states. The motion distance of each sub-motion state of each motion state is saved to the corresponding tag data. The number of data collection frames within a set duration for each sub-stationary state of each motion state is saved to the corresponding tag data.
[0134] Specifically, the average number of data acquisition frames (move_count) for each sub-motion state of a given motion state within a set time period is saved to the label data corresponding to the motion state category; the movement distance (move_dist) for each sub-motion state in the navigation coordinate system of the corresponding motion state category is saved to the label data corresponding to the motion state category; and the average number of data acquisition frames (station_count) for each stationary state within a set time period of the corresponding motion state category is saved to the label data corresponding to the motion state category. Then, the actual movement distance for each sub-motion state is... Save it to the label data corresponding to the motion state of the corresponding category.
[0135] From the label data corresponding to each category of motion state, extract the data of all sub-motion states to form n groups of sub-motion state data. Then, extract the number of data acquisition frames within a set duration from each group of sub-motion state data to form an array [simple_num1 simple_num2...simple_num] n The average value of this array is taken as the average number of data acquisition frames within the set duration for each sub-motion state in the label data corresponding to the motion state of this category; the average number of data acquisition frames within the set duration for each sub-stationary state in the label data corresponding to the motion state of this category is determined in the same way.
[0136] In chronological order, the acceleration of each frame of data in the carrier coordinate system is extracted from the label data corresponding to each category of motion state. and angular velocity gyro i =[gyro_x i gyro_y i gyro_z i The acceleration and angular velocity in the carrier coordinate system are used as input vectors, and the corresponding rotation matrix is obtained by using the "quaternion attitude and heading reference system (AHRS) attitude calculation" algorithm. By rotation matrix Convert the acceleration in the vehicle coordinate system to the acceleration in the navigation coordinate system. By acc n The velocity vel in the navigation coordinate system is obtained by integration. i Then, the speed of the movement is saved to the label data corresponding to the movement state of the corresponding category.
[0137] Based on the Bayesian discrimination rule and experimental results, the prior probability of each of the 6 motion states is set to 1 / n. Since there are a total of 6 motion states, the prior probability of each motion state is 1 / 6. These prior probabilities are saved to the label data corresponding to each motion state.
[0138] Based on the Bayesian discrimination rule and experimental results, conditional probabilities are set for each type of motion state, and these conditional probabilities are saved to the label data corresponding to each type of motion state.
[0139] In practical applications, based on relevant experimental data, for any type of motion state, if the data in the first detection data collected during the positioning process is collected under the current type of motion state, then the conditional probability that the number of data acquisition frames in the second sub-motion state within the set duration in the first detection data is closest to the number of data acquisition frames within the set duration in the second sub-label data corresponding to the current type of motion state is 0.95, and the conditional probability that it is closest to the number of data acquisition frames within the set duration in the second sub-label data corresponding to other types of motion states is 0.01. Here, the second sub-motion state represents the sub-motion state corresponding to each type of motion state, and the second sub-label data represents the data collected under the corresponding sub-motion state.
[0140] For any type of human motion state, if the data in the first detection data collected during the positioning process is collected within the current type of motion state, then the conditional probability that the number of data acquisition frames in the first sub-motion state within the set duration in the first detection data is closest to the number of data acquisition frames in the first sub-label data within the set duration corresponding to the current type of motion state is 0.75, and the conditional probability that it is closest to the number of data acquisition frames in the first sub-label data within the set duration corresponding to other types of motion states is 0.05. Here, the first sub-motion state represents the sub-stationary state corresponding to each type of motion state, and the first sub-label data represents the data collected in the sub-stationary state of the corresponding motion state.
[0141] For any type of human motion state, if the data in the first detection data collected during the positioning process is collected in the current type of motion state, then the conditional probability that the motion distance of the positioned object in the first detection data is closest to the corresponding motion distance in the label data corresponding to the current type of motion state is 0.85, and the conditional probability that it is closest to the corresponding motion distance in the label data corresponding to other types of motion states besides the current type of motion state is 0.03.
[0142] By pre-collecting label data for each type of motion state, the first detection data can be accurately corrected based on the label data corresponding to each type of motion state during the positioning process, thereby accurately determining the motion state of the positioning object.
[0143] In one embodiment, when each of the at least one type of motion states corresponds to a first and a second sub-motion state, the method further includes, after collecting the tag data corresponding to each of the at least one type of motion states:
[0144] Based on the movement speed of the located object in the first sub-label data corresponding to each type of label data, a third correction amount for the movement speed of the located object is determined;
[0145] Based on the third correction amount, the movement speed of the positioning object in the second sub-label data corresponding to the corresponding class label data is corrected;
[0146] Based on the movement speed of the located object in the second sub-label data corresponding to the corrected class label data, the movement distance of the located object in the corresponding class label data is updated; wherein...
[0147] The first sub-label data represents the data collected in the first sub-motion state of the corresponding motion state, and the second sub-label data represents the data collected in the second sub-motion state of the corresponding motion state.
[0148] Here, if each type of motion state corresponds to a first sub-motion state and a second sub-motion state, then after collecting the label data corresponding to each type of motion state, based on the motion speed of the located object in the first sub-label data corresponding to each type of label data, a third correction amount for the motion speed of the located object is determined. Based on the third correction amount, the motion speed of the located object in the second sub-label data corresponding to the corresponding type of label data is corrected. Based on the corrected motion speed of the located object in the second sub-label data corresponding to the corresponding type of label data, the motion distance of the located object in the corresponding type of label data is updated. Here, the first sub-label data represents the data collected in the first sub-motion state of the corresponding motion state, and the second sub-label data represents the data collected in the second sub-motion state of the corresponding motion state.
[0149] In practical applications, the first sub-motion state represents the sub-stationary state, and the second sub-motion state represents the sub-motion state. Since the first and second sub-motion states alternate in chronological order, the corresponding first and second sub-label data also alternate in chronological order when collecting the corresponding label data. The average value of the motion velocities in the preceding set of first sub-label data for each set of second sub-label data is used as the third correction factor (vel_prift) for the motion velocity in the second sub-label data. This vel_prift is then used to correct the motion velocity in the second sub-label data, resulting in the corrected motion velocity. use Integrating to obtain the position pos i Through this location pos i Calculate the movement distance between every two positions, and sum the movement distances between all positions corresponding to each sub-motion state to obtain the total movement distance dist for each sub-motion state. i A category's motion state corresponds to n segments of second sub-label data in the label data, thus forming a motion distance array [dist]. 1 dist 2 …dist n Calculate the average value of this motion distance array, and use it as the motion distance (dist) for each second sub-label data in the label data corresponding to the motion state of the current category. i The calculation process for the actual movement distance of each sub-motion state of the current category is as follows: the total movement distance of the current category's motion state is actually measured and divided by the total number of sub-motion states of the current category's motion state.
[0150] By correcting the motion distance in the label data corresponding to each category of motion state, the first detection data can be corrected based on accurate label data during real-time positioning, thus improving positioning accuracy.
[0151] Figure 5 A schematic diagram illustrating the implementation flow of the positioning method provided in the application embodiments of this application is shown below. Figure 5 As shown:
[0152] First, set up a data frame buffer queue for the static state and a data frame buffer queue for the moving state. Here, the moving state is represented... Figure 2 The six types of motion states.
[0153] A frame of inertial data is acquired from the inertial device. Based on the prior information of the stationary state, it is determined whether the current frame of inertial data is stationary data. If the determination result indicates that the current frame of inertial data is not stationary data, then the current frame of inertial data is stored in the motion state data frame buffer queue.
[0154] If the judgment result indicates that the current frame of inertial data is stationary, then it is determined whether the previous frame of inertial data is in motion. If the judgment result indicates that the previous frame of inertial data is in motion, then the current frame of inertial data is stored in the motion state data frame buffer queue. All data frames in the motion state data frame buffer queue are retrieved and calculated to obtain the motion velocity of each frame. Based on the current motion state data and prior information, the posterior probability of the current motion state being one of the six motion states is obtained. Based on the posterior probability, it is determined which of the six motion states the positioning object is currently in. The motion velocity of the current motion state is corrected using the motion velocity in the matching motion state label data. The corrected motion velocity is then integrated to obtain the current position of the positioning object.
[0155] If the judgment result indicates that the previous frame's inertial data is also not motion state data, then the current frame's inertial data is stored in the stationary state data frame buffer queue.
[0156] The specific process is as follows:
[0157] During real-time positioning, two data frame buffer queues are first set up: a static state data frame buffer queue (list_station). n ) and motion state data frame buffer queue (list_move n Each data frame in the stationary state data frame buffer queue includes at least: the velocity in the navigation coordinate system; each data frame in the moving state data frame buffer queue includes at least: the velocity in the navigation coordinate system.
[0158] A frame of inertial data is retrieved from the inertial device, and it is determined whether the current frame of inertial data is stationary or moving. If the current frame of inertial data is moving, the corresponding acceleration data in the navigation coordinate system is stored in the moving data frame buffer queue. If the current frame of inertial data is stationary, it is determined whether the previous frame of inertial data was stationary or moving. If the previous frame of inertial data was stationary, the current frame of inertial data is stored in the stationary buffer queue. If the previous frame of inertial data was moving, the following processing procedure is performed:
[0159] 1) Obtain the conditional probability of the current frame of inertial data. The acquisition process is as follows:
[0160] A. Calculate the number of data frames in the motion state data frame buffer queue, list_move_count. Compare list_move_count with the number of data frames in the label data corresponding to the 6 types of motion states, move_count. It should be noted that the number of data frames here is equivalent to the number of data acquisition frames within the set time period mentioned earlier. The comparison formula is as follows:
[0161] move_diff_count=|move_count-list_move_count| Formula 5 The current motion state of the positioned object is w i In a motion state, the number of data acquisition frames within a set duration of the sub-motion state acquired under the current motion state, and w i The conditional probability that the number of data collection frames within a set time period in the second sub-label data corresponding to the motion state is closest is 0.95;
[0162] The current motion state of the positioned object is not w i In a motion state, the number of data acquisition frames within a set duration of the sub-motion state acquired under the current motion state, and w i The conditional probability that the number of data collection frames within the set duration in the second sub-label data corresponding to the motion state is closest is (1-0.95) / 5, which is 0.01.
[0163] B. Compare the number of data acquisition frames (list_station_count) within a set duration for the sub-stationary state in the motion state data frame buffer queue with the number of data acquisition frames (station_count) within a set duration in the first sub-label data corresponding to the 6 types of motion states, using the following comparison formula:
[0164] station_diff_count=|station_count-list_station_count| Formula 6
[0165] The current motion state of the positioned object is w i In a motion state, the number of data acquisition frames within a set duration of the sub-stationary state acquired under the current motion state, and w i The conditional probability that the number of data collection frames within a set time period in the first sub-label data corresponding to the motion state is closest is 0.75;
[0166] The current motion state of the positioned object is not w i In a motion state, the number of data acquisition frames within a set duration of the sub-stationary state acquired under the current motion state, and w iThe conditional probability that the number of data collection frames within the set time period in the first sub-label data corresponding to the motion state is closest is (1-0.75) / 5, which is 0.05.
[0167] C. Based on the motion distance in the navigation coordinate system corresponding to each data frame in the motion state data frame buffer queue, the total motion distance corresponding to all data frames in the motion state data frame buffer queue is obtained by summing, denoted as move_dist_cur. move_dist_cur is then compared with the motion distance move_dist in the label data corresponding to the 6 types of motion states, using the following comparison formula:
[0168] diff_dist=|move_dist_cur-move_dist| Formula 7
[0169] The current motion state of the positioned object is w i In a motion state, the total motion distance corresponding to all data frames in the current motion state is related to w. i The conditional probability that the total motion distance is closest in the label data corresponding to the motion state is 0.85;
[0170] The current motion state of the positioned object is not w i In a motion state, the total motion distance corresponding to all data frames in the current motion state is related to w. i The conditional probability that the total motion distance is closest in the label data corresponding to the motion state is (1-0.85) / 5, which is 0.03.
[0171] 2) Based on the Bayesian discrimination rule and the actual situation of the real-time positioning process, the prior probability of each category of motion state is set to 1 / n. There are a total of 6 categories of motion states, so the prior probability of each category of motion state is 1 / 6.
[0172] 3) Calculate the posterior probability of the data frames in the current motion state data frame buffer queue for each motion state category:
[0173] The calculation process for the posterior probability of each category of motion state is the same as the calculation formula for the second similarity mentioned above. Specifically, it is the sum of the products of the weight corresponding to each category of data and the first probability corresponding to each category of data. For example, if there are three categories of data, namely the number of data collection frames within the set time of the sub-motion state, the number of data collection frames within the set time of the sub-stationary state, and the motion distance, then the probabilities of these three categories of data corresponding to a certain type of motion state are calculated as a, b, and c, respectively, and the weights corresponding to these three categories of data are 0.6, 0.3, and 0.1, respectively. Then, the posterior probability of this category of motion state is: 0.6*a + 0.3*b + 0.1*c.
[0174] 4) Among the posterior probabilities of each category of motion states calculated, if there is a category of motion states with a posterior probability greater than a set threshold, the motion state of this category is taken as the motion state that best matches the current motion state of the positioning object.
[0175] Obtain the movement distance `move_dist` of the second sub-label data in the navigation coordinate system from the label data corresponding to the most matching movement state, and compare it with the movement distance corresponding to each sub-movement state in the actual measured detection data of the positioning object. Differential processing is performed to obtain the motion distance correction amount move_diff_dist. Based on the ratio of the motion distance correction amount move_diff_dist to the number of data acquisition frames within a set time period in the actual measured detection data of the positioning object, the motion speed correction amount is obtained. The calculation formula for the motion speed correction amount is Formula 3. Correcting the motion speed of each frame in the actual measured detection data of the located object. The corrected motion speed Using the corrected velocity The position pos of the located object is obtained by integration. i The _lst setting eliminates positioning errors and improves positioning accuracy.
[0176] In this embodiment, first detection data of the positioning object is acquired. The first detection data includes data of at least one category related to the motion state of the positioning object. If the similarity between the first detection data and the first label data corresponding to the first motion state is greater than a set threshold, the positioning object is determined to be in the first motion state. The label data represents data of at least one category related to the corresponding motion state. The first detection data is corrected based on the first label data to obtain corrected first detection data. The current position of the positioning object is determined based on the corrected first detection data. Thus, after acquiring the first detection data of the positioning object, the first motion state, which best matches the actual current motion state of the positioning object, is accurately determined based on the first detection data. Correcting the first detection data based on the first label data corresponding to the first motion state ensures that the first label data used for correction is the correction parameter that best matches the actual motion state of the positioning object, thereby eliminating errors in the positioning process and enabling accurate determination of the current position of the positioning object based on the corrected first detection data, thus improving positioning accuracy.
[0177] To implement the method of the embodiments of this application, the embodiments of this application also provide a positioning device. Figure 6 For a schematic diagram of the positioning device provided in the embodiments of this application, please refer to [link / reference]. Figure 6 The device includes:
[0178] The acquisition unit 601 is used to acquire first detection data of the positioning object; the first detection data includes at least one category of data related to the motion state of the positioning object.
[0179] The first determining unit 602 is configured to determine that the positioning object is in a first motion state when the similarity between the first detection data and the first label data corresponding to the first motion state is greater than a set threshold; wherein the label data represents at least one category of data related to the corresponding motion state;
[0180] The correction unit 603 is used to correct the first detection data based on the first tag data to obtain the corrected first detection data;
[0181] The second determining unit 604 is used to determine the current position of the positioning object based on the corrected first detection data.
[0182] In one embodiment, the first determining unit 602 is further configured to determine a first similarity between the first detected data and the first labeled data on the data of each category in the at least one category of data;
[0183] Based on the determined first similarity, a second similarity is determined between the first detection data and the first label data;
[0184] If the second similarity is greater than the set threshold, the location object is determined to be in a first motion state.
[0185] In one embodiment, the first determining unit 602 is further configured to determine a first similarity between the first detected data and the first labeled data on the data of each category in the at least one category of data, based on the weight corresponding to the data of each category in the at least one category of data.
[0186] In one embodiment, the at least one category of data includes at least one of the following:
[0187] The acceleration of the positioning object;
[0188] The angular velocity of the object being located;
[0189] The speed of movement of the object being located;
[0190] The distance the object moved;
[0191] The number of data collection frames within a set time period.
[0192] In one embodiment, the first correction unit 603 is further configured to determine a first correction amount for the movement distance of the positioning object based on the difference between the movement distance of the positioning object in the first detection data and the corresponding movement distance in the first tag data;
[0193] A second correction amount is determined based on the ratio of the first correction amount to the number of data acquisition frames within a set time period in the first detection data;
[0194] Based on the second correction amount, the movement speed of the positioning object in the first detection data is corrected.
[0195] In one embodiment, the device further includes: a data acquisition unit, configured to acquire tag data corresponding to each of at least one type of motion state; wherein,
[0196] The at least one type of motion state includes at least a first motion state.
[0197] In one embodiment, the apparatus further includes: an update unit, configured to determine a third correction amount for the movement speed of the positioning object based on the movement speed of the positioning object in the first sub-label data corresponding to each type of label data;
[0198] Based on the third correction amount, the movement speed of the positioning object in the second sub-label data corresponding to the corresponding class label data is corrected;
[0199] Based on the movement speed of the located object in the second sub-label data corresponding to the corrected class label data, the movement distance of the located object in the corresponding class label data is updated; wherein...
[0200] The first sub-label data represents the data collected in the first sub-motion state of the corresponding motion state, and the second sub-label data represents the data collected in the second sub-motion state of the corresponding motion state.
[0201] In practical applications, the acquisition unit 601, the first determination unit 602, the correction unit 603, the second determination unit 604, the acquisition unit, and the update unit can be implemented by a processor in the terminal, such as a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU), or a field-programmable gate array (FPGA).
[0202] It should be noted that the positioning device provided in the above embodiments is only illustrated by the division of the above program modules when displaying information. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the positioning device and positioning method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0203] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, the embodiments of this application also provide an electronic device. Figure 7 This is a schematic diagram of the hardware composition structure of the electronic device provided in the embodiments of this application, such as... Figure 7 As shown, the electronic device includes:
[0204] The communication interface 701 enables information exchange with other devices, such as network devices.
[0205] The processor 702 is connected to the communication interface 701 to enable information interaction with other devices and, when running a computer program, executes the methods provided by one or more of the aforementioned terminal-side technical solutions. The computer program is stored in the memory 703.
[0206] Specifically, the processor 702 is configured to acquire first detection data of the positioning object; the first detection data includes at least one category of data related to the motion state of the positioning object;
[0207] If the similarity between the first detection data and the first label data corresponding to the first motion state is greater than a set threshold, the location object is determined to be in the first motion state; wherein, the label data represents at least one category of data related to the corresponding motion state;
[0208] The first detection data is corrected based on the first label data to obtain the corrected first detection data.
[0209] The current location of the object is determined based on the corrected first detection data.
[0210] In one embodiment, the processor 702 is further configured to determine a first similarity between the first detected data and the first labeled data on data in each of the at least one category of data;
[0211] Based on the determined first similarity, a second similarity is determined between the first detection data and the first label data;
[0212] If the second similarity is greater than the set threshold, the location object is determined to be in a first motion state.
[0213] In one embodiment, the processor 702 is further configured to determine a first similarity between the first detected data and the first labeled data on the data of each category in the at least one category of data, based on the weights corresponding to the data of each category in the at least one category of data.
[0214] In one embodiment, the at least one category of data includes at least one of the following:
[0215] The acceleration of the positioning object;
[0216] The angular velocity of the object being located;
[0217] The speed of movement of the object being located;
[0218] The distance the object moved;
[0219] Set the number of data collection frames within a specified time period.
[0220] In one embodiment, the processor 702 is further configured to determine a first correction amount for the movement distance of the positioning object based on the difference between the movement distance of the positioning object in the first detection data and the corresponding movement distance in the first tag data;
[0221] A second correction amount is determined based on the ratio of the first correction amount to the number of data acquisition frames within a set time period in the first detection data;
[0222] Based on the second correction amount, the movement speed of the positioning object in the first detection data is corrected.
[0223] In one embodiment, before acquiring the first detection data of the located object, the processor 702 is further configured to collect tag data corresponding to each type of motion state in at least one type of motion state; wherein,
[0224] The at least one type of motion state includes at least a first motion state.
[0225] In one embodiment, when each of the at least one type of motion states corresponds to a first and a second sub-motion state, after collecting the tag data corresponding to each of the at least one type of motion states, the processor 702 is further configured to determine a third correction amount for the motion speed of the positioning object based on the motion speed of the positioning object in the first sub-tag data corresponding to each type of tag data.
[0226] Based on the third correction amount, the movement speed of the positioning object in the second sub-label data corresponding to the corresponding class label data is corrected;
[0227] Based on the movement speed of the located object in the second sub-label data corresponding to the corrected class label data, the movement distance of the located object in the corresponding class label data is updated; wherein...
[0228] The first sub-label data represents the data collected in the first sub-motion state of the corresponding motion state, and the second sub-label data represents the data collected in the second sub-motion state of the corresponding motion state.
[0229] Of course, in practical applications, the various components in an electronic device are coupled together through a bus system 704. It can be understood that the bus system 704 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 704 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 7 The general designated all buses as Bus System 704.
[0230] The memory 703 in this embodiment is used to store various types of data to support the operation of the electronic device. Examples of such data include any computer program used to operate on the electronic device.
[0231] It is understood that memory 703 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 703 described in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0232] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 702. Processor 702 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 702 or by instructions in the form of software. The processor 702 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 702 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 703. Processor 702 reads the program in memory 703 and completes the steps of the aforementioned method in combination with its hardware.
[0233] When processor 702 executes the program, it implements the corresponding processes in the various methods of the embodiments of this application.
[0234] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 703 storing a computer program, which can be executed by a processor 702 to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0235] In the several embodiments provided in this application, it should be understood that the disclosed apparatus, terminal, and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and 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. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0236] The units described above as separate components may or may not be physically separate. 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 the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0237] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0238] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0239] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0240] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A positioning method, characterized in that, The method includes: Acquire first detection data of the positioning object; the first detection data includes at least one category of data related to the motion state of the positioning object; the at least one category of data includes one or more of the following: the acceleration of the positioning object, the angular velocity of the positioning object, the motion speed of the positioning object, the motion distance of the positioning object, and the number of data acquisition frames within a set time period; If the similarity between the first detection data and the first label data corresponding to the first motion state is greater than a set threshold, the location object is determined to be in the first motion state; wherein, the label data represents at least one category of data related to the corresponding motion state; the first motion state includes a stationary state, a slow stepping in place state, a fast stepping in place state, a slow walking state, a normal walking state, a fast walking state, or a running state. The first detection data is corrected based on the first tag data to obtain corrected first detection data; the correction of the first detection data based on the first tag data includes: determining a first correction amount for the movement distance of the positioning object based on the difference between the movement distance of the positioning object in the first detection data and the corresponding movement distance in the first tag data; determining a second correction amount for the movement speed of the positioning object based on the ratio of the first correction amount to the number of data acquisition frames within a set time period in the first detection data; and correcting the movement speed of the positioning object in the first detection data based on the second correction amount. The current location of the object is determined based on the corrected first detection data.
2. The positioning method according to claim 1, characterized in that, Determining that the positioning object is in a first motion state includes: Determine the first similarity between the first detected data and the first labeled data on the data of each category in the at least one category; Based on the determined first similarity, a second similarity is determined between the first detection data and the first label data; If the second similarity is greater than the set threshold, the location object is determined to be in a first motion state.
3. The positioning method according to claim 2, characterized in that, Determining the first similarity between the first detected data and the first labeled data on each category of data in the at least one category includes: Based on the weights corresponding to the data in each of the at least one category, a first similarity between the first detected data and the first labeled data is determined on the data in each of the at least one category.
4. The positioning method according to claim 1, characterized in that, Before acquiring the first detection data of the located object, the method further includes: Collect label data corresponding to each of at least one type of motion state; where, The at least one type of motion state includes at least a first motion state.
5. The positioning method according to claim 4, characterized in that, When each of the at least one type of motion states corresponds to a first and a second sub-motion state, after collecting the tag data corresponding to each of the at least one type of motion states, the method further includes: Based on the movement speed of the located object in the first sub-label data corresponding to each type of label data, a third correction amount for the movement speed of the located object is determined; Based on the third correction amount, the movement speed of the positioning object in the second sub-label data corresponding to the corresponding class label data is corrected; Based on the movement speed of the located object in the second sub-label data corresponding to the corrected class label data, the movement distance of the located object in the corresponding class label data is updated; wherein... The first sub-label data represents the data collected in the first sub-motion state of the corresponding motion state, and the second sub-label data represents the data collected in the second sub-motion state of the corresponding motion state.
6. A positioning device, characterized in that, The device includes: The acquisition unit is used to acquire first detection data of the positioning object; the first detection data includes at least one category of data related to the motion state of the positioning object; the at least one category of data includes one or more of the following: the acceleration of the positioning object, the angular velocity of the positioning object, the motion speed of the positioning object, the motion distance of the positioning object, and the number of data acquisition frames within a set time period; The first determining unit is configured to determine that the positioning object is in a first motion state when the similarity between the first detection data and the first label data corresponding to the first motion state is greater than a set threshold; wherein the label data represents at least one category of data related to the corresponding motion state; the first motion state includes a stationary state, a slow stepping in place state, a fast stepping in place state, a slow walking state, a normal walking state, a fast walking state, or a running state. A correction unit is configured to correct the first detection data based on the first tag data to obtain corrected first detection data. The correction of the first detection data based on the first tag data includes: determining a first correction amount for the movement distance of the positioning object based on the difference between the movement distance of the positioning object in the first detection data and the corresponding movement distance in the first tag data; determining a second correction amount for the movement speed of the positioning object based on the ratio of the first correction amount to the number of data acquisition frames within a set time period in the first detection data; and correcting the movement speed of the positioning object in the first detection data based on the second correction amount. The second determining unit is used to determine the current position of the positioning object based on the corrected first detection data.
7. An electronic device, characterized in that, include: A processor and memory for storing computer programs that can run on the processor, wherein, When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1-5.
8. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Method and device for compensating parameters, processor and storage medium
CN108818540A
IMU-based step length correction system and method for step-counting positioning
CN113390437A
Human body movement determination device
JP2000213967A