Vehicle trajectory data protection method, system, computer device and storage medium based on differential privacy
By calculating the maximum moving distance and turning angle distribution of vehicle trajectory data, combining Laplace noise and first-order Markov model, synthetic trajectory data is generated, which solves the problem that vehicle trajectory data cannot resist background knowledge attacks in the Internet of Vehicles environment, and achieves effective privacy protection and data utilization.
Patent Information
- Application Number
- CN202210903287.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-07-29
AI Technical Summary
The existing vehicle trajectory data protection methods cannot effectively resist attackers with background knowledge, and there is a risk of data leakage. Especially in the Internet of Vehicles environment, the application of k-anonymous model has limitations.
By calculating the maximum moving distance distribution and maximum turning angle distribution of the trajectory data, a new trajectory is synthesized using Laplace noise, combined with the first-order Markov model and differential privacy protection technology, the synthetic trajectory data is generated, the sampling position is controlled within a reasonable range, and noise is added to protect privacy.
Effectively resist background knowledge attacks, maintain data utility, and at the same time realize differential privacy protection to prevent data leakage.
Smart Images

Figure CN115221557B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a vehicle trajectory data protection method, system, computer equipment and storage medium based on differential privacy, belonging to the technical field of privacy protection. Background Art
[0002] Applications based on data from smart devices, such as path planning, smart identity authentication, and edge computing, are becoming increasingly common in our lives. While this brings convenience, it inevitably leads to the leakage of user data privacy, especially in the increasingly widespread Internet of Vehicles (IoV) environment. With the development of smart connected vehicles and the popularization of onboard positioning terminals, smart connected vehicles generate a large amount of trajectory data. This trajectory data collected from vehicle terminals has important application value for commercial organizations, traffic management departments, some legal information query organizations, and location-based services. However, this data collected by trusted servers can still lead to the leakage of individual user data during the trajectory data release phase.
[0003] To address the issue of privacy leakage in trajectories, scholars at home and abroad have conducted extensive research. The most widely used methods are mainly based on the k-anonymity model, but these methods still have some defects because they all rely on privacy models - either relying on specific assumptions or having low practicality. These models cannot cope with attackers with background knowledge, such as foreground knowledge attacks, deFinetti attacks, and combination attacks. Summary of the Invention
[0004] The present invention aims to overcome the shortcomings of the prior art and provide a vehicle trajectory data protection method, system, computer device, and storage medium based on differential privacy. By calculating the maximum movement distance distribution and maximum turning angle distribution of trajectory data, and then dividing geographical areas by the maximum movement distance, Laplace noise is added to the distribution, starting point, and transition probability of potentially leaking private data. New trajectories are synthesized by sampling the noise values. This method can improve the effectiveness of the published data while protecting the trajectory data through differential privacy.
[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0006] The first object of the present invention is to provide a vehicle trajectory data protection method based on differential privacy, which is characterized by comprising:
[0007] Acquiring original vehicle trajectory data, wherein the original vehicle trajectory data includes trajectory position points of a plurality of vehicle trajectories, movement distances between adjacent trajectory position points, and turning angles;
[0008] According to the original vehicle trajectory data, the geographical area where the vehicle trajectory is located is evenly divided to obtain a uniform grid;
[0009] Based on the original vehicle trajectory data, uniform network and first Laplace noise, the maximum moving distance noise distribution, maximum turning angle noise distribution and origin and destination point distribution are calculated;
[0010] According to the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model, the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory are obtained;
[0011] According to the starting and ending points, maximum moving distance and maximum turning angle of the synthetic trajectory, the rationality of the sampling position points is judged to obtain a complete synthetic trajectory;
[0012] According to the complete synthetic trajectory, the rationality of the starting and ending points of the complete synthetic trajectory is judged to obtain the synthetic trajectory with differential privacy protection.
[0013] Furthermore, the method of evenly dividing the geographical area where the vehicle trajectory is located according to the original vehicle trajectory data to obtain a uniform grid includes:
[0014] According to the original vehicle trajectory data, remove the position points with a moving distance of 0;
[0015] The minimum moving distance with the most distribution is set as the unit grid length, so as to divide the geographical area of the vehicle trajectory into m*n uniform grids, where m and n are the ratios of the total length of the geographical area edge to the unit grid length.
[0016] Furthermore, the method of calculating the maximum moving distance noise distribution, the maximum turning angle noise distribution and the origin and destination point distribution based on the original vehicle trajectory data, the uniform network and the first Laplace noise includes:
[0017] According to the uniform grid, the trajectory position points in the original vehicle trajectory data are mapped to the centroid position of the grid;
[0018] Based on the original vehicle trajectory data, the maximum moving distance distribution, maximum turning angle distribution, and origin and destination point distribution are obtained;
[0019] The maximum moving distance distribution and the maximum turning angle distribution are added with Laplace noise to obtain the maximum moving distance noise distribution and the maximum turning angle noise distribution.
[0020] Furthermore, the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory are obtained according to the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model; specifically including:
[0021] Randomly sample the maximum moving distance noise distribution, maximum turning angle noise distribution, and start and end point distribution to obtain the start and end points, maximum moving distance, and maximum turning angle of the synthetic trajectory;
[0022] Inputting the starting point of the synthetic trajectory into a first-order Markov model to calculate the first sampling position point of the synthetic trajectory, wherein the first sampling position point of the synthetic trajectory is the first position point after the starting point of the synthetic trajectory;
[0023] Take the first sampling position point of the synthetic trajectory as input and repeat the previous step to obtain the sampling position point of the synthetic trajectory;
[0024] Furthermore, the method for calculating the sampling position points of the synthetic trajectory using the first-order Markov model includes:
[0025] Compute the transition probabilities between equally divided grids:
[0026]
[0027] Where C i is the grid where the trajectory position point in the original trajectory data is located, C j To include C i All grids including Φ(C i →C j ) is to query the C of the next timestamp in all original vehicle trajectories i In grid C j The trajectory count of |T| is the number of original vehicle trajectories;
[0028] The transfer probability matrix is established by the transfer probability, and the transfer probability matrix is added with the Laplace noise matrix of the same order to obtain the noise transfer probability matrix;
[0029] The prior probability is calculated through the noise transfer probability matrix, and each sampling position point of the synthetic trajectory is obtained according to the prior probability. The calculation formula of the prior probability is:
[0030]
[0031] Where t is the timestamp; is the prior probability of timestamp t; is the posterior probability of the previous timestamp t-1; M * is the noise state transfer matrix;
[0032] For each grid l i , its posterior probability can be calculated as:
[0033]
[0034] Where, is the grid position l at time stamp t i The posterior probability of is the actual position point, l i 、l j is the grid position point, z t is the disturbance position point, is the grid position l at time stamp t i The prior probability of
[0035] The next timestamp of the starting point of the synthetic trajectory is the first sampling position point. The prior probability of the first sampling position point is calculated by the posterior probability of the starting point of the synthetic trajectory to obtain the first sampling position point. The sampling position point of the synthetic trajectory is obtained by iterative calculation.
[0036] Furthermore, the rationality of the synthetic trajectory sampling position points is judged based on the maximum moving distance and the maximum turning angle of the synthetic trajectory to obtain a complete synthetic trajectory; specifically including:
[0037] If the moving distance or turning angle between each sampling position point and the previous sampling position point in the synthetic trajectory exceeds the maximum moving distance or maximum turning angle of the synthetic trajectory, the sampling position point is considered an unreasonable position point, and the maximum moving distance and maximum turning angle of the synthetic trajectory are updated. Otherwise, it is reasonable and no update is performed, thereby obtaining all reasonable synthetic trajectory sampling position points; the sampling position point before the first sampling position point is the starting point of the synthetic trajectory;
[0038] Set the number of thresholds based on all reasonable synthetic trajectory sampling locations Calculate the distance and turning angle between each sampling point and the end point. If the distance and turning angle between a sampling position and the end point are both less than the maximum moving distance and maximum turning angle of the last updated synthetic trajectory, the next sampling position of the sampling position is directly set as the end point of the synthetic trajectory to obtain a complete synthetic trajectory.
[0039] Furthermore, the method of determining the rationality of the starting and ending points of the complete synthetic trajectory based on the complete synthetic trajectory to obtain the synthetic trajectory with differential privacy protection includes:
[0040] Add the second Laplace noise to the starting and ending points of the complete synthetic trajectory to perturb them and obtain the perturbed starting and ending points;
[0041] The rationality of the start and end points after the disturbance is judged. If the moving distance between the start and end points after the disturbance and the start and end points before the disturbance does not exceed the maximum moving distance of the updated synthetic trajectory, and the starting point after the disturbance and the first sampling position point, as well as the end point after the disturbance and the previous sampling position point, do not exceed the maximum moving distance and maximum turning angle of the updated synthetic trajectory, then the start and end points after the disturbance are reasonable. If not, the maximum moving distance and maximum turning angle of the synthetic trajectory are updated again to obtain trajectory data that meets the protection of differential privacy.
[0042] A second object of the present invention is to provide a vehicle trajectory data protection system based on differential privacy, comprising:
[0043] Acquisition module: acquires original vehicle trajectory data, wherein the original vehicle trajectory data includes trajectory position points of multiple vehicle trajectories, movement distances between adjacent trajectory position points, and turning angles;
[0044] Grid division module: used to evenly divide the geographical area where the vehicle trajectory is located according to the original vehicle trajectory data to obtain a uniform grid;
[0045] Distribution calculation module: used to calculate the maximum moving distance noise distribution, maximum turning angle noise distribution and origin and destination point distribution based on the original vehicle trajectory data, uniform network and first Laplace noise;
[0046] Sampling point position calculation module: used to obtain the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory based on the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model;
[0047] Trajectory synthesis module: used to determine the rationality of the sampling position points based on the starting and ending points, maximum moving distance and maximum turning angle of the synthetic trajectory, and obtain a complete synthetic trajectory;
[0048] Perturbation processing module: used to judge the rationality of the start and end points of the complete synthetic trajectory based on the complete synthetic trajectory, and obtain trajectory data that meets differential privacy protection.
[0049] A third aspect of the present invention provides a computer device comprising a processor and a storage medium;
[0050] The storage medium is used to store instructions;
[0051] The processor is configured to operate according to the instructions to execute the steps of any of the above methods.
[0052] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] This invention combines differential privacy with vehicle trajectory publication for privacy protection, helping to defend against attacks by adversaries with excessive knowledge. This method utilizes maximum movement distance and maximum turning angle, offsetting previous approaches that restrict predicted locations to nearby locations or the entire geographic area. This approach controls sampling locations within a reasonable range, preserving the characteristics of the original data. Furthermore, by adding noise to feature distributions, starting points, and transition probabilities, it ensures differential privacy of trajectory data, preventing adversaries from attacking through background knowledge. This method not only ensures data utility but also protects data privacy. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flowchart of a vehicle trajectory data protection method based on differential privacy provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.
[0057] Example 1:
[0058] This embodiment provides a vehicle trajectory data protection method based on differential privacy, including the following steps:
[0059] S1: Acquire original vehicle trajectory data, where the original vehicle trajectory data includes trajectory position points of a plurality of vehicle trajectories, movement distances between adjacent trajectory position points, and turning angles.
[0060] S2: Based on the original vehicle trajectory data, the geographical area where the vehicle trajectory is located is evenly divided to obtain a uniform grid.
[0061] S3: Based on the original vehicle trajectory data, uniform network and first Laplace noise, the maximum moving distance noise distribution, maximum turning angle noise distribution and origin and destination point distribution are calculated.
[0062] S4: Based on the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model, the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory are obtained.
[0063] S5: According to the starting and ending points, maximum moving distance and maximum turning angle of the synthetic trajectory, the rationality of the sampling position points is judged to obtain a complete synthetic trajectory.
[0064] S6: Based on the complete synthetic trajectory, determine the rationality of the starting and ending points of the complete synthetic trajectory, and obtain the synthetic trajectory with differential privacy protection.
[0065] The S2 step specifically includes:
[0066] S21: Based on the original vehicle trajectory data, remove the position points with a moving distance of 0.
[0067] S22: Setting the minimum moving distance with the most distribution as the unit grid length, thereby dividing the geographical area of the vehicle trajectory into m*n uniform grids, where m and n are the ratios of the total length of the geographical area edge to the unit grid length.
[0068] For the S3 step, specifically include:
[0069] S31: Mapping the trajectory position points in the original vehicle trajectory data to the centroid position of the grid according to the uniform grid.
[0070] S32: Obtain the maximum moving distance distribution, the maximum turning angle distribution, and the origin and destination point distribution based on the original vehicle trajectory data.
[0071] S33: Adding Laplace noise to the maximum moving distance distribution and the maximum turning angle distribution to obtain the maximum moving distance noise distribution and the maximum turning angle noise distribution.
[0072] For step S4, the specific method includes:
[0073] S41: Randomly sample the maximum moving distance noise distribution, the maximum turning angle noise distribution, and the start and end point distribution respectively to obtain the start and end points, the maximum moving distance, and the maximum turning angle of the synthetic trajectory.
[0074] S42: Inputting the starting point of the synthetic trajectory into a first-order Markov model to calculate a first sampling position point of the synthetic trajectory, where the first sampling position point of the synthetic trajectory is the first position point after the starting point of the synthetic trajectory.
[0075] S43: Taking the first sampling position point of the synthetic trajectory as input, repeat step S42 to obtain the sampling position point of the synthetic trajectory.
[0076] In this embodiment, the method of calculating the sampling position points of the synthetic trajectory using the first-order Markov model is:
[0077] First calculate the transition probability between evenly divided grids:
[0078]
[0079] Where C i is the grid where the trajectory position point in the original trajectory data is located, Cj To include C i All grids including Φ(C i →C j ) is to query the C of the next timestamp in all original vehicle trajectories i In grid C j The trajectory count of |T| is the number of original vehicle trajectories.
[0080] Then, a transfer probability matrix is established through the transfer probability, and the transfer probability matrix is added with the Laplace noise matrix of the same order to obtain the noise transfer probability matrix.
[0081] The prior probability is calculated through the noise transfer probability matrix, and each sampling position point of the synthetic trajectory is obtained according to the prior probability. The calculation formula of the prior probability is:
[0082]
[0083] Where t is the timestamp; is the prior probability of timestamp t; is the posterior probability of the previous timestamp t-1; M * is the noise state transfer matrix;
[0084] For each grid l i , its posterior probability can be calculated as:
[0085]
[0086] Where, is the grid position l at time stamp t i The posterior probability of is the actual position point, l i 、l j is the grid position point, z t is the disturbance position point, is the grid position l at time stamp t i The prior probability of
[0087] The next timestamp of the starting point of the synthetic trajectory is the first sampling position point. The prior probability of the first sampling position point is calculated by the posterior probability of the starting point of the synthetic trajectory to obtain the first sampling position point. The sampling position point of the synthetic trajectory is obtained by iterative calculation.
[0088] For step S5, the rationality of the synthetic trajectory sampling position points is judged according to the maximum moving distance and maximum turning angle of the synthetic trajectory to obtain a complete synthetic trajectory. The specific method is as follows:
[0089] If the moving distance or turning angle between each sampling position point and the previous sampling position point in the synthetic trajectory exceeds the maximum moving distance or maximum turning angle of the synthetic trajectory, the sampling position point is considered an unreasonable position point, and the maximum moving distance and maximum turning angle of the synthetic trajectory are updated. Otherwise, it is reasonable and no update is performed, thereby obtaining all reasonable synthetic trajectory sampling position points; the sampling position point before the first sampling position point is the starting point of the synthetic trajectory;
[0090] Set the number of thresholds based on all reasonable synthetic trajectory sampling locations Calculate the distance and turning angle between each sampling point and the end point. If the distance and turning angle between a sampling position and the end point are both less than the maximum moving distance and maximum turning angle of the last updated synthetic trajectory, the next sampling position of the sampling position is directly set as the end point of the synthetic trajectory to obtain a complete synthetic trajectory.
[0091] In step S6, after the start and end points of the complete synthetic trajectory are perturbed by the second Laplace noise, the rationality of the perturbed start and end points still needs to be judged in this embodiment. The judgment method includes:
[0092] S61: Add the second Laplace noise to the starting and ending points of the complete synthetic trajectory for perturbation to obtain the perturbed starting and ending points.
[0093] S62: Determine the rationality of the start and end points after the disturbance. If the moving distance between the start and end points after the disturbance and the start and end points before the disturbance does not exceed the maximum moving distance of the updated synthetic trajectory, and the distance between the starting point after the disturbance and the first sampling position point, and the distance between the end point after the disturbance and the previous sampling position point do not exceed the maximum moving distance and maximum turning angle of the updated synthetic trajectory, then the start and end points after the disturbance are reasonable. If not, update the maximum moving distance and maximum turning angle of the synthetic trajectory again to obtain trajectory data that meets the protection of differential privacy.
[0094] The above method generates a complete synthetic trajectory that has been rationally verified. By using the maximum movement distance and maximum turning angle, it overcomes previous methods that restrict predicted locations to nearby locations or extend them to the entire geographic area. It controls the sampling locations within a reasonable range, preserving the characteristics of the original data. Furthermore, by adding noise to the feature distribution, starting point, and transition probabilities, it ensures differential privacy of the trajectory data, preventing adversaries from exploiting background knowledge. This method not only ensures data utility but also protects data privacy. Furthermore, if multiple synthetic trajectories are required, simply repeat steps S3, S4, and S5 to obtain the desired number of synthetic trajectory sets.
[0095] Example 2:
[0096] This embodiment provides a vehicle trajectory data protection system based on differential privacy, including:
[0097] Acquisition module: acquires original vehicle trajectory data, wherein the original vehicle trajectory data includes trajectory position points of multiple vehicle trajectories, movement distances between adjacent trajectory position points, and turning angles;
[0098] Grid division module: used to evenly divide the geographical area where the vehicle trajectory is located according to the original vehicle trajectory data to obtain a uniform grid;
[0099] Distribution calculation module: used to calculate the maximum moving distance noise distribution, maximum turning angle noise distribution and origin and destination point distribution based on the original vehicle trajectory data, uniform network and first Laplace noise;
[0100] Sampling point position calculation module: used to obtain the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory based on the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model;
[0101] Trajectory synthesis module: used to determine the rationality of the sampling position points based on the starting and ending points, maximum moving distance and maximum turning angle of the synthetic trajectory, and obtain a complete synthetic trajectory;
[0102] Perturbation processing module: used to judge the rationality of the start and end points of the complete synthetic trajectory based on the complete synthetic trajectory, and obtain trajectory data that meets differential privacy protection.
[0103] The vehicle trajectory data protection system based on differential privacy provided in this embodiment can execute the protection method embodiment in Example 1. Its implementation principle and technical effects are similar and will not be repeated here.
[0104] Example 3:
[0105] An embodiment of the present invention also provides a computer device, including a processor and a storage medium;
[0106] The storage medium is used to store instructions;
[0107] The processor is configured to operate according to the instructions to execute the steps of the following method:
[0108] Acquiring original vehicle trajectory data, wherein the original vehicle trajectory data includes trajectory position points of a plurality of vehicle trajectories, movement distances between adjacent trajectory position points, and turning angles;
[0109] According to the original vehicle trajectory data, the geographical area where the vehicle trajectory is located is evenly divided to obtain a uniform grid;
[0110] Based on the original vehicle trajectory data, uniform network and first Laplace noise, the maximum moving distance noise distribution, maximum turning angle noise distribution and origin and destination point distribution are calculated;
[0111] According to the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model, the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory are obtained;
[0112] According to the starting and ending points, maximum moving distance and maximum turning angle of the synthetic trajectory, the rationality of the sampling position points is judged to obtain a complete synthetic trajectory;
[0113] According to the complete synthetic trajectory, the rationality of the starting and ending points of the complete synthetic trajectory is judged to obtain the synthetic trajectory with differential privacy protection.
[0114] The computer device provided in this embodiment can execute the protection method embodiment in Example 1. Its implementation principle and technical effects are similar and will not be repeated here.
[0115] Example 4:
[0116] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the following method:
[0117] Acquiring original vehicle trajectory data, wherein the original vehicle trajectory data includes trajectory position points of a plurality of vehicle trajectories, movement distances between adjacent trajectory position points, and turning angles;
[0118] According to the original vehicle trajectory data, the geographical area where the vehicle trajectory is located is evenly divided to obtain a uniform grid;
[0119] Based on the original vehicle trajectory data, uniform network and first Laplace noise, the maximum moving distance noise distribution, maximum turning angle noise distribution and origin and destination point distribution are calculated;
[0120] According to the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model, the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory are obtained;
[0121] According to the starting and ending points, maximum moving distance and maximum turning angle of the synthetic trajectory, the rationality of the sampling position points is judged to obtain a complete synthetic trajectory;
[0122] According to the complete synthetic trajectory, the rationality of the starting and ending points of the complete synthetic trajectory is judged to obtain the synthetic trajectory with differential privacy protection.
[0123] The computer device provided in this embodiment can execute the protection method embodiment in Example 1. Its implementation principle and technical effects are similar and will not be repeated here.
[0124] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0125] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0126] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0128] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A vehicle trajectory data protection method based on differential privacy, characterized in that: include: Acquiring original vehicle trajectory data, wherein the original vehicle trajectory data includes trajectory position points of a plurality of vehicle trajectories, movement distances between adjacent trajectory position points, and turning angles; According to the original vehicle trajectory data, the geographical area where the vehicle trajectory is located is evenly divided to obtain a uniform grid; Based on the original vehicle trajectory data, uniform network and first Laplace noise, the maximum moving distance noise distribution, maximum turning angle noise distribution and origin and destination point distribution are calculated; According to the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model, the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory are obtained; According to the starting and ending points, maximum moving distance and maximum turning angle of the synthetic trajectory, the rationality of the sampling position points is judged to obtain a complete synthetic trajectory; Based on the complete synthetic trajectory, the rationality of the starting and ending points of the complete synthetic trajectory is judged to obtain the synthetic trajectory with differential privacy protection; The method for calculating the sampling position points of the synthetic trajectory using the first-order Markov model includes: Compute the transition probabilities between equally divided grids: ; Where, is the grid where the trajectory position point in the original trajectory data is located, To include All grids, To query the next timestamp in all original vehicle trajectories In the grid The trajectory count, is the number of original vehicle trajectories; The transfer probability matrix is established by the transfer probability, and the transfer probability matrix is added with the Laplace noise matrix of the same order to obtain the noise transfer probability matrix; The prior probability is calculated through the noise transfer probability matrix, and each sampling position point of the synthetic trajectory is obtained according to the prior probability. The calculation formula of the prior probability is: ; Where t is the timestamp; is the prior probability of timestamp t; is the posterior probability of the previous timestamp t-1; is the noise state transfer matrix; For each grid , its posterior probability can be calculated as: ; Where, is the grid position at time stamp t The posterior probability of is the real location point, 、 is the grid location point, is the disturbance position point, is the grid position at time stamp t The prior probability of The next timestamp of the starting point of the synthetic trajectory is the first sampling position point. The prior probability of the first sampling position point is calculated by the posterior probability of the starting point of the synthetic trajectory to obtain the first sampling position point. The sampling position point of the synthetic trajectory is obtained by iterative calculation.
2. The vehicle trajectory data protection method based on differential privacy according to claim 1 is characterized in that: The method of uniformly dividing the geographical area where the vehicle trajectory is located according to the original vehicle trajectory data to obtain a uniform grid includes: According to the original vehicle trajectory data, remove the position points with a moving distance of 0; The minimum moving distance with the most distribution is set as the unit grid length, so as to divide the geographical area of the vehicle trajectory into m*n uniform grids, where m and n are the ratios of the total length of the geographical area edge to the unit grid length.
3. The vehicle trajectory data protection method based on differential privacy according to claim 1 is characterized in that: The method of calculating the maximum moving distance noise distribution, the maximum turning angle noise distribution and the origin and destination point distribution according to the original vehicle trajectory data, the uniform network and the first Laplace noise comprises: According to the uniform grid, the trajectory position points in the original vehicle trajectory data are mapped to the centroid position of the grid; Based on the original vehicle trajectory data, the maximum moving distance distribution, maximum turning angle distribution, and origin and destination point distribution are obtained; The maximum moving distance distribution and the maximum turning angle distribution are added with Laplace noise to obtain the maximum moving distance noise distribution and the maximum turning angle noise distribution.
4. The vehicle trajectory data protection method based on differential privacy according to claim 1 is characterized in that: The method obtains the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory according to the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model; specifically includes: Randomly sample the maximum moving distance noise distribution, maximum turning angle noise distribution, and start and end point distribution to obtain the start and end points, maximum moving distance, and maximum turning angle of the synthetic trajectory; Inputting the starting point of the synthetic trajectory into a first-order Markov model to calculate the first sampling position point of the synthetic trajectory, wherein the first sampling position point of the synthetic trajectory is the first position point after the starting point of the synthetic trajectory; Take the first sampling position point of the synthetic trajectory as input and repeat the previous step to obtain the sampling position point of the synthetic trajectory.
5. The vehicle trajectory data protection method based on differential privacy according to claim 1 is characterized in that: The method of determining the rationality of the synthetic trajectory sampling position points according to the maximum moving distance and the maximum turning angle of the synthetic trajectory to obtain a complete synthetic trajectory specifically includes: If the moving distance or turning angle between each sampling position point and the previous sampling position point in the synthetic trajectory exceeds the maximum moving distance or maximum turning angle of the synthetic trajectory, the sampling position point is considered an unreasonable position point, and the maximum moving distance and maximum turning angle of the synthetic trajectory are updated. Otherwise, it is reasonable and no update is performed, thereby obtaining all reasonable synthetic trajectory sampling position points; the sampling position point before the first sampling position point is the starting point of the synthetic trajectory; Set the number of thresholds based on all reasonable synthetic trajectory sampling locations , calculate the distance and turning angle between each sampling point and the end point, if continuous If the distance and turning angle between a sampling position and the end point are both less than the maximum moving distance and maximum turning angle of the last updated synthetic trajectory, the next sampling position of the sampling position is directly set as the end point of the synthetic trajectory to obtain a complete synthetic trajectory.
6. The vehicle trajectory data protection method based on differential privacy according to claim 5 is characterized in that: The method of determining the rationality of the starting and ending points of the complete synthetic trajectory based on the complete synthetic trajectory to obtain the synthetic trajectory with differential privacy protection includes: Add the second Laplace noise to the starting and ending points of the complete synthetic trajectory to perturb them and obtain the perturbed starting and ending points; The rationality of the start and end points after the disturbance is judged. If the moving distance between the start and end points after the disturbance and the start and end points before the disturbance does not exceed the maximum moving distance of the updated synthetic trajectory, and the starting point after the disturbance and the first sampling position point, as well as the end point after the disturbance and the previous sampling position point, do not exceed the maximum moving distance and maximum turning angle of the updated synthetic trajectory, then the start and end points after the disturbance are reasonable. If not, the maximum moving distance and maximum turning angle of the synthetic trajectory are updated again to obtain trajectory data that meets the protection of differential privacy.
7. A vehicle trajectory data protection system based on differential privacy, characterized in that: include: Acquisition module: acquires original vehicle trajectory data, wherein the original vehicle trajectory data includes trajectory position points of multiple vehicle trajectories, movement distances between adjacent trajectory position points, and turning angles; Grid division module: used to evenly divide the geographical area where the vehicle trajectory is located according to the original vehicle trajectory data to obtain a uniform grid; Distribution calculation module: used to calculate the maximum moving distance noise distribution, maximum turning angle noise distribution and origin and destination point distribution based on the original vehicle trajectory data, uniform network and first Laplace noise; Sampling point position calculation module: used to obtain the starting and ending points, maximum moving distance, maximum turning angle and sampling position points of the synthetic trajectory based on the maximum moving distance noise distribution, maximum turning angle noise distribution, starting and ending point distribution and the first-order Markov model; Trajectory synthesis module: used to determine the rationality of the sampling position points based on the starting and ending points, maximum moving distance and maximum turning angle of the synthetic trajectory, and obtain a complete synthetic trajectory; Perturbation processing module: used to judge the rationality of the start and end points of the complete synthetic trajectory based on the complete synthetic trajectory, and obtain trajectory data that meets differential privacy protection; The method for calculating the sampling position points of the synthetic trajectory using the first-order Markov model includes: Compute the transition probabilities between equally divided grids: ; Where, is the grid where the trajectory position point in the original trajectory data is located, To include All grids, To query the next timestamp in all original vehicle trajectories In the grid The trajectory count, is the number of original vehicle trajectories; The transfer probability matrix is established by the transfer probability, and the transfer probability matrix is added with the Laplace noise matrix of the same order to obtain the noise transfer probability matrix; The prior probability is calculated through the noise transfer probability matrix, and each sampling position point of the synthetic trajectory is obtained according to the prior probability. The calculation formula of the prior probability is: ; Where t is the timestamp; is the prior probability of timestamp t; is the posterior probability of the previous timestamp t-1; is the noise state transfer matrix; For each grid , its posterior probability can be calculated as: ; Where, is the grid position at time stamp t The posterior probability of is the real location point, 、 is the grid location point, is the disturbance position point, is the grid position at time stamp t The prior probability of The next timestamp of the starting point of the synthetic trajectory is the first sampling position point. The prior probability of the first sampling position point is calculated by the posterior probability of the starting point of the synthetic trajectory to obtain the first sampling position point. The sampling position point of the synthetic trajectory is obtained by iterative calculation.
8. A computer device, characterized in that: including processor and storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.