Traffic density prediction method and system for data flow differential privacy
By employing the ω-event local differential privacy framework and the LSTM-TCN-Attention model, the problems of environmental change adaptability and privacy leakage in intelligent transportation systems are solved, achieving high-precision traffic density prediction and strict privacy protection.
Patent Information
- Application Number
- CN202511184296.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-12-12
AI Technical Summary
Existing intelligent transportation systems cannot capture potential concept drift through continuous learning mechanisms, resulting in models that cannot adapt to environmental changes. Furthermore, there is a risk of sensitive information privacy leakage during traffic density prediction, leading to inaccurate prediction results.
The ω-event local differential privacy framework is used for local perturbation processing. Combined with LDP and LBA algorithms, perturbation data is generated by calculating dissimilarity and dynamically publishing budgets through initializing server data. Finally, the LSTM-TCN-Attention prediction model is used to predict traffic density, achieving incremental learning and privacy protection.
It effectively adapts to changing road and environmental conditions, provides strict privacy protection, improves the accuracy and security of traffic density prediction, and avoids the threat of man-in-the-middle attacks.
Smart Images

Figure CN121122008A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent transportation, and particularly relates to a traffic density prediction method and system based on data stream differential privacy, a terminal and a computer readable storage medium. BACKGROUND
[0002] In the field of intelligent transportation, real-time traffic data captures the spatio-temporal characteristics of the road network through dynamic recording, providing support for applications such as traffic signal optimization control, dynamic path planning, autonomous driving decision-making, and electric vehicle energy consumption prediction.
[0003] However, for long-term running intelligent transportation systems, potential concept drift phenomena cannot be captured through continuous learning mechanisms, resulting in models that cannot adapt to environmental changes, and sensitive information is at risk of privacy leakage during this process, leading to unsafe traffic density prediction processes and inaccurate results.
[0004] Therefore, the prior art still needs to be improved and developed. SUMMARY
[0005] The main purpose of the present application is to provide a traffic density prediction method and system based on data stream differential privacy, a terminal and a computer readable storage medium, which aims to solve the problem that the prior art cannot capture potential concept drift phenomena through continuous learning mechanisms for long-term running intelligent transportation systems, resulting in models that cannot adapt to environmental changes, and sensitive information is at risk of privacy leakage during this process, leading to unsafe traffic density prediction processes and inaccurate results.
[0006] To achieve the above purpose, the present application provides a traffic density prediction method based on data stream differential privacy, which comprises the following steps:
[0007] Initialize the server data, calculate the dissimilarity calculation budget according to the server data, send the dissimilarity calculation budget to a plurality of target vehicles for initial data perturbation, and receive the first perturbed data generated by the plurality of target vehicles;
[0008] According to the first perturbed data, calculate the dynamic publishing budget, generate the publishing strategy of the first perturbed data according to the dynamic publishing budget, and send the publishing strategy and the dynamic publishing budget to a plurality of target vehicles for secondary data perturbation;
[0009] Receive the second perturbed data generated by the plurality of target vehicles, perform feature extraction to obtain a multi-dimensional feature vector, divide the second perturbed data according to the data stream processed in the previous time to obtain divided data;
[0010] inputting the division data into a target prediction model to perform traffic density prediction, obtaining a current traffic density change value, and obtaining a current traffic density according to the current traffic density change value and a previous moment traffic density.
[0011] Optionally, the sending of the distinctness calculation budget to the plurality of target vehicles for initial data perturbation further comprises:
[0012] The plurality of target vehicles pre-collect vehicle data.
[0013] The plurality of target vehicles receive the distinctness calculation budget, and according to the type of the vehicle data, perform initial data perturbation using the distinctness calculation budget to obtain first perturbed data.
[0014] The plurality of target vehicles send the first perturbed data.
[0015] Optionally, the calculating of the dynamic publishing budget according to the first perturbed data, the generating of a publishing strategy of the first perturbed data according to the dynamic publishing budget, and the sending of the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for secondary data perturbation comprise:
[0016] calculating a basic publishing budget according to the server data, and calculating a dynamic publishing budget according to the basic publishing budget;
[0017] calculating the distinctness of each attribute according to the first perturbed data;
[0018] judging a strategy label of each attribute in the first perturbed data according to the distinctness of each attribute and the dynamic publishing budget, and generating the publishing strategy according to the strategy labels of all attributes;
[0019] sending the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for secondary data perturbation.
[0020] Optionally, the judging of the strategy label of each attribute in the first perturbed data according to the distinctness of each attribute and the dynamic publishing budget, and the generating of the publishing strategy according to the strategy labels of all attributes comprise:
[0021] calculating a publishing error according to the dynamic publishing budget;
[0022] obtaining the distinctness of each attribute, judging whether the distinctness of each attribute is greater than or equal to the publishing error, and obtaining a judgment result;
[0023] generating a strategy label of each attribute in the first perturbed data according to the judgment result, and generating the publishing strategy according to the strategy labels of all attributes.
[0024] Optionally, the generating a strategy label of each attribute in the first perturbation data according to the judgment result comprises:
[0025] When the judgment result is that the dissimilarity of the attribute is greater than or equal to the publishing error, the strategy label of the corresponding attribute is set to a first label.
[0026] When the judgment result is that the dissimilarity of the attribute is not greater than and not equal to the publishing error, the strategy label of the corresponding attribute is set to a second label.
[0027] Optionally, the sending the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for secondary data perturbation further comprises:
[0028] The plurality of target vehicles accept the publishing strategy and the dynamic publishing budget.
[0029] When the strategy label of the attribute in the publishing strategy is the first label, the vehicle data is subjected to secondary data perturbation according to the dynamic publishing budget.
[0030] All the data obtained after the secondary data perturbation is obtained to obtain second perturbation data, and the second perturbation data is sent.
[0031] Optionally, the target prediction model comprises a time convolution network, a long short-term memory network, a multi-head attention mechanism and a multi-layer perception.
[0032] The inputting the divided data into a target prediction model for traffic density prediction to obtain a current traffic density change value comprises:
[0033] The divided data is subjected to shunting expansion to obtain a basic value flow and a change value flow.
[0034] The basic value flow is input into the long short-term memory network, and the change value flow is input into the time convolution network.
[0035] Features output by the time convolution network and the long short-term memory network are input into a multi-head attention mechanism to obtain a time sequence feature vector, and the time sequence feature vector is input into the multi-layer perception to obtain the current traffic density change value.
[0036] In addition, to achieve the above-mentioned purposes, the application further provides a traffic density prediction system facing data stream differential privacy, wherein the traffic density prediction system facing data stream differential privacy comprises:
[0037] A first disturbance module is configured to initialize server data, calculate a dissimilarity calculation budget according to the server data, send the dissimilarity calculation budget to a plurality of target vehicles for first data disturbance, and receive first disturbance data generated by the plurality of target vehicles;
[0038] A second disturbance module is configured to calculate a dynamic publishing budget according to the first disturbance data, generate a publishing strategy of the first disturbance data according to the dynamic publishing budget, and send the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for second data disturbance.
[0039] A data division module is configured to receive second disturbance data generated by the plurality of target vehicles, perform feature extraction to obtain a multi-dimensional feature vector, divide the second disturbance data according to a previous processed data stream to obtain divided data.
[0040] A result output module is configured to input the divided data into a target prediction model to perform traffic density prediction, obtain a current traffic density change value, and obtain a current traffic density according to the current traffic density change value and a previous moment traffic density.
[0041] In addition, to achieve the above object, the application further provides a terminal, wherein the terminal comprises a memory, a processor, and a traffic density prediction program for data stream differential privacy stored in the memory and executable on the processor, and the traffic density prediction program for data stream differential privacy implements the steps of the traffic density prediction method for data stream differential privacy when executed by the processor.
[0042] In addition, to achieve the above object, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a traffic density prediction program for data stream differential privacy, and the traffic density prediction program for data stream differential privacy implements the steps of the traffic density prediction method for data stream differential privacy when executed by a processor.
[0043] In the present application, the server data is initialized, the dissimilarity calculation budget is calculated according to the server data, the dissimilarity calculation budget is sent to a plurality of target vehicles for initial data perturbation, and the first perturbation data generated by the plurality of target vehicles is received; the dynamic publishing budget is calculated according to the first perturbation data, the publishing strategy of the first perturbation data is generated according to the dynamic publishing budget, and the publishing strategy and the dynamic publishing budget are sent to a plurality of target vehicles for secondary data perturbation; the second perturbation data generated by the plurality of target vehicles is received, feature extraction is performed to obtain a multi-dimensional feature vector, the second perturbation data is divided according to the data stream processed last time to obtain divided data; the divided data is input into a target prediction model for traffic density prediction to obtain a current traffic density change value, and the current traffic density change value and the traffic density at the last moment are used to obtain the current traffic density. The present application predicts traffic density based on extended floating car data collected by intelligent vehicles, does not rely on traditional fixed collection equipment such as electronic cameras deployed on specific road sections, and therefore can effectively adapt to changing road and environmental conditions, has wider applicability; at the same time, the local differential privacy framework is used to perform local perturbation before user data collection, fundamentally avoiding the threat of man-in-the-middle attack that centralized differential privacy may face in the clear transmission stage, and providing more stringent privacy protection; in addition, the target prediction model is used to capture local detail changes and long-term time sequence dependence, and the results are organically integrated, further improving the accuracy of prediction. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 is a flow chart of a preferred embodiment of the traffic density prediction method for data stream differential privacy of the present application;
[0045] Figure 2 is a framework schematic diagram of the traffic density prediction method for data stream differential privacy of the present application;
[0046] Figure 3 is a structure diagram of a preferred embodiment of the traffic density prediction system for data stream differential privacy of the present application;
[0047] Figure 4 is a structure diagram of a preferred embodiment of the terminal of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical scheme and advantages of the present application more clear and definite, the present application will be further described in detail below with reference to the drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0049] Mobile crowd sensing (MCS) technology mobilizes large-scale participants through intelligent devices or Internet of Things (IoT) devices to collect data, significantly improving the breadth and depth of information collection. This technology has received extensive attention and is widely used in various fields, such as smart cities, intelligent transportation, environmental monitoring, and health monitoring. In the era of smart cars, extending floating car data as a new sensing data can quickly obtain real-time information of vehicles, including location information, speed information, and information between other vehicles. Through certain data mining methods, real-time road conditions can be obtained, providing reference data for traffic scheduling. However, in the process of real-time traffic data sharing, individual location coordinates, mobile trajectory features, and other sensitive attributes face significant privacy leakage risks. For example, by analyzing an individual's mobile trajectory, one can easily identify the individual's daily activity patterns, such as work location, residential area, and even favorite entertainment venues. More seriously, re-identification attacks based on the spatiotemporal uniqueness of trajectory data can effectively associate individual identity identifiers, and then obtain sensitive information such as personal health status and social relationships through semantic reasoning. This attack method is particularly dangerous in the context of data sharing, as it can bypass traditional anonymization processing and directly threaten individual privacy security.
[0050] Directly applying existing privacy protection methods to protect real-time data often results in insufficient protection or significant reduction in data utility. This is because traditional privacy protection techniques often struggle to find a balance between protecting privacy and maintaining data usability. For example, simple data desensitization processing can cause data to lose its original analytical value, while complex encryption techniques, although providing higher privacy protection, can make data processing extremely difficult, affecting the actual application of data. Therefore, a dynamic balance between protection strength and data usability needs to be established to ensure that personal privacy is protected while data still plays its due role. The centralized differential privacy framework provides a quantifiable privacy guarantee, but it still has the risk of man-in-the-middle attacks during the clear transmission of user-side raw data in the collection stage. An attacker can intercept and tamper with data during transmission, thereby obtaining sensitive information. To eliminate this server-side trust dependency, a localized privacy protection mechanism is needed to enhance data security. For example, anonymization processing can be performed directly on user devices, and then the processed data can be sent to the server. In this way, even if the data is intercepted during transmission, the attacker cannot obtain any useful information.
[0051] The accuracy of short-term traffic flow prediction plays a crucial role in the implementation of intelligent transportation systems. Accurate traffic flow prediction not only provides quantitative basis for travel demand analysis and optimization of traffic control strategies, but also is the core technical support for real-time decision-making in intelligent transportation systems. For example, by predicting the traffic flow in the future, intelligent transportation systems can adjust the timing of traffic lights in advance, optimize the distribution of traffic flow, and thus alleviate traffic congestion and improve the efficiency of road traffic.
[0052] In the field of intelligent transportation, real-time traffic data records the spatio-temporal characteristics of the road network, providing support for applications such as traffic signal optimization control, dynamic path planning, autonomous driving decision-making, and electric vehicle energy consumption prediction. However, sensitive information such as location coordinates and movement trajectories involved in the data sharing process poses a risk of privacy leakage. Attackers can use the unique characteristics of trajectories to associate identity with individual behavior, thereby infringing on privacy. To address this issue, the academic community has adopted the differential privacy theory (ε-differential privacy) based on rigorous mathematical proofs to construct protection mechanisms, achieving quantitative privacy protection by defining the indistinguishability of adjacent data sets.
[0053] Current user-level privacy protection for multi-focus finite data streams, while the ω-event ε-differential privacy model uses a dynamic sliding window to achieve event-level protection in an infinite stream. This model uses the budget allocation (BD) algorithm to uniformly or adaptively allocate privacy budgets within a continuous ω timestamp, and combines the budget absorption (BA) algorithm to absorb redundant budgets to optimize global efficiency, forming a dynamic balance between protection strength and data availability. However, the centralized architecture relies on a trusted third-party server, and the clear-text transmission link at the user end still faces the threat of man-in-the-middle attacks. To address this defect, local differential privacy (LDP) is extended to the infinite stream scenario, and LBD and LBA algorithms are developed by integrating the BD / BA strategy. The LBD uses an exponential decay strategy to reduce window noise accumulation, and the LBA improves resource utilization by uniformly allocating unused budgets.
[0054] In the field of traffic flow prediction, traditional methods have the dual limitations of insufficient medium and long-term prediction ability and insufficient spatio-temporal dependent modeling. However, most of the technologies use offline batch processing mode, relying on historical data for full-model training and static deployment. This mode has significant defects: on the one hand, dynamic factors such as changes in road network topology and traffic mutations caused by sudden events can cause model performance degradation; on the other hand, full-volume retraining requires a large amount of computing resources, making it difficult to meet real-time requirements. Especially for long-running intelligent transportation systems, potential concept drift phenomena cannot be captured through continuous learning mechanisms, resulting in models that cannot adapt to environmental changes, which is a key bottleneck restricting the technology from being implemented.
[0055] It can be seen that the existing offline learning paradigm ignores the evolution of traveler behavior patterns, leading to time-varying problems of traffic flow distribution characteristics, and is difficult to adapt to dynamic changes in the traffic environment. For example, there is a significant difference in traffic flow distribution between holidays and weekdays, and traditional prediction models often fail to capture such changes in a timely manner.
[0056] Therefore, for long-term running intelligent transportation systems, potential concept drift phenomena cannot be captured through continuous learning mechanisms, resulting in models that cannot adapt to environmental changes, and in the process, sensitive information is at risk of privacy leakage, leading to an unsafe traffic density prediction process and inaccurate results.
[0057] To solve one or more of the above problems, the application initializes server data, calculates a dissimilarity calculation budget based on the server data, sends the dissimilarity calculation budget to a plurality of target vehicles for initial data perturbation, and receives first perturbed data generated by the plurality of target vehicles; calculates a dynamic publishing budget based on the first perturbed data, generates a publishing strategy for the first perturbed data based on the dynamic publishing budget, and sends the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for secondary data perturbation; receives second perturbed data generated by the plurality of target vehicles, performs feature extraction to obtain a multi-dimensional feature vector, divides the second perturbed data based on the previous processed data stream to obtain divided data; inputs the divided data into a target prediction model to predict traffic density, obtains a current traffic density change value, and obtains a current traffic density based on the current traffic density change value and a previous traffic density.
[0058] The traffic density prediction method for data stream differential privacy according to the preferred embodiment of the application, as shown in Figure 1 and Figure 2 The traffic density prediction method for data stream differential privacy includes the following steps:
[0059] Step S10, initialize server data, calculate a dissimilarity calculation budget based on the server data, send the dissimilarity calculation budget to a plurality of target vehicles for initial data perturbation, and receive first perturbed data generated by the plurality of target vehicles.
[0060] It should be noted that the ω-event local differential privacy (LDP) framework is adopted in the application, and the local disturbance is performed before user data collection, which fundamentally avoids the threat of man-in-the-middle attack that the centralized differential privacy may face in the plaintext transmission stage, and provides more stringent privacy protection. Through the budget absorption (BA) and dynamic budget allocation algorithm, the system can intelligently decide whether to release a new disturbance value or reuse an old disturbance value according to the actual change of the data flow, and realize dynamic balance between protection strength and data availability, avoiding unnecessary privacy budget waste.
[0061] Among them, local differential privacy (Local Differential Privacy, LDP) is an emerging privacy protection technology, and its core idea is to disturb the user data before data collection to ensure that the data collector cannot obtain the original data. ω-event local differential privacy is a special variant for infinite data flow scenarios, which provides privacy protection for dynamic time series data through adaptive threshold truncation and budget allocation mechanism. The main challenges faced by traditional differential privacy technology include the balance between privacy protection and data availability, and the privacy budget consumption caused by multiple queries. The ω-event local differential privacy effectively reduces the truncation error of dynamic time series patterns by introducing adaptive threshold truncation and pattern reservation mechanism, while providing ω-event level privacy protection. This technology has wide application prospects in Internet of Things, edge computing and other scenarios, and can support real-time analysis and application of data flow without leaking user's original data.
[0062] It should be noted that the process of generating the first disturbance data and the second disturbance data, i.e. Figure 2 The dynamic privacy budget allocation in the above formula (1) and formula (2) is that in the initial stage of data processing, the central server will first divide the original total budget into two key parts, namely the dissimilarity privacy budget and the basic release privacy budget. Then, the central server will interact with the intelligent vehicle for multiple rounds, through which privacy protection data meeting the ω-event∈-LDP (Local Differential Privacy) standard can be obtained, ensuring the privacy safety of data in the transmission and processing process.
[0063] Specifically, in the server, the server data is initialized, and the total privacy budget∈ total , the time window size ω, and the statistical attribute set (such as v x ,v y ,a x ,a y , dhw) are set. And divide the total budget into two parts:
[0064] Dissimilarity calculation budget:
[0065]
[0066] Basic release budget:
[0067]
[0068] And the dissimilarity calculation budget is issued to multiple target vehicles.
[0069] Further, the dissimilarity calculation budget is sent to multiple target vehicles for initial data perturbation, and then further comprising:
[0070] Multiple target vehicles pre-acquire vehicle data;
[0071] Multiple target vehicles receive the dissimilarity calculation budget, and according to the type of vehicle data, use the dissimilarity calculation budget for initial data perturbation to obtain first perturbed data;
[0072] Multiple target vehicles send the first perturbed data.
[0073] Specifically, as shown in Figure 2 , the target vehicle performs real-time data acquisition, and the intelligent vehicle (CV) collects data in real time through various vehicle-mounted sensors, which covers multiple aspects such as speed, acceleration and headway. The intelligent vehicle will encapsulate the data collected at the same time as a frame of data, and attach an accurate time stamp on the data frame to ensure the timeliness and accuracy of the data. In this way, the data exists in the form of streaming, which is convenient for subsequent processing and analysis.
[0074] After obtaining the streaming vehicle data, the corresponding continuous monitoring Kafka topic budget-allocat ion is obtained, and the dissimilarity calculation budget ∈ t,1 of the current time stamp t issued by the central server is obtained. Then local data acquisition and dissimilarity calculation perturbation are performed, that is, the vehicle collects instantaneous data through sensors, that is, streaming vehicle data d i,t , which contains multiple features (such as x-direction speed v x , y-direction speed v y , x-direction acceleration a x , y-direction acceleration a y , and headway dhw). Using the received ∈ t,1 , the local differential privacy perturbation mechanism is applied to d i,t for initial data perturbation to generate first perturbed data The perturbation mechanism selects according to the feature type. For numerical features (such as v x , v y , a x , and a y), using La place mechanism. For discrete features (e.g. dhw, if quantized to integer), using geometric mechanism. The perturbed publish to Kafka topic noisy-data, so that the server can receive it.
[0075] Step S20, according to the first perturbed data, calculate the dynamic publishing budget, generate the publishing strategy of the first perturbed data according to the dynamic publishing budget, and send the publishing strategy and the dynamic publishing budget to a plurality of target vehicles for secondary data perturbation.
[0076] Specifically, after obtaining the first perturbed data, the first perturbation is performed again.
[0077] Further, the calculation of the dynamic publishing budget according to the first perturbed data, the generation of the publishing strategy of the first perturbed data according to the dynamic publishing budget, and the sending of the publishing strategy and the dynamic publishing budget to a plurality of target vehicles for secondary data perturbation, comprises:
[0078] According to the server data, calculate the basic publishing budget, and calculate the dynamic publishing budget according to the basic publishing budget;
[0079] According to the first perturbed data, calculate the dissimilarity of each attribute;
[0080] According to the dissimilarity of each attribute and the dynamic publishing budget, judge the strategy label of each attribute in the first perturbed data, and generate the publishing strategy according to the strategy labels of all attributes;
[0081] Send the publishing strategy and the dynamic publishing budget to a plurality of target vehicles for secondary data perturbation.
[0082] Specifically, when performing secondary data perturbation, dynamic privacy budget allocation is performed. A queue with a size of w is maintained to record the historical publishing decisions and budget usage. The unused budget saved by the "approximate" operation in the window is calculated unused =∑approx∈ i,2 .
[0083] Then the corresponding dynamic publishing budget is:
[0084]
[0085] Wherein, the calculation of the basic publishing budget can be calculated by the server data.
[0086] Further, the dissimilarity calculation is performed, that is, the Kafka topic noisy-data is subscribed, and the first perturbed data perturbed by N vehicles t,1 For each attribute k, compute the current perturbation mean:
[0087]
[0088] And the last published value r l [k] Compute the dissimilarity:
[0089]
[0090] Where V(∈ t,1 ,N) is the perturbation variance (e.g., under the Laplace mechanism The geometric mechanism approximation is similar.
[0091] Then the dissimilarity of all attributes is integrated:
[0092]
[0093] After that, according to the dynamic publishing budget and the corresponding dissimilarity, the strategy label of each attribute in the first perturbation data is obtained.
[0094] Further, the strategy label of each attribute in the first perturbation data is determined according to the dissimilarity of each attribute and the dynamic publishing budget, and the publishing strategy is generated according to the strategy labels of all attributes, comprising:
[0095] The publishing error is calculated according to the dynamic publishing budget;
[0096] The dissimilarity of each attribute is obtained, it is judged whether the dissimilarity of each attribute is greater than or equal to the publishing error, and a judgment result is obtained;
[0097] According to the judgment result, the strategy label of each attribute in the first perturbation data is generated, and the publishing strategy is generated according to the strategy labels of all attributes.
[0098] Specifically, the application needs to quantify the error that the published new value may introduce, that is, for each attribute k to be counted, the potential publishing error err=V(∈ t,2 ,N) is estimated by using the dynamic publishing budget ∈ t,2 The error is determined by the theoretical variance of the local differential privacy (LDP) mechanism used, representing the cost bottom line of publishing new values. On this basis, the application independently judges the strategy of each attribute in the multi-dimensional data stream to ensure that the budget can be finely applied to the most dramatic feature dimension.
[0099] Specifically, for any attribute k, if the data dissimilarity dis k satisfies the following conditions:
[0100] dis k≥ err k ;
[0101] That is, the system will choose the "publish" strategy as the policy label, i.e., the first label, if the error caused by using the old value exceeds the cost of adding new noise. At the same time, in order to ensure the basic timeliness of the data, when the time t-t l satisfies:
[0102] t-t l ≥ ω;
[0103] Or in the initialization phase when the system is first run, the "publish" strategy will also be forcibly triggered to update the data, otherwise the corresponding policy label is "approximate", i.e., the second label. After the system traverses all attributes and determines the "publish" or "approximate" strategy for each attribute, the policy set containing these independent decisions and the dynamic publishing budget ∈ t,2 used this time are integrated together into a publishing strategy. Finally, the publishing strategy is broadcast through a specific Kafka topic, and all intelligent vehicle terminals will execute subsequent data perturbation and return operations according to the publishing strategy. For attributes marked as "approximate", the server will directly reuse the last published value.
[0104] Further, the generating a policy label for each attribute in the first perturbation data according to the judgment result comprises:
[0105] When the judgment result is that the dissimilarity of the attribute is greater than or equal to the publishing error, the policy label of the corresponding attribute is set to the first label;
[0106] When the judgment result is that the dissimilarity of the attribute is not greater than and not equal to the publishing error, the policy label of the corresponding attribute is set to the second label.
[0107] Specifically, when the judgment result is that the dissimilarity of the attribute is greater than or equal to the publishing error, the policy label of the corresponding attribute is set to the first label, specifically "publish"; when the judgment result is that the dissimilarity of the attribute is not greater than and not equal to the publishing error, the policy label of the corresponding attribute is set to the second label, specifically "approximate".
[0108] Further, the sending the publishing strategy and the dynamic publishing budget to a plurality of target vehicles for secondary data perturbation further comprises:
[0109] The plurality of target vehicles receive the publishing strategy and the dynamic publishing budget;
[0110] When the attribute corresponding to the policy tag in the publishing strategy is the first tag, then the vehicle data is subjected to secondary data perturbation according to the dynamic publishing budget;
[0111] All the data obtained after secondary data perturbation is obtained to obtain second perturbation data, and the second perturbation data is sent.
[0112] Specifically, after the publishing strategy and the dynamic publishing budget are sent to a plurality of target vehicles, the vehicle terminal continuously listens to the Kafka topic budget-allocation to obtain the dynamic publishing budget ∈ of the current timestamp t issued by the server t,2 and the publishing strategy flag ("publish" or "approximate"). According to the publishing strategy, the data is processed, and if the strategy is "approximate", the vehicle does not send new data, and the server reuses the last published statistical value; if the strategy is "publish", the vehicle uses ∈ t,2 to the original data d i,t , that is, the vehicle data, is subjected to secondary data perturbation by applying differential privacy perturbation again to generate second perturbation data and published to the Kafka topic noisy-data. The secondary data perturbation and the primary data perturbation processing process are the same, and the numerical type uses Laplace and the discrete type uses the geometric mechanism.
[0113] Step S30, receiving the second perturbation data generated by a plurality of target vehicles, and performing feature extraction to obtain a multi-dimensional feature vector, dividing the second perturbation data according to the data stream processed last time to obtain divided data.
[0114] Further, subscribe to the Kafka topic noisy-data to receive the second perturbation data of N vehicles at the timestamp t and process these data. The data with the same timestamp is aggregated to calculate the average value of these data. At the same time, the central server also counts the total number of vehicles submitting data at the time point, thereby forming an original traffic feature data stream.
[0115] Specifically, for each attribute k, the mean value is calculated:
[0116]
[0117] According to the central limit theorem, when N is large enough, the noise mean value variance is significantly reduced, close to the true statistical quantity. Repeat the aggregation for all attributes to generate a multi-dimensional feature vector.
[0118] After that, the multi-dimensional feature vector is divided, the dimension is unified through standardization processing, and is organized into a three-dimensional tensor according to a sliding window (the window size is 20) to adapt to the input of the time series model. The data stream is divided into a series of continuous task batches to adapt to incremental learning, and the divided data is obtained. Specifically, the proportion of accelerating vehicles, the proportion of decelerating vehicles, and the vehicle number fluctuation rate within a 5-frame, 15-frame, and 30-frame window are calculated; these calculation results are spliced and aligned with the original traffic feature data stream according to the time stamp, so as to obtain the divided data. This expansion process enhances the richness of the data and the depth of the analysis.
[0119] In step S40, the divided data is input into the target prediction model to predict the traffic density, and the current traffic density change value is obtained. According to the current traffic density change value and the traffic density at the previous moment, the current traffic density is obtained.
[0120] It should be noted that the target prediction model in the present application is an LSTM-TCN-Attention prediction model. Among them, LSTM (Long Short-Term Memory Network) is an improved recurrent neural network (RNN), which effectively solves the gradient disappearance and long-term dependence problem of traditional RNN in processing long sequences by introducing the mechanism of forgetting gate, input gate and output gate. Its core is the memory unit (Cell State), which transmits information in a linear additive manner to avoid exponential decay of gradient, so as to be able to learn long-term dependencies. LSTM is widely used in natural language processing (such as machine translation, text generation), time series prediction (such as stock price analysis) and speech recognition, etc. fields, and is a powerful tool for processing sequence data.
[0121] Temporal Convolutional Network (TCN) is a deep learning architecture specially designed for processing time series data. TCN effectively solves the problems of gradient disappearance and low computational efficiency of traditional recurrent neural network (RNN) in processing long time series through causal convolution and dilated convolution technology. The core features of TCN include: causal convolution ensures that the model only relies on past information for prediction, avoiding future information leakage; dilated convolution captures long-term dependencies without increasing computational complexity by introducing interval expansion receptive field; residual connection design alleviates the gradient disappearance problem in deep network training. Compared with traditional RNN, TCN has the advantages of strong parallel computing ability, high training efficiency, excellent long-term dependence capture ability, etc. This technology has been successfully applied to speech recognition, action segmentation, anomaly detection and other time series analysis fields.
[0122] Multilayer Perceptron (MLP) is one of the most basic feedforward neural network models. MLP solves the limitation of single-layer perceptron that cannot handle nonlinear problems by introducing hidden layers and nonlinear activation functions. The basic structure of MLP includes input layer, one or more hidden layers, and output layer, with full connection between layers. Its working principle is to calculate the output through forward propagation, and then adjust the weight parameters through the backpropagation algorithm. Commonly used activation functions include Sigmoid, Tanh, and ReLU, which introduce nonlinear capabilities to the network.
[0123] The LSTM-TCN-Attention prediction model uses a parallel LSTM-TCN hybrid architecture. The TCN branch processes differential features through three layers of dilated convolution (dilation rates of 1, 2, and 4, respectively, with channel numbers increasing from 64 to 256), as well as causal convolution and residual connection, effectively capturing local fluctuation patterns; the LSTM branch (bidirectional, two layers, 256 dimensions each) is used to model the long-term dependencies of absolute features, and its dual-flow output is concatenated and passed through a fully connected layer (containing a GELU activation function and a Dropout mechanism) to generate prediction values. During training, a hierarchical experience replay mechanism is used: a short-term experience replay area (capacity of 2000) is used to maintain recent data distribution, and a FIFO algorithm is used to update the data in this area; a long-term experience replay area (capacity of 5000) is used to collect landmark data from historical data to retain a representative and diverse sparse sample set, thereby preserving global patterns, and a reservoir sampling algorithm is used to update the data in the long-term experience replay area. During training, both experience replay areas mix the current task data with historical replay samples at a ratio of 30%, combined with a weighted Huber loss function (assigning a weight of 9.5 to sudden changes) to enhance the model's sensitivity to sudden events; the optimization process uses the SAM algorithm: first, calculate the gradient perturbation direction (p = 0.05), then perform AdamW updates in the perturbation direction (learning rate of 1e-3, weight decay rate of 5e-5), and combine it with a dynamic learning rate adjustment strategy based on rolling validation RMSE (if there is no decrease for 5 consecutive rounds, the learning rate is halved). The data stream is loaded in task blocks (minimum 1000 samples), after sliding window processing (history sequence of 80 steps), the system performs the iteration process of buffer updating, mixed batch training, and next task block validation in turn, finally outputs the RMSE / MAPE indicators and prediction curve on the independent test set, achieving continuous adaptive modeling in non-stationary time series environments.
[0124] Meanwhile, the corresponding target prediction model can be continuously optimized through incremental learning. Incremental learning is a machine learning paradigm that can continuously absorb knowledge from new samples while retaining learned information. Unlike traditional batch learning, incremental learning does not require retraining the entire model, but only a small amount of updating on new data. The key features of incremental learning include: learning from new data without reprocessing historical data; retaining most of the existing knowledge while learning new knowledge; significantly reducing storage requirements and training time. The main challenge is how to balance the preservation of new and old knowledge to avoid the "catastrophic forgetting" phenomenon.
[0125] wherein the reservoir sampling algorithm is an efficient streaming random sampling technique designed for large data streams of unknown length. Its core mechanism is to ensure that the probability of each element being drawn is strictly equal to k / N (N is the total data amount) under the premise of traversing the data only once and fixed memory occupation (only k elements need to be stored). The specific process is as follows: the first k elements are directly stored in the "reservoir"; for the subsequent i-th element (i>k), an integer d in the range of [0, i-1] is randomly generated, and if d falls in the interval [0, k-1], the old element in the corresponding position in the reservoir is replaced.
[0126] Further, the target prediction model comprises a time convolution network, a long short-term memory network, a multi-head attention mechanism and a multi-layer perception.
[0127] The divided data is input into the target prediction model for traffic density prediction to obtain a current traffic density change value, comprising:
[0128] The divided data is shunted and expanded to obtain a basic value flow and a change value flow;
[0129] The basic value flow is input into the long short-term memory network, and the change value flow is input into the time convolution network;
[0130] The features output by the time convolution network and the long short-term memory network are input into the multi-head attention mechanism to obtain a time sequence feature vector, and the time sequence feature vector is input into the multi-layer perception to obtain a current traffic density change value.
[0131] Specifically, the division data is split and expanded to obtain a basic value stream and a change value stream, then empirical playback is performed, the past part of the data stream is added to the task, and then normalization processing is performed to meet the needs of task incremental learning and alleviate the catastrophic forgetting phenomenon. The processed data is then input into a multi-channel LSTM-TCN-Attention network, the basic value stream is input into the LSTM network, and the change value stream is input into the TCN, so as to fully utilize the long-term sequence capturing capability of the LSTM and the local detail capturing capability of the TCN. Each traffic feature corresponds to a channel. Then, through the multi-head attention mechanism, the data of multiple channels are aggregated, and finally a traffic flow time sequence feature vector is obtained.
[0132] After obtaining the time sequence feature vector of the traffic flow, the next step is to calculate through an MLP (Multi-Layer Perceptron) to predict the change value of the traffic density. After obtaining the predicted value, it is added to the last obtained traffic density prediction value, and the current traffic density prediction value can be obtained. This prediction has important practical significance for traffic management and planning, and can help relevant departments make more scientific decisions.
[0133] Further, the privacy guarantee of the dynamic privacy allocation mechanism involved in the application is proved. The goal of the dynamic privacy allocation mechanism is to meet the ω-event∈-local differential privacy (Local Differential Privacy, LDP), that is, in any continuous window (length ω time stamp), the total privacy budget does not exceed∈ total =5.0. In this proof, the following parameter settings are adopted: total privacy budget∈ total =5; time window size ω=5; data attribute number |attributes|=5. The core to be proved is that in any window, the following inequality always holds:
[0134]
[0135] The total budget consumption is decomposed into dissimilarity calculation budget∈ s,1 and data publishing budget∈ s,2 Two parts are analyzed.
[0136] Firstly, the dissimilarity calculation budget consumption is analyzed. According to the allocation rule of the application, the dissimilarity calculation budget allocated to a single attribute k at each time stamp t is:
[0137]
[0138] Since the system needs to compute the dissimilarity for all |attributes| = 5 attributes at each timestamp, the total budget consumed by the dissimilarity computation within a single timestamp is:
[0139] |attributes| · ∈ t,1 = 5 · 0.1 = 0.5.
[0140] Accordingly, the total budget consumed by the dissimilarity computation within any window of size ω = 5 is:
[0141]
[0142] Secondly, we analyze the consumption of the data publishing budget. The budget absorption (BA) mechanism of the present application designs a core constraint, i.e., the total budget for data publishing is limited within half of the total budget.
[0143] Therefore, within any window, the upper bound of the sum of all budgets ∈ t,2 for publishing is:
[0144]
[0145] In summary, within any consecutive ω-time window, the total privacy budget consumed by the mechanism is the sum of the two parts, and the upper bound is:
[0146]
[0147] Since the total budget consumption in the worst case 5.0 does not exceed (equal to) the set total budget ∈ total = 5, the dynamic privacy allocation mechanism of the present application meets the definition of ω-event local differential privacy, and its privacy guarantee is strict and provable.
[0148] The application initializes server data, calculates a dissimilarity calculation budget according to the server data, sends the dissimilarity calculation budget to a plurality of target vehicles for primary data perturbation, and receives first perturbation data generated by the plurality of target vehicles; according to the first perturbation data, a dynamic publishing budget is calculated, a publishing strategy of the first perturbation data is generated according to the dynamic publishing budget, and the publishing strategy and the dynamic publishing budget are sent to the plurality of target vehicles for secondary data perturbation; second perturbation data generated by the plurality of target vehicles is received, feature extraction is performed to obtain a multi-dimensional feature vector, the second perturbation data is divided according to the data stream processed last time to obtain divided data; the divided data is input into a target prediction model for traffic density prediction to obtain a current traffic density change value, and a current traffic density is obtained according to the current traffic density change value and a previous moment traffic density. The application predicts traffic density based on extended floating car data collected by intelligent vehicles, does not rely on traditional fixed collection equipment such as electronic cameras deployed on specific road sections, and therefore can effectively adapt to changing road and environmental conditions, has wider applicability; an omega-event local differential privacy (LDP) framework is adopted to perform local perturbation before user data collection, fundamentally avoiding the threat of man-in-the-middle attacks that centralized differential privacy may face in the clear transmission phase, and providing stricter privacy protection; through a budget absorption (BA) and dynamic budget allocation algorithm, the system can intelligently decide whether to publish a new perturbation value or reuse an old perturbation value according to the actual changes of the data stream, dynamically balancing between protection strength and data availability, and avoiding unnecessary privacy budget waste; an incremental learning mechanism is introduced, enabling the prediction model to continuously learn from new incoming data, solving the problem of performance degradation caused by the inability of traditional offline learning paradigm to adapt to the evolution of traveler behavior. By combining a hierarchical experience replay mechanism, the problem of catastrophic forgetting in incremental learning is effectively overcome, ensuring that the model can retain historical knowledge while learning new knowledge, maintaining the stability of long-term prediction. This mechanism enables the model to adapt to traffic mutations caused by changes in road network topology, sudden events, etc., without consuming a large amount of computing resources to retrain, meeting the real-time requirements of intelligent transportation systems; TCN and LSTM are used as the core, taking advantage of the strengths of TCN and LSTM to capture local detail changes and long-term temporal dependencies. Using a multi-head self-attention mechanism, the results of the two models are organically integrated, further improving the accuracy of the prediction; in addition, asynchronous communication is performed through industrial-grade message middleware such as Kafka, with a clear architecture and decoupling, good scalability and reliability, and the ability to support real-time access and data processing of a large number of vehicles.
[0149] Further, as Figure 3As shown, based on the above data stream differential privacy oriented traffic density prediction method, the application also correspondingly provides a data stream differential privacy oriented traffic density prediction system, wherein the data stream differential privacy oriented traffic density prediction system comprises:
[0150] The first disturbance module 31 is configured to initialize server data, calculate a dissimilarity calculation budget according to the server data, send the dissimilarity calculation budget to a plurality of target vehicles for first data disturbance, and receive first disturbed data generated by the plurality of target vehicles;
[0151] The second disturbance module 32 is configured to calculate a dynamic publishing budget according to the first disturbed data, generate a publishing strategy of the first disturbed data according to the dynamic publishing budget, and send the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for second data disturbance;
[0152] The data division module 33 is configured to receive second disturbed data generated by the plurality of target vehicles, perform feature extraction to obtain a multi-dimensional feature vector, divide the second disturbed data according to a data stream processed in a previous time to obtain divided data;
[0153] The result output module 34 is configured to input the divided data into a target prediction model to perform traffic density prediction, obtain a current traffic density change value, and obtain a current traffic density according to the current traffic density change value and a previous moment traffic density.
[0154] Further, as shown in the accompanying drawings, Figure 4 Based on the above data stream differential privacy oriented traffic density prediction method and system, the application also correspondingly provides a terminal, which comprises a processor 10, a memory 20 and a display 30. Figure 4 Only part of the components of the terminal are shown, but it should be understood that all the shown components are not required to be implemented, and more or less components can be alternatively implemented.
[0155] The memory 20 can be an internal storage unit of the terminal in some embodiments, such as a hard disk or a memory of the terminal. The memory 20 can also be an external storage device of the terminal in other embodiments, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal. Further, the memory 20 can include both the internal storage unit and the external storage device of the terminal. The memory 20 is used to store application software and various data installed on the terminal, such as program codes of the terminal, etc. The memory 20 can also be used to temporarily store data that has been output or will be output. In an embodiment, the memory 20 stores a traffic density prediction program for data stream differential privacy 40, which can be executed by the processor 10 to implement the traffic density prediction method for data stream differential privacy in the present application.
[0156] The processor 10 can be a central processing unit (CPU), a microprocessor or other data processing chip in some embodiments, which is used to run program codes or process data stored in the memory 20, such as to execute the traffic density prediction method for data stream differential privacy, etc.
[0157] The display 30 can be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, etc. in some embodiments. The display 30 is used to display information on the terminal and to display a visualized user interface.
[0158] In an embodiment, the processor 10 implements the steps of the above traffic density prediction method for data stream differential privacy when executing the traffic density prediction program for data stream differential privacy 40 in the memory 20.
[0159] The present application also provides a computer readable storage medium, wherein the computer readable storage medium stores a traffic density prediction program for data stream differential privacy, which, when executed by a processor, implements the following steps:
[0160] Initializing server data, calculating a dissimilarity calculation budget according to the server data, sending the dissimilarity calculation budget to a plurality of target vehicles for initial data perturbation, and receiving first perturbed data generated by the plurality of target vehicles;
[0161] According to the first perturbation data, a dynamic release budget is calculated, a release strategy of the first perturbation data is generated according to the dynamic release budget, and the release strategy and the dynamic release budget are sent to a plurality of target vehicles for secondary data perturbation;
[0162] Second perturbation data generated by a plurality of target vehicles is received, feature extraction is performed to obtain a multi-dimensional feature vector, the second perturbation data is divided according to the data stream processed last time to obtain divided data;
[0163] The divided data is input into a target prediction model for traffic density prediction to obtain a current traffic density change value, and a current traffic density is obtained according to the current traffic density change value and a previous moment traffic density.
[0164] According to the first perturbation data, a dynamic release budget is calculated, a release strategy of the first perturbation data is generated according to the dynamic release budget, and the release strategy and the dynamic release budget are sent to a plurality of target vehicles for secondary data perturbation;
[0165] A plurality of target vehicles pre-collect vehicle data;
[0166] A plurality of target vehicles receive the dissimilarity calculation budget, and according to the type of the vehicle data, the dissimilarity calculation budget is used for initial data perturbation to obtain first perturbation data;
[0167] A plurality of target vehicles send the first perturbation data.
[0168] According to the first perturbation data, a dynamic release budget is calculated, a release strategy of the first perturbation data is generated according to the dynamic release budget, and the release strategy and the dynamic release budget are sent to a plurality of target vehicles for secondary data perturbation;
[0169] According to the server data, a basic release budget is calculated, and a dynamic release budget is calculated according to the basic release budget;
[0170] According to the first perturbation data, the dissimilarity of each attribute is calculated;
[0171] According to the dissimilarity of each attribute and the dynamic release budget, a strategy label of each attribute in the first perturbation data is judged, and the release strategy is generated according to the strategy labels of all attributes;
[0172] The release strategy and the dynamic release budget are sent to a plurality of target vehicles for secondary data perturbation.
[0173] According to the first perturbation data, the dissimilarity of each attribute is calculated;
[0174] calculating a publishing error according to the dynamic publishing budget;
[0175] obtaining the difference of each attribute, determining whether the difference of each attribute is greater than or equal to the publishing error, and obtaining a determination result;
[0176] According to the determination result, a strategy label of each attribute in the first perturbation data is generated, and the publishing strategy is generated according to the strategy labels of all attributes.
[0177] According to the determination result, a strategy label of each attribute in the first perturbation data is generated, and the publishing strategy is generated according to the strategy labels of all attributes.
[0178] When the determination result is that the difference of the attribute is greater than or equal to the publishing error, the strategy label of the corresponding attribute is set to a first label;
[0179] When the determination result is that the difference of the attribute is not greater than and not equal to the publishing error, the strategy label of the corresponding attribute is set to a second label.
[0180] According to the determination result, a strategy label of each attribute in the first perturbation data is generated, and the publishing strategy is generated according to the strategy labels of all attributes.
[0181] The target vehicle receives the publishing strategy and the dynamic publishing budget;
[0182] When the strategy label of the attribute in the publishing strategy is the first label, the vehicle data is subjected to secondary data perturbation according to the dynamic publishing budget;
[0183] Obtaining all data obtained after secondary data perturbation to obtain second perturbation data, and sending the second perturbation data.
[0184] The target prediction model includes a time convolution network, a long short-term memory network, a multi-head attention mechanism, and a multi-layer perception machine.
[0185] The divided data is input into the target prediction model to predict the traffic density and obtain the current traffic density change value, including:
[0186] The divided data is subjected to shunting expansion to obtain a basic value flow and a change value flow;
[0187] The basic value flow is input into the long short-term memory network, and the change value flow is input into the time convolution network.
[0188] The time convolution network and the long short-term memory network output features are input to a multi-head attention mechanism to obtain a time sequence feature vector, and the time sequence feature vector is input to the multi-layer perception to obtain a current traffic density change value.
[0189] It should be noted that, in this document, the terms "comprising" "containing" or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article, or terminal. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or terminal that includes the element.
[0190] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable computer-readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a magnetic disc, an optical disc, etc.
[0191] It should be understood that the application is not limited to the above examples, and those skilled in the art can make improvements or changes according to the above description, and all these improvements and changes should be within the protection scope of the appended claims of the present application.
Claims
1. A data flow oriented differential privacy traffic density prediction method, characterized in that, The data stream oriented differential privacy traffic density prediction method comprises the following steps: initializing server data, calculating a dissimilarity calculation budget according to the server data, sending the dissimilarity calculation budget to a plurality of target vehicles for primary data perturbation, and receiving first perturbed data generated by the plurality of target vehicles; calculating a dynamic publishing budget according to the first perturbed data, generating a publishing strategy of the first perturbed data according to the dynamic publishing budget, and sending the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for secondary data perturbation; receiving second perturbed data generated by the plurality of target vehicles, performing feature extraction to obtain a multi-dimensional feature vector, dividing the second perturbed data according to a previous data stream to obtain divided data; inputting the divided data into a target prediction model for traffic density prediction to obtain a current traffic density change value, and obtaining a current traffic density according to the current traffic density change value and a previous traffic density.
2. The data stream oriented differential privacy based traffic density prediction method of claim 1, wherein, The sending of the dissimilarity calculation budget to the plurality of target vehicles for primary data perturbation further comprises the following steps: a plurality of target vehicles pre-collect vehicle data; the plurality of target vehicles receive the dissimilarity calculation budget, perform primary data perturbation on the vehicle data according to the type of the vehicle data to obtain first perturbed data, and send the first perturbed data. The calculation of a dynamic publishing budget according to the first perturbed data, the generation of a publishing strategy of the first perturbed data according to the dynamic publishing budget, and the sending of the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for secondary data perturbation comprise the following steps: 3.The data flow oriented differential privacy based traffic density prediction method according to claim 1, wherein, calculating a basic publishing budget according to the server data, and calculating a dynamic publishing budget according to the basic publishing budget; calculating the dissimilarity of each attribute according to the first perturbed data; judging the strategy label of each attribute in the first perturbed data according to the dissimilarity of each attribute and the dynamic publishing budget, and generating the publishing strategy according to the strategy labels of all attributes; sending the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for secondary data perturbation. The judgment of the strategy label of each attribute in the first perturbed data according to the dissimilarity of each attribute and the dynamic publishing budget, and the generation of the publishing strategy according to the strategy labels of all attributes comprise the following steps:
4. The data stream oriented differential privacy based traffic density prediction method of claim 3, wherein, calculating a publishing error according to the dynamic publishing budget; obtaining the dissimilarity of each attribute, judging whether the dissimilarity of each attribute is greater than or equal to the publishing error, and obtaining a judgment result; generating the strategy label of each attribute in the first perturbed data according to the judgment result, and generating the publishing strategy according to the strategy labels of all attributes. The generation of the strategy label of each attribute in the first perturbed data according to the judgment result comprises the following steps:
5. The data stream oriented differential privacy based traffic density prediction method according to claim 4, characterized in that, when the judgment result is that the dissimilarity of the attribute is greater than or equal to the publishing error, the strategy label of the corresponding attribute is set to a first label. When the judgment result is that the attribute difference is not greater than and not equal to the publishing error, the strategy tag corresponding to the attribute is set to a second tag.
6. The data stream oriented differential privacy based traffic density prediction method according to claim 5, characterized in that, The sending of the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for secondary data perturbation further comprises: The plurality of target vehicles receive the publishing strategy and the dynamic publishing budget; When the strategy tag corresponding to the attribute in the publishing strategy is a first tag, the vehicle data is subjected to secondary data perturbation according to the dynamic publishing budget; All the data obtained after the secondary data perturbation is obtained to obtain second perturbation data, and the second perturbation data is sent.
7. The data stream oriented differential privacy based traffic density prediction method according to claim 1, wherein, The target prediction model comprises a time convolution network, a long short-term memory network, a multi-head attention mechanism, and a multi-layer perception. The input of the divided data into the target prediction model for traffic density prediction to obtain a current traffic density change value comprises: The divided data is subjected to shunting expansion to obtain a base value flow and a change value flow; The base value flow is input into the long short-term memory network, and the change value flow is input into the time convolution network; Features output by the time convolution network and the long short-term memory network are input into the multi-head attention mechanism to obtain a time sequence feature vector, and the time sequence feature vector is input into the multi-layer perception to obtain the current traffic density change value.
8. A data flow oriented differential privacy traffic density prediction system, characterized in that, The data stream differential privacy-oriented traffic density prediction system comprises: A primary perturbation module is configured to initialize server data, calculate a difference calculation budget according to the server data, send the difference calculation budget to a plurality of target vehicles for primary data perturbation, and receive first perturbation data generated by the plurality of target vehicles; A secondary perturbation module is configured to calculate a dynamic publishing budget according to the first perturbation data, generate a publishing strategy of the first perturbation data according to the dynamic publishing budget, and send the publishing strategy and the dynamic publishing budget to the plurality of target vehicles for secondary data perturbation; A data division module is configured to receive second perturbation data generated by the plurality of target vehicles, extract features to obtain a multi-dimensional feature vector, divide the second perturbation data according to a data stream processed in a previous time, and obtain divided data; A result output module is configured to input the divided data into a target prediction model for traffic density prediction to obtain a current traffic density change value, and obtain a current traffic density according to the current traffic density change value and a previous traffic density.
9. A terminal, characterized by comprising: The terminal comprises a memory, a processor, and a data stream differential privacy-oriented traffic density prediction program stored on the memory and executable on the processor, and the data stream differential privacy-oriented traffic density prediction program, when executed by the processor, implements the steps of the data stream differential privacy-oriented traffic density prediction method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a data stream differential privacy oriented traffic density prediction program, and the data stream differential privacy oriented traffic density prediction program, when executed by the processor, implements the steps of the data stream differential privacy oriented traffic density prediction method according to any one of claims 1-7.