Vehicle trajectory generation method, device and medium based on localized differential privacy
The vehicle trajectory is divided and perturbed through a localized differential privacy algorithm to generate a privacy-protecting trajectory on the road network, which solves the problem of the trajectory not being on the road in the existing technology, achieves a balance between privacy and usability, and is suitable for a variety of application scenarios. .
Patent Information
- Application Number
- CN202410553951.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-07
AI Technical Summary
When existing differential privacy technology processes vehicle trajectories, road network information is not used during the perturbation process, resulting in the perturbed trajectory not being on the road. It cannot satisfy scenarios that require road network information, and has a poor balance between privacy and usability.
Using a localized differential privacy algorithm, the vehicle trajectory is divided into pivot segments and non-pivot segments, which are perturbed respectively, retaining position and direction information, and through an exponential mechanism and threshold adjustment, generating a segment that satisfies privacy protection and is on the road network. trajectory.
It realizes the privacy protection of vehicle trajectory data and ensures that the data finds a balance between privacy and usability. It is suitable for business needs such as data mining and query statistics, and is also suitable for scenarios such as arrival time estimation and traffic flow monitoring.
Smart Images

Figure CN118132667B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle trajectory privacy protection, and in particular to a vehicle trajectory generation method, device and medium based on localized differential privacy. Background Art
[0002] Extensive vehicle trajectory data collection and analysis also brings significant privacy risks. To address these privacy issues, differential privacy technology has gradually become a more powerful and reliable solution. As a branch of differential privacy, localized differential privacy (LDP) further puts the control of privacy protection in the hands of users. In the LDP model, the data is perturbed before leaving the user's device, which means that even if the server where the data is collected and analyzed is untrusted, the user's privacy is still protected. This approach is particularly suitable for sensitive vehicle trajectory data collection because it allows trajectory data to be collected and analyzed without exposing the user's precise location information.
[0003] In related technologies, differential privacy technology is used to perform perturbations only according to distance and direction during the processing. Since the perturbation process does not use road network information, the vehicle trajectory after the disturbance may not be on the road and cannot be applied to scenarios that require road network information. The vehicle trajectory data after the disturbance has a poor balance between privacy and availability. Summary of the invention
[0004] Based on this, it is necessary to provide a vehicle trajectory generation method, device, equipment and readable storage medium based on localized differential privacy to address the above technical problems.
[0005] In a first aspect, an embodiment of the present application provides a vehicle trajectory generation method based on localized differential privacy, the method comprising:
[0006] Copy two original vehicle trajectories to obtain a first vehicle trajectory and a second vehicle trajectory;
[0007] Matching the first vehicle trajectory and the second vehicle trajectory to a road network, dividing the first vehicle trajectory according to the road to obtain a first pivot segment set and a first non-pivot segment set; dividing the second vehicle trajectory according to the road to obtain a second pivot segment set and a second non-pivot segment set;
[0008] Using a localized differential privacy algorithm, each first pivot segment in the first pivot segment set is perturbed to a neighboring road that meets a first preset condition, to obtain a plurality of first pivot segments that retain position information after perturbation; and using a localized differential privacy algorithm, each second non-pivot segment in the second non-pivot segment set is perturbed to a neighboring road that meets a second preset condition, to obtain a plurality of second non-pivot segments that retain direction information after perturbation;
[0009] The plurality of first pivot segments that retain position information after disturbance are connected with the plurality of second non-pivot segments that retain direction information after disturbance to generate a vehicle trajectory after disturbance.
[0010] In one embodiment, the localized differential privacy algorithm is used to perturb each first pivot segment in the first pivot segment set to a neighboring road that satisfies a first preset condition, and the first pivot segments that retain position information after the perturbation are obtained include:
[0011] For each of the first pivot segments, respectively determine a plurality of roads whose distance therefrom is less than a first threshold;
[0012] Calculating respectively the edit distance from each of the roads to the corresponding first pivot segment;
[0013] Based on the edit distance, a localized differential privacy algorithm with an exponential mechanism is used to perturb each of the first pivot segments to a corresponding plurality of roads, so as to obtain a plurality of first pivot segments that retain position information after perturbation.
[0014] In one embodiment, the localized differential privacy algorithm is used to perturb each second non-pivot segment in the second non-pivot segment set to a neighboring road that satisfies a second preset condition, and the second non-pivot segments that retain direction information after the perturbation are obtained include:
[0015] For each of the second non-pivot segments, a plurality of roads whose distances therefrom are less than a second threshold and whose distances from a line connecting an end point of a previous disturbed first pivot segment and a starting point of a next disturbed first pivot segment are less than a third threshold are determined respectively;
[0016] Calculating the cosine distance from each of the roads to the corresponding second non-pivot segment respectively;
[0017] Based on the cosine distance, a localized differential privacy algorithm with an exponential mechanism is used to perturb each of the second non-pivot segments to a corresponding plurality of roads, so as to obtain a plurality of second non-pivot segments that retain direction information after perturbation.
[0018] In one embodiment, the method further comprises:
[0019] Based on the first threshold candidate set, the second threshold candidate set, and the third threshold candidate set, obtaining multiple groups of threshold parameter combinations;
[0020] Disturbing the original vehicle trajectory under each of the threshold parameter combinations to generate a plurality of disturbed vehicle trajectories;
[0021] The availability of each post-disturbance vehicle trajectory is calculated, and the values of the first threshold, the second threshold, and the third threshold are determined based on the availability.
[0022] In one embodiment, the calculating the availability of each post-disturbance vehicle trajectory and determining the values of the first threshold, the second threshold, and the third threshold based on the availability include:
[0023] Dividing each disturbed vehicle trajectory into a plurality of trips, and dividing the plurality of trips into a training set and a test set in chronological order;
[0024] Matching each of the trips to the road network through a map matching algorithm to obtain the road ID corresponding to each of the trips and the travel time on the road;
[0025] Aligning the map matching results of each trip in the test set with the map matching results of each trip in the training set to obtain an estimated trip;
[0026] Based on the estimated running time of the trip on the road in the test set and the estimated running time of the trip on the road in the training set, calculating the error of the estimated time, and obtaining the availability of each disturbed vehicle trajectory based on the error;
[0027] Based on the disturbed vehicle trajectory corresponding to the highest availability, the values of the first threshold, the second threshold and the third threshold are determined.
[0028] In one embodiment, the calculating the availability of each post-disturbance vehicle trajectory and determining the values of the first threshold, the second threshold, and the third threshold based on the availability include:
[0029] Query the original vehicle trajectory and the vehicle trajectory after each disturbance that passes through the preset area within the preset time range;
[0030] Calculating a recall rate and an accuracy rate based on the queried original vehicle trajectory data and each of the disturbed vehicle trajectories, and obtaining the availability of each of the disturbed vehicle trajectories based on the recall rate and the accuracy rate;
[0031] Based on the disturbed vehicle trajectory corresponding to the highest availability, the values of the first threshold, the second threshold and the third threshold are determined.
[0032] In one embodiment, the formula of the index mechanism is:
[0033]
[0034] in, Budget for privacy. pis the first pivot segment or the second non-pivot segment, is the result of the perturbation of the first pivot segment or the second non-pivot segment, r is the neighboring road, P is the set of neighboring roads, u is the edit distance or cosine distance, ∆ u is the global sensitivity, Indicates that the first pivot segment or the second non-pivot segment is disturbed to the neighboring road r probability.
[0035] In a second aspect, an embodiment of the present application further provides a vehicle trajectory generation device based on localized differential privacy, the device comprising:
[0036] A copy module, used for copying two original vehicle trajectories to obtain a first vehicle trajectory and a second vehicle trajectory;
[0037] A partitioning module, used for matching the first vehicle trajectory and the second vehicle trajectory to a road network, partitioning the first vehicle trajectory according to the road to obtain a first pivot segment set and a first non-pivot segment set; partitioning the second vehicle trajectory according to the road to obtain a second pivot segment set and a second non-pivot segment set;
[0038] A perturbation module, configured to use a localized differential privacy algorithm to perturb each first pivot segment in the first pivot segment set to a neighboring road that satisfies a first preset condition, thereby obtaining a plurality of first pivot segments that retain position information after perturbation; and to use a localized differential privacy algorithm to perturb each second non-pivot segment in the second non-pivot segment set to a neighboring road that satisfies a second preset condition, thereby obtaining a plurality of second non-pivot segments that retain direction information after perturbation;
[0039] A generation module is used to connect the plurality of first pivot segments that retain position information after disturbance with the plurality of second non-pivot segments that retain direction information after disturbance to generate a vehicle trajectory after disturbance.
[0040] In a third aspect, an embodiment of the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method as described in the first aspect above.
[0041] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein when the computer program is executed by a processor, the method described in the first aspect above is implemented.
[0042] The above-mentioned vehicle trajectory generation method, device, equipment and readable storage medium based on localized differential privacy, by using a localized differential privacy algorithm, each first pivot segment in the first pivot segment set is disturbed to a neighboring road that meets the first preset condition, thereby retaining the position information of the original vehicle trajectory, and using a localized differential privacy algorithm, each second non-pivot segment in the second non-pivot segment set is disturbed to a neighboring road that meets the second preset condition, thereby retaining the direction information of the original vehicle trajectory, and connecting the first pivot segments that retain the position information after the multiple disturbances with the second non-pivot segments that retain the direction information after the multiple disturbances to generate the disturbed vehicle trajectory, thereby realizing the privacy protection of the vehicle trajectory data, and can meet the business needs such as data mining and query statistics. At the same time, the vehicle trajectory after being published is still on the road network, for example, it is applied to scenarios such as arrival time estimation and traffic flow monitoring, so that the generated vehicle trajectory data can find a certain balance between privacy and availability.
[0043] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0045] Figure 1 is a hardware structure block diagram of a terminal device of a vehicle trajectory generation method based on localized differential privacy in an embodiment;
[0046] Figure 2 is a flow chart of a vehicle trajectory generation method based on localized differential privacy in an embodiment;
[0047] Figure 3 is a structural block diagram of a vehicle trajectory generation device based on localized differential privacy in an embodiment;
[0048] Figure 4 It is a schematic diagram of the structure of a computer device in an embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantity limitation, and may indicate the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0051] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the vehicle trajectory generation method based on localized differential privacy in this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0052] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the vehicle trajectory generation method based on localized differential privacy in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0053] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.
[0054] The present application embodiment provides a vehicle trajectory generation method based on localized differential privacy, and the method is applied to Figure 1 The terminal in is used as an example to illustrate. Figure 2 As shown, the method comprises the following steps:
[0055] S201, copy two original vehicle trajectories to obtain a first vehicle trajectory and a second vehicle trajectory.
[0056] Specifically, the vehicle trajectory data can be collected by the vehicle-mounted GPS device. The vehicle trajectory data includes the collected longitude, latitude and corresponding timestamp, and the original vehicle trajectory can be obtained based on the vehicle trajectory data. , the original vehicle trajectory Make two copies and get ,in, is the first vehicle trajectory, is the trajectory of the second vehicle.
[0057] S202, matching the first vehicle trajectory and the second vehicle trajectory to a road network, dividing the first vehicle trajectory according to the road to obtain a first pivot segment set and a first non-pivot segment set; dividing the second vehicle trajectory according to the road to obtain a second pivot segment set and a second non-pivot segment set.
[0058] Specifically, the first vehicle trajectory and the second vehicle trajectory Match the first vehicle trajectory to the road network and divide it into track segments according to the road. The segments are connected to form vehicle tracks. For example, different roads are divided into different track segments. After the division, several trajectory segments are obtained and marked with serial numbers, and then all the trajectory segments are divided into two groups, one group is the first pivot segment set, and the other group is the first non-pivot segment set. The grouping rule can be that the trajectory segments with odd serial numbers are divided into the first pivot segment set, and the trajectory segments with even serial numbers are divided into the first non-pivot segment set, or the trajectory segments with even serial numbers are divided into the first pivot segment set, and the trajectory segments with odd serial numbers are divided into the first non-pivot segment set. Based on the same process, the second vehicle trajectory is divided into the first pivot segment set according to the road. Partitioning is performed to obtain a second pivot segment set and a second non-pivot segment set.
[0059] S203, using a localized differential privacy algorithm, respectively perturbing each first pivot segment in the first pivot segment set to a neighboring road that meets a first preset condition, to obtain a plurality of first pivot segments that retain position information after perturbation; and using a localized differential privacy algorithm, respectively perturbing each second non-pivot segment in the second non-pivot segment set to a neighboring road that meets a second preset condition, to obtain a plurality of second non-pivot segments that retain direction information after perturbation.
[0060] S204, connecting the plurality of first pivot segments that retain position information after disturbance with the plurality of second non-pivot segments that retain direction information after disturbance to generate a vehicle trajectory after disturbance.
[0061] In the above-mentioned vehicle trajectory generation method based on localized differential privacy, by adopting the localized differential privacy algorithm, each first pivot segment in the first pivot segment set is disturbed to the neighboring road that meets the first preset condition, and the location information of the original vehicle trajectory is retained. By adopting the localized differential privacy algorithm, each second non-pivot segment in the second non-pivot segment set is disturbed to the neighboring road that meets the second preset condition, and the direction information of the original vehicle trajectory is retained. The first pivot segments that retain the location information after the disturbance are connected with the second non-pivot segments that retain the direction information after the disturbance to generate the disturbed vehicle trajectory, so as to achieve the privacy protection of the vehicle trajectory data, and can meet the business needs such as data mining and query statistics. At the same time, the vehicle trajectory after being published is still on the road network, for example, it is applied to the scenarios such as arrival time estimation and traffic flow monitoring, so that the generated vehicle trajectory data can find a certain balance between privacy and availability.
[0062] In one embodiment, the method of using a localized differential privacy algorithm to perturb each first pivot segment in the first pivot segment set to a neighboring road that satisfies a first preset condition to obtain a plurality of first pivot segments that retain position information after perturbation comprises the following steps:
[0063] S301: for each of the first pivot segments, respectively determine a plurality of roads whose distances therefrom are less than a first threshold.
[0064] S302, respectively calculating the edit distance from each of the roads to the corresponding first pivot segment.
[0065] S303: Based on the edit distance, a localized differential privacy algorithm with an exponential mechanism is used to perturb each of the first pivot segments to a corresponding plurality of roads, so as to obtain a plurality of first pivot segments that retain position information after perturbation.
[0066] Specifically, from the first vehicle trajectory Select the first set of pivot segments, and use the exponential mechanism of localized differential privacy algorithm to independently perturb each pivot segment. The specific process is: for each first pivot segment, find the first threshold on the map. d 1 For multiple roads within the range, the edit distance from each road to the first pivot segment is calculated respectively, and then the localized differential privacy algorithm with an exponential mechanism is used to perturb the first pivot segment to these roads. The probability of perturbing each road is proportional to the exponent of the edit distance.
[0067] The overall idea of the index mechanism is that when a query is received, it does not output a result deterministically, but returns the result with a certain probability value, thereby achieving differential privacy. In this way, the query results of the data are made as reliable as possible while protecting data privacy.
[0068] In this embodiment, Denote the first pivot segment, using represents a road, where x,s Indicates latitude, y,t Indicates longitude, i and j Respectively represent i and j trajectory points. T 2 are trajectory points collected at equal intervals on the road.
[0069] Calculate the first pivot segment T 1 and roads T 2 The algorithm for the edit distance between them is as follows:
[0070] Step 1: Initialize a The matrix M ,in n and m The trajectories T 1 and T 2 The number of points in
[0071] Step 2: Setup M [0][0]=0, the rest of the elements are infinite;
[0072] Step 3: For each pair of trajectory points and , calculate the Euclidean distance between two points ;
[0073] Step 4: Iterate and calculate the matrix using the following formula M For each element in:
[0074]
[0075] Step 5: Track T 1 and T 2 The edit distance between M [ n ][ m ].
[0076] In one embodiment, the method of using a localized differential privacy algorithm to perturb each second non-pivot segment in the second non-pivot segment set to a neighboring road that satisfies a second preset condition to obtain a plurality of second non-pivot segments that retain direction information after perturbation comprises the following steps:
[0077] S401, for each of the second non-pivot segments, determine a plurality of roads whose distances therefrom are less than a second threshold and whose distances from a line connecting an end point of a previous disturbed first pivot segment and a starting point of a next disturbed first pivot segment are less than a third threshold;
[0078] S402, respectively calculating the cosine distance from each of the roads to the corresponding second non-pivot segment;
[0079] S403, based on the cosine distance, using a localized differential privacy algorithm with an exponential mechanism to perturb each of the second non-pivot segments to a corresponding plurality of roads, to obtain a plurality of second non-pivot segments that retain direction information after perturbation.
[0080] Specifically, from the second vehicle trajectory Select a set of second non-pivot segments, and use the exponential mechanism of localized differential privacy algorithm to independently perturb each non-pivot segment. The specific process is: for each second non-pivot segment, determine the previous first pivot segment and the next first pivot segment connected to the second non-pivot segment, find the first pivot segment on the map with a distance from the second non-pivot segment within the second threshold d 2 The distance between the end point of the first pivot segment after the previous disturbance and the starting point of the first pivot segment after the next disturbance is less than the third threshold value. d 3 The cosine distance from each road to the second non-pivot segment is calculated respectively, and then the second non-pivot segment is perturbed to these roads using the localized differential privacy algorithm with an exponential mechanism. The probability of perturbing each road is proportional to the exponent of the cosine distance.
[0081] In this embodiment, Denote the second non-pivot segment by represents a road, where x, s Indicates latitude, y,t Indicates longitude, i and j Respectively represent i and j trajectory points. T 2 are trajectory points collected at equal intervals on the road.
[0082] Calculate the second non-pivot segment T 1 and roads T 2 The algorithm for the edit distance between them is as follows:
[0083]
[0084] in, n is the number of points in the trajectory. If the number of points in two trajectories is not equal, linear interpolation can be used to make the two trajectories have the same number of points.
[0085] In one of the embodiments, the method further includes: obtaining multiple sets of threshold parameter combinations based on a first threshold candidate set, a second threshold candidate set, and a third threshold candidate set; perturbing the original vehicle trajectory under each of the threshold parameter combinations to generate multiple disturbed vehicle trajectories; calculating the availability of each disturbed vehicle trajectory, and determining the values of the first threshold, the second threshold, and the third threshold based on the availability.
[0086] Specifically, in order to determine the first threshold d1 , the second threshold d 2 and the third threshold d 3 The optimal value of, the embodiment of the present application is based on the first threshold candidate set, the second threshold candidate set and the third threshold candidate set, to form multiple groups of different threshold parameter combinations, for each group of threshold parameter combinations, respectively use the perturbation method described in the above embodiment to perturb the original vehicle trajectory to generate multiple disturbed vehicle trajectories, and then calculate the availability of each disturbed vehicle trajectory, determine the threshold parameter combination selected for the highest availability of the disturbed vehicle trajectory, and obtain the optimal values of the first threshold, the second threshold and the third threshold.
[0087] In one embodiment, the calculating the availability of each post-disturbance vehicle trajectory and determining the values of the first threshold, the second threshold, and the third threshold based on the availability comprises the following steps:
[0088] S501, dividing each disturbed vehicle trajectory into a plurality of trips, and dividing the plurality of trips into a training set and a test set in chronological order.
[0089] Specifically, for each disturbed vehicle trajectory, the disturbed vehicle trajectory is divided into multiple trips. The method of dividing the trips is as follows: if the speed is less than 1m / s for more than 120s continuously, it is considered a new trip. Assuming that the disturbed vehicle trajectory has a total time span of T days, the trip trajectories of the first Tt days are used as the training set, and the trip trajectories of the last t days are used as the test set.
[0090] S502, matching each of the trips to a road network through a map matching algorithm, and obtaining a road ID corresponding to each of the trips and a travel time on the road.
[0091] Specifically, for the travel trajectories of the training set and the test set, a map matching algorithm is used to match the travel to the road network. The map matching algorithm uses open source code, and the code link is https: / / github.com / graphhopper / graphhopper. After map matching, the road ID corresponding to each travel is obtained, the time interval for entering the road (the time interval divides 24 hours a day into 48 intervals, each interval is half an hour), and the running time on this road.
[0092] S503 , aligning the map matching result of each trip in the test set with the map matching result of each trip in the training set to obtain an estimated trip.
[0093] Specifically, if the trips in the training set and the test set have the same road ID, the trip is confirmed to be an estimated trip, and the running time of the estimated trip on the road in the test set and the running time of the estimated trip on the road in the training set are determined. In the same time interval, a road in the training set may have multiple trips, and the running time is the average of the running times of these trips.
[0094] S504, based on the test set, the estimated running time of the trip on the road (referred to as the trip i The estimated time of the trip on the road in the training set (recorded as the trip i The real time of the vehicle is obtained by calculating the error of the estimated time and obtaining the availability of the vehicle trajectory after each disturbance based on the error.
[0095] The smaller the calculated error is, the higher the availability of the vehicle trajectory after the disturbance is. The error of the estimated time includes MAE (mean absolute error) and MRE (mean relative error), and the calculation formula is as follows:
[0096]
[0097] in, et i Itinerary i Estimated time, rt i Itinerary i The real time, n is the estimated number of trips.
[0098] S505: Determine the values of the first threshold, the second threshold, and the third threshold based on the disturbed vehicle trajectory corresponding to the highest availability.
[0099] In one embodiment, the calculating the availability of each post-disturbance vehicle trajectory and determining the values of the first threshold, the second threshold, and the third threshold based on the availability comprises the following steps:
[0100] S601, querying the original vehicle trajectory and the vehicle trajectory after each disturbance that passes through a preset area within a preset time range.
[0101] S602: Calculate a recall rate and an accuracy rate based on the queried original vehicle trajectory data and each of the disturbed vehicle trajectories, and obtain the availability of each of the disturbed vehicle trajectories based on the recall rate and the accuracy rate.
[0102] Among them, the accuracy precision(Q) And recall recall(Q) The calculation formula is as follows:
[0103]
[0104] in, Ro It indicates the original vehicle trajectory that passes through the preset area within the preset time range. Ra It indicates the trajectory of the vehicle after the disturbance in the preset area within the preset time range.
[0105] Usability evaluation index F1(Q) Value measurement:
[0106]
[0107] in, F1(Q) A higher value indicates a higher availability of the vehicle trajectory after the perturbation.
[0108] S603: Determine the values of the first threshold, the second threshold, and the third threshold based on the disturbed vehicle trajectory corresponding to the highest availability.
[0109] In one embodiment, the formula of the index mechanism is:
[0110]
[0111] in, Budget for privacy. p is the first pivot segment or the second non-pivot segment, is the result of the perturbation of the first pivot segment or the second non-pivot segment, r is the neighboring road, P is the set of neighboring roads, u is the edit distance or cosine distance, ∆ u is the global sensitivity, Indicates that the first pivot segment or the second non-pivot segment is disturbed to the neighboring road r probability.
[0112] The embodiment of the present application also provides a vehicle trajectory generation device based on localized differential privacy, such as Figure 3 As shown, the device comprises:
[0113] A copy module 10, used to copy two original vehicle trajectories to obtain a first vehicle trajectory and a second vehicle trajectory;
[0114] A partitioning module 20 is used to match the first vehicle trajectory and the second vehicle trajectory to a road network, and to partition the first vehicle trajectory according to the road to obtain a first pivot segment set and a first non-pivot segment set; and to partition the second vehicle trajectory according to the road to obtain a second pivot segment set and a second non-pivot segment set;
[0115] The perturbation module 30 is used to use a localized differential privacy algorithm to perturb each first pivot segment in the first pivot segment set to a neighboring road that meets a first preset condition, so as to obtain a plurality of first pivot segments that retain position information after perturbation; and to use a localized differential privacy algorithm to perturb each second non-pivot segment in the second non-pivot segment set to a neighboring road that meets a second preset condition, so as to obtain a plurality of second non-pivot segments that retain direction information after perturbation;
[0116] The generating module 40 is used to connect the plurality of first pivot segments that retain position information after disturbance with the plurality of second non-pivot segments that retain direction information after disturbance to generate a vehicle trajectory after disturbance.
[0117] In one embodiment, the perturbation module 30 is further used to: for each of the first pivot segments, determine a plurality of roads whose distance therefrom is less than a first threshold; calculate the edit distance from each of the roads to the corresponding first pivot segment; based on the edit distance, use a localized differential privacy algorithm with an exponential mechanism to perturb each of the first pivot segments to the corresponding plurality of roads, and obtain a plurality of first pivot segments that retain position information after the perturbations.
[0118] In one embodiment, the perturbation module 30 is also used to: for each of the second non-pivot segments, determine a plurality of roads whose distance thereto is less than a second threshold and whose distance from a line connecting an end point of the previous perturbed first pivot segment and a starting point of the next perturbed first pivot segment is less than a third threshold; calculate a cosine distance from each of the roads to the corresponding second non-pivot segment; based on the cosine distance, perturb each of the second non-pivot segments to the corresponding plurality of roads using a localized differential privacy algorithm with an exponential mechanism, so as to obtain a plurality of second non-pivot segments that retain directional information after perturbation.
[0119] In one of the embodiments, the disturbance module 30 is further used to: obtain multiple sets of threshold parameter combinations based on a first threshold candidate set, a second threshold candidate set, and a third threshold candidate set; perturb the original vehicle trajectory under each of the threshold parameter combinations to generate multiple disturbed vehicle trajectories; calculate the availability of each disturbed vehicle trajectory, and determine the values of the first threshold, the second threshold, and the third threshold based on the availability.
[0120] In one embodiment, the disturbance module 30 is further used to: divide each disturbed vehicle trajectory into multiple trips, and divide the multiple trips into a training set and a test set in chronological order; match each of the trips to the road network through a map matching algorithm to obtain a road ID corresponding to each of the trips and the running time on the road; align the map matching results of each trip in the test set with the map matching results of each trip in the training set to obtain an estimated trip; calculate the error of the estimated time based on the running time of the estimated trip on the road in the test set and the running time of the estimated trip on the road in the training set, and obtain the availability of each disturbed vehicle trajectory based on the error; determine the values of the first threshold, the second threshold, and the third threshold based on the disturbed vehicle trajectory corresponding to the highest availability.
[0121] In one of the embodiments, the disturbance module 30 is further used to: query the original vehicle trajectory and each disturbed vehicle trajectory passing through a preset area within a preset time range; calculate the recall rate and the accuracy rate based on the queried original vehicle trajectory data and each disturbed vehicle trajectory, and obtain the availability of each disturbed vehicle trajectory based on the recall rate and the accuracy rate; determine the values of the first threshold, the second threshold, and the third threshold based on the disturbed vehicle trajectory corresponding to the highest availability.
[0122] In one embodiment, the formula of the index mechanism is:
[0123]
[0124] in, Budget for privacy. p is the first pivot segment or the second non-pivot segment, is the result of the perturbation of the first pivot segment or the second non-pivot segment, r is the neighboring road, P is the set of neighboring roads, u is the edit distance or cosine distance, ∆ u is the global sensitivity, Indicates that the first pivot segment or the second non-pivot segment is disturbed to the neighboring road r probability.
[0125] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0126] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a vehicle trajectory generation method based on localized differential privacy is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse.
[0127] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in any of the above-mentioned vehicle trajectory generation method embodiments based on localized differential privacy are implemented.
[0129] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0130] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A vehicle trajectory generation method based on localized differential privacy, characterized in that: The method comprises: Copy two original vehicle trajectories to obtain a first vehicle trajectory and a second vehicle trajectory; Matching the first vehicle trajectory and the second vehicle trajectory to a road network, dividing the first vehicle trajectory according to the road to obtain a first pivot segment set and a first non-pivot segment set; dividing the second vehicle trajectory according to the road to obtain a second pivot segment set and a second non-pivot segment set; A localized differential privacy algorithm is used to perturb each first pivot segment in the first pivot segment set to a neighboring road that meets a first preset condition, and obtain multiple first pivot segments that retain position information after perturbation; specifically comprising: for each first pivot segment, multiple roads whose distances are less than a first threshold are determined; the edit distance from each road to the corresponding first pivot segment is calculated; based on the edit distance, each first pivot segment is perturbed to the corresponding multiple roads using a localized differential privacy algorithm with an exponential mechanism, and obtain multiple first pivot segments that retain position information after perturbation; And adopting a localized differential privacy algorithm, each second non-pivot segment in the second non-pivot segment set is disturbed to a neighboring road that meets a second preset condition, and a plurality of second non-pivot segments that retain direction information after disturbance are obtained; specifically including: for each second non-pivot segment, a plurality of roads whose distance to the second non-pivot segment is less than a second threshold value, and whose distance to a line connecting an end point of a previous perturbed first pivot segment and a starting point of a next perturbed first pivot segment is less than a third threshold value are determined; the cosine distance from each of the roads to the corresponding second non-pivot segment is calculated; based on the cosine distance, a localized differential privacy algorithm with an exponential mechanism is adopted to perturb each of the second non-pivot segments to a plurality of corresponding roads, and a plurality of second non-pivot segments that retain direction information after disturbance are obtained; The plurality of first pivot segments that retain position information after disturbance are connected with the plurality of second non-pivot segments that retain direction information after disturbance to generate a vehicle trajectory after disturbance.
2. The method according to claim 1, characterized in that The method further comprises: Based on the first threshold candidate set, the second threshold candidate set, and the third threshold candidate set, obtaining multiple groups of threshold parameter combinations; Disturbing the original vehicle trajectory under each of the threshold parameter combinations to generate a plurality of disturbed vehicle trajectories; The availability of each post-disturbance vehicle trajectory is calculated, and the values of the first threshold, the second threshold, and the third threshold are determined based on the availability.
3. The method according to claim 2, characterized in that The calculating the availability of each post-disturbance vehicle trajectory and determining the values of the first threshold, the second threshold, and the third threshold based on the availability comprises: Dividing each disturbed vehicle trajectory into a plurality of trips, and dividing the plurality of trips into a training set and a test set in chronological order; Matching each of the trips to the road network through a map matching algorithm to obtain the road ID corresponding to each of the trips and the travel time on the road; Aligning the map matching results of each trip in the test set with the map matching results of each trip in the training set to obtain an estimated trip; Based on the estimated running time of the trip on the road in the test set and the estimated running time of the trip on the road in the training set, calculating the error of the estimated time, and obtaining the availability of each disturbed vehicle trajectory based on the error; Based on the disturbed vehicle trajectory corresponding to the highest availability, the values of the first threshold, the second threshold and the third threshold are determined.
4. The method according to claim 2, characterized in that: The calculating the availability of each post-disturbance vehicle trajectory and determining the values of the first threshold, the second threshold, and the third threshold based on the availability comprises: Query the original vehicle trajectory and the vehicle trajectory after each disturbance that passes through the preset area within the preset time range; Calculating a recall rate and an accuracy rate based on the queried original vehicle trajectory data and each of the disturbed vehicle trajectories, and obtaining the availability of each of the disturbed vehicle trajectories based on the recall rate and the accuracy rate; Based on the disturbed vehicle trajectory corresponding to the highest availability, the values of the first threshold, the second threshold and the third threshold are determined.
5. The method according to claim 2, characterized in that: The formula for the exponential mechanism is: ; in, Budget for privacy, p is the first pivot segment or the second non-pivot segment, is the result of the perturbation of the first pivot segment or the second non-pivot segment, r is the neighboring road, P is the set of neighboring roads, u is the edit distance or cosine distance, is the global sensitivity, Indicates that the first pivot segment or the second non-pivot segment is disturbed to the neighboring road r probability.
6. A vehicle trajectory generation device based on localized differential privacy, characterized in that: The device comprises: A copy module, used for copying two original vehicle trajectories to obtain a first vehicle trajectory and a second vehicle trajectory; A partitioning module, used for matching the first vehicle trajectory and the second vehicle trajectory to a road network, partitioning the first vehicle trajectory according to the road to obtain a first pivot segment set and a first non-pivot segment set; partitioning the second vehicle trajectory according to the road to obtain a second pivot segment set and a second non-pivot segment set; A perturbation module, for perturbing each first pivot segment in the first pivot segment set to a neighboring road satisfying a first preset condition by using a localized differential privacy algorithm, to obtain a plurality of first pivot segments retaining position information after perturbation; specifically comprising: for each first pivot segment, respectively determining a plurality of roads whose distances therefrom are less than a first threshold; respectively calculating the edit distance from each of the roads to the corresponding first pivot segment; based on the edit distance, perturbing each first pivot segment to a plurality of corresponding roads by using a localized differential privacy algorithm with an exponential mechanism, to obtain a plurality of first pivot segments retaining position information after perturbation; And adopting a localized differential privacy algorithm, each second non-pivot segment in the second non-pivot segment set is disturbed to a neighboring road that meets a second preset condition, and a plurality of second non-pivot segments that retain direction information after disturbance are obtained; specifically including: for each second non-pivot segment, a plurality of roads whose distance to the second non-pivot segment is less than a second threshold value, and whose distance to a line connecting an end point of a previous perturbed first pivot segment and a starting point of a next perturbed first pivot segment is less than a third threshold value are determined; the cosine distance from each of the roads to the corresponding second non-pivot segment is calculated; based on the cosine distance, a localized differential privacy algorithm with an exponential mechanism is adopted to perturb each of the second non-pivot segments to a plurality of corresponding roads, and a plurality of second non-pivot segments that retain direction information after disturbance are obtained; A generation module is used to connect the plurality of first pivot segments that retain position information after disturbance with the plurality of second non-pivot segments that retain direction information after disturbance to generate a vehicle trajectory after disturbance.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Differential privacy protection method based on Location BasedService
CN108563962A
Track data protection method based on differential privacy technology
CN111460508A
Trajectory privacy protection method, privacy protection system, storage medium and mobile equipment
CN111581662A
Differential privacy-based vehicle trajectory data protection method and system, computer equipment and storage medium
CN115221557A
Vehicle real-time track privacy protection method and device and storage medium
CN116975903A
