Research Article

Minimum Latency-Secure Key Transmission for Cloud-Based Internet of Vehicles Using Reinforcement Learning

Algorithm 1

Low-latency IoV key distribution management algorithm based on reinforcement learning.
(1)Initialize α, β, Q = 0, s1, k = 1, and K.
(2)Observe the number of vehicles Mk−1 and Mk at time k − 1 and time k, the vehicle speed , the critical update situation in the first D time and the communication security level ρk−1 at time k − 1.
(3)Construct the state of the cluster at the current k time.
(4)Select the key update strategy according to formula (2).
(5)When , do the following:
  (a) Request TA to generate a group key ψ of length ;
  (b) RSU broadcasts the critical update message to cluster vehicle .
(6)Evaluate the current communication security level ρk.
(7)Obtain benefit uk according to equation (3).
(8)Update according to equation (4).
(9)If k = K, end the study; otherwise, k = k + 1, go to step 2.