A method of smoothing a person trajectory
By processing satellite positioning data using Kalman filtering and density clustering algorithms, the problems of satellite positioning data drift and trajectory knotting are solved, thereby improving the accuracy and temporal sequence of the trajectory and presenting a clear and smooth trajectory.
Patent Information
- Application Number
- CN202210324454.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-03-30
AI Technical Summary
Satellite positioning data drifts due to environmental factors, resulting in inaccurate trajectories. Furthermore, when people move back and forth in a certain location, the trajectory lines become knotted, affecting the quality of the trajectory path display.
The Kalman filter algorithm is used to correct drift points in satellite positioning data, and a density-based clustering analysis algorithm is used to cluster knots in the trajectory line into a single point to ensure the temporal order of the trajectory point set.
It improves the accuracy and temporality of the trajectory, eliminates the chaos of the trajectory lines, and presents a clearer and smoother trajectory.
Smart Images

Figure CN114707594B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of trajectory smoothing method, and particularly relates to a personnel trajectory smoothing method. BACKGROUND
[0002] Currently, GNSS satellite positioning technology has been widely applied, and functions such as GIS graphical monitoring and trajectory query of terminal positioning have become basic GIS applications. With the increasing number of trajectory display and playback application scenarios, users have higher and higher quality requirements for trajectory path playback, and some behavior characteristics can also be obtained through analysis of the trajectory path.
[0003] Currently, in some practical application scenarios, RTK differential positioning technology is used to obtain the real-time position of personnel, and the personnel trajectory is generally generated according to the position information obtained by satellite positioning. However, satellite positioning data will drift due to environmental factors, resulting in inaccurate trajectory, and when personnel move back and forth at a certain position, the trajectory line will appear knotted due to trajectory folding, which seriously affects the quality of trajectory path playback. SUMMARY
[0004] In view of the technical problems that satellite positioning data will drift due to environmental factors, resulting in inaccurate trajectory, and when personnel move back and forth at a certain position, the trajectory line will appear knotted due to trajectory folding, the present application provides a personnel trajectory smoothing method with accurate trajectory, high time sequence and high applicability.
[0005] To solve the above technical problems, the technical scheme adopted by the present application is as follows:
[0006] A personnel trajectory smoothing method comprises the following steps:
[0007] S1, obtaining satellite positioning data;
[0008] S2, and correcting the drift points in the data;
[0009] S3, using a density-based clustering analysis algorithm to cluster the knotted points in the trajectory line due to trajectory folding into one point, while ensuring the time sequence of the trajectory point set.
[0010] The method for obtaining satellite positioning data in S1 is to obtain personnel position information through a handheld terminal with a sampling frequency of 1s as the original trajectory point.
[0011] The position information output by the handheld terminal includes longitude coordinate, latitude coordinate, time stamp and RTK solution state position information.
[0012] The method for rectifying the drift points in the data in S2 is: considering the points with the solution state of non-differential solution in the position information points as the drift points, and applying the Kalman filtering algorithm to the drift points for rectifying.
[0013] The method for rectifying the drift points in the data in S2 is: considering the points with the solution state of non-differential solution in the position information points as the drift points, and applying the Kalman filtering algorithm to the drift points for rectifying.
[0014] S2.1, one-dimensional data filtering is adopted to rectify the longitude and latitude coordinate values of the drift points respectively, the state prediction equation is x t =x t-1 , the state deviation of the current time is: Kalman gain: the optimal value of the current state is: the updated state uncertainty error is: The measure is a measurement value, Q is a state noise covariance, R is a measurement noise covariance, δ1 is the optimal value error of the system at t-1, and δ2 is the state uncertainty error.
[0015] S2.2, the updated state uncertainty error value δ2 in S2.1 is used to iteratively execute the filtering algorithm, and finally the optimal coordinate value is estimated.
[0016] The method for clustering based on the density-based clustering analysis algorithm in S3 is: including the following steps:
[0017] S3.1, the coordinate points in a time period are obtained and recorded as a set S={x1,x2,…,x n} wherein x i (i=1,…n) is composed of longitude, latitude and time stamp, and the elements in the set S are sorted in ascending order of time stamp;
[0018] S3.2, setting the neighborhood radius Eps as T;
[0019] S3.3, setting the density threshold MinPts as 1, that is, ensuring that each point in the trajectory point set is a core point;
[0020] S3.4, generating a trajectory point cluster according to the set parameters Eps, MinPts and the density accessibility rule of the points, and selecting a point from each cluster in the set to form a new set E, wherein the set E is the trajectory point set after clustering.
[0021] The method for generating the trajectory point cluster in S3.4 is as follows: according to the parameter setting and the density accessibility rule of the clustering center point, a core point cluster is generated, that is, taking a point x1 in the set S, finding the density accessible points of the point x1 in the set S except the point x1, obtaining the set C1 of the density accessible points of the point x1, and the point x1 and the set C1 constitute a cluster, and meanwhile, the point x1 and the points in the set C1 are deleted from the set S, the core point set S is traversed, the above process is repeated, the trajectory points x1, x2, x3, … and the density accessible point sets C1, C2, C3, … are obtained, and finally a cluster set is constituted.
[0022] The method for constituting a set E in S3.4 is as follows: a mean point is obtained for each cluster in the cluster set, and finally a new point set E is constituted, and the set E is the trajectory point set after clustering, and the points in the set E are sorted in ascending order according to the time stamp.
[0023] The mean point is an arithmetic mean point, that is, the longitude coordinate of the point is the arithmetic mean of the longitude coordinates of all points in the cluster, the latitude coordinate is the arithmetic mean of the latitude coordinates of all points in the cluster, and the time stamp of the point is the time stamp of the core point.
[0024] The point which is not solved by difference represents a point whose solution state is not pseudo-range difference, floating solution and fixed solution.
[0025] Compared with the prior art, the present application has the beneficial effects that:
[0026] The present application performs the Kalman filtering algorithm on the drift points in the satellite positioning data for correction processing, adopts the density-based clustering algorithm to cluster the knotted points in the trajectory line, eliminates the problem of trajectory line confusion caused by knotting, and makes the presented trajectory more clear and smooth. After the clustering algorithm is executed, the time sequence of the trajectory points in the set is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for those skilled in the art, other embodiments can be derived from the provided drawings without creative labor.
[0028] The structures, proportions, sizes, etc. shown in the specification are only used to cooperate with the content disclosed in the specification, to be understood and read by those skilled in the art, and do not have technical significance to limit the conditions that can be implemented by the application. Any modification of the structure, change of the proportion relationship, or adjustment of the size, without affecting the effects that can be produced by the application and the purposes that can be achieved, should still fall within the scope covered by the disclosed technology.
[0029] Figure 1 For comparison between before and after applying the clustering algorithm in this embodiment. DETAILED DESCRIPTION
[0030] To make the purposes, technical solutions and advantages of the embodiments of the application clearer, the technical solutions in the embodiments of the application will be described clearly and completely below. Obviously, the described embodiments are only some of the embodiments of the application, rather than all the embodiments. These descriptions are only for further illustrating the features and advantages of the application, rather than limiting the claims of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the application.
[0031] The specific embodiments of the application will be further described in detail below in combination with the drawings and embodiments. The following embodiments are used to illustrate the application, but not to limit the scope of the application.
[0032] In this embodiment, the smoothing method of the personnel trajectory adopts the following steps:
[0033] Step 1: The handheld terminal obtains personnel position information with a sampling frequency of 1 s as original trajectory points. The handheld terminal can output position information containing longitude coordinates, latitude coordinates, time stamps and RTK solution states.
[0034] Step 2: The points in the position information points whose solution states are not differential solution (not pseudo-range difference, floating solution and fixed solution) are considered as drift points, and Kalman filtering algorithm is applied to the points for correction processing; one-dimensional data filtering is adopted to correct the latitude and longitude coordinate values respectively.
[0035] Step 21: In this algorithm, the state prediction equation is x t = x t-1 The state deviation at the current time is: Kalman gain: The optimal value of the state at the current time is: Update the state uncertainty error: Wherein measure is the measured value, Q is the state noise covariance, R is the measurement noise covariance, δ1 is the optimal value error at t-1 time, δ2 is the state uncertainty error.
[0036] Step 22: using the updated state uncertainty error value δ2 in step 21, the filtering algorithm is iteratively executed, and the optimal coordinate value is finally estimated. As shown in Table 1, the results of the correction processing of the longitude and latitude coordinates of the point whose solution state is single point positioning are listed.
[0037] Serial number Longitude coordinate Latitude coordinate Solution status Corrected longitude coordinate Corrected longitude coordinate 1 112.5820316 37.7538887 5 (float solution) —— —— 2 112.5820313 37.7538883 5 (float solution) —— —— 3 112.5820317 37.7538918 2 (pseudo-range differential) —— —— 4 112.5820402 37.7539000 2 (pseudo-range differential) —— —— 5 112.5820525 37.7539591 1 (single point positioning) 112.5820426 37.7539113 6 112.5820467 37.7539851 1 (single point positioning) 112.5820514 37.7539641 7 112.5819673 37.7539076 2 (pseudo-range differential) —— —— 8 112.5816729 37.7539201 1 (single point positioning) 112.5819108 37.7539010 9 112.5814289 37.7539635 1 (single point positioning) 112.5818183 37.7539202
[0038] Table 1
[0039] Step 3: take a set of coordinate points in a certain period of time, denoted as set S = {x1, x2, …, x n}, wherein the elements in set S are sorted in ascending order of timestamp. The knotted points in the trajectory line are clustered into one point by using a density-based clustering analysis algorithm.
[0040] Step 31: according to the distance between the actual coordinate points and the adjustment results after executing the program, set the neighborhood radius Eps as 2.53, which is the threshold value for determining the distance between two points. Here, the distance is the Euclidean distance.
[0041] Step 32: set the density threshold MinPts as 1, which ensures that each point in the trajectory point set is a core point, i.e. the set S is the core point set.
[0042] Step 33: generate the core point cluster according to the above parameter setting and the density reachability rule of the clustering point, i.e. take a point x1 in set S, find the density reachable points of point x1 (excluding point x1) in set S, obtain the set C1 of the density reachable points of point x1, and point x1 and set C1 constitute a cluster. At the same time, delete point x1 and the points in set C1 from set S.
[0043] Step 34: traverse the core point set S, repeat the above process, obtain the trajectory points x1, x2, x3, … and their density reachable point sets C1, C2, C3, …, and finally form a cluster set.
[0044] Step 35: obtain a mean point in each cluster in the cluster set, which is obtained by using the arithmetic mean method, i.e. the longitude coordinate of the point is the arithmetic mean of the longitude coordinates of all points in the cluster, the latitude coordinate is the arithmetic mean of the latitude coordinates of all points in the cluster, and the timestamp of the point is the timestamp of the core point.
[0045] Step 36: According to the above method, the cluster set is traversed and finally a new point set E is formed, E is the clustered trajectory point set, and the points in set E are sorted in ascending order according to the time stamp. Figure 1 The results before and after clustering of the trajectory point set are presented.
[0046] The above only describes the preferred embodiments of the present application in detail, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the purpose of the present application, and all the changes shall be included in the protection scope of the present application.
Claims
1. A method of smoothing a person's trajectory, characterized by: It comprises the following steps: S1, obtaining satellite positioning data; the method for obtaining satellite positioning data in S1 is that the personnel position information is obtained by the handheld terminal with a sampling frequency of 1s as the original trajectory point; S2, and the drift point in the data is corrected; the method for correcting the drift point in the data in S2 is that the point whose position information point is not differentiated is considered as a drift point, and the Kalman filter algorithm is applied to the drift point for correction; One-dimensional data filtering is adopted to correct the longitude and latitude coordinate values of the drift point; the point not differentiated means that the solution state is not pseudo-range difference, floating solution and fixed solution; S3, a density-based clustering analysis algorithm is adopted to cluster the knotted points in the trajectory line due to trajectory return as one point, while ensuring the time sequence of the trajectory point set; The method for clustering in S3 based on the density-based clustering analysis algorithm comprises the following steps: S3.1, Obtain coordinate points in a certain period of time, and record as set S = {x1, x2, …, xn}, where x n , i = 1, …, n consists of longitude, latitude and timestamp, and the elements in set S are sorted in ascending order of timestamp; i S3.2, setting the neighborhood radius Eps as T; S3.3, setting the density threshold MinPts as 1, that is, ensuring that each point in the trajectory point set is a core point; S3.4, generating a trajectory point cluster according to the parameters Eps, MinPts set above and the point density accessibility rule, and selecting a point from each cluster in the set to form a new set E, the set E is the trajectory point set after clustering; The method for forming a set E in S3.4 is that a mean point is obtained for each cluster in the cluster set, and finally a new point set E is formed, the set E is the trajectory point set after clustering, and the points in the set E are sorted in ascending order of time stamp.
2. The method of claim 1, wherein: The position information output by the handheld terminal includes longitude coordinate, latitude coordinate, time stamp and RTK solution state position information.
3. The method of claim 1, wherein: The method for applying the Kalman filter algorithm to the drift point for correction is as follows: S2.1, the state prediction equation is , the state deviation at the current time: , the Kalman gain: , the optimal value of the state at the current time: , the updated state uncertainty error: , the measure is a measured value, Q is a state noise covariance, R is a measurement noise covariance, the is the optimal value error of the system at t-1, and the is a state uncertainty error; S2.2, using the updated state uncertainty error value in S2.1 The filtering algorithm is iteratively performed to finally estimate the optimal coordinate value.
4. The method of claim 1, wherein: The method for generating a trajectory point cluster in S3.4 is that a core point cluster is generated according to the parameter setting and the density accessibility rule of the clustering point, that is, taking a point x1 in the set S, finding the density accessible points of the point x1 in the set S except x1, obtaining the set C1 of the density accessible points of the point x1, and the point x1 and the set C1 constitute a cluster, while deleting the point x1 and the points in the set C1 from the set S, repeating the above process by traversing the core point set S, obtaining the trajectory points x1, x2, x3, … and their density accessible point sets C1, C2, C3, …, and finally forming a cluster set.
5. The method of claim 1, wherein: The mean point is an arithmetic mean point, that is, the longitude coordinate of the point is the arithmetic mean of the longitude coordinates of all points in the cluster, the latitude coordinate is the arithmetic mean of the latitude coordinates of all points in the cluster, and the time stamp of the point is the time stamp of the core point.
Citation Information
Patent Citations
Driving track optimization method
CN108120991A