Driving path privacy protection method, electronic equipment and storage medium
By applying differential privacy technology in a dynamic road network environment, using road network hierarchical model and hybrid distance calculation methods, the problem of privacy protection of logistics vehicle driving paths is solved, and the dual goals of precise privacy protection and data availability of logistics vehicle driving paths in a dynamic road network environment are achieved.
Patent Information
- Application Number
- CN202411596350.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-11
AI Technical Summary
The prior art is difficult to effectively protect the privacy of logistics vehicles' driving paths in a dynamic road network environment, especially in the scenarios of data sharing and dynamic path updates.
The travel path privacy protection method based on differential privacy technology is adopted, and precise privacy protection of the travel path of logistics vehicles is achieved through technical means such as road network layering model, dynamic adjustment of road network distance and node density, mixed distance calculation and Gaussian noise addition.
This method can effectively protect the privacy of logistics vehicles' driving paths while ensuring data availability. It is suitable for complex and real-time changing logistics scenarios, especially in large-scale dynamic road network environments, showing superior privacy protection capabilities and model optimization effects.
Smart Images

Figure CN119557917A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of privacy protection of vehicle driving paths, and in particular to a driving path privacy protection method, electronic equipment and storage medium. Background Art
[0002] With the rapid development of the logistics industry, the driving path data of logistics vehicles are widely used to optimize transportation routes, improve distribution efficiency and reduce costs. However, this data often contains a large amount of sensitive geographic location information. Especially in the logistics network, the driving path of the vehicle can directly reflect the business operation status of the enterprise, customer location information and the real-time location of the vehicle. If this data is leaked without protection, it may lead to serious privacy and security issues, such as location tracking, malicious competition and data abuse.
[0003] Existing privacy protection technologies mostly rely on data encryption or obfuscation technology. Although they can protect location information to a certain extent, it is difficult to ensure data availability and privacy at the same time, especially in the scenario of dynamic updates and data sharing of logistics routes. In addition, differential privacy technology has been proven to be effective in dealing with privacy leakage issues. However, how to apply differential privacy technology in a dynamic road network environment to achieve accurate privacy protection of logistics vehicle driving routes still faces technical challenges.
[0004] Traditional differential privacy methods have difficulty taking into account different road types, traffic conditions, and data heterogeneity when processing location data. The driving paths of logistics vehicles are complex and diverse, and the different road types, congestion levels, and vehicle speeds make it difficult for a single privacy protection strategy to meet actual needs. At the same time, in the federated learning scenario, how to ensure the validity of data and the accuracy of the model while protecting privacy is also an urgent problem to be solved in the current technical field.
[0005] Therefore, a differential privacy protection method is proposed that can be dynamically updated according to the hierarchical structure, traffic conditions and paths of the road network, which can not only protect the privacy of the driving paths of logistics vehicles but also maintain the availability of data. This is the technical problem to be solved by the present invention. Summary of the invention
[0006] The purpose of the present invention is to provide a driving path privacy protection method, electronic device and storage medium to solve the problems raised in the above background technology.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] A driving path privacy protection method is applied to logistics vehicles, and the method includes:
[0009] S100, collecting dynamic road network data of the logistics vehicle, obtaining real-time traffic data and road types of the logistics vehicle according to the dynamic road network data and GIS, and performing hierarchical division processing on the dynamic road network data;
[0010] S200, setting the node density of the road nodes in the road network data according to the hierarchical road network data; and dynamically adjusting the node density according to the real-time traffic data and the road type; and confirming the optional set of obfuscated positions in the dynamically adjusted road nodes according to the dynamic weight random sampling algorithm;
[0011] S300, calculating the degree of traffic congestion according to real-time traffic data, and dynamically adjusting the road network distance; calculating the mixed distance in combination with the Euclidean distance, determining the selection probability of each confusion position in the optional set, and further confirming the final confusion position;
[0012] S400, analyzing the indistinguishability of each layer in the hierarchical road network data according to the hybrid distance; and calculating the comprehensive indistinguishability, and dynamically adjusting the privacy budget;
[0013] S500, obtaining data of each client of the logistics vehicle, confirming the client model gradients respectively according to the loss function and the comprehensive indistinguishability, calculating the local difference of each client, and dynamically adjusting the label type of the client;
[0014] S600, calculating the gradient change rate of the client according to the client model gradient; dynamically adjusting the clipping threshold according to the gradient change rate and label type of the client, generating and adding noise that conforms to the Gaussian distribution;
[0015] S700, calculate personalized deviation correction values for each client, update the local model and upload the gradient and parameters of adding noise; the server aggregates the model parameters uploaded by all clients and adds Gaussian noise to the global model;
[0016] S800: broadcast the global model with added noise to the client and continue the next round of iteration of federated learning.
[0017] Preferably, S100 comprises:
[0018] S101, the real-time traffic data includes the traffic flow, speed, road width, number of lanes, road congestion and construction information of logistics vehicles;
[0019] S102, preprocessing the collected data, including removing abnormal data, completing missing data, removing duplicate records, and unifying the scale and unit of the data;
[0020] S103, hierarchical division processing: the road network is divided into different levels according to the importance, usage frequency and traffic flow of roads in the dynamic road network data, and a hierarchical road network model is constructed; wherein the roads at each level in the hierarchical road network model have different importance and traffic characteristics.
[0021] Preferably, S200 includes:
[0022] S201, obtaining hierarchical road network data, dividing roads in the road network data into multiple intervals; one interval represents a node, and setting a corresponding basic node density according to the road type;
[0023] S202, dynamically adjusting the basic node density based on the traffic flow, vehicle speed, road width and number of lanes in the real-time traffic data:
[0024] Among them, D adjusted is the node density after dynamic adjustment, D base is the basic node density, T traffic To set the traffic flow index, T congestion is the degree of traffic congestion, W is the actual width of the road (meters), and W max is the maximum road width, as a normalized reference value, L is the number of lanes on the road, L max To represent the maximum road width, Q max is the maximum carrying capacity of the road, γ, δ, λ1, λ2 are adjustment coefficients, which respectively control the influence of traffic flow, vehicle speed, road width and number of lanes on node density;
[0025] S203, based on the dynamically adjusted node density D adjusted Lay out road nodes, calculate the distance between logistics vehicles and each road node, map the real-time location of logistics vehicles to the nearest node and record the node coordinates;
[0026] S204: Determine the weight of each road node based on the traffic flow, vehicle speed and road congestion conditions in the real-time traffic data:
[0027]
[0028] Among them, V current is the current vehicle speed, V free is the normal speed under free flow state, α and β are the adjustment coefficients of speed difference and traffic flow, ∈ j is a random disturbance term, sampled from a uniform distribution U(-δ,δ);
[0029] S205: If there are n road nodes, the weight value w of each road node is jNormalized, the selection probability of each road node is calculated as At this time, the random sampling interval is divided by the cumulative weight value, the interval corresponding to the generated random number is confirmed, and the node corresponding to the interval is used as the confusion position; the confusion position is added to the set of all nodes of the current road to form a new node set S = {p1, p2, p3, ..., p n ,p j}.
[0030] Preferably, S300 includes:
[0031] S301. Obtain the real-time speed V of logistics vehicles in real-time traffic data current , get the traffic congestion level T congestion : Among them, V free is the vehicle speed in free flow state;
[0032] S302, according to the traffic congestion level T congestion , actual distance d G (p i ,p' j ) Confirm the adjusted road network distance Where α is the adjustment factor;
[0033] S303, calculate the hybrid distance by combining the Euclidean distance: Among them, d euclidean (p i ,p j ') is the Euclidean distance, for node p i and p j ' is calculated based on the geographical coordinates of the node, and β is the dynamically adjusted weight coefficient;
[0034] S304, according to the mixed distance D hybrid (p i ,p j ') Calculate the selection probability of each node in the node set S: Among them, α is a parameter that controls the selection sensitivity; at this time, according to the selection probability P(p j '|p i ) Select the final obfuscation position p'.
[0035] Preferably, S400 includes:
[0036] S401, obtain hierarchical road network data and calculate the road network distance at each level Among them, w k is the weight of the road node, K is the number of paths in this level;
[0037] S402: Determine the indistinguishability measure RN-I of each level according to the road network distance of each level L :
[0038]
[0039] Among them, ∈ L Budget for this level of privacy;
[0040] S403, according to the indistinguishability measurement RN-I L Confirm the comprehensive dynamic indistinguishability of the entire road network:
[0041]
[0042] Among them, λ L is the weight of each level, ∈ dyn budget for comprehensive privacy;
[0043] S404. Dynamically adjust the privacy budget based on the comprehensive dynamic indistinguishability and traffic congestion level. The privacy budget adjustment formula is: Among them, ∈0 is the initial privacy budget and γ is the traffic congestion impact coefficient.
[0044] Preferably, S500 includes:
[0045] S501. Obtain the client data of each logistics vehicle and calculate the client model gradient
[0046]
[0047] Among them, |D i | is the number of samples in the dataset of client i, w t is the weight factor for time period t, γ is the adjustment factor for controlling the impact of traffic congestion on losses, is the square of the prediction error at time t, β is the weight coefficient for balancing the privacy protection loss, RN-I dyn It is comprehensive indistinguishability;
[0048] S502: Calculate the local difference B(w) of each client: Where K is the number of clients participating in the training, The gradient of the global model is calculated by averaging the gradients of all clients;
[0049] S503, dividing the vehicle trajectory data into different states or modes according to the real-time traffic data of the logistics vehicles, and defining a label for each state;
[0050] S504, based on comprehensive indistinguishability RN-I dynDynamically adjust the number of client tag types c nk :
[0051] c nk =c total ×RN-I dyn ;
[0052] Among them, c total is the number of initial tag types, RN-I dyn Indicates comprehensive indistinguishability.
[0053] Preferably, S600 includes:
[0054] S601, based on the gradient of a certain client i at time t Confirm the client's gradient change rate ΔG i (t): Among them, ∥·∥2 represents the L2 norm of the gradient, which is used to measure the size of the gradient vector;
[0055] S602: According to the client gradient change rate ΔG i (t) and the number of label types to dynamically adjust the pruning threshold C i (t):
[0056]
[0057] Among them, C base is the basic clipping threshold, c n and c nk are the initial and adjusted number of tag types on the client, RN-I dyn represents the comprehensive indistinguishability, f(ΔG i (t)) is the adjustment factor;
[0058] S603: Based on the adjusted clipping threshold C i (t), dynamic privacy budget ∈ dyn and comprehensive indistinguishability RN-I dyn Confirm the standard deviation of the noise σ: Where δ is the privacy parameter; then the noise N(0,σ 2 );
[0059] S604: Add the generated Gaussian noise to the clipped gradient of the client to obtain a gradient that meets the differential privacy requirements. in, is the original gradient of the client, N(0,σ 2 ) is the generated Gaussian noise.
[0060] Preferably, S700 includes:
[0061] S701, according to the gradient of a certain client i at time t Calculate the personalized bias correction value b i (t): Among them, η b is the bias correction factor, is the gradient of the global model;
[0062] S702, according to the personalized deviation correction value b i (t) and the gradient that meets the differential privacy requirements Update the local model parameter w of a client i i : Where η is the learning rate;
[0063] S703: The server receives the personalized model parameters w uploaded by all clients. i , confirm the update parameters of the global model Where K is the number of clients participating in federated learning;
[0064] S704, according to the global model w global Confirm the pruning threshold C of the global model global , then according to the standard deviation σ of the noise, the calculation formula is: Generate the corresponding noise N(0,σ) that conforms to the Gaussian distribution to protect the privacy of the global model 2 );
[0065] S705, Gaussian noise N(0,σ 2 ) is added to the global model w global In this paper, we obtain the global model parameters that meet the requirements of differential privacy.
[0066] An electronic device, comprising:
[0067] at least one processor;
[0068] and, a memory communicatively coupled to the at least one processor;
[0069] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above protection method.
[0070] A computer-readable storage medium stores a computer program, wherein the computer program implements the above protection method when executed by a processor.
[0071] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0072] The present invention provides a solution that can effectively protect the privacy of logistics vehicle driving paths by combining differential privacy technology with a federated learning framework. The method uses a road network hierarchical model to grade roads according to importance, frequency of use and traffic conditions, and dynamically adjusts the road network distance and node density to ensure that the privacy protection strength can adapt to different traffic scenarios. On this basis, hybrid distance calculation and dynamic path update are used to further improve the accuracy and flexibility of privacy protection. Through the dynamic adjustment of the clipping threshold and the addition of Gaussian noise, the present invention effectively handles the problem of data heterogeneity during the model training process, ensures that the personalized characteristics of client data are fully reflected, and enhances the accuracy and usability of the model in federated learning. At the same time, the method prevents the risk of inferring the actual location of logistics vehicles through model parameters, effectively protects sensitive location information, and is suitable for complex and real-time changing logistics scenarios, especially in large-scale dynamic road network environments. It shows superior privacy protection capabilities and model optimization effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0074] Figure 1 It is a flow chart of a driving path privacy protection method of the present invention;
[0075] Figure 2 is a schematic flow chart of S200 and S300 in a driving path privacy protection method of the present invention;
[0076] Figure 3 is a schematic flow chart of S500 in a driving path privacy protection method of the present invention;
[0077] Figure 4 It is a schematic flow chart of S700 in a driving path privacy protection method of the present invention. DETAILED DESCRIPTION
[0078] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0079] See also Figure 1-Figure 4 , the present invention provides a technical solution:
[0080] A driving path privacy protection method is applied to logistics vehicles, and the method includes:
[0081] S100, collecting dynamic road network data of the logistics vehicle, obtaining real-time traffic data and road types of the logistics vehicle according to the dynamic road network data and GIS, and performing hierarchical division processing on the dynamic road network data;
[0082] Preferably, S100 comprises:
[0083] S101, the real-time traffic data includes the traffic flow, speed, road width, number of lanes, road congestion and construction information of logistics vehicles;
[0084] Collect dynamic road network data, continuously obtain real-time traffic data, and combine with geographic information system (GIS) to obtain traffic flow, vehicle speed, road congestion, construction information and geographic information data, including road types and intersections, to ensure the accuracy of road characteristics and surrounding environment data. Due to the characteristics of different data sources, the collection frequency will be dynamically adjusted according to actual conditions; for example, traffic flow and speed data are updated once a minute, while accident and construction information are updated according to actual conditions;
[0085] S102, preprocessing the collected data, including removing abnormal data, completing missing data, removing duplicate records, and unifying the scale and unit of the data;
[0086] Preprocess the collected data to ensure data quality and consistency. This includes detecting and removing abnormal data through statistical methods, such as outliers caused by sensor failures, GPS drift, etc., and completing missing data, while removing duplicate records to ensure the uniqueness of each data point in time and space. The scale and unit of the data are unified. This series of preprocessing steps ensures the accuracy and reliability of the data foundation for subsequent model training and privacy protection strategies;
[0087] S103, hierarchical division processing: dividing the road network into different levels according to the importance, usage frequency and traffic flow of the roads in the dynamic road network data, and constructing a hierarchical road network model; wherein the roads at each level in the hierarchical road network model have different importance and traffic characteristics;
[0088] Hierarchical road network data processing is performed. The road network is divided into different levels according to the importance, frequency of use and traffic flow of the roads. A hierarchical road network model is constructed, including trunk roads, secondary trunk roads and branch roads. The roads at each level have different importance and traffic characteristics. Trunk roads are used for roads with large traffic and high importance, such as highways. The data of such roads are updated frequently and the privacy protection requirements are more stringent. Secondary trunk roads are used for internal traffic flow in the city, and branch roads are used for residential areas or remote areas with lower traffic flow. This provides a basis for data discretization and processing. The system can dynamically adjust the privacy protection strategy according to the characteristics of roads at different levels to ensure that the intensity of privacy protection matches the importance of the road. Hierarchical processing not only improves the flexibility of privacy protection, but also ensures that more stringent protection measures are taken on roads with large traffic flow and high privacy risks.
[0089] S200, setting the node density of the road nodes in the road network data according to the hierarchical road network data; and dynamically adjusting the node density according to the real-time traffic data and the road type; and confirming the optional set of obfuscated positions in the dynamically adjusted road nodes according to the dynamic weight random sampling algorithm;
[0090] Preferably, S200 includes:
[0091] S201, obtaining hierarchical road network data, dividing roads in the road network data into multiple intervals; one interval represents a node, and setting a corresponding basic node density according to the road type;
[0092] Urban roads usually have large and complex traffic flows, so a node is set up every 50 meters to ensure the accuracy and flexibility of privacy protection; although the traffic flow on highways is large, the road conditions are relatively simple, so a node is set up every 200 meters to meet the needs; rural roads have small traffic flows and low interaction complexity, so a node is set up every 500 meters. This division method ensures that different types of roads can be allocated with the optimal node density according to their characteristics, thereby improving the operating efficiency of the overall system.
[0093] S202, dynamically adjusting the basic node density based on the traffic flow, vehicle speed, road width and number of lanes in the real-time traffic data:
[0094] Among them, D adjusted is the node density after dynamic adjustment, D base is the basic node density, T traffic To set the traffic flow index, T congestion is the degree of traffic congestion, W is the actual width of the road (meters), and W max is the maximum road width, as a normalized reference value, L is the number of lanes on the road, Lmax To represent the maximum road width, Q max is the maximum carrying capacity of the road, γ, δ, λ1, λ2 are adjustment coefficients, which respectively control the impact of traffic flow, vehicle speed, road width, and number of lanes on node density; among them, the node density of roads with heavy traffic will increase, while the node density of roads with slower speeds will decrease. This adjustment can ensure better protection of user privacy on busy roads;
[0095] S203, based on the dynamically adjusted node density D adjusted Lay out road nodes, calculate the distance between logistics vehicles and each road node, map the real-time location of logistics vehicles to the nearest node and record the node coordinates;
[0096] S204: Determine the weight of each road node based on the traffic flow, vehicle speed and road congestion conditions in the real-time traffic data:
[0097]
[0098] Among them, V current is the current vehicle speed, V free is the normal speed under free flow state, α and β are the adjustment coefficients of speed difference and traffic flow, ∈ j is a random disturbance term, sampled from a uniform distribution U(-δ,δ);
[0099] Through this formula, nodes with larger traffic volume will receive higher weights, which means that these nodes are more likely to be selected in subsequent obfuscation operations, thereby enhancing the privacy protection effect;
[0100] S205: If there are n road nodes, the weight value w of each road node is j Normalized, the selection probability of each road node is calculated as At this time, the random sampling interval is divided by the cumulative weight value, the interval corresponding to the generated random number is confirmed, and the node corresponding to the interval is used as the confusion position; the confusion position is added to the set of all nodes of the current road to form a new node set S = {p1, p2, p3, ..., p n ,p j}.
[0101] The obfuscation position is selected by random sampling, the selection probability of the node is calculated, and finally the node within the weight cumulative value interval is selected as the obfuscation position; this step effectively increases the unpredictability of the obfuscation operation by introducing randomness, thereby significantly improving the privacy protection ability of the system. Through this obfuscation mechanism, it is difficult for the outside world to simply analyze the user's actual location, ensuring that the user's location information is not leaked;
[0102] S300, calculating the degree of traffic congestion according to real-time traffic data, and dynamically adjusting the road network distance; calculating the mixed distance in combination with the Euclidean distance, determining the selection probability of each confusion position in the optional set, and further confirming the final confusion position;
[0103] Preferably, S300 includes:
[0104] S301. Under actual traffic conditions, the road network distance will be affected by the degree of traffic congestion. In order to enable the system to adapt to different traffic conditions more flexibly, the real-time speed V of the logistics vehicle in the real-time traffic data is obtained. current , get the degree of traffic congestion Among them, V free is the vehicle speed in free flow state; through this formula, the system can adjust the road network distance according to the real-time traffic conditions, ensuring that the system's choice of path is more flexible and reasonable under different traffic congestion conditions;
[0105] S302, according to the traffic congestion level T congestion , actual distance d G (p i ,p' j ) Confirm the adjusted road network distance Where α is the adjustment factor, which ensures that the road network distance is dynamically adjusted according to the real-time traffic conditions;
[0106] S303, calculate the hybrid distance by combining the Euclidean distance: ; where d euclidean (p i ,p j ') is the Euclidean distance, for node p i and p j ' is calculated based on the geographical coordinates of the node, and β is the dynamically adjusted weight coefficient;
[0107] Combine dynamic road network distance and Euclidean distance, balance the influence of actual path and geometric distance, calculate hybrid distance to balance the difference between actual driving path and geographical location, and enhance the indistinguishability of location;
[0108] By adjusting β, the impact of the two distances can be balanced according to different scenarios or needs. For example, in scenarios where precise routes are required, the weight of the dynamic road network distance can be increased, while in scenarios where privacy protection is required, the Euclidean distance can be preferred.
[0109] This hybrid distance ensures that the user’s actual location is difficult to infer because it combines different characteristics of the actual driving route and geometric location, thereby increasing indistinguishability;
[0110] S304, according to the mixed distance Dhybrid (p i ,p j ') Calculate the selection probability of each node in the node set S: Among them, α is a parameter that controls the selection sensitivity, ensuring that the selection of different nodes has probability differences; through this formula, the obfuscated location far away from the user's actual location still has a certain probability of being selected, which effectively increases the randomness and ensures that it is difficult for the outside world to infer the user's true location through simple distance; at this time, according to the selection probability P(p j '|p i ) Select the final obfuscation position p';
[0111] Specifically, the system first normalizes all possible obfuscation positions according to the aforementioned selection probabilities to ensure that the sum of all selection probabilities is 1; then, a random number r is generated and selected according to the probability interval. If the random number r falls within the probability interval of a certain obfuscation position, then this position is the final obfuscation position; through random sampling, the system ensures that the selection of obfuscation positions is sufficiently random, thereby greatly improving the privacy protection effect of the system, making it difficult for the outside world to infer the user's true location by analyzing the user's path selection;
[0112] S400, analyzing the indistinguishability of each layer in the hierarchical road network data according to the hybrid distance; and calculating the comprehensive indistinguishability, and dynamically adjusting the privacy budget;
[0113] Preferably, S400 includes:
[0114] S401, obtain hierarchical road network data and calculate the road network distance at each level Among them, w k is the weight of the road node, K is the number of paths in this level;
[0115] In a complex road network structure, roads at different levels (such as main roads, secondary roads, and branch roads) have different importance to the overall privacy protection and path selection of the system. Therefore, this step reflects the importance of each level of path by calculating the weighted mixed distance of each level of path, and combines the mixed distance of dynamic road network distance and Euclidean distance;
[0116] Different levels of paths are given different weights according to their importance. The weights of main roads are usually higher because these roads play a more critical role in traffic flow and location privacy, while the weights of branch roads are relatively lower;
[0117] S402: Determine the indistinguishability measure RN-I of each level according to the road network distance of each level L :
[0118]
[0119] Among them, ∈ L The privacy budget for this level is dynamically adjusted to meet different privacy requirements. Privacy budgets at different levels are allocated according to the importance and traffic volume of the road.
[0120] For example, for main roads, the privacy budget is larger to ensure stricter privacy protection, while for branch roads with less traffic, the privacy budget can be relatively low;
[0121] S403, according to the indistinguishability measurement RN-I L Confirm the comprehensive dynamic indistinguishability of the entire road network:
[0122]
[0123] Among them, λ L is the weight of each level, ∈ dyn budget for comprehensive privacy;
[0124] Through this calculation, the system can integrate the privacy protection effects at all levels, ensuring effective privacy protection on roads at different levels, and ultimately improving the privacy protection level of the overall system;
[0125] After calculating the indistinguishability measures at each level, the system also needs to calculate the comprehensive dynamic indistinguishability of the entire road network; based on the indistinguishability measures at each level, the comprehensive dynamic indistinguishability of the entire road network is comprehensively calculated to ensure the privacy protection effect at different levels;
[0126] S404. Dynamically adjust the privacy budget based on the comprehensive dynamic indistinguishability and traffic congestion level. The privacy budget adjustment formula is: Among them, ∈0 is the initial privacy budget, γ is the traffic congestion impact coefficient, and the dynamic adjustment mechanism of the privacy budget ensures that under different traffic conditions and privacy requirements, the privacy protection budget can dynamically adapt to the current network environment and flexibly adjust the privacy protection level, thereby effectively improving the privacy protection effect;
[0127] Through this dynamic adjustment mechanism, the system can adjust the privacy protection level in a timely manner when traffic conditions change, ensuring that in cases of severe congestion or heavy traffic, the privacy budget is increased and the privacy protection intensity is improved; in cases of light traffic, the privacy budget can be reduced accordingly, thereby improving the system's operating efficiency.
[0128] S500, obtaining data of each client of the logistics vehicle, confirming the client model gradients respectively according to the loss function and the comprehensive indistinguishability, calculating the local difference of each client, and dynamically adjusting the label type of the client;
[0129] Preferably, S500 includes:
[0130] S501. In order to balance privacy protection and prediction accuracy under the federated learning framework, the comprehensive loss function is used for global optimization to balance privacy protection and prediction accuracy, ensure that prediction accuracy, traffic congestion impact and privacy protection are considered simultaneously in model training, and balance privacy protection and model performance; the comprehensive loss function is defined as:
[0131]
[0132] Among them, the loss function not only minimizes the prediction error during the model training process, but also optimizes the performance of the model under the constraints of privacy protection. By balancing privacy loss and prediction loss, the system can achieve the dual goals of higher privacy protection and prediction accuracy;
[0133] Obtain the client data of each logistics vehicle and calculate the client model gradient
[0134]
[0135] Among them, |D i | is the number of samples in the dataset of client i, w t is the weight factor for time period t, γ is the adjustment factor for controlling the impact of traffic congestion on losses, is the square of the prediction error at time t, β is the weight coefficient for balancing the privacy protection loss, RN-I dyn It is comprehensive indistinguishability;
[0136] Through this gradient calculation formula, each client can perform local optimization of the model based on its local data and privacy protection requirements, and provide useful update information for the global model in the federated learning framework;
[0137] S502: Calculate the local difference B(w) of each client: Where K is the number of clients participating in the training, The gradient of the global model is calculated by averaging the gradients of all clients;
[0138] The calculation of local differences helps the system dynamically evaluate the client's contribution to the global model update, while ensuring the security of the data in combination with privacy protection requirements;
[0139] S503, dividing the vehicle trajectory data into different states or modes according to the real-time traffic data of the logistics vehicles, and defining a label for each state;
[0140] In order to better analyze and model vehicle trajectory data, the vehicle trajectory data is divided into different states or modes, and labels are defined for each state; these labels help the system distinguish different traffic conditions so as to perform more detailed modeling and optimization for different scenarios; the specific states and labels include:
[0141] 1) Normal driving: The vehicle is driving under normal traffic conditions, without obvious traffic interference or emergencies;
[0142] 2) Traffic congestion: When a vehicle is traveling in a traffic congestion area, the speed of the vehicle drops significantly, which may be accompanied by frequent stops and starts;
[0143] 3) Detour: An alternative route chosen by a vehicle to avoid congested or closed roads, which may take an uncommon route;
[0144] 4) Parking: The vehicle is completely stationary, whether due to traffic lights, traffic control or other reasons;
[0145] 5) Abnormal driving: Abnormal driving behaviors such as sudden acceleration and sudden braking may be caused by emergencies or dangerous situations;
[0146] The definition of these labels helps the system adjust the privacy protection strategy under different driving conditions and optimize the model more accurately;
[0147] S504, based on comprehensive indistinguishability RN-I dyn Dynamically adjust the number of client tag types c nk :
[0148] c nk =c total ×RN-I dyn ;
[0149] Among them, c total is the number of initial tag types, RN-I dyn represents comprehensive indistinguishability;
[0150] This adjustment mechanism ensures that the data of each client can be dynamically optimized according to its privacy needs, while improving the ability to handle heterogeneous data under the federated learning framework.
[0151] S600, calculating the gradient change rate of the client according to the client model gradient; dynamically adjusting the clipping threshold according to the gradient change rate and label type of the client, generating and adding noise that conforms to the Gaussian distribution;
[0152] Preferably, S600 includes:
[0153] S601, based on the gradient of a certain client i at time t Confirm the client's gradient change rate ΔG i (t): Among them, ∥·∥2 represents the L2 norm of the gradient, which is used to measure the size of the gradient vector;
[0154] This formula reflects the change of client gradient over time. If the gradient change rate is large, it means that the model update is more drastic and requires stricter privacy protection measures; if the change rate is small, it means that the model update is relatively stable;
[0155] S602: According to the client gradient change rate ΔG i (t) and the number of label types to dynamically adjust the pruning threshold C i (t):
[0156]
[0157] Among them, C base is the basic clipping threshold, c n and c nk are the initial and adjusted number of tag types on the client, RN-I dyn represents the comprehensive indistinguishability, f(ΔG i (t)) is the adjustment factor;
[0158] Where, f(ΔG i (t)) is defined as:
[0159]
[0160] Among them, β and γ are the adjustment amplitudes for controlling the gradient change rate to be large and small, respectively, and θ is the threshold value of the gradient change rate;
[0161] According to the client gradient change rate ΔG i (t) and the number of label types to dynamically adjust the pruning threshold C i (t), the clipping threshold is used to control the maximum amplitude of the uploaded gradient to prevent some abnormal gradients from having too much impact on the global model, while also ensuring that the requirements of differential privacy are met;
[0162] Through this adjustment mechanism, the client's clipping threshold can adapt to the gradient changes, avoiding overly strict clipping on models with relatively slow updates, while ensuring stricter control on models with large changes, thereby balancing the effectiveness of model updates and privacy protection;
[0163] S603: Based on the adjusted clipping threshold C i (t), dynamic privacy budget ∈ dyn and comprehensive indistinguishability RN-I dyn Confirm the standard deviation of the noise σ: Where δ is the privacy parameter; then the noise N(0,σ 2 );
[0164] The generation process of Gaussian noise follows the strict requirements of differential privacy. By dynamically adjusting the amplitude of the noise according to the current gradient clipping threshold and privacy budget, the noise intensity is ensured to adapt to the actual situation of the client, thereby maximizing the retention of useful information in the gradient while ensuring privacy.
[0165] S604: Add the generated Gaussian noise to the clipped gradient of the client to obtain a gradient that meets the differential privacy requirements. in, is the original gradient of the client, N(0,σ 2 ) is the generated Gaussian noise;
[0166] By adding noise to the gradient, the system ensures that the gradient data uploaded by the client meets the differential privacy requirements, thereby protecting the privacy and security of the client. This process can effectively prevent the inference of the client's private data by analyzing the uploaded gradient. At the same time, the intensity of the noise is optimized through a dynamic adjustment mechanism, which can not only protect privacy but also not have a significant impact on model performance.
[0167] S700, calculate personalized deviation correction values for each client, update the local model and upload the gradient and parameters of adding noise; the server aggregates the model parameters uploaded by all clients and adds Gaussian noise to the global model;
[0168] Preferably, S700 includes:
[0169] S701, according to the gradient of a certain client i at time t Calculate the personalized bias correction value b i (t): Among them, η b is the bias correction factor, is the gradient of the global model;
[0170] Calculate a personalized bias correction value b for each client i (t) is used to adjust the deviation between the client model and the global model, ensuring that the client can make personalized adjustments based on the difference between its own data distribution and the global model, ensuring that the client model can be effectively adjusted according to its own data distribution, and enhancing the adaptability of the client model;
[0171] The core idea of this formula is to compare the local gradient of the client with the global gradient, calculate the difference between the two, and use the deviation correction coefficient η bScaling adjustment. This allows the client model to be personalized and optimized according to the changes in the global model and its own data characteristics, enhancing the adaptability of the model. Especially when there is heterogeneity in data distribution, the bias correction mechanism can help the client better adapt to the pace of global model updates;
[0172] S702, according to the personalized deviation correction value b i (t) and the gradient that meets the differential privacy requirements Update the local model parameter w of a client i i : Where η is the learning rate;
[0173] This formula adjusts the client model parameters through two parts: the first part is the gradient after differential privacy processing It is used to ensure the security of private data when the client model is updated; the second part is the personalized deviation correction value b i (t) is used to balance the differences between the client model and the global model and enhance the personalized performance of the client model;
[0174] By combining these two parts, the system can not only ensure privacy protection, but also make personalized adjustments based on the specific data characteristics of the client, thereby ensuring that the model better adapts to the actual situation of the client. This personalized update mechanism is particularly suitable for scenarios with large data heterogeneity and can significantly improve the model performance under the federated learning framework;
[0175] S703: The server receives the personalized model parameters w uploaded by all clients. i , confirm the update parameters of the global model Where K is the number of clients participating in federated learning;
[0176] In each round of federated learning, the server can average and aggregate the model parameters of all clients to generate updated parameters for the global model. This process ensures that the global model can reflect the contribution of each client while maintaining the efficiency of model updates;
[0177] S704, according to the global model w global Confirm the pruning threshold C of the global model global , then according to the standard deviation σ of the noise, the calculation formula is: Generate the corresponding noise N(0,σ) that conforms to the Gaussian distribution to protect the privacy of the global model 2 );
[0178] The system can dynamically adjust the intensity of the noise based on the privacy budget and the indistinguishability metric. The noise generation process ensures that the global model does not leak the client's private information when broadcasting, while also maintaining the rationality of the model performance;
[0179] S705, Gaussian noise N(0,σ 2 ) is added to the global model w global In this paper, we obtain the global model parameters that meet the requirements of differential privacy.
[0180] By adding noise to the global model, the system can effectively prevent external attackers from inferring the private information of each client by analyzing the global model parameters. The intensity of noise addition is adjusted according to the dynamic privacy budget and the indistinguishability metric of the system, thereby minimizing the impact on model performance while ensuring privacy protection.
[0181] S800: broadcast the global model with added noise to the client and continue the next round of iteration of federated learning.
[0182] An electronic device, comprising:
[0183] at least one processor;
[0184] and, a memory communicatively coupled to the at least one processor;
[0185] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above protection method.
[0186] A computer-readable storage medium stores a computer program, wherein the computer program implements the above protection method when executed by a processor.
[0187] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A driving path privacy protection method, applied to logistics vehicles, characterized by: The method comprises: S100, collecting dynamic road network data of the logistics vehicle, obtaining real-time traffic data and road types of the logistics vehicle according to the dynamic road network data and GIS, and performing hierarchical division processing on the dynamic road network data; S200, setting the node density of the road nodes in the road network data according to the hierarchical road network data; and dynamically adjusting the node density according to the real-time traffic data and the road type; and confirming the optional set of obfuscated positions in the dynamically adjusted road nodes according to the dynamic weight random sampling algorithm; S300, calculating the degree of traffic congestion according to real-time traffic data, and dynamically adjusting the road network distance; calculating the mixed distance in combination with the Euclidean distance, determining the selection probability of each confusion position in the optional set, and further confirming the final confusion position; S400, analyzing the indistinguishability of each layer in the hierarchical road network data according to the hybrid distance; and calculating the comprehensive indistinguishability, and dynamically adjusting the privacy budget; S500, obtaining data of each client of the logistics vehicle, confirming the client model gradients respectively according to the loss function and the comprehensive indistinguishability, calculating the local difference of each client, and dynamically adjusting the label type of the client; S600, calculating the gradient change rate of the client according to the client model gradient; dynamically adjusting the clipping threshold according to the gradient change rate and label type of the client, generating and adding noise that conforms to the Gaussian distribution; S700, calculate personalized deviation correction values for each client, update the local model and upload the gradient and parameters of adding noise; the server aggregates the model parameters uploaded by all clients and adds Gaussian noise to the global model; S800: broadcast the global model with added noise to the client and continue the next round of federated learning iteration.
2. The driving path privacy protection method according to claim 1, characterized in that: The S100 includes: S101, the real-time traffic data includes the traffic flow, speed, road width, number of lanes, road congestion and construction information of logistics vehicles; S102, preprocessing the collected data, including removing abnormal data, completing missing data, removing duplicate records, and unifying the scale and unit of the data; S103, hierarchical division processing: the road network is divided into different levels according to the importance, usage frequency and traffic flow of roads in the dynamic road network data, and a hierarchical road network model is constructed; wherein the roads at each level in the hierarchical road network model have different importance and traffic characteristics.
3. The driving path privacy protection method according to claim 2, characterized in that: The S200 includes: S201, obtaining hierarchical road network data, dividing roads in the road network data into multiple intervals; one interval represents a node, and setting a corresponding basic node density according to the road type; S202, dynamically adjusting the basic node density based on the traffic flow, vehicle speed, road width and number of lanes in the real-time traffic data: Among them, D adjusted is the node density after dynamic adjustment, D base is the basic node density, T traffic To set the traffic flow index, T congestion is the degree of traffic congestion, W is the actual width of the road (meters), and W max is the maximum road width, as a normalized reference value, L is the number of lanes on the road, L max To represent the maximum road width, Q max is the maximum carrying capacity of the road, γ, δ, λ1, λ2 are adjustment coefficients, which respectively control the influence of traffic flow, vehicle speed, road width and number of lanes on node density; S203, based on the dynamically adjusted node density D adjusted Lay out road nodes, calculate the distance between logistics vehicles and each road node, map the real-time location of logistics vehicles to the nearest node and record the node coordinates; S204: Determine the weight of each road node based on the traffic flow, vehicle speed and road congestion conditions in the real-time traffic data: Among them, V current is the current vehicle speed, V free is the normal speed under free flow state, α and β are the adjustment coefficients of speed difference and traffic flow, ∈ j is a random disturbance term, sampled from a uniform distribution U(-δ,δ); S205: If there are n road nodes, the weight value w of each road node is j Normalized, the selection probability of each road node is calculated as At this time, the random sampling interval is divided by the cumulative weight value, the interval corresponding to the generated random number is confirmed, and the node corresponding to the interval is used as the confusion position; the confusion position is added to the set of all nodes of the current road to form a new node set S = {p1, p2, p3, ..., p n ,p j }.
4. The driving path privacy protection method according to claim 3, characterized in that: The S300 includes: S301. Obtain the real-time speed V of logistics vehicles in real-time traffic data current , get the traffic congestion level T congestion : Among them, V free is the vehicle speed in free flow state; S302, according to the traffic congestion level T congestion , actual distance d G (p i ,p' j ) Confirm the adjusted road network distance Where α is the adjustment factor; S303, calculate the hybrid distance by combining the Euclidean distance: Among them, d euclidean (p i ,p j ') is the Euclidean distance, for node p i and p j ' is calculated based on the geographical coordinates of the node, and β is the dynamically adjusted weight coefficient; S304, according to the mixed distance D hybrid (p i ,p j ') Calculate the selection probability of each node in the node set S: Among them, α is a parameter that controls the selection sensitivity; at this time, according to the selection probability P(p j '|p i ) Select the final obfuscated position p'.
5. The driving path privacy protection method according to claim 4, characterized in that: The S400 includes: S401, obtain hierarchical road network data and calculate the road network distance at each level Among them, w k is the weight of the road node, K is the number of paths in this level; S402: Determine the indistinguishability measure RN-I of each level according to the road network distance of each level L : Among them, ∈ L Budget for this level of privacy; S403, according to the indistinguishability measurement RN-I L Confirm the comprehensive dynamic indistinguishability of the entire road network: Among them, λ L is the weight of each level, v dyn budget for comprehensive privacy; S404. Dynamically adjust the privacy budget based on the comprehensive dynamic indistinguishability and traffic congestion level. The privacy budget adjustment formula is: Among them, ∈0 is the initial privacy budget and γ is the traffic congestion impact coefficient.
6. The driving route privacy protection method according to claim 5, characterized in that: The S500 comprises: S501. Obtain the client data of each logistics vehicle and calculate the client model gradient Among them, |D i | is the number of samples in the dataset of client i, w t is the weight factor for time period t, γ is the adjustment factor for controlling the impact of traffic congestion on losses, is the square of the prediction error at time t, β is the weight coefficient for balancing the privacy protection loss, RN-I dyn It is comprehensive indistinguishability; S502: Calculate the local difference B(w) of each client: Where K is the number of clients participating in the training, The gradient of the global model is calculated by averaging the gradients of all clients; S503, dividing the vehicle trajectory data into different states or modes according to the real-time traffic data of the logistics vehicles, and defining a label for each state; S504, based on comprehensive indistinguishability RN-I dyn Dynamically adjust the number of client tag types c nk : c nk =c total ×RN-I dyn ; Among them, c total is the number of initial tag types, RN-I dyn Indicates comprehensive indistinguishability.
7. The driving route privacy protection method according to claim 6, characterized in that: The S600 includes: S601, based on the gradient of a certain client i at time t Confirm the client's gradient change rate ΔG i (t): Among them, ∥·∥2 represents the L2 norm of the gradient, which is used to measure the size of the gradient vector; S602: According to the client gradient change rate ΔG i (t) and the number of label types to dynamically adjust the pruning threshold C i (t): Among them, C base is the basic clipping threshold, c n and c nk are the initial and adjusted number of tag types on the client, RN-I dyn represents the comprehensive indistinguishability, f(ΔG i (t)) is the adjustment factor; S603: Based on the adjusted clipping threshold C i (t), dynamic privacy budget ∈ dyn and comprehensive indistinguishability RN-I dyn Confirm the standard deviation of the noise σ: Where δ is the privacy parameter; then the noise N(0,σ 2 ); S604: Add the generated Gaussian noise to the clipped gradient of the client to obtain a gradient that meets the differential privacy requirements. in, is the original gradient of the client, N(0,σ 2 ) is the generated Gaussian noise.
8. The driving route privacy protection method according to claim 7, characterized in that: The S700 includes: S701, according to the gradient of a certain client i at time t Calculate the personalized bias correction value b i (t): Among them, η b is the bias correction factor, is the gradient of the global model; S702, according to the personalized deviation correction value b i (t) and the gradient that meets the differential privacy requirements Update the local model parameter w of a client i i : Where η is the learning rate; S703: The server receives the personalized model parameters w uploaded by all clients. i , confirm the updated parameter w of the global model global (t+1): Where K is the number of clients participating in federated learning; S704, according to the global model w global Confirm the pruning threshold C of the global model global , then according to the standard deviation σ of the noise, the calculation formula is: Generate the corresponding noise N(0,σ) that conforms to the Gaussian distribution to protect the privacy of the global model 2 ); S705, Gaussian noise N(0,σ 2 ) is added to the global model w global In this paper, we obtain the global model parameters that meet the requirements of differential privacy.
9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the protection method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the protection method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Privacy protection asynchronous federation sharing method and system based on block chain
CN114297722A
Intelligent logistics trolley data sharing and privacy protection method based on alliance chain
CN118433191A
Privacy Control-Adjustable Commercial Vehicle Electronic Logging Device (ELD) and Trip Data-Sharing System Between a Transportation Company and a Third-Party Corporate Partner Entity
US20200219337A1
User-level Privacy Preservation for Federated Machine Learning
US20230047092A1