Vehicle-mounted model safe online federated distillation method for automatic driving

Through the online federal distillation method using blockchain technology and smart contract incentive mechanism in the autonomous driving system, the problems of safety and stability challenges of autonomous driving systems in dynamic traffic environments are solved, and the safe and efficient update of vehicle models is achieved.

CN119623575APending Publication Date: 2025-03-14NANJING TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411724964.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Autonomous driving systems face safety and stability challenges in dynamic and changeable traffic environments, especially safety and efficiency issues in the updating of vehicle models.

Method used

A blockchain-based online federal distillation method is proposed, using a double-chain architecture to simplify identity verification, and improving security and efficiency through smart contract incentive mechanisms.

Benefits of technology

It realizes safe and efficient update of vehicle models, enhances the environmental adaptability and attack resistance of the autonomous driving system, and reduces the computing burden of the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623575A_ABST
    Figure CN119623575A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle-mounted model safe online federated distillation method for automatic driving. The method comprises the following steps: 1) registering; 2) identity verification and authorization; 3) grouping vehicles; and 4) online federated distillation training, including 4.1) federated aggregation, 4.2) knowledge distillation and 4.3) credit value and service charge calculation. According to the method, the double-chain architecture of the main chain and the auxiliary chain avoids repeated identity verification of the vehicle, and potential threats such as Sybil attacks and DDoS attacks are defended with real and credible identities. The federal distillation provides two learning ways of multi-vehicle cooperation and teacher guidance for the vehicle-mounted model, so that all vehicles share the model and local model characteristics are reserved at the same time. The contribution degree and the reputation value are automatically recorded and managed based on an incentive mechanism of the smart contract, so that the vehicle is encouraged to provide a high-quality model and suppress hostile attacks through reasonable reward and punishment. The safety, feasibility and superiority of the method are verified through safety analysis and simulation experiment results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to autonomous driving technology, and in particular to a safe online federated distillation method for autonomous driving. Background Art

[0002] The rapid development of artificial intelligence has greatly promoted the progress of autonomous driving, among which autonomous vehicles are regarded as a revolutionary technological advancement in global transportation[1]. Autonomous driving uses collected sensor data to make intelligent decisions, and uses V2X (Vehicle to Everything) communication to promote information sharing to improve driving safety. It is crucial for vehicles to accurately perceive and distinguish pedestrians, obstacles, road signs, etc. around them for autonomous driving. However, autonomous driving faces a dynamic and changing traffic environment, including sudden changes in weather and roads, as well as uncertain behaviors of vehicles and pedestrians[2]. Unpredictability is a huge challenge to the safety and stability of autonomous driving.

[0003] In autonomous driving based on artificial intelligence, the vehicle task computing model (generally deployed on the vehicle, usually referred to as the "on-board model" or "vehicle model") makes real-time decisions based on the collected perception data to control the vehicle's steering, acceleration, braking and other behaviors.

[0004] The static on-board models stored in vehicles are trained offline from historical data sets and are difficult to cope with the complex changes in traffic environments. In particular, when vehicles enter unknown environments, static models are likely to enter cognitive blind spots, resulting in recognition errors and decision delays. This limitation seriously hinders the practical application and promotion of autonomous driving technology. Federated Learning (FL) [3] [4] provides a distributed collaborative learning method that fully utilizes the heterogeneous perception data of terminal devices to train an aggregate model with strong generalization capabilities. Online federated learning implemented by multiple vehicles allows the on-board models to be dynamically updated to improve their adaptability. However, sharing the aggregate model by multiple vehicles will cause homogeneity problems, which will weaken the ability of a single vehicle to adapt to heterogeneous environments. For this reason, knowledge distillation (KD) was introduced into federated learning [5]. A large-scale and highly knowledgeable teacher model teaches knowledge to a lightweight and less knowledgeable student model. Through teacher guidance and student imitation, knowledge distillation can improve the student's ability without changing the model structure. Combining the advantages of federated learning and knowledge distillation, the paper [6] proposed a federated distillation (FD) method, where each client acts as a student and the average model of all clients acts as a teacher. Federated distillation allows distributed collaborative training and can distill personalized student models.

[0005] As a collaborative training framework that combines federated learning and knowledge distillation, federated distillation provides a new solution for distributed model updating and optimization in autonomous driving. However, the safe and efficient application of federated distillation in autonomous driving still faces many challenges, mainly including the following three issues:

[0006] (1) Security of online federated distillation. In order to adapt to the dynamic traffic environment, the on-board model usually needs to be continuously updated. Limited local data leads to limitations in single-vehicle model training. Online collaborative training is an effective means to improve the training performance of single-vehicle models. Wu et al. [7] proposed a learning method called FedKD, which obtains a shared model through adaptive mutual distillation and dynamic gradient compression technology. Itahara et al. [8] proposed a Logit aggregation method for semi-supervised federated learning based on distillation, aiming to accelerate collaborative training and improve the adaptability of the model to non-IID data. However, these existing methods are centralized offline training on fixed clients and are difficult to directly apply to distributed online training of mobile vehicles. In addition, they do not involve the security of the training process, and the most important thing for autonomous driving is safety. To this end, it is urgent to build a secure framework for online federated distillation to avoid risks during the on-board model update process.

[0007] (2) Efficiency of vehicle safety verification. Blockchain, as a distributed and tamper-proof ledger technology, records and stores transaction data through a peer-to-peer (P2P) network, forming a chain storage structure between multiple nodes. Its decentralized, tamper-proof and traceable characteristics provide a credible behavioral norm for all participants in collaborative training [9]

[10] . Lu et al.

[11] proposed an asynchronous federated learning scheme under the hybrid architecture of Internet of Vehicles and blockchain, integrating the vehicle model into the blockchain and adopting a two-stage verification mechanism to ensure the quality of the model. For time-sensitive services, blockchain-based federated learning may significantly increase the task completion delay due to the increase in verification links. To this end, Ghimire et al.

[12] first used a graph method to represent and analyze the vehicle information dissemination and verification delay in the blockchain, and then introduced informed decision-making to reduce delays and improve operational efficiency. Ayaz et al.

[13] proposed a blockchain consensus mechanism called Proof of Federated Learning (PoFL), which verifies and filters intensive model updates by embedding safety check logic into smart contracts and realizes the trusted selection of relay nodes. Experimental results show that its consensus delay is reduced by 65.2% compared with the baseline method. The above methods provide a reference for blockchain to strengthen model security. However, vehicles frequently enter new communication service areas, which requires them to constantly interact with the blockchain to verify their identities. This will repeatedly interrupt online federated distillation training and significantly increase training latency. How to efficiently implement vehicle identity authentication during federated distillation training is an issue that needs to be explored.

[0008] (3) Incentive mechanism for online federated distillation. Although blockchain technology can enhance the security of online collaborative training, vehicles are still worried about exposing their own information and sensitive data and lack the enthusiasm to participate. At the same time, repeated blockchain verification and consensus will increase the computing burden of vehicles and affect service efficiency. Researchers have designed various incentive mechanisms to improve the enthusiasm of participating vehicles. Lin et al.

[14] designed a two-stage incentive mechanism based on contracts to solve the problems of intermittent connection, low initiative and resource constraints of vehicles during federated training. Compared with the baseline federated learning based on blockchain, the experimental results show that the convergence speed is increased by 30.6% and the energy consumption is reduced by 50.3%. Hu et al.

[15] proposed an incentive mechanism called FedBeam, which uses a weighted Beta reputation update mechanism on a two-layer Stackelberg game model to incentivize vehicles to provide high-quality models. He et al.

[16] proposed a long-term incentive mechanism based on two-period dynamic contracts, which adaptively designs the optimal contract terms according to the time-varying privacy preferences of vehicles to enhance service willingness. As a new model update paradigm, it is necessary to learn from existing incentive mechanisms to design corresponding reward and punishment mechanisms for online federated distillation. Summary of the invention

[0009] In response to the above problems, the present invention proposes a distributed online federated distillation method, which aims to improve the environmental adaptability and attack resistance of the vehicle and create a safe, reliable and efficient autonomous driving ecosystem.

[0010] The method for secure online federated distillation of an on-board model for autonomous driving of the present invention comprises the following steps: 1) registration; 2) identity authentication and authorization; 3) vehicle grouping; 4) online federated distillation training, which is divided into 4.1) federated aggregation, 4.2) knowledge distillation and 4.3) reputation value and service fee calculation steps.

[0011] This method uses a vehicle grouping strategy and reputation mechanism under a dual-chain architecture combining the main chain and the auxiliary chain to simplify the identity authentication process and ensure the security of model updates. In addition, the teacher model is deployed locally in the vehicle to meet the personalized needs of the on-board model.

[0012] The dual-chain architecture of the main and auxiliary chains of this method avoids repeated identity verification of vehicles, and defends against potential threats such as Sybil and DDoS attacks with real and trusted identities. Federated distillation provides two learning paths for vehicle models: multi-vehicle cooperation and teacher guidance, so that all vehicles can share models while retaining local model characteristics. The incentive mechanism based on smart contracts automatically records and manages contribution and reputation values ​​to encourage vehicles to provide high-quality models and suppress malicious attacks through reasonable rewards and punishments.

[0013] The main contributions of the present invention are as follows:

[0014] (1) We propose a blockchain-based online federated distillation framework to enhance the feasibility and flexibility of on-board model updates and screen out vehicles with poor historical performance. Under this framework, vehicles in different regions achieve secure collaborative training through V2I (Vehicle-to-Infrastructure) communication.

[0015] (2) Design a dual-chain architecture that combines the main chain and the auxiliary chain to solve the problem of repeated identity authentication caused by cross-domain vehicles. The auxiliary chain uses a lightweight consensus algorithm to quickly verify identity and data; the main chain synchronizes the verification results of the auxiliary chain and is responsible for recording and tracking the entire process of model updates to ensure traceability and integrity.

[0016] (3) Design an incentive mechanism based on smart contracts [1 7], adopt a fair reward strategy to implement pricing for model update quality, and set a reputation value to resist malicious attacks. Security analysis and simulation results prove the security, feasibility and superiority of the proposed method. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 Represents a blockchain-based autonomous driving system;

[0018] Figure 2 Represents the account registration process;

[0019] Figure 3 Represents the authentication process;

[0020] Figure 4 Represents the training process of blockchain-based online federated distillation;

[0021] Figure 5 It shows the processing flow of FD request under dual chain architecture;

[0022] Figure 6(a) to Figure 6(f) Respectively represent the convergence curves of three baseline methods (Baseline-1, Baseline-2 and Baseline-3) and the proposed method (Proposed) under different data distributions (α is 0.5 or 1) on the CIFAR-10 and CIFAR-100 datasets;

[0023] Figure 7(a) to Figure 7(d) Respectively represent the convergence curves of four vehicles on the CIFAR-100 training set using three baseline methods (Baseline-1, Baseline-2 and Baseline-3) and the proposed method of the present invention;

[0024] Figure 8(a) and Figure 8(b) show the average classification accuracy of the four methods for eight vehicles on the CIFAR-10 and CIFAR-100 datasets, respectively;

[0025] Fig. 9 Represents the convergence curve of mixed data on the CIFAR-10 dataset;

[0026] Fig.10 It shows the comparison of average verification time under different numbers of RSUs;

[0027] Figure 11(a) and Figure 11(b) show the vehicle participation rate versus target classification accuracy on the CIFAR-10 and CIFAR-100 datasets, respectively;

[0028] Fig.12 It shows the impact of different security mechanisms on target classification accuracy on the CIFAR-10 dataset;

[0029] Figure 13(a) to Figure 13(c) Respectively represent the impact of different (high, medium and low) reputation value states on the average reward value;

[0030] Figure 14(a) shows the probability density function (PDF) of the average reputation value under different penalty parameters;

[0031] FIG14( b ) shows the cumulative distribution function (CDF) of the average reputation value. DETAILED DESCRIPTION

[0032] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0033] 1 Overview

[0034] In order to optimize the intelligent decision-making capabilities of vehicles in dynamic traffic environments, autonomous driving systems need to assist vehicles in different areas in online collaborative training of on-board models. However, many trust, privacy, and security issues hinder the large-scale promotion of this service. Malicious vehicles may transmit tampered or erroneous updated models to disrupt collaborative training. In addition, possible privacy leaks will reduce the willingness of vehicles to participate.

[0035] To this end, the present invention proposes an online federated distillation method based on blockchain to create a trusted online model update ecosystem that adapts to high mobility while resisting Sybil attacks, poisoning attacks and DDoS attacks. Under the dual-chain architecture combining the main chain and the auxiliary chain, the present invention designs a vehicle grouping strategy and a reputation mechanism to simplify the identity authentication process and ensure the security of model updates. In addition, the teacher model is deployed locally in the vehicle to meet the personalized needs of the on-board model.

[0036] Security analysis and simulation experimental results verify the safety, feasibility and superiority of the proposed method.

[0037] 2 System Model and Problem Description

[0038] This section first introduces the blockchain-based online federated distillation framework, and then introduces the threat model and design goals. Table 1 lists the main symbols and variables.

[0039] Table 1 Symbols and variables

[0040]

[0041]

[0042] 2.1 System Model

[0043] like Figure 1 As shown in Figure 1, the blockchain-based online federated distillation framework includes five main entities: Registration Authority (RA), Operators, Roadside Unit (RSU), Base Station (BS), MEC server (MEC), and Vehicle. The roles of these six entities are introduced as follows:

[0044] ·Registration Authority: As an authorized auditing authority, RA is responsible for identity management of vehicles joining the platform and is responsible for account registration. RA records vehicle identity and authorization information by maintaining a repository of vehicle certificates, and installs a blockchain client to maintain a global ledger containing all payment records. Only vehicles authorized by RA signatures are eligible to obtain or send data. Each payment record contains transaction and account information. Transaction information is public, while accounts are anonymous to prevent privacy leaks. RA can obtain vehicle account information.

[0045] Operators: Provide network infrastructure such as RSU, base stations and MEC servers. All operators follow the unified rules and standards deployed on the blockchain. It records and tracks V2I information interactions through the blockchain.

[0046] Roadside Unit: It is a communication device deployed by operators along the road, acting as a medium for communication between vehicles and base stations. RSU collects vehicle data and sends it to the base station to assist the vehicle in completing various on-board tasks.

[0047] Base stations: Base stations deployed by operators are connected by optical fibers. They provide communication and computing power guarantee for online collaborative training of vehicles in different regions.

[0048] MEC server: It is a high-performance computing device deployed at the base station, which can provide low-latency computing services for vehicles.

[0049] Vehicle: An entity with an on-board unit (OBU) [1 8]. It collects environmental data through a sensor suite and uses model reasoning to achieve accurate environmental understanding, formulate reasonable driving strategies, and perform efficient driving operations. Each vehicle is equipped with a trusted platform module (TPM) to store private information such as keys and digital certificates. In addition, each vehicle broadcasts information such as speed and direction (vehicle status information) through a beacon mechanism [1 9] and also acts as a relay to transmit data to neighboring vehicles.

[0050] 2.2 Threat Model

[0051] The open and transparent blockchain has privacy and security issues. The blockchain-based autonomous driving system has the following threats:

[0052] Privacy leakage: Since transaction records are shared among traders, attackers can infer the inference results of the onboard model. In addition, attackers may also collude with selfish vehicles to obtain private information of other vehicles.

[0053] Model stealing attack: Since multiple vehicles share some common vehicle models, attackers can use model output to infer model information, resulting in sensitive information leakage.

[0054] Model tampering attack: During the collaborative training process, the attacker injects malicious data into the perception data or model parameters to affect the learning effect of other models, causing them to perform poorly in actual applications or act according to the attacker's intentions.

[0055] Replay attack: The attacker intercepts the model information transmitted between the vehicle and the RSU and replays it at the appropriate time to trick the vehicle into making decisions based on outdated information.

[0056] Man-in-the-middle attack: The attacker tampers with the model information transmitted between the vehicle and the RSU, causing the vehicle to receive incorrect model parameters. This may cause navigation errors or driving decision errors.

[0057] Sybil attack: Since single-bike transactions rely on one account, attackers may virtualize multiple account identities and use different accounts to send model parameters to the same RSU or base station to interfere with online collaborative training.

[0058] DDoS attack: When multiple malicious vehicles attack a target vehicle or RSU, the attacked equipment cannot be used normally, causing serious economic losses.

[0059] 2.3 Design Goals

[0060] In order to build a secure online federated distillation framework for autonomous driving, the solution of the present invention should achieve the following design goals:

[0061] Credibility: 1) Vehicles should provide credible and reliable (on-board) model parameters. When teaming with other vehicles, vehicles should be able to verify the credibility of the partner vehicles and avoid collaborative training with vehicles with poor historical performance. 2) Model parameters sent by RSU should be authorized and verifiable. 3) Operators need to ensure the traceability of model parameters and prevent these parameters from being maliciously tampered with during transmission.

[0062] Security: 1) The system should prevent the leakage of vehicle privacy information and avoid sensitive information such as perception data and model parameters from being obtained by malicious entities. 2) The system should have the ability to track abnormal or attacking vehicles to prevent the propagation and diffusion of unsafe model parameters. 3) The system should have sufficient defense mechanisms to resist security threats such as model theft and tampering.

[0063] Fairness: The system should give fair rewards to vehicles that deliver model parameters to encourage vehicles to actively participate in collaborative training.

[0064] Feasibility of high-speed movement: 1) Vehicles participating in online training should consider the duration and achievable transmission rate of the V2I connection to accommodate the fast movement or frequent switching of cooperative vehicles.

[0065] 3 Secure and Scalable Online Federated Distillation Methods

[0066] In the context of a blockchain-based autonomous driving system, this section discusses a secure and scalable online federated distillation scheme, including: registration, fast authentication and authorization, vehicle grouping, online federated distillation training, and security analysis.

[0067] 3.1 Registration

[0068] Vehicles use V2I to achieve data transmission and content transactions across RSUs and base stations. However, potential data leakage and malicious attacks threaten model security, such as malicious tampering or unauthorized access to the on-board model. To this end, vehicles need to register an account with RA in advance to obtain a unique and legal identity. Vehicle i submits the generated identity, public key, account ID, private key, reputation value, address and other information to RA for identity registration and information verification. The vehicle account can be represented as Includes a statement of the legitimacy of identity, reputation, and address on the blockchain.

[0069] After vehicle i is registered, a pair of public and private keys is generated as credentials for interacting with other entities. Figure 2 Vehicle i will be the public key and identity information to RA. After RA verifies the identity of vehicle i, it uses the private key right When interacting with RSU, vehicle i will and Sent to RSU. RSU uses RA's public key To verify and account i .r i , to determine the legality of the vehicle. Legal vehicles i can transmit data and trade content with RSU and share payment records. Payment records include public transaction information and private account information, where the account information is maintained by RA.

[0070] 3.2 Fast Authentication and Authorization

[0071] Vehicles need to continuously authenticate and authorize when switching frequently, which will inevitably increase the delay in task completion. The dual-chain structure of the joint main chain and auxiliary chain can alleviate the inefficiency caused by frequent verification. The base station is responsible for maintaining the main chain and saving the vehicle's privacy information and keys. The RSU is responsible for maintaining the auxiliary chain and quickly verifying the vehicle's identity and authorization. Assuming that vehicle i maintains communication with base station n through RSUm, Figure 3 The detailed process of vehicle cross-region verification and authorization is given:

[0072] Step 1 Based on the verification information recorded by the auxiliary chain, RSUm determines whether vehicle i needs complete identity verification. If verification is required, RSUm notifies other RSUs to jointly generate a verification strategy. The verification strategy clearly specifies specific verification requirements, including account verification, reputation check, and privacy information processing rules. The auxiliary chain obtains vehicle privacy information in the form of hash values ​​from the main chain. According to the verification strategy sent by RSUm, vehicle i generates and sends verification information to RSUm, including digital signatures, accounts, and hashed privacy information.

[0073] Step 2 RSUm initially verifies the identity of vehicle i. The core verification is to match the hash value of the main chain. RSUm sends the preliminary result to base station n for further verification. Base station n feeds back the verification result to RSUm and authorizes vehicle i. The main chain records the authorization token, which contains the identity information account i , verify timestamp t n,m,i and hash value H i .

[0074] Step 3: The auxiliary chain updates the verification result and sends it to vehicle i. The verified vehicle i establishes a trust connection with base station n and obtains an authorization token. The auxiliary chain records the verification time of vehicle i to decide whether to verify again when crossing zones.

[0075] Step 4 After vehicle i enters the service area of ​​RSUm+1 (or base station n+1), if the auxiliary link (or main link) determines the time interval Δt n,m+1,i =t n,m+1,i -t n,m,i (or Δt n+1,m+1,i =t n+1,m+1,i -t n,m,i ) is greater than the preset threshold Δt (max) , the vehicle needs to be verified and authorized again; otherwise, verification and authorization are postponed. When the time accumulates to the threshold Δt (max) , the auxiliary chain (or main chain) will re-trigger the verification.

[0076] 3.3 Vehicle Grouping Strategy

[0077] After multiple vehicles initiate federated distillation requests, the main chain will record these requests. Other vehicles download the requests from the main chain and decide whether to participate. After all participating information is written to the main chain, the main chain notifies the participating vehicles to start online federated distillation. The auxiliary chain verifies the identity information and authorization tokens of the participating vehicles to ensure that they have the authority to receive and upload data.

[0078] Each vehicle can only participate in one group of collaborative training, so the main chain needs to reasonably group vehicles based on the following three factors. (1) Vehicle information includes both physical characteristics such as brand, model, hardware configuration, and driving status such as geographic location, speed, and direction. Heterogeneous vehicles carrying the same model can also work in the same group. (2) Different vehicles undertake different on-board tasks. For example, some vehicles focus on obstacle detection and traffic perception, while others focus on path navigation and multimedia playback. Group training of vehicles handling the same tasks is more conducive to sharing knowledge and accelerating convergence. (3) High-reputation vehicles can provide high-quality data and accurate inference results. Giving priority to these vehicles can ensure the stability of collaborative training.

[0079] According to vehicle information, task type and reputation value, the main chain uses the K-means algorithm [2 0] to divide the participating vehicles in different areas into G groups, whose index set is The vehicle index set of group g is vehicle The index sets of the connected RSU and base station are and Its local dataset is where x i,k represents the input sample, Represents the classification label, Represents the output vector. Taking group g as an example, the training process of online federated distillation is described in detail below.

[0080] 3.4 Online Federated Distillation Training

[0081] Because they are distributed in different areas and store heterogeneous data, participating vehicles cannot use unified model parameters and local data for federated distillation training. To this end, all vehicles in group g uniformly download the initial model Θ0 and its parameters θ0 required for this training from the model pool of the main chain. Set up the student model Θ i,0 ←Θ0 and its parameter θ i,0 ←θ0 (the initial model is used as the student model, and the initial model parameters are used to assign initial values ​​to the student model parameters). At the same time, an unparameterized teacher model is used for knowledge distillation. Figure 4 Detailed steps for online federated distillation training are given.

[0082] Step 1 The federated aggregation auxiliary chain sends a request for a new round of federated aggregation to the main chain. Once the main chain confirms, the corresponding data block status on the auxiliary chain is updated to Confirmed. The auxiliary chain uploads and records the vehicle identity, model parameters and timestamp to the distributed ledger of the main chain. Let the model parameter of vehicle i in round l-1 be θ i,l-1 , the main chain calculates θ i,l-1 With aggregation parameters The approximation of To set the weight factor

[0083]

[0084] Therefore, the weighted federated average is used to calculate the aggregation parameter of round l

[0085]

[0086] where θ i,l is the model parameter of round l. The main chain will aggregate the model Parameters Sent to RSU so that the vehicle can download from the auxiliary chain Implement distillation training.

[0087] Step 2 Knowledge Distillation Vehicle i passes download Parameters For teacher models and the student model Θ i,l , vehicle i calculates cross entropy loss and distillation loss respectively

[0088]

[0089]

[0090] in Represents the input sample x i,k A collection of express xi,k The output vector of the distillation temperature coefficient τ is used to soften Next, it calculates the federated distillation loss

[0091]

[0092] The hyperparameter κ1,1-κ1 weighs the weight of the two losses. The gradient descent method [2 1] is used to update the student model parameters

[0093]

[0094] Where η represents the learning rate.

[0095] Note that the sensors of vehicle i will continuously collect new data These unlabeled data are stored in the dataset After accumulating a certain amount of unlabeled data, vehicle i starts semi-supervised distillation to adapt to environmental changes. At this time, only the soft labels generated by the teacher model are used to guide the student model, and the distillation loss function of formula (4) is changed to

[0096]

[0097] in and Respectively and θ i,l The output vector of . Therefore, the federated distillation loss of formula (5) is changed to

[0098]

[0099] The hyperparameter κ2,1-κ2 weighs the weight of the two losses. The parameter update formula of the student model is

[0100]

[0101] Vehicle i will update the parameter θ i,l+1 and its hash value H(θ i,l+1 ) is uploaded to RSUm, and RSUm calculates θ i,l+1 The hash value H′(θ i,l+1 ). H′(θ i,l+1 ) and H(θ i,l+1 ) is equal to θ i,l It was not tampered with when it was uploaded. The auxiliary chain is then θ i,l+1 Create a new pending data block. Figure 5 The detailed process of processing a federated distillation request using the dual-chain architecture is shown.

[0102] Step 3 Reputation and Service Fee Calculation The reputation value records the vehicle’s contribution to each round of federated distillation. Assume that the model parameter θ of vehicle i i.l With aggregate model parameters The deviation is and the deviation threshold is d0, the reputation value update formula of vehicle i is

[0103]

[0104] where r max represents the maximum reward value, r penalty represents the penalty value, β1 and β2 represent the adjustment parameters.

[0105] In order to encourage vehicles to submit high-quality model parameters, the system sets a service fee as a reward. When vehicle i participates in collaborative training, it needs to pay a deposit E to the system. i . The system evaluates the contribution of the first round

[0106]

[0107] Where σ represents the adjustment parameter. is the credit value threshold and c0 is the unit service price. The system reward value update formula is:

[0108]

[0109] where c0(γr i,l +(1-γ)q i,l ) represents the service fee paid by the system, E i a% represents the deducted deposit, and a% represents the deduction ratio.

[0110] In order to achieve transparent execution and trust guarantee of the above incentive mechanism, the smart contract automatically records the reputation value, contribution and reward value of the vehicle in each round on the main chain, and determines the payment of service fees and deposit deduction according to the terms of the contract. The main chain saves all records by timestamp to ensure that the vehicle has a real and verifiable reputation and contribution history.

[0111] In summary, the blockchain-based online federated distillation training in this paper is summarized as Algorithm 1.

[0112]

[0113] 3.5 Security Analysis

[0114] This section explains how to achieve the design goals of trustworthiness, security, and fairness against different types of attacks. The security of the blockchain-based online federated distillation scheme is analyzed in the autonomous driving scenario.

[0115] Trusted entity interaction: Authorize vehicle i to obtain information signed by RA Other vehicles can pass Verify the legitimacy and authenticity of the vehicle i’s identity. RSU evaluates the vehicle’s credibility based on its historical reputation value to prevent malicious vehicles from participating in the collaboration, thus ensuring that all participating vehicles are credible.

[0116] Trusted model propagation: The blockchain records each round of parameter updates of the on-board model. RSU uses the public key and hash value to verify the authenticity of the model update to ensure that the model parameters have not been tampered with. The smart contract sets a pre-deposit mechanism, that is, the vehicle must pay a deposit to participate in the training. The incentive mechanism based on the smart contract can effectively prevent the spread of illegal model parameters.

[0117] Security against Sybil attacks: Vehicles must provide identity information signed by RA to prevent malicious vehicles from creating multiple fake accounts, forging identities to participate in training and tampering with model parameters. RA fundamentally prevents the impact of Sybil attacks on federated distillation training by tracking and blocking these fake accounts.

[0118] Security against poisoning attacks: The blockchain records every round of model updates and vehicle transactions. Any attempt to maliciously tamper with the model (i.e., poisoning attacks) can be tracked and traced.

[0119] Security against DDoS attacks: Vehicles are required to deposit a deposit before participating in training, and malicious vehicles pay a high cost for attacking. This will reduce the possibility of them sending fake data or a large number of requests, effectively preventing DDoS attacks.

[0120] Non-repudiation: Vehicle behavior is recorded on the main chain, and any vehicle that spreads malicious information or false model parameters can be tracked. The system sets up incentive mechanisms in smart contracts to prevent account fraud.

[0121] 4 Experimental results analysis

[0122] In order to evaluate the online training performance and safety of the proposed method, this experiment deployed an autonomous driving network environment consisting of a MEC server, 20 base stations and 30 vehicles in a 5km×5km square area. The vehicles were clustered into 3 groups according to the K-mean algorithm, and ResNet-8 was selected as the target classification model. The two authoritative datasets CIFAR-10[2 2] and CIFAR-100[2 2] were used as image libraries, containing 60,000 32×32 RGB images, respectively, of which 54,000 (90%) and 6,000 (10%) images were used for training and testing. This paper samples the dataset according to the Dirichlet distribution Dir(α) and uses it as the local data of the vehicle. The smaller the concentration parameter α, the higher the data heterogeneity. The proposed method uses the SDG optimizer to train the model under the PyTorch framework. The server is equipped with an Intel i9-13900k CPU and an NVIDIA GeForce RTX 4090 GPU. Some other parameter settings are shown in Table 2.

[0123] Table 2 Parameter settings

[0124] parameter Numeric Learning rate η 0.05 Distillation loss coefficient 0.1 Training batch size 64 <![CDATA[Reward parameter β1]]> 1 <![CDATA[Penalty parameter β2]]> [1,1.5] Dirichlet distribution α [0.1,1]

[0125] In order to analyze the impact of different functional modules on the overall performance, the proposed methods are divided into the following five categories:

[0126] 1) Proposed-1: Only local data and its hard labels are used for model training.

[0127] 2) Proposed-2: Use mixed local and newly sampled data for unsupervised training.

[0128] 3) Proposed-3: Use only a single chain for vehicle authentication and authorization.

[0129] 4) Proposed-4: Omit the vehicle grouping screening in Section 3.3 and the reputation value mechanism in Section 3.4.

[0130] 5) Proposed-5: Adopt the vehicle grouping screening in Section 3.3 and omit the reputation value mechanism in Section 3.4.

[0131] For the convenience of comparison and analysis, three benchmark methods were selected:

[0132] 1) Baseline-1: FedAvg[2 3] is used for federated aggregation, omitting the knowledge distillation in Section 3.4.

[0133] 2) Baseline-2: FedADAM [2 4] is used to adaptively optimize federated aggregation, omitting the knowledge distillation in Section 3.4.

[0134] 3) Baseline-3: FedAvg[2 3] is used for federated aggregation and the knowledge distillation in Section 3.4 is adopted.

[0135] 4.1 Convergence Analysis

[0136] The first set of experiments analyzes the impact of heterogeneous local data on model convergence. Based on the randomly set vehicle information, task type, and vehicle reputation value, the main chain excludes vehicles with poor historical performance, selects 27 vehicles from 30 vehicles, and uses the K-means algorithm to divide them into 3 groups: 8 vehicles, 9 vehicles, and 10 vehicles. For ease of explanation, 8 vehicles are grouped to show the results of federated distillation training. Figure 6(a) to Figure 6(f) Each vehicle is trained for 100 rounds using the training sets of CIFAR-10 and CIFAR-100, and the average loss curves of the four methods for 8 vehicles under different Dirichlet distribution parameters α (0.5 or 1) are given. Baseline-1 and Baseline-2 use FedAvg and FedADAM aggregation parameters respectively, which can easily make the shared model affected by uneven data distribution and reduce the convergence speed. Baseline-3 uses the soft labels of the teacher model to guide the student model training, which is easier to adapt to uneven data distribution than Baseline-1, but the average aggregation makes its convergence speed and accuracy inferior to Proposed. In addition, on the training set of CIFAR-100, when the local data difference is the largest (α=0.1), the average loss of the four methods decreases by 1.09, 1.13, 1.16 and 1.21 respectively. Proposed still maintains the fastest decline trend, and the average loss in the stable stage is significantly lower than other baseline methods. This shows that federated distillation still has advantages when the data quality is high. Proposed uses the aggregated model as the teacher model and uses local data to guide the student model training, which enables the student model to learn shared knowledge while maintaining personalization. Comparing the convergence curves of Figure 6(a), Figure 6(d) and Figure 6(c), Figure 6(f), Proposed shows a faster decline trend than Baseline-1. This is because the student model adapted to the local data can reach the stable state of training earlier.

[0137] When α = 0.1, Figure 7 selects the four cars with the farthest distance from the eight cars in Experiment 1 and gives the convergence curves of the four methods on the CIFAR-100 training set to more intuitively compare the training effects. Similar to the experimental results in Figure 6, the convergence curves of the four cars using the Proposed training model all converged in about 42 rounds, while the other methods converged in about 60 rounds. This once again verifies that Proposed can train a better model for each car.

[0138] Corresponds to Figure 6(a) to Figure 6(f), Figure 8(a) and Figure 8(b) show that the average classification accuracy of the four methods for 8 vehicles on the CIFAR-10 and CIFAR-100 test sets increases as α increases. When α = 1, the four methods achieve the highest classification accuracy on both test sets, which are 76.5%, 77.4%, 77.9%, 79% and 39.1%, 40.2%, 41.0%, 42.5%, respectively. This demonstrates the superiority of the proposed online collaborative training under different data distributions.

[0139] The second set of experiments analyzes the impact of new sampled data on federated distillation training. When α = 1, Fig. 9 The average loss curves of three methods for eight vehicles on the CIFAR-10 dataset are given. Before collecting new data (0-50 epochs), the average loss of the three methods using local data training quickly decreased from 1.48 to 0.44. The vehicle collects new perception data and adds it to the training set to enhance the adaptability of the model. However, the new data has no hard labels, which makes it impossible to implement supervised training. Even when driving to a new environment, Proposed-1 still uses the local data it carries for online training, resulting in an average loss higher than Proposed-2 and Proposed after 40 rounds. Proposed-2 attempts to use unsupervised learning for new data training, but the decrease in average loss is limited. By introducing soft labels through knowledge distillation, Proposed achieves rapid convergence of new data training. At the same time, soft labels have a smoother probability distribution than hard labels, which can reduce the impact of the difference between new and old data on federated distillation training and adapt to the characteristics of new data more quickly.

[0140] 4.2 Vehicle Verification Time Comparison

[0141] The third group of experiments compared the efficiency of identity authentication under dual-chain and single-chain architectures. Proposed-3, which uses a single chain, requires vehicles in the three groups to verify their identities at each RSU, which causes the average verification time of the 27 vehicles to increase linearly with the increase in the number of RSUs, from 200ms to 2000ms. Proposed, which uses a dual chain, only requires vehicles to verify their identities when they time out within the domain or cross domains and exceed the time threshold, and its average verification time only increases from 50ms to 550ms. When the number of RSUs is 20, the verification time of the dual chain is about 25% of that of the single chain. This division of labor and cooperation between the main chain and the auxiliary chain reduces the burden of vehicle verification and communication, allowing it to focus on completing on-board tasks while ensuring safety.

[0142] 4.3 Impact of vehicle participation rate on performance

[0143] In order to analyze the impact of the number of participating vehicles on performance, the fourth group of experiments determines the number of vehicles in the three groups by the participation rate. As the participation rate increases, Figures 11(a) and 11(b) show that the average classification accuracy of the four methods for all vehicles increases. The classification accuracy of Proposed is better than Baseline-1, Baseline-2, and Baseline-3 on both datasets. When the participation rate is 0.7, its average accuracy reaches 80.11% and 45.40%, exceeding Baseline-1's 78.12% and 43.23% and Baseline-2's 78.54% and 43.85%. These results show that Proposed can not only enhance the generalization of the model by integrating the different features of multiple vehicles, but also use local data to implement distillation teaching to maintain model personalization. This advantage becomes more significant as the number of vehicles increases. In contrast, Baseline-1 and Baseline-2 only use the federated aggregation model to update the on-board model. Even if the number of participating vehicles increases, the classification accuracy is low because it is not adapted to heterogeneous data. At the same time, the performance improvement of multi-vehicle cooperation without teacher guidance is limited. Although Baseline-3 introduces teacher guidance, the average federated aggregation does not take into account the contribution size of the vehicle, resulting in a cooperative performance worse than that of Proposed. This shows that Proposed improves the classification accuracy of all vehicles by dually optimizing federated aggregation and knowledge distillation.

[0144] 4.4 Impact of security mechanisms on performance

[0145] The fifth group of experiments analyzes the impact of different security mechanisms on performance under malicious attacks. The initial reputation value and reputation threshold of the vehicle are set to 0.6 and 0.3 respectively. Vehicles with a reputation value lower than 0.3 are marked as malicious vehicles. The learning rate of potential malicious vehicles is randomly selected between 0.05 and 0.01. Fig.12In the 30-vehicle dataset, when the number of malicious vehicles increases, Proposed-4 does not filter vehicles by vehicle information, task type, or reputation value, and directly trains, making it easy for malicious vehicles to mix in and disrupt the training process. Its average classification accuracy on the CIFAR-10 dataset drops from 72% to 58%. Proposed-5 improves Proposed-4 by implementing group screening, trying to exclude some potential malicious vehicles based on historical behavior before starting training. However, some highly concealed malicious vehicles are difficult to identify. Proposed-5, which does not introduce a reputation mechanism, cannot exclude attacks from these vehicles during training. When there are 2 malicious vehicles in each group, Proposed-5 weakens the damage of malicious vehicles through weighted aggregation, making the average accuracy close to Proposed; but when there are 6 malicious vehicles in each group, Proposed-5 is difficult to resist attacks, and its average accuracy drops to 62%, which is lower than Proposed's 72%. Because of the simultaneous use of group screening and reputation mechanism, Proposed still shows strong robustness when the number of malicious vehicles increases.

[0146] 4.5 Impact of different reputation status on rewards

[0147] In order to study the change of reward value under different reputation status, the vehicle reputation status is divided into three categories: high reputation 0.7-1.0, medium reputation 0.4-0.7 and low reputation 0-0.4. In order to observe the change trend of the proposed reward value, the fifth group of experiments set the initial reputation value of the three groups of vehicles in Experiment 3 to 0.6. As the training continues, Figure 13(a) to Figure 13(c) It shows that the reputation values ​​of the three groups of vehicles gradually diverge, and the number of vehicles converted to high, medium, and low reputation states is 3:3:2, 3:3:3, and 4:3:3, respectively. The average reward values ​​of the three groups of high and medium reputation vehicles are gradually increasing, while the average reward value of low reputation vehicles has remained at a low level, and even stagnated after 40 rounds. This shows that the update model provided by the low-reputation vehicle deviates greatly from the aggregation model, and its low contribution to federated learning reduces its reward. Once the reputation value is less than the threshold, these vehicles can no longer receive rewards. High-reputation vehicles can provide better update models than medium-reputation vehicles, so their reward value growth rate is higher than that of medium-reputation vehicles. Vehicles receiving high rewards help stimulate their willingness and enthusiasm to participate in cooperation. At the same time, high rewards drive the increase in reputation value, which will stimulate more high-reputation vehicles to participate in cooperation.

[0148] Record Figure 13(a) to Figure 13(c)Figure 14(a) shows the average reputation value of high, medium, and low reputation vehicles in every 10 rounds. Figure 14(a) gives the probability density function (PDF) of the average reputation value under different penalty parameters. As the penalty parameter increases from 1 to 1.5, the reputation value distribution curve moves to the left. When β2 = 1, some potentially malicious vehicles can still obtain a high reputation value (about 0.58); but when β2 = 1.5, the reputation value of most vehicles is less than 0.45. Figure 14(b) shows that the cumulative distribution function (CDF) of the average reputation value moves to the left as the penalty parameter 1 increases. This is because increasing the penalty parameter increases the cost of attack and makes it difficult to obtain high rewards. The reputation value mechanism can effectively resist attacks and regulate behaviors, and enhance the security of federated distillation training.

[0149] in conclusion

[0150] This paper proposes an online federated distillation framework based on blockchain, which aims to solve the adaptability and security problems of autonomous driving in a changing environment. The dual-chain architecture of the main and auxiliary chains avoids repeated identity verification of vehicles, and defends against potential threats such as Sybil and DDoS attacks with real and trusted identities. Under this architecture, federated distillation provides two learning paths for on-board models: multi-vehicle cooperation and teacher guidance, so that all vehicles share models while retaining local model characteristics. In addition, the incentive mechanism based on smart contracts automatically records and manages contribution and reputation values ​​to encourage vehicles to provide high-quality models and suppress malicious attacks through reasonable rewards and punishments. The proposed security analysis and simulation results confirm the feasibility and efficiency of this method. Future work needs to further study distributed collaborative learning based on alliance chains to further optimize the versatility and scalability of the system.

[0151] References

[0152] [1]Chen J,Sun J,Wang G.From unmanned systems to autonomousintelligent systems[J].Engineering,2022,12:16-19.

[0153] [2]Zhao J, Zhao W, Deng B, et al. Autonomous driving system: Acomprehensive survey[J]. Expert Systems with Applications, 2023:122836.

[0154] [3]Yang Z,Chen M,Wong K K,et al.Federated learning for 6G:Applications,challenges,and opportunities[J].Engineering,2022,8:33-41.

[0155] [4]Zhang T,Gao L,He C,et al.Federated learning for the internet ofthings:Applications,challenges,and opportunities[J].IEEE Internet of ThingsMagazine,2022,5(1):24-29.

[0156] [5]Wang L,Yoon K J.Knowledge distillation and student-teacherlearning for visual intelligence:Areview and new outlooks[J].IEEEtransactions on pattern analysis and machine intelligence,2021,44(6):3048-3068.

[0157] [6]Lin T,Kong L,Stich S U,et al.Ensembledistillation for robust modelfusion in federated learning[J].Advances in neural information processingsystems,2020,33:2351-2363.

[0158] [7]Wu C,Wu F,Lyu L,et al.Communication-efficient federated learningvia knowledge distillation[J].Nature communications,2022,13(1):2032.

[0159] [8]Itahara S,Nishio T,Koda Y,et al.Distillation-based semi-supervisedfederated learning for communication-efficient collaborative training withnon-iid private data[J].IEEE Transactions on Mobile Computing,2021,22(1):191-205.

[0160] [9]Rawat D B,Doku R,Adebayo A,et al.Blockchain enabled named datanetworking for secure vehicle-to-everything communications[J].IEEE Network,2020,34(5):185-189.

[0161]

[10] Taylor P J,Dargahi T,Dehghantanha A,et al.A systematic literaturereview of blockchain cyber security[J].Digital Communications and Networks,2020,6(2):147-156.

[0162]

[11] Lu Y,Huang X,Zhang K,et al.Blockchain empowered asynchronousfederated learning for secure data sharing in internet of vehicles[J].IEEETransactions on Vehicular Technology,2020,69(4):4298-4311.

[0163]

[12] Ghimire B,Rawat D B,Rahman A.Efficient Information Disseminationin Blockchain-Enabled Federated Learning for IoV[J].IEEE Internet of ThingsJournal,2023.

[0164]

[13] Ayaz F,Sheng Z,Tian D,et al.A blockchain based federated learningfor message dissemination in vehicular networks[J].IEEE Transactions onVehicular Technology,2021,71(2):1927-1940.

[0165]

[14] Lin S,Li Y,Han Z,et al.Joint Incentive Mechanism Design andEnergy-Efficient Resource Allocation for Federated Learning in UAV-AssistedInternet of Vehicles[J].Drones,2024,8(3):82.

[0166]

[15] Hu G,Zhu D,Shen J,et al.FedBeam:Reliable Incentive Mechanisms forFederated Learning in UAV-Enabled Internet of Vehicles[J].Drones,2024,8(10):567.

[0167]

[16] He C,Wang Y,Hu J,et al.Collaborative Vehicular Threat Sharing:ALong-Term Contract-Based Incentive Mechanism With Privacy Preservation[J].IEEE Transactions on Intelligent Transportation Systems,2024.

[0168]

[17] Ahram T, Sargolzaei A, Sargolzaei S, et al.Blockchain technologyinnovations[C] / / 2017IEEE technology&engineering management conference(TEMSCON).IEEE,2017:137-141.

[0169]

[18] Shah G, Valiente R, Gupta N, et al.Real-time hardware-in-the-loopemulation framework for DSRC-based connected vehicle applications[C] / / 2019IEEE 2nd Connected and Automated Vehicles Symposium(CAVS).IEEE,2019:1-6.

[0170]

[19] Ni Y,Cai L,He J,et al.Toward reliable and scalable internet ofvehicles:Performance analysis and resource management[J].Proceedings of the IEEE,2019,108(2):324-340.

[0171]

[20] Wang Zilong, Li Jin, Song Yafei. K-means algorithm based on distance and weight improvement[J]. Journal of Computer Engineering & Applications, 2020, 56(23).

[0172]

[21] Shi Jiarong, Wang Dan, Shang Fanhua, et al. Research progress of stochastic gradient descent algorithm[J]. Acta Automatica Sinica, 2021, 47(9): 2103-2119.

[0173]

[22] Krizhevsky A, Hinton G.Learning multiple layers of features from tiny images[J].2009:7.

[0174]

[23] Zhang J,Guo S,Qu Z,et al.Adaptive federated learning on non-iiddata with resource constraint[J].IEEE Transactions on Computers,2021,71(7):1655-1667.

[0175]

[24] Reddi S,Charles Z,Zaheer M,et al.Adaptive federated optimization[J].arXiv preprint arXiv:2003.00295,2020.

Claims

1. A secure online federated distillation method for on-board models for autonomous driving, which is applied in autonomous driving systems. In autonomous driving systems, each vehicle collects environmental data through an on-board sensor suite and uses local on-board model reasoning to understand the environment, formulate driving strategies, and perform driving operations. Its characteristics are In the blockchain-based autonomous driving system, the on-board model is distilled using the online federated distillation method; The entities involved in the online federal distillation method include: Registration Agency RA: As an authorized auditing agency, RA manages the identities of the vehicles that join and is responsible for account registration; only vehicles that have been signed and authorized by RA are eligible to obtain or send data; Operators: provide network infrastructure; operators use blockchain to record and track the V2I information interaction between vehicles and infrastructure; Roadside Unit (RSU): It is a communication device deployed by operators along the road and serves as a medium for communication between vehicles and base stations. Base station BS: The base stations deployed by operators provide communication and computing power guarantee for online collaborative training of vehicles in different regions; MEC server: a computing device deployed by operators at base stations to provide computing services for vehicles; Vehicle: An entity with an onboard unit (OBU). Each vehicle is equipped with a trusted platform module (TPM) to store private information. Each vehicle broadcasts vehicle status information through a beacon mechanism and also acts as a relay to transmit data to neighboring vehicles. The steps of the online federal distillation method include: 1) Register Vehicle i submits the generated identity, public key, account ID, private key, reputation value, address and other information to RA for identity registration and information verification; after registration, vehicle i generates a pair of public and private keys as credentials for interaction with other entities; 2) Authentication and Authorization The dual-chain structure of the joint main chain and auxiliary chain is used to alleviate the problem of frequent verification; the base station maintains the main chain and saves the vehicle's privacy information and keys; the RSU maintains the auxiliary chain and verifies the vehicle's identity and authorization; 3) Vehicle Grouping 3.1) After multiple vehicles initiate a federal distillation request, the main chain and the auxiliary chain determine the participating vehicles; 3.2) Each vehicle can only participate in one group of collaborative training; based on vehicle information, task type and reputation value, the main chain groups participating vehicles in different regions; 4) Online Federated Distillation Training For all vehicles in the same group g, they uniformly download the initial model Θ0 and its parameters θ0 required for this training from the model pool of the main chain; then, vehicle i sets the student model Θ i,0 ←Θ0 and its parameter θ i,0 ←θ0; at the same time, an unparameterized teacher model is used for knowledge distillation; the steps of online federated distillation training include: 4.1) Federated Aggregation The auxiliary chain sends a request for a new round of federation aggregation to the main chain. After the main chain confirms it, the status of the corresponding data block on the auxiliary chain is updated to Confirmed. The auxiliary chain uploads and records the vehicle identity, model parameters and timestamp to the distributed ledger of the main chain. Assume that the model parameter of vehicle i in the l-1th round of training is θ i,l-1 , the main chain calculates θ i,l-1 With aggregation parameters The approximation of To set the weight factor Therefore, the weighted federated average is used to calculate the aggregation parameter of round l where θ i,l is the model parameter of the first round; the main chain will aggregate the model Parameters Sent to RSU so that the vehicle can download from the auxiliary chain Implement distillation training; 4.2) Knowledge Distillation Vehicle i passes download Parameters For teacher models and the student model Θ i,l , vehicle i calculates cross entropy loss and distillation loss respectively in Represents the input sample x i,k A collection of express x i,k The output vector of the distillation temperature coefficient τ is used to soften output; then, it calculates the federated distillation loss The hyperparameter κ1,1-κ1 weighs the weight of the two losses; the student model parameters are updated using the gradient descent method Where η represents the learning rate; The vehicle's sensors will continuously collect new data These unlabeled data are stored in the dataset After accumulating a certain amount of unlabeled data, vehicle i starts semi-supervised distillation to adapt to environmental changes. At this time, only the soft labels generated by the teacher model are used to guide the student model. The distillation loss function of formula (4) is changed to in and Respectively and θ i,l The output vector of ; therefore, the federated distillation loss of formula (5) is changed to The hyperparameter κ2,1-κ2 weighs the weight of the two losses; the parameter update formula of the student model is Vehicle i will update the parameter θ i,l+1 and its hash value H(θ i,l+1 ) is uploaded to RSUm, and RSUm calculates θ i,l+1 The hash value H′(θ i,l+1 );H′(θ i,l+1 ) and H(θ i,l+1 ) is equal to θ i,l When it is uploaded, it is not tampered with, and the auxiliary chain is θ i,l+1 Create a new pending data block; 4.3) Calculation of credit value and service fee Reputation points record the vehicle's contribution to each round of federal distillation; Assume that the model parameters θ of vehicle i are i.l With aggregate model parameters The deviation is and the deviation threshold is d0, the reputation value update formula of vehicle i is where r max represents the maximum reward value, r penalty represents the penalty value, β1 and β2 represent the adjustment parameters; Set a service fee as a reward; vehicle i needs to pay a deposit E to the system when participating in collaborative training i ; The system evaluates the contribution of round l Where σ represents the adjustment parameter; is the credit value threshold and c0 is the unit service price. The system reward value update formula is: where c0(γr i,l +(1-γ)q i,l ) represents the service fee paid by the system, E i a% represents the deducted deposit, and a% represents the deduction ratio.

2. The method for secure online federated distillation of vehicle models for autonomous driving according to claim 1, characterized in that In step 2), assuming that vehicle i maintains communication with base station n through RSUm, the vehicle cross-zone verification and authorization steps include: 2.1) Based on the verification information recorded by the auxiliary chain, RSUm determines whether vehicle i needs complete identity verification; if verification is required, RSUm notifies other RSUs to jointly generate a verification strategy; the auxiliary chain obtains vehicle privacy information from the main chain; based on the verification strategy sent by RSUm, vehicle i generates and sends verification information to RSUm: 2.2) RSUm initially verifies the identity of vehicle i and sends the preliminary verification result to base station n for further verification; base station n feeds back the verification result to RSUm and grants vehicle i an authorization token; 2.3) The auxiliary chain updates the verification result and sends it to vehicle i. The verified vehicle i establishes a trust connection with base station n and obtains an authorization token. The auxiliary chain records the verification time of vehicle i. 2.4) After vehicle i enters the service area of ​​RSUm+1 or base station n+1, if the auxiliary chain or main chain determines that the time interval is greater than the preset threshold, the vehicle needs to be verified and authorized again; otherwise, verification and authorization are suspended; when the time accumulates to the threshold, the auxiliary chain or main chain will re-trigger verification.

3. The method for secure online federated distillation of vehicle models for autonomous driving according to claim 2, characterized in that In step 2.1), the verification policy specifies specific verification requirements, including account verification, reputation check, and privacy information processing rules; The vehicle privacy information of the main chain exists in the form of hash values; The verification information generated by vehicle i and sent to RSUm includes the digital signature, account, and hashed private information: In step 2.2), the core verification is to match the hash value of the main chain; the authorization token contains identity information, verification timestamp and hash value.

4. The method for secure online federated distillation of vehicle models for autonomous driving according to claim 1, characterized in that In step 3.1), after multiple vehicles initiate federated distillation requests, the main chain will record these requests; other vehicles download the requests from the main chain and decide whether to participate; after all participation information is written to the main chain, the main chain notifies the participating vehicles to start online federated distillation; the auxiliary chain verifies the identity information and authorization tokens of the participating vehicles to ensure that they have the authority to receive and upload data; In step 3.2), each vehicle can only participate in one group of collaborative training. The factors used by the main chain to group vehicles include: (1) vehicle information, including physical characteristics and driving status; heterogeneous vehicles carrying the same model are allowed to work in the same group; (2) different vehicles have different on-board tasks; vehicles handling the same tasks are trained in the same group; (3) high-reputation vehicles are given priority for collaborative training; Based on vehicle information, task type and reputation value, the main chain groups participating vehicles in different areas.

5. The method for secure online federated distillation of vehicle models for autonomous driving according to claim 4, characterized in that In step 3.2), among the factors according to which the main link groups vehicles, the physical characteristics in the vehicle information include brand, model and hardware configuration, and the driving status in the vehicle information includes geographic location, speed and direction; The grouping method is that according to vehicle information, task type and reputation value, the main chain uses the K-means algorithm to divide the participating vehicles in different areas into G groups, whose index set is The vehicle index set of group g is vehicle The index sets of the connected RSU and base station are and The local dataset of the vehicle is where x i,k represents the input sample, Represents the classification label, Represents the output vector.

6. The method for online federated distillation of vehicle models for autonomous driving according to claim 1, characterized in that Step 4.3) The smart contract automatically records the reputation value, contribution and reward value of the vehicle in each round on the main chain, and determines the service fee payment and deposit deduction according to the terms of the contract; the main chain saves all records by timestamp to ensure that the vehicle has a real and verifiable reputation and contribution history.