The invention provides an Internet of Vehicles-oriented AIGC service incentive contract generation method, a service providing method and devices. AIGC service is provided for a vehicle terminal through a roadside unit
edge server. On the basis of a
reinforcement learning training strategy network, according to real-time state parameters such as task types, RSU loads and communication conditions, an optimal
service contract is dynamically generated, contract parameters comprise a
service time delay upper limit and a basic right and interest value, and the joint utility of consumers and RSUs is maximized. And dynamic reward and punishment is realized through a time
gain factor: the service is completed on time to obtain positive excitation, negative excitation is obtained when time is out, and time
delay constraint is enhanced. According to the method, a Trans-
Diffusion SAC
algorithm is adopted, and a Transform
encoder is combined to capture a long-term state-action dependency relationship, so that a contract generation strategy is optimized, and the
resource allocation efficiency is improved. The method effectively solves the problems of information
asymmetry and insufficient incentive in
the Internet of Vehicles, ensures that the RSU continuously provides high-quality and low-
delay AIGC service, and balances the rights and interests of both parties at the same time.