A differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment
By constructing a Markov chain in the vehicle-to-everything (V2X) environment and using the whale algorithm to optimize the task offloading scheme, the problem of balancing vehicle location privacy protection and task offloading efficiency in V2X is solved, achieving dynamic privacy protection and efficient task offloading.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2023-12-15
- Publication Date
- 2026-06-30
AI Technical Summary
In the connected vehicle environment, existing task offloading strategies cannot effectively protect vehicle location privacy in dynamically changing vehicle environments, and traditional differential privacy protection mechanisms pose a risk of privacy leakage when vehicles are densely packed or their speeds change.
A differential privacy task offloading method based on Markov chains is adopted. By constructing a discrete Markov state space, the privacy protection strength is dynamically adjusted. Combined with the whale algorithm to optimize the task offloading scheme, a balance is achieved between vehicle location obfuscation protection and task offloading efficiency.
It achieves high efficiency in task offloading strategies and effective protection of vehicle location privacy in the Internet of Vehicles environment, dynamically adapts to environmental changes, reduces the risk of location privacy leakage, and makes full use of edge computing resources.
Smart Images

Figure CN117749797B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle networking and privacy protection, and specifically relates to a differential privacy task offloading method based on Markov chains in a vehicle networking environment, which is applicable to task offloading strategy optimization and vehicle location privacy protection in a vehicle networking environment. Background Technology
[0002] With the rapid development of cloud computing and IoT technologies, an increasing number of terminal devices, such as vehicles and mobile devices, need to perform a large number of computing tasks. Since vehicles and mobile devices are usually severely limited in terms of computing power, battery life, and storage space, task offloading has become an effective strategy to solve this problem, that is, offloading some computing-intensive or data-intensive tasks to cloud servers or edge servers for processing.
[0003] However, the task offloading process involves the transmission of a large amount of sensitive user data, which may lead to serious privacy leaks. For example, in the Internet of Vehicles (IoV), the leakage of vehicle location information could lead to targeted attacks. How to effectively protect user data privacy while ensuring task offloading efficiency has become an important research problem in the field of edge computing. Existing task offloading strategies, such as genetic algorithms and particle swarm optimization, mainly focus on performance optimization of task offloading, while giving less consideration to the protection of user data privacy.
[0004] Currently, differential privacy has become a widely used privacy protection method. Its basic idea is to introduce a degree of randomness during data publishing or querying, making it impossible for attackers to determine the information of a specific individual by analyzing the publishing or query results. However, during the offloading of tasks in connected vehicles, fixed differential privacy protection strategies may not effectively cope with the dynamic changes in the vehicle's environment. Specifically, when the vehicle speed decreases and the surrounding traffic is dense, an individual's location information is more easily inferred, leading to a higher risk of privacy leakage. Conversely, when the vehicle is traveling at a higher speed and the surrounding traffic is sparse, the risk of privacy leakage is relatively low. Therefore, traditional static differential privacy protection mechanisms may lead to insufficient data privacy protection in such dynamic environments. Summary of the Invention
[0005] To address the above problems, this invention proposes a differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment. This method optimizes task offloading strategies in a V2X environment, applies differential privacy to protect individual vehicle location privacy, and adjusts the differential privacy protection strength based on vehicle speed and surrounding vehicle density to achieve a good balance between protecting vehicle location privacy and ensuring task offloading efficiency. This invention is proposed to achieve task offloading decision-making in a V2X environment, effectively balance the efficiency of the task offloading strategy and vehicle location privacy protection, and dynamically adapt to changes in the task offloading environment.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment, specifically including the following steps:
[0008] Based on the degree of privacy protection needs of each vehicle during vehicle operation in the Internet of Vehicles environment, the discrete Markov state space of each vehicle is constructed and initialized.
[0009] Update the state transition probability matrix of the Markov chain of the current vehicle based on the current vehicle's moving speed, the number of surrounding vehicles, and the number of edge servers.
[0010] Based on the current vehicle's state transition probability matrix, the privacy parameters of the current vehicle are obtained;
[0011] Based on the current vehicle's privacy parameters, the current vehicle's location is protected locally using differential privacy and a distorted location is generated.
[0012] Based on the current vehicle's obfuscated location, calculate the latency caused by the transmission of tasks between the current vehicle and the edge server, and construct a minimum system task offloading latency objective function;
[0013] The whale algorithm is used to process the objective function of system task unloading delay, search for the optimal unloading scheme, and perform differential privacy task unloading.
[0014] The beneficial effects of this invention are as follows:
[0015] This invention enables task offloading decisions in a connected vehicle environment, effectively balancing the efficiency of task offloading strategies with vehicle location privacy protection. By adapting to changes in the task offloading environment, this invention can continuously provide stable and efficient task offloading services. Furthermore, by dynamically adjusting the differential privacy protection strength based on the environment and its own characteristics before task offloading, this invention can fully utilize edge computing resources to improve task offloading efficiency while protecting vehicle location privacy. This not only meets the needs of task offloading but also effectively reduces the risk of location privacy leakage, providing a new solution for location privacy protection in a connected vehicle environment. Attached Figure Description
[0016] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the following figures are provided for illustration:
[0017] Figure 1 This is a schematic diagram of a vehicle networking scenario according to the present invention;
[0018] Figure 2 This is a flowchart of the differential privacy task unloading method of the present invention;
[0019] Figure 3 This is a flowchart of the local differential privacy module of the present invention;
[0020] Figure 4 This is a flowchart of the task unloading module of the present invention; Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] like Figure 1 As shown, the vehicle-to-everything (V2X) system consists of a cloud center, multiple edge servers, and connected vehicles. Each connected vehicle may generate tasks, and when a task is generated, the vehicle requests the edge servers to unload it. During this process, the vehicle may leak its location privacy, especially in situations with dense traffic and slow speeds. Therefore, in this system, vehicles need to protect their location privacy before unloading tasks. The cloud center handles complex tasks that are difficult for edge servers to process. This embodiment will not focus on the tasks handled by the cloud center, but will only focus on the task unloading process between the edge servers and connected vehicles.
[0023] A differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment, such as... Figure 2 As shown, the method includes:
[0024] S1. Based on the degree of privacy protection needs of each vehicle during vehicle operation in the Internet of Vehicles environment, construct and initialize the discrete Markov state space of each vehicle.
[0025] In this embodiment of the invention, based on the degree of privacy protection needs of each vehicle during vehicle operation in a vehicle-to-everything (V2X) environment, a discrete Markov state space for each vehicle is constructed and initialized. Specifically, this includes using the degree of privacy protection needs of each vehicle as a privacy parameter ε. j To store the vehicle's privacy parameters ε j As a discrete Markov state ω j The discrete Markov states of each vehicle are used to construct a Markov state space Ω = {ω1, ω2, ..., ω}. m}, j∈{1,2…,m}, where m represents the number of discrete Markov states.
[0026] In the Markov state space, the state size increases by the index; the specific selection should be set according to the overall environment of the vehicle-to-everything (V2X) network. Privacy parameter ε j Used for subsequent local differential privacy protection, ε j The smaller the value, the higher the level of protection. j The larger the size, the lower the level of protection.
[0027] S2. Update the state transition probability matrix of the Markov chain of the current vehicle based on the current vehicle's moving speed, the number of surrounding vehicles, and the number of edge servers.
[0028] In this embodiment of the invention, step S2 involves detecting the number of surrounding vehicles and edge servers, and adjusting the transition probability matrix based on its own speed. Specifically, this includes:
[0029] The current vehicle's speed, the number of surrounding vehicles, and the number of edge servers are input into a defined state function to calculate the function value for the current vehicle's transition from its current state to other states; the state function is expressed as:
[0030] f ij (M,V)=a j ·M i -b j ·V i
[0031] Among them, f ij (M,V) represents the function value for the current vehicle to transition from its current state i to another state j, a j and b jHere, M represents the first and second adjustment parameters for state j. The values of these adjustment parameters differ depending on the state. The parameters can be set using the least squares method or based on actual conditions. This function satisfies the requirements for the state function. i V represents the sum of the number of vehicles surrounding the current vehicle in state i and the number of edge servers. i This represents the current speed of the vehicle in the current state i.
[0032] It is understandable that the state function f ij The function (M,V) is used to calculate the function value for transitioning from the current state to other states based on the number of surrounding vehicles, edge servers, and the current speed of the vehicles, thus converting it into probabilities. For example, in a low-privacy-protection state, the more surrounding vehicles and edge servers there are, and the lower the vehicle speed, the larger the function value for transitioning to a high-privacy-protection state, and vice versa; the opposite is true in a high-privacy-protection state. The calculated set of values is normalized using a normalized exponential function to obtain the transition probability matrix. Assume there are 3 Markov states and c target vehicles, i.e., Ω = {ω c1 ,ω c2 ,ω c3}, which correspond to three incremental privacy parameters ε, i.e., ω c1 It offers the strongest level of privacy protection. c3 The level of privacy protection is the weakest.
[0033] S3. Obtain the privacy parameters of the current vehicle based on the current vehicle's state transition probability matrix;
[0034] In this embodiment of the invention, step S3, which involves obtaining the privacy parameters of the current vehicle based on the current vehicle's state transition probability matrix, specifically includes:
[0035] S31. The function value of the current vehicle transitioning from the current state to other states is processed by a normalized exponential function;
[0036] S32. Use the normalization function value to update the transition probability matrix of the Markov chain;
[0037] S33. Select an updated Discrete Markov state in the Discrete Markov state space using a random number, and use the updated Discrete Markov state as the privacy parameter of the current vehicle.
[0038] In this embodiment of the invention, the state function f calculated above can be... ij After processing (M,V), the transition probability matrix is obtained as follows:
[0039]
[0040] in:
[0041]
[0042] Generate a random number in the interval [0,1], and select ω in the state space based on the generated random number. ci That is, the differential privacy parameter ε is obtained. i For example, the current state of the target is ω c1 If the generated random number is less than or equal to p 1,1 Then transition to state ω c1 If the generated random number is greater than p 1,1 Less than p 1,2 Then transition to state ω c2 And so on.
[0043] S4. Based on the current vehicle's privacy parameters, perform local differential privacy protection on the current vehicle's location and generate an obfuscated location for the current vehicle.
[0044] In step S4, the local differential privacy protection of the current vehicle's location is performed based on the vehicle's privacy parameters, and an obfuscated location of the current vehicle is generated. Figure 3 As shown, the specific steps include:
[0045] S41. Based on the current vehicle speed, obtain a confusion range relative to the current position;
[0046] In this embodiment, the allowable offset distance of the current vehicle is calculated based on its current speed, and the confusion range relative to the current position is determined based on the vehicle's actual position and the offset distance; as follows:
[0047] [Ld,L+d]
[0048] Where L represents the current actual position of the vehicle, and the offset distance d = V·t s , t s The parameters are set;
[0049] S42. While ensuring that the probability distribution is 1, select the confused position according to the probability distribution;
[0050] In this embodiment, the probability distribution function is as follows:
[0051]
[0052] Where, f(L) f Let L represent the probability distribution function at the current vehicle confusion location, ε represent the privacy parameter of the current vehicle, and L represent the probability distribution function at the current vehicle confusion location. f This indicates the current location of the vehicle in confusion.
[0053] S43. Use the rejection sampling method to sample within the confusion range to obtain the confusion position L of the current vehicle. f .
[0054] In this embodiment of the invention, step S43, which involves sampling within the obfuscation range using a rejection sampling method to obtain the obfuscated location of the current vehicle, includes:
[0055] S431. Choose a Gaussian distribution as the reference distribution z(x);
[0056] S432. Generate a random number r from 0 to the reference distribution z(x), and then generate a random number u from 0 to the reference distribution z(r);
[0057] S433. If u≤f(r), accept r as the position L after confusion. f Otherwise, reject r and return to step S432 to regenerate a random number;
[0058] Here, f(r) represents the probability distribution function at the current vehicle position r.
[0059] To better illustrate that the local differential privacy protection mechanism of the present invention satisfies the definition of ε-differential privacy, this embodiment analyzes and proves the local differential privacy protection mechanism of the present invention as follows:
[0060] In this embodiment of the invention, the true position is L, the neighboring position is L′, and the confused position is L. f The confusion range is [Ld, L+d], and the confusion probability to the true location is Pr(L). f |L) and the confusion probability Pr(L) to neighboring locations f |L′). Note that the above includes:
[0061] |L′-L|≤2d
[0062] According to the definition of ε-differential privacy, we have:
[0063]
[0064] The above evidence demonstrates that the local differential privacy protection mechanism adopted in this invention satisfies the definition of ε-differential privacy and can be applied in engineering.
[0065] S5. Based on the current vehicle's obfuscated location, calculate the latency generated by the transmission of tasks between the current vehicle and the edge server, and construct a minimum system task offloading latency objective function;
[0066] In this embodiment of the invention, since the vehicle's location affects the latency of the transmission task, this embodiment will focus on explaining the transmission model. To simplify the transmission model, this invention sets the task to be completely offloaded to the edge server for execution. The system task set is T = {t1, t2, ..., t...} n The i-th task is defined as t. i ={U i ,R i}, where U i R represents the amount of data for the i-th task. i This represents the number of CPU cycles required for the edge server's CPU to process each bit; the main parameter of the edge server is f. e This represents the processing power of the edge server, which can be expressed as the number of CPU cycles per second; the main parameter of the vehicle is P. C , representing the vehicle's transmission power; according to Shannon's formula, the transmission rate at which the vehicle sends tasks to the edge server is:
[0067]
[0068] Where B represents the bandwidth between the vehicle and the edge server, and D(L,L) E ) -r D(L) represents the channel coefficients of the vehicle and the edge server. f ,L E ) -r D(L) represents the channel coefficients of the vehicle and the edge server. f ,L E L represents the distance between the vehicle and the edge server. f Indicates the current confusion position of the vehicle, L E The location of the edge server is represented by r, the fading factor of the channel is represented by σ. 2 This indicates the noise power of the channel.
[0069] Therefore, the latency incurred by the terminal device of vehicle c transmitting the data of the i-th task to the edge server e is expressed as:
[0070]
[0071] The latency generated when the i-th task is executed on edge server e is represented as:
[0072]
[0073] Based on the above delay, and with the goal of minimizing the system task unloading delay, the vehicle task unloading objective function is constructed as follows:
[0074]
[0075] Where n represents the number of tasks, the objective function for minimizing the system task unloading latency is constructed by minimizing the unloading latency of all tasks in the system.
[0076] S6. The whale algorithm is used to process the objective function of system task unloading delay, search for the optimal unloading scheme, and perform differential privacy task unloading.
[0077] The system uses the whale algorithm to perform the task unloading process as follows: Figure 4 As shown, the specific steps include:
[0078] S61: Input the set of running vehicles and edge servers;
[0079] S62: Determine the objective function for optimization;
[0080] S63: Initialize a whale population K with a certain number of individuals, where each individual represents a possible pairing scheme, denoted as X;
[0081] S64: Calculate the fitness(X) for each individual whale, i.e., the solution, where fitness is the total latency of the individual;
[0082] fitness(X) = Q(X)
[0083] S65: Update parameters;
[0084] The main parameter 'a' is updated as follows:
[0085]
[0086] Here, a max and a min Here, 'a' represents the maximum and minimum values, 't' represents the current iteration number, and 'T' represents the total number of iterations. Other parameters, such as 'A', depend on a random process and are not considered in this embodiment. The iteration window 't' is set. w And record the number of iterations t in which the best individual remains unchanged. u .
[0087] S66: Generates new individuals and calculates fitness through three strategies: surrounding prey, shrinking the encirclement, and spiraling updates;
[0088] S67: Update the population by adding individuals with fitness higher than all individuals in the old population to the new population and deleting individuals with low fitness, while keeping the population size unchanged.
[0089] S68: Check and update the global optimum: After each iteration, check if a better individual has been found. If found, update the current optimal individual X. beSt ;
[0090] S69: Multi-condition judgment: If the maximum number of iterations is reached, return the optimal individual, i.e., the optimal solution set; otherwise: check whether the optimal individual has reached the threshold of the number of iterations without change. If so, reinitialize all individuals in the population except the optimal individual and return to step S65; otherwise, directly return to step S65.
[0091] In this embodiment, a random restart method is adopted, and the generation of random numbers is determined by using an unchanged iteration number threshold.
[0092] S610: Unload the task based on the obtained optimal solution.
[0093] The embodiments of the present invention can effectively balance the efficiency of the task unloading strategy and the protection of vehicle location privacy, and can dynamically adapt to changes in the task unloading environment.
[0094] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include ROM, RAM, disk, or optical disk, etc.
[0095] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for Markov chain based differential privacy task offloading in a vehicle-to-everything environment, the method comprising: The method specifically includes the following steps: Based on the degree of privacy protection needs of each vehicle during vehicle operation in the Internet of Vehicles environment, the discrete Markov state space of each vehicle is constructed and initialized. Update the state transition probability matrix of the Markov chain of the current vehicle based on the current vehicle's moving speed, the number of surrounding vehicles, and the number of edge servers. Based on the current vehicle's state transition probability matrix, the privacy parameters of the current vehicle are obtained; Based on the current vehicle's privacy parameters, the current vehicle's location is protected locally using differential privacy and a distorted location is generated. Based on the current vehicle's obfuscated location, calculate the latency caused by the transmission of tasks between the current vehicle and the edge server, and construct a minimum system task offloading latency objective function; The whale algorithm is used to process the objective function of system task unloading delay, search for the optimal unloading scheme, and perform differential privacy task unloading.
2. The differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment as described in claim 1, characterized in that, Based on the degree of privacy protection needs of each vehicle during vehicle operation in a connected vehicle environment, the discrete Markov state space of each vehicle is constructed and initialized. Specifically, this includes using the degree of privacy protection needs of each vehicle as a privacy parameter. To store vehicle privacy parameters As a discrete Markov state The discrete Markov states of each vehicle are used to construct a Markov state space. , , This represents the number of discrete Markov states.
3. The differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment according to claim 1, characterized in that, The step of updating the state transition probability matrix of the current vehicle's Markov chain based on the current vehicle's speed, the number of surrounding vehicles, and the number of edge servers specifically includes inputting the current vehicle's speed, the number of surrounding vehicles, and the number of edge servers into a defined state function, and calculating the function value for the current vehicle to transition from the current state to other states; wherein, the state function is expressed as: in, Indicates the current vehicle's current state Transition to other states The function value, and For state The first and second adjustment parameters; Indicates the current state The sum of the number of vehicles surrounding the current vehicle and the number of edge servers. Indicates the current state Set the current vehicle speed.
4. The differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment according to claim 1, characterized in that, The step of obtaining the privacy parameters of the current vehicle based on the current vehicle's state transition probability matrix specifically includes processing the function value of the current vehicle transitioning from the current state to other states using a normalized exponential function, using the normalized function value to update the transition probability matrix of the Markov chain; selecting the updated Discrete Markov state in the Discrete Markov state space using random numbers, and using the updated Discrete Markov state as the privacy parameters of the current vehicle.
5. A differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment according to claim 1, characterized in that, The process of performing local differential privacy protection on the current vehicle's location and generating an obfuscated location for the current vehicle based on the vehicle's privacy parameters specifically includes the following steps: Based on the current vehicle speed, obtain a confusion range relative to the current position; While ensuring that the probability distribution is 1, the confused position is selected according to the probability distribution; The rejection sampling method is used to sample within the obfuscated area to obtain the obfuscated location of the current vehicle. .
6. A differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment according to claim 5, characterized in that, The probability distribution is specifically represented as follows: in, This represents the probability distribution function at the current vehicle confusion location. This indicates the current vehicle's privacy parameters. Indicates the current confusion position of the vehicle. Indicates the current actual location of the vehicle. Indicates the current vehicle's offset distance. , The parameters are set. This indicates the current speed of the vehicle. This indicates the offset range of the current vehicle's actual position.
7. A differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment according to claim 5, characterized in that, The step of sampling within the obfuscation range using the rejection sampling method to obtain the obfuscated location of the current vehicle includes: Choose a Gaussian distribution as the reference distribution z(x); Generate random numbers from 0 to the reference distribution z(x). Then generate a random number between 0 and the reference distribution z(r). ; if ,accept As the position after confusion Otherwise, refuse. Then generate a new random number; in, Let r represent the probability distribution function at the current vehicle position r.
8. A differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment as described in claim 1, characterized in that, The step of constructing a minimum system task unloading latency objective function based on the latency generated by task transmission and unloading between the vehicle and the edge server specifically includes: With the goal of minimizing system task unloading latency, the vehicle task unloading objective function is constructed as follows: in, Indicates the number of tasks. Indicates at the edge server Execute the The latency generated by each task Indicates from vehicle The terminal equipment transmits the first Data from each task is sent to the edge server. The resulting delay Indicates the first The amount of data per task This indicates the number of CPU cycles required for the edge server's CPU to process each bit. This represents the computing power parameter of the edge server. Indicates vehicle The transmission rate at which tasks are sent to the edge server. This indicates the bandwidth between the vehicle and the edge server; This represents the channel coefficients of the vehicle and the edge server. This indicates the distance between the vehicle and the edge server. Indicates the current confusion position of the vehicle. Indicates the location of the edge server. The fading factor represents the channel. Indicates the noise power of the channel. These are the main parameters of the vehicle.
9. A differential privacy task offloading method based on Markov chains in a vehicle-to-everything (V2X) environment according to claim 1, characterized in that, The process of using the whale algorithm to handle the system task unloading delay objective function, searching for the optimal unloading scheme, and performing differential privacy task unloading specifically includes the following steps: The objective function of system task unloading delay is used as the fitness function, and the whale algorithm is used for optimization to obtain the optimal solution set; based on the obtained optimal solution set, task unloading is performed in sequence.