| Vehicular fog computing(VFC)provides the vehicles with enormous benefits such as the low-latency access to computational resources.However,the development of VFC is hinder by the security and privacy threats,information incompleteness for the user vehicles(UVs)and the long-term constraints of the UVs.In this article,we first develop a blockchain and smart contract-based task offloading framework to preserve the privacy,security,and fairness.Specifically,the Merkle hash tree and smart contracts are utilized to realize "proof-of-computing" and to mitigate the"double-claim" attack,the "free-ride" attack,and the repudiation attack.Then,we aim at minimizing the task offloading delay subject to the long-term constraints of queuing delay and handover cost.A new metric named trustfulness is designed to quantify the vehicular fog servers(VFSs)from the security and physical domain.This paper proposes a QUeuing-delay aware,handOver-aware,and Trustfulness-Aware Upper Confidence Bound(QUOTA-UCB)algorithm by the combined power of machine learning,Lyapunov optimization and subjective logic.We provide rigorous theoretical analysis top prove that the proposed secure and intelligent framework can provide guaranteed security,privacy,fairness and optimality.Finally,extensive simulations are carried out to verify the efficiency of the proposed QUOTA-UCB algorithm. |