Traffic control model training method and system based on blockchain and federated learning
By combining blockchain with federated learning, local model training and evaluation of intelligent vehicles are conducted, solving the privacy leaks and single points of failure problems caused by data centralization in traditional methods, and achieving safer and more reliable traffic control.
Patent Information
- Application Number
- CN202510287257.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-03-12
AI Technical Summary
Traditional traffic control model training methods require data to be centralized on a central server, which leads to problems such as high risk of data leakage, high risk of single point of failure, and communication bottlenecks.
This approach employs a blockchain-based, federated learning method. It uses a blockchain network to authenticate intelligent vehicles, train and evaluate local models, ensure model quality through smart contracts, and perform decentralized model aggregation to achieve global model distribution and local model updates.
It reduces the risk of user privacy leaks, eliminates the risk of single points of failure, improves the safety and reliability of traffic control systems, reduces communication costs, and enables more precise traffic management.
Smart Images

Figure CN120337989B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer technology, and particularly relates to a traffic control model training method and system based on a blockchain and federated learning. BACKGROUND
[0002] With the development of intelligent transportation systems, vehicle networking technology has become a key to improving road efficiency and traffic safety. Intelligent vehicles collect a large amount of data through on-board sensors, which can be used to train traffic control models to achieve more intelligent traffic management. However, traditional model training methods usually require data to be centralized on a central server for processing, which not only increases the risk of data leakage, but also can cause single point failure and communication bottlenecks and other problems.
[0003] In summary, the technical problems in the related art need to be improved. SUMMARY
[0004] The embodiments of the present application aim to at least partially solve one of the technical problems in the related art. To this end, the main purpose of the embodiments of the present application is to propose a traffic control model training method and system based on a blockchain and federated learning, which can avoid data privacy leakage and single point failure risk, improve model training quality and training efficiency, and improve the security and reliability of vehicle networking systems.
[0005] To achieve the above-mentioned purpose, one aspect of the embodiments of the present application proposes a traffic control model training method based on a blockchain and federated learning, which comprises the following steps:
[0006] Obtain the to-be-trained on-board sensor data corresponding to a plurality of intelligent vehicles in a vehicle networking system;
[0007] Authenticate the identity of each of the intelligent vehicles through a blockchain network, and determine a plurality of target intelligent vehicles participating in federated learning;
[0008] Each of the target intelligent vehicles trains a local traffic control model according to the corresponding to-be-trained on-board sensor data, obtains a plurality of local model training results, and sends each of the local model training results to the blockchain network;
[0009] Evaluate each of the local model training results through a smart contract in the blockchain network, and determine a plurality of qualified model training results;
[0010] Aggregate each of the qualified model training results through the blockchain network to obtain a global model, and distribute the global model to each of the target intelligent vehicles, so that each of the target intelligent vehicles updates the local traffic control model according to the global model; the local traffic control model is used to realize intelligent management and control of traffic scenarios.
[0011] In some embodiments, before the obtaining of the to-be-trained vehicle-mounted sensor data corresponding to a plurality of intelligent vehicles in the vehicle networking system, the method further comprises:
[0012] obtaining local vehicle-mounted sensor data corresponding to a plurality of the intelligent vehicles in the vehicle networking system;
[0013] encrypting each of the local vehicle-mounted sensor data using a target encryption algorithm, and preprocessing each of the encrypted local vehicle-mounted sensor data to obtain a plurality of the to-be-trained vehicle-mounted sensor data.
[0014] In some embodiments, the encrypting each of the local vehicle-mounted sensor data using the target encryption algorithm, and preprocessing each of the encrypted local vehicle-mounted sensor data to obtain a plurality of the to-be-trained vehicle-mounted sensor data comprises:
[0015] encrypting each of the local vehicle-mounted sensor data using the target encryption algorithm, and respectively performing denoising processing on each of the encrypted local vehicle-mounted sensor data to obtain a plurality of local clean sensor data;
[0016] respectively performing feature extraction processing on each of the local clean sensor data to obtain a plurality of local initial traffic feature data;
[0017] respectively performing data fusion processing on each of the local initial traffic feature data to obtain a plurality of local multi-source traffic feature data;
[0018] performing deep learning on each of the local multi-source traffic feature data to extract a plurality of local multi-source key traffic feature data;
[0019] respectively performing selection and dimension reduction processing on each of the local multi-source key traffic feature data to obtain a plurality of the to-be-trained vehicle-mounted sensor data.
[0020] In some embodiments, the method further comprises:
[0021] encrypting intermediate parameters generated during the training process of the local traffic control model using a target encryption algorithm.
[0022] In some embodiments, the evaluating each of the local model training results through the smart contract in the blockchain network to determine a plurality of qualified model training results comprises:
[0023] performing training quality evaluation on each of the local model training results through the smart contract in the blockchain network to determine whether each of the local model training results meets a preset training quality standard.
[0024] performing compliance checking on each of the local model training results by the smart contract to determine whether each of the local model training results meets a preset compliance standard;
[0025] taking the local model training result meeting the preset training quality standard and the preset compliance standard as the qualified model training result.
[0026] In some embodiments, the method further comprises:
[0027] giving an incentive to the target intelligent vehicle corresponding to the local model training result meeting the preset training quality standard;
[0028] giving a penalty to the target intelligent vehicle corresponding to the local model training result not meeting the preset training quality standard.
[0029] In some embodiments, the aggregating each of the qualified model training results by the blockchain network to obtain a global model, and distributing the global model to each of the target intelligent vehicles, so that each of the target intelligent vehicles updates the local traffic control model according to the global model, comprises:
[0030] aggregating each of the qualified model training results by the blockchain network using the decentralized feature to obtain the global model;
[0031] distributing the global model to each of the target intelligent vehicles by the blockchain network, so that each of the target intelligent vehicles trains the corresponding local traffic control model according to the global model parameter in the global model to obtain an updated local traffic control model.
[0032] To achieve the above object, another aspect of the embodiments of the present application proposes a traffic control model training system based on blockchain and federated learning, which comprises the following modules:
[0033] a to-be-trained vehicle-mounted sensor data acquisition module configured to acquire to-be-trained vehicle-mounted sensor data corresponding to a plurality of intelligent vehicles in a vehicle networking system;
[0034] an intelligent vehicle identity authentication module configured to perform identity authentication on each of the intelligent vehicles by a blockchain network to determine a plurality of target intelligent vehicles participating in federated learning;
[0035] The local traffic control model training module is configured to train a local traffic control model according to the corresponding to-be-trained vehicle-mounted sensor data, obtain a plurality of local model training results, and send each local model training result to the blockchain network.
[0036] The local model training result evaluation module is configured to evaluate each local model training result through a smart contract in the blockchain network, and determine a plurality of qualified model training results.
[0037] The global model aggregation module is configured to aggregate each qualified model training result through the blockchain network, obtain a global model, and distribute the global model to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model. The local traffic control model is used to realize intelligent management and control of a traffic scene.
[0038] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application proposes an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the method described above when executing the computer program.
[0039] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application proposes a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method described above.
[0040] The embodiments of this application include at least the following beneficial effects: This application provides a traffic control model training method and system based on blockchain and federated learning. This scheme acquires onboard sensor data corresponding to several intelligent vehicles in a vehicle-to-everything (V2X) system; authenticates each intelligent vehicle through a blockchain network to determine several target intelligent vehicles participating in federated learning; each target intelligent vehicle trains its local traffic control model based on its corresponding onboard sensor data, obtaining several local model training results, and sends these results to the blockchain network; evaluates the local model training results through smart contracts in the blockchain network to determine several qualified model training results; aggregates the qualified model training results through the blockchain network to obtain a global model, and distributes the global model to each target intelligent vehicle, enabling each target intelligent vehicle to update its local traffic control model according to the global model; the local traffic control model is used to achieve intelligent management and control of traffic scenarios. This application employs a federated learning approach, enabling intelligent vehicles to train models locally without uploading raw data to the blockchain network, thus reducing the risk of user privacy leaks. The use of blockchain technology eliminates the single point of failure risk inherent in traditional centralized solutions for vehicle-to-everything (V2X) systems. The decentralized model aggregation method ensures effective verification and monitoring of the training results of all participating nodes, preventing malicious attacks and data tampering. Furthermore, automated model quality assessment based on blockchain smart contracts ensures high-quality aggregated global models, thereby improving the reliability of the traffic control system. By combining blockchain technology with federated learning, the need for large-scale data transmission is reduced, communication costs are lowered, and the security and reliability of the federated learning process in the V2X system are improved. Simultaneously, the local traffic control model can be updated in real-time based on the global model. Through continuous updates and optimization of the local traffic control model, intelligent vehicles can better adapt to complex traffic scenarios and achieve more precise traffic control. Attached Figure Description
[0041] Figure 1 This is a flowchart of a traffic control model training method based on blockchain and federated learning provided in an embodiment of this application;
[0042] Figure 2 This is a schematic diagram of the design structure of the blockchain-enabled federated learning framework provided in the embodiments of this application;
[0043] Figure 3 This is a schematic diagram of the structure of the traffic control model training system based on blockchain and federated learning provided in the embodiments of this application;
[0044] Figure 4 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0045] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be given below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with embodiments of the present application. They are only examples of systems and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0046] It can be understood that the terms "first", "second" and the like used in the present application can be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determining".
[0047] The terms "at least one", "multiple", "each", "any" and the like used in the present application include one, two or more than two, multiple includes two or more than two, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as understood by those skilled in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0049] With the development of intelligent transportation systems, Internet of Vehicles technology has become a key to improving road efficiency and traffic safety. Intelligent vehicles collect a large amount of data through on-board sensors, which can be used to train traffic control models to achieve more intelligent traffic management. However, traditional model training methods usually require data to be centralized on a central server for processing, which not only increases the risk of data leakage, but also may cause single point failure and communication bottleneck problems.
[0050] Exemplarily, at present, there are some researches combining artificial intelligence with blockchain for the related application of intelligent Internet of Vehicles to improve the technical problems existing in the blockchain. By combining the blockchain with artificial intelligence, the intelligent optimization decision-making ability of artificial intelligence is given to the Internet of Vehicles and the vehicle-mounted system on the basis of retaining the security and reliability of the blockchain. However, there are some problems in the combination of the two: first, the traditional machine learning algorithm relies on a centralized data set to train the model, and generally the larger the data set, the more accurate the trained model. For this reason, the server needs to collect a lot of data from the user side, which increases the risk of user data privacy leakage. While federated learning is a new machine learning scheme, unlike traditional centralized machine learning, federated learning trains the model by decentralizing the training task to the user side. By introducing more user participation, federated learning can expand the training data set as a whole, thereby improving the overall model quality. However, federated learning also faces some challenges: cross-device federated learning performs model aggregation algorithms through a parameter server, but the centralized parameter server can be subject to malicious attacks and intercepted or tampered with intermediate parameters in the model aggregation process. In addition, the centralized parameter server causes a large amount of remote data communication between the participating nodes and the parameter server, which also leads to the risk of data tampering and privacy leakage.
[0051] In view of this, the embodiments of the present application provide a traffic control model training method and system based on blockchain and federated learning. The scheme obtains the to-be-trained vehicle-mounted sensor data corresponding to a plurality of intelligent vehicles in a vehicle networking system; performs identity authentication on each intelligent vehicle through a blockchain network to determine a plurality of target intelligent vehicles participating in federated learning; each target intelligent vehicle trains a local traffic control model according to the corresponding to-be-trained vehicle-mounted sensor data, obtains a plurality of local model training results, and sends each local model training result to the blockchain network; each local model training result is evaluated through a smart contract in the blockchain network to determine a plurality of qualified model training results; each qualified model training result is aggregated through the blockchain network to obtain a global model, and the global model is distributed to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model; the local traffic control model is used to realize intelligent management and control of a traffic scene. The embodiments of the present application use federated learning, so that the intelligent vehicle trains the model locally without uploading the original data to the blockchain network, reducing the risk of user privacy leakage; the blockchain technology is used to eliminate the single-point failure risk brought by the traditional centralized scheme, and the decentralized model aggregation method enables the training results of all participating nodes to be effectively verified and monitored, preventing malicious attacks and data tampering. At the same time, the automatic model quality evaluation is realized based on the blockchain smart contract, ensuring that the aggregated global model has high quality, thereby improving the reliability of the traffic control system; by introducing the blockchain technology combined with federated learning, the need for a large amount of data transmission is reduced, the communication cost is reduced, and the security and reliability of the federated learning process in the vehicle networking system are improved; at the same time, the local traffic control model can be updated in real time according to the global model, and through the continuous updating and optimization of the local traffic control model, the intelligent vehicle can better adapt to complex traffic scenes and realize more accurate traffic control.
[0052] The traffic control model training method based on the blockchain and the federated learning provided in the embodiments of the present application relates to the technical field of computers. The traffic control model training method based on the blockchain and the federated learning provided in the embodiments of the present application can be applied to a terminal, can also be applied to a server, and can further be software running in the terminal or the server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, and the like, but is not limited thereto; the server end can be configured as a stand-alone physical server, can also be configured as a server cluster or a distributed system formed by multiple physical servers, can further be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, and the server can also be a node server in a blockchain network; and the software can be an application for implementing the traffic control model training method based on the blockchain and the federated learning, and the like, but is not limited to the above forms.
[0053] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs (Personal Computers), minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0054] It should be noted that in various specific embodiments of the present application, when relevant processing needs to be performed on data related to the identity or characteristics of the user, such as user information, user behavior data, user history data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for the normal operation of the embodiments of the present application will be obtained.
[0055] Please refer to Figure 1 , Figure 1 is an optional flowchart of a traffic control model training method based on a blockchain and federated learning provided by the embodiments of the present application, Figure 1 The method in the method can include but is not limited to steps S101-S105.
[0056] Step S101, obtaining a plurality of intelligent vehicles corresponding to the vehicle-mounted sensor data to be trained in the vehicle networking system;
[0057] In some embodiments, before step S101, it can also include: obtaining a plurality of local vehicle-mounted sensor data corresponding to a plurality of intelligent vehicles in the vehicle networking system; using a target encryption algorithm to encrypt each local vehicle-mounted sensor data, and preprocessing each encrypted local vehicle-mounted sensor data to obtain a plurality of vehicle-mounted sensor data to be trained.
[0058] In some specific embodiments, the step of using a target encryption algorithm to encrypt each local vehicle-mounted sensor data and preprocessing each encrypted local vehicle-mounted sensor data to obtain a plurality of vehicle-mounted sensor data to be trained can include: using a target encryption algorithm to encrypt each local vehicle-mounted sensor data, and respectively performing denoising processing on each encrypted local vehicle-mounted sensor data to obtain a plurality of local clean sensor data; performing feature extraction processing on each local clean sensor data to obtain a plurality of local initial traffic feature data; performing data fusion processing on each local initial traffic feature data to obtain a plurality of local multi-source traffic feature data; performing deep learning on each local multi-source traffic feature data to extract a plurality of local multi-source key traffic feature data; and performing selection and dimensionality reduction processing on each local multi-source key traffic feature data to obtain a plurality of vehicle-mounted sensor data to be trained.
[0059] The vehicle networking system refers to a system for realizing intelligent information exchange and sharing between vehicles, infrastructure, pedestrians, and networks through information communication technology. The vehicle networking system can include vehicle-mounted sensors, vehicle-mounted units, roadside units, data centers, communication networks, and other components. The main purpose of the vehicle networking technology is to improve road safety, traffic efficiency, and driving comfort.
[0060] For an intelligent vehicle, which is a component of the vehicle networking system, the intelligent vehicle refers to a vehicle equipped with advanced vehicle-mounted sensors, controllers, actuators, computing platforms, and communication devices, and capable of realizing perception, understanding, decision-making, and control of the vehicle state, surrounding environment, and driving behavior. The intelligent vehicle can be regarded as a node, and the target intelligent vehicle in the following can be regarded as a participating node allowed to join federated learning.
[0061] The local vehicle-mounted sensor data refers to data collected by various sensors mounted on the intelligent vehicle, which is local data without any processing. The local vehicle-mounted sensor data is used for model training locally on the intelligent vehicle. The sensors mounted on the intelligent vehicle can include, but are not limited to, GPS (Global Positioning System) sensors, cameras, laser radars, ultrasonic sensors, etc. The local vehicle-mounted sensor data can include, but is not limited to, position data, speed data, direction data, and sensor feedback information (such as laser radar, camera image, etc.), etc. The position data is the real-time geographic position of the vehicle, the speed data is the driving speed of the vehicle, the direction data is the driving direction or heading angle of the vehicle, and the sensor feedback information includes object recognition, obstacle detection, road conditions, etc.
[0062] The target encryption algorithm can be selected according to actual conditions, and the embodiments of the present application do not limit this. For example, the target encryption algorithm can be a homomorphic encryption algorithm or a differential privacy algorithm.
[0063] In the embodiments of the present application, the training data (local data) is not directly sent to the blockchain. The core is to ensure that user privacy is not leaked. Specifically, after obtaining the local data, the local data is first encrypted on the local device, then the encrypted local data is preprocessed, then the preprocessed encrypted data is trained locally, and finally the model parameters generated in the training process are sent to the blockchain. In this way, even if the training data is used and processed in the training process, the original personal data will not be leaked.
[0064] The preprocessing can include denoising processing, preliminary feature extraction processing, data fusion processing, deep learning feature extraction processing, and feature selection and dimension reduction processing. The specific preprocessing steps are as follows:
[0065] (1) Since the vehicle networking data has high dynamics and heterogeneity, before extracting the features, the original data needs to be denoised first. The denoising method can include but is not limited to: smoothing algorithm, time window processing method, outlier detection method. Among them, the smoothing algorithm refers to using a low-pass filter to eliminate random fluctuations in the data; the time window processing method refers to using a sliding window to smooth the speed and position data based on time series data; the outlier detection method refers to removing abnormal data caused by sensor failure or data transmission error. That is, the steps of respectively denoising the encrypted local vehicle sensor data to obtain a plurality of local clean sensor data.
[0066] (2) Preliminary feature extraction processing: After denoising, according to the specific needs of the traffic scene, features related to vehicle driving safety, path planning, obstacle recognition, etc. are extracted, and preliminary features can include but are not limited to: position-related features, dynamic state features, traffic flow features, road condition features, and spatiotemporal features. Among them, the position-related features can include the latitude and longitude information of the vehicle and the relative distance (such as the distance between the vehicle and the intersection, the distance between the vehicle and other vehicles, etc.); the dynamic state feature can include the speed, acceleration, and acceleration rate of the vehicle, which can help understand the driving state of the vehicle; the traffic flow feature is to collect the driving speed, position, traffic density, etc. of surrounding vehicles to estimate the current traffic flow; the road condition feature refers to the road information provided by sensors such as cameras or lidar, and the identified traffic signs, traffic lights, road barriers, pedestrians, etc.; the spatiotemporal feature can include time series data of vehicle speed and position, which can help analyze the comparison between the current time and the past history time, and predict the future traffic condition. That is, the steps of respectively extracting features from each local clean sensor data to obtain a plurality of local initial traffic feature data.
[0067] (3) Data fusion processing: Since there are often multiple sensor data sources in vehicle networking, these data are often heterogeneous, so data fusion is needed to extract more accurate features by combining data from multiple sensors. For example, using Kalman filtering algorithm to fuse GPS data and speed sensor data to optimize vehicle position and speed estimation. That is, the steps of respectively performing data fusion processing on each local initial traffic feature data to obtain a plurality of local multi-source traffic feature data.
[0068] (4) Deep learning feature extraction processing: In some cases, raw sensor data (such as images, video streams) may need to be further extracted by deep learning methods. Exemplarily, convolutional neural networks (CNN) and recurrent neural networks (RNN) can be used for feature extraction, specifically: for camera image data, object recognition, landmark recognition, obstacle detection and other features can be extracted by convolutional neural networks; for time series data (e.g., vehicle position, speed, etc.), RNN or LSTM (Long Short-Term Memory) methods can be used to extract time series features. That is, corresponding to the aforementioned deep learning of each local multi-source traffic feature data, a number of local multi-source key traffic feature data are extracted.
[0069] (5) Feature selection and dimensionality reduction processing: In order to improve the efficiency of model training and reduce the complexity of calculation, the extracted features are selected and reduced in dimension, and redundant or irrelevant features are removed. Exemplarily, principal component analysis (PCA) method can be used to transform multiple related variables into several important principal components through linear transformation; feature importance evaluation can be selected through methods such as information gain, correlation analysis, etc. to select the most representative features. That is, corresponding to the aforementioned selection and dimensionality reduction processing of each local multi-source key traffic feature data, a number of to-be-trained vehicle-mounted sensor data are obtained.
[0070] The features (to-be-trained vehicle-mounted sensor data) extracted by the above preprocessing method will provide necessary input data for subsequent federated learning model training, while ensuring data privacy and security. In the blockchain environment, these features will be encrypted and recorded through distributed ledger, ensuring transparency and traceability. In the intelligent vehicle networking system, the process of extracting traffic scene related features is crucial, and traffic scene related features can help vehicles understand the surrounding environment and provide valuable information for subsequent deep learning model training.
[0071] Step S102, identity authentication of each of the intelligent vehicles through the blockchain network to determine a number of target intelligent vehicles participating in federated learning;
[0072] Among them, the target intelligent vehicle refers to an intelligent device that can pass the identity authentication of the blockchain and has legal validity, and can be used to participate in federated learning.
[0073] In a specific implementation, the vehicle or intelligent terminal device is authenticated through the blockchain system to ensure that only trusted devices can participate in the federated learning process. Through the consensus mechanism of the blockchain (such as PoW (Proof of Work), PoS (Proof of Stake), DPoS (Delegated Proof of Stake)), the legality and credibility of each participant in the model training process are guaranteed. Specifically, in the specific implementation process of participant authentication, the following steps are taken:
[0074] (1) Device registration and identity authentication;
[0075] Device registration: Each participating intelligent vehicle or terminal device needs to register in the blockchain system before starting to participate in federated learning. Device registration information includes the vehicle's unique identifier (such as the VIN (Vehicle Identification Number) code or device serial number), device type, hardware configuration, location (optional), and other basic information.
[0076] Public key generation and registration: Each device participates in the blockchain network by generating a pair of public and private keys, with the public key serving as the device's unique identity identifier. The private key is used for identity verification and encrypted communication, while the public key serves as the public identity identifier stored on the blockchain. The device's public key and related information will be registered on the blockchain as the device's "identity card".
[0077] (2) Blockchain identity verification;
[0078] Identity verification request: Before participating in federated learning tasks, the device initiates an identity verification request to the blockchain network, submitting its registered public key and necessary authentication information (such as device model, geographic location, etc.);
[0079] Consensus mechanism authentication: The registration information of the device is verified through the consensus mechanism of the blockchain (such as PoW, PoS, or a delegated proof mechanism). If the device's identity information passes the consensus verification (for example, certain verification nodes confirm the device's identity based on its historical records or reputation rating), the device is considered trustworthy and allowed to participate in model training.
[0080] (3) Permission control and access management;
[0081] Smart contract permission check: A smart contract is deployed on the blockchain to control the access permissions of devices. The smart contract automatically determines whether a device is allowed to participate in training based on the device's public key and identity information. If the device's identity is not verified or the device's reputation score is too low (e.g., due to past malicious behavior), the smart contract will automatically reject the device's request and prohibit it from participating in federated learning model training.
[0082] Device reputation management: The smart contract can also dynamically assess the reputation of devices based on their history of participation in training, the quality of uploaded models, and the behavior of the devices. The reputation score of a device will affect its priority and rewards for future training. Devices with low reputation may be restricted from participating or removed from the blockchain network.
[0083] (4) Privacy protection of identity verification;
[0084] Zero-knowledge proof (ZKP): To enhance privacy protection, zero-knowledge proof technology can be introduced in the identity verification process. Devices can prove their identity without revealing any personal information. For example, a device can prove that it meets certain pre-set conditions (such as being an authenticated vehicle) without providing specific personal or vehicle information to the blockchain.
[0085] Anonymous authentication: To further protect user privacy, anonymous authentication mechanisms such as ring signatures or homomorphic encryption can be used to ensure that no sensitive data is leaked during the device identity verification process.
[0086] (5) Blockchain log and audit;
[0087] Authentication log recording: Each device identity verification process is recorded by the blockchain and generates an unalterable log. These logs include device registration information, verification requests, consensus processes, and device verification results. Each round of verification can be traced back and provides evidence for subsequent system security audits.
[0088] Dynamic update and audit: Device identity and reputation information will be updated over time. If a device exhibits abnormal behavior during model training (such as uploading false model parameters or participating in attacks), the smart contract can record it as an unqualified node and deduct its reputation score. All updates are recorded on the blockchain to ensure system transparency and credibility.
[0089] The consensus mechanism can include PoW, PoS, and DPoS. Specifically, PoW is used to verify the identity of a device by performing a certain calculation task, ensuring that only verified devices can participate in model training to prevent malicious devices from attacking. PoS is used for certain specific devices to prove their legitimacy and credibility in participating in federated learning by staking certain resources (such as tokens, computing power, etc.). DPoS is used to select trusted verification nodes to authenticate the identity of a device, reducing the computational consumption of the authentication process and improving efficiency.
[0090] In step S103, each target intelligent vehicle trains a local traffic control model according to the corresponding to-be-trained vehicle-mounted sensor data, obtains a plurality of local model training results, and sends each local model training result to the blockchain network.
[0091] The local traffic control model is a deep learning model. Each participant (i.e., a target intelligent vehicle) trains the deep learning model on a local device according to the corresponding local data (pre-processed to-be-trained vehicle-mounted sensor data). Each device only sends the local model training result (i.e., model parameters) to the blockchain network, rather than the original data (local data).
[0092] The deep learning model (local traffic control model) refers to a machine learning model used in intelligent transportation systems, autonomous driving, cooperative driving, and other applications in the Internet of Vehicles (IoV). Specifically, the purpose of the deep learning model is to train on local data of a vehicle-mounted device (such as a smart vehicle) to achieve automated identification, prediction, and decision-making of traffic scenarios. The use of the local traffic control model can include but is not limited to traffic scenario identification, autonomous driving decision-making, cooperative autonomous driving, and traffic prediction. Traffic scenario identification refers to identifying important information such as traffic signals, road obstacles, traffic signs, and pedestrians based on data collected by vehicle sensors (such as lidar, cameras, GPS, etc.) through the local traffic control model, thereby providing environmental perception capabilities for autonomous driving systems; autonomous driving decision-making refers to allowing vehicles to make driving decisions such as steering, accelerating, and braking based on real-time data (such as speed, position, traffic state, etc.) by training the local traffic control model; cooperative autonomous driving refers to sharing information between multiple smart vehicles using the local traffic control model for collaborative driving to improve road safety and traffic efficiency, for example, vehicle-to-vehicle communication can help achieve automated platooning, intelligent traffic signal control, etc.; traffic prediction refers to the local traffic control model can also be used to predict traffic flow, congestion, road conditions, etc. to provide navigation recommendations for drivers or autonomous driving systems.
[0093] For the initial construction step of the deep learning model (local traffic control model), specifically: (1) data collection and preprocessing: each vehicle-mounted device obtains data from its local sensors (such as cameras, radars, GPS, etc.), which typically includes vehicle speed, position, direction, surrounding environment, etc. Due to the high dynamics and heterogeneity of Internet of Vehicles data, data needs to be preprocessed, including noise removal, feature extraction, data standardization, etc.; (2) model selection and construction: the deep learning model uses a multi-layer neural network (such as convolutional neural network CNN, long short-term memory network LSTM, etc.), for example, in an environmental perception task, a convolutional neural network (CNN) can be used to extract image features, or an LSTM can be used to process time-series data of the vehicle (such as speed changes, position changes, etc.), these models are trained on local vehicles to capture patterns and rules in the data.
[0094] In a specific implementation, each vehicle trains a local traffic control model using its local processing capability (e.g., an on-board computing device), and the model training is performed using sensor data collected by the on-board device. The training process can include steps such as forward propagation, loss calculation, and back propagation. Details of these steps can be found in the relevant model training techniques, which are not described herein. The goal of the training is to optimize the model parameters so that the model can accurately perform traffic scene recognition and decision-making tasks.
[0095] In some embodiments, the method can further include encrypting intermediate parameters generated by the local traffic control model during the training process using a target encryption algorithm.
[0096] The intermediate parameters refer to parameters and data generated at each stage during the training process, which are intermediate results of the model training. For example, in a deep learning training process, model parameters are constantly updated, and the loss function value during training also changes. These intermediate parameters do not represent the final model parameters, but refer to the parameters and related information updated at each stage during the training process. The model parameters are the final optimized parameters after multiple rounds of training, which are the core information for inference and prediction. The local model training result includes not only the model parameters but also the loss function, which is used to measure the error of the model after each round of training. The loss function is closely related to the intermediate parameters, because the performance of the model is evaluated through the loss function after each round of training, and the model parameters are further adjusted. Therefore, the intermediate parameters include but are not limited to the model parameters and the loss function. The intermediate parameters are dynamic data during the training process, and are finally summarized into the final model parameters.
[0097] The encryption method of the intermediate parameters is the same as the method of encrypting the local vehicle sensor data, and the difference between the two is that the encryption stage is different. Specifically, the local vehicle sensor data encryption first occurs in the collection and processing stage of the local data, that is, when each vehicle-mounted device locally processes the sensor data, the original data is encrypted, and then the encrypted data is used for local training, and only the encrypted training results (such as model parameters) are sent to the blockchain network. It can be understood that the time point of local data encryption is that the original data is encrypted locally as soon as the collection is completed, and no privacy information is leaked; and the time point of intermediate parameter encryption is that the parameters (intermediate parameters) of each round of model update in the training process are also protected by the encryption algorithm to avoid leakage or tampering during transmission. The encryption of intermediate parameters and data is a parallel process, both of which are to ensure the privacy of the entire training process. The encryption of training data and intermediate parameters is performed at different stages, but both are completed on local devices, and the encryption method and purpose of the two are the same, both of which are to ensure the privacy and security of the data, and only the encrypted parameters are transmitted in the transmission stage, ensuring that the privacy is not leaked in the data transmission or storage process.
[0098] In the embodiments of the present application, unlike the traditional centralized training method, each vehicle-mounted device only uploads the trained model parameters (rather than the original data) to the blockchain network, so that the data privacy is protected, and each device can still use the distributed data set for global model training. In the subsequent global model aggregation process, through the federal learning mechanism, the model parameters from multiple intelligent vehicles are aggregated in the blockchain network to form a global model, and finally each vehicle will perform the next round of local training according to the global model to further improve the accuracy and reliability of the model.
[0099] In specific implementation, in order to protect user privacy, an encryption algorithm (such as homomorphic encryption or differential privacy technology) is used to encrypt the training data and intermediate parameters, preventing data leakage during transmission. Therefore, since the training data always remains on the local device (such as the data of the vehicle sensor), even if the trained model parameters are transmitted through the blockchain, the uploading and sharing of the original data are not involved; in addition, even if the intermediate parameters (such as the intermediate results of model training) are recorded by the blockchain, the intermediate parameters are encrypted versions. Through the encryption algorithm (such as homomorphic encryption or differential privacy), even if these encrypted data are transmitted to the blockchain network, they cannot be decrypted, thereby effectively preventing the risk of data leakage.
[0100] In step S104, the local model training results are evaluated by the smart contract in the blockchain network, and a number of qualified model training results are determined.
[0101] In some embodiments, step S104 can include: performing training quality evaluation on each local model training result by a smart contract in the blockchain network to determine whether each local model training result meets a preset training quality standard; performing compliance check on each local model training result by the smart contract to determine whether each local model training result meets a preset compliance standard; and taking the local model training result meeting the preset training quality standard and the preset compliance standard as a qualified model training result.
[0102] In some embodiments, it can also include: giving an incentive to the target intelligent vehicle corresponding to the local model training result meeting the preset training quality standard; and giving a penalty to the target intelligent vehicle corresponding to the local model training result not meeting the preset training quality standard.
[0103] In a specific implementation, each participating node (target intelligent vehicle) uploads its training result (model parameter and loss function) to the blockchain network, which records it as an unalterable transaction record. The blockchain network, through the way of smart contract, enables the blockchain to verify whether the training result submitted by each participating node is compliant and records the contribution of the node. At the same time, each block in the blockchain network stores the intermediate parameters of the training and verification information, which are used for the aggregation and verification of the global model. Through the decentralized blockchain ledger, the single point of failure and malicious attacks that the traditional centralized server may encounter are eliminated.
[0104] Wherein, whether each local model training result meets the preset training quality standard is mainly determined based on the contribution of each participating node, and the contribution of the participating node is mainly evaluated by the performance of the participating node in local training and the quality of the model parameter provided, while the role of the smart contract is to automatically verify the contribution of each participating node on the blockchain and ensure that these contributions are compliant, thereby ensuring the quality and transparency of the global model training.
[0105] To ensure that the quality of the model parameter submitted by each node meets the standard, the model result of each node needs to be evaluated in each round of training process. The specific evaluation process includes:
[0106] (1) Evaluation standard setting: certain standards such as loss function, accuracy, F1 score, etc. can be set to measure the training effect of the model. For example, when a classification task is adopted, the accuracy of the model parameter can be judged by evaluating the classification accuracy, and if it is a regression task, it can be evaluated by Mean Squared Error (MSE) and the like.
[0107] (2) Loss function comparison: After multiple nodes complete local training, their respective loss function values will be calculated. If a node's model loss function is significantly higher than that of other nodes, it indicates that the model quality is poor, and there may be problems such as overfitting, underfitting, or data noise.
[0108] (3) Cross-validation: The model updates submitted by each node can be cross-validated on a portion of the data. That is, the data is divided into multiple subsets, and the performance of the model on different subsets is verified to ensure its good generalization ability.
[0109] (4) Consistency check: Consistency check is performed with the parameters submitted by other nodes, i.e., whether the model parameters of each node are within a certain standard deviation range. If the model parameters of a node differ significantly from those of other nodes, it indicates that the model submitted by the node may have bias or problems.
[0110] Specifically, the contribution of a participating node refers to the effective contribution made by the participating node during the model training process, mainly including training quality, participation, computing resources, and model update contribution, with specific contents as follows:
[0111] (1) Training quality: The quality and effectiveness of the model parameters submitted by the participating node during local training. For example, whether the loss function during training decreases, and the performance of the model on the local data set. If the model provided by the participating node can effectively improve the accuracy of the global model, the contribution of the participating node will be considered to be greater;
[0112] (2) Participation: The frequency of node participation in training and the amount of data involved in training are also part of the contribution. For example, a node may participate in multiple rounds of training, and each time the training results meet the requirements, which will increase the weight of its contribution;
[0113] (3) Computing resources: In some implementations, the total contribution of a node may also be calculated based on its contribution of computing resources. For example, nodes with stronger computing capabilities may perform better when handling more complex models, so their contributions can be weighted according to the computing resources provided;
[0114] (4) Model update contribution: The model parameters improved by the node through local training will be aggregated into the global model. If the model parameters provided by the node have a greater contribution in global aggregation (e.g., significantly improving the accuracy of the global model), its contribution value will also be higher.
[0115] For smart contracts, a smart contract is a program used to automatically execute and execute conditional agreements in a blockchain network. Smart contracts are mainly used in the following four steps:
[0116] (1) Training result submission: After each node (e.g., intelligent vehicle) completes training locally, it uploads the parameters of the model (rather than the original data) to the blockchain network. The uploaded data includes: trained model parameters, loss function values, the number of training batches, the algorithm used, and other information;
[0117] (2) Verification of training results: The model parameters submitted by each node will be verified by the smart contract. The smart contract will verify whether the training results submitted by each node meet certain quality standards according to predetermined standards and verification logic. For example, the smart contract can check: 1) whether the model parameters meet the predetermined format and data range; 2) whether the loss function value is within the appropriate range and meets the expected training effect; 3) whether there is abnormal data (such as unstable training results, etc.);
[0118] (3) Hash verification: The smart contract can verify the model parameters through hash values to ensure that they have not been tampered with during transmission.
[0119] (4) Compliance check: If the training results of a node are verified by the smart contract as non-compliant (e.g., the model is not effective, or the submitted data is abnormal), the node will be punished or recorded as non-compliant. Conversely, compliant nodes will be incentivized and may receive rewards such as increased participation rights, improved reputation, etc. Each node's submission will affect its reputation score. For example, if a node's training results fail to meet the expected standards for two consecutive times, the node's reputation score will decrease, and it may be restricted from participating in subsequent training tasks.
[0120] For example, assume that there are 3 intelligent vehicles (nodes A, B, and C) participating in training a global traffic scenario model. During the model training process, the processes of each node are as follows: (1) Node A collects local traffic data (such as vehicle speed, location, etc.) and trains a model locally. Node A calculates the loss function and uploads the training results (e.g., model parameters, loss function values, etc.) to the blockchain. (2) The smart contract automatically verifies the training results submitted by node A on the blockchain. The smart contract checks whether node A's model is compliant and meets the quality standards. If it is compliant, node A's training results will be recorded as valid, and its contribution to the global model will be evaluated. Nodes B and C perform the same process and upload their respective training results. The training results of each node are verified by the smart contract.
[0121] If a node's contribution is non-compliant, the smart contract will trigger a penalty mechanism, which may manifest as a reduction in its future participation rights, a reduction in rewards, or a record of the node's low-quality performance. If a node submits valid training results and makes effective contributions, it will receive corresponding rewards (e.g., increased reputation points or certain material rewards).
[0122] wherein, for nodes that submit high-quality model parameters, the smart contract will give rewards. The form of the rewards can be: (1) reputation score increase: each time a node submits a model parameter that meets the standard, its reputation score will be increased, and it can obtain more tasks in the future, or even a higher weight in future training. (2) Token incentives: if the blockchain system adopts a token incentive mechanism (such as based on cryptocurrency or points), excellent nodes can obtain token rewards for participating in more tasks in the future or exchanging value.
[0123] For nodes that submit unqualified model parameters, the following punitive measures are taken: (1) loss of participation rights: if a node's model quality continuously falls below the standard, the smart contract will automatically list it as a "punished node" and restrict it from continuing to participate in the subsequent training process; (2) reputation decline: each unqualified submission will cause the node's reputation score to decrease, and nodes with low reputation scores may lose the right to participate in priority in subsequent training, or even be removed by the system; (3) weight reduction: the system can adjust the weight of a node in model aggregation according to its reputation score, and if a node's reputation score is low, its model contribution will be reduced in the update of the global model.
[0124] Exemplarily, assume that after a certain training, node A submits its model parameters to the blockchain, and after evaluation by the smart contract, it is found that the accuracy of node A's model is 70%, while the accuracy of other nodes is generally above 85%. At this time, the smart contract considers that the quality of node A's model does not meet the standard according to the pre-set standard, and node A will be punished, with its reputation score being reduced and possibly losing the right to participate in the next two rounds of training; in addition, in the process of updating the global model, node A's model is removed from the global model aggregation, and the model parameters of other nodes are integrated with weights, at this time, the updated global model will continue to propagate and update among the effective nodes.
[0125] In a specific implementation, for each round of training, the quality and accuracy of the model parameters will be verified according to the contributions of each node. If the quality of a node's submitted model parameters does not meet the standard, it will be punished and may lose the right to participate or be subject to reputation punishment. In the subsequent aggregation process, the smart contract evaluates the training quality of each node to ensure that only qualified training results can enter the aggregation of the global model.
[0126] In step S105, the qualified model training results are aggregated through the blockchain network to obtain a global model, and the global model is distributed to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model; the local traffic control model is used to realize intelligent management and control of the traffic scene.
[0127] In some embodiments, step S105 can include: aggregating the respective qualified model training results by using the decentralized characteristics of the blockchain network to obtain a global model; and distributing the global model to each target intelligent vehicle through the blockchain network, so that each target intelligent vehicle trains the corresponding local traffic control model according to the global model parameters in the global model to obtain an updated local traffic control model.
[0128] When a certain node is punished, the model update includes the following steps:
[0129] (1) Remove unqualified models: When a certain node is punished and removed, the model parameters submitted by the node will be removed from the global model. If the parameters of the node have participated in aggregation and affected the global model, a "rollback" mechanism needs to be used to correct the parameters to ensure the accuracy of the global model is not affected.
[0130] (2) Dynamic update: The system will re-aggregate the global model based on the valid models submitted by other nodes. At this time, the model parameters contributed by the unqualified node will be discarded, and the model aggregation will continue to be updated by the valid parameters of the remaining nodes.
[0131] (3) Calibration and optimization: After a certain node is punished, the system recalibrates the training load of the remaining participating nodes to ensure that the model can continue to be optimized by high-quality nodes.
[0132] The distributed is the aggregated and updated global model, which contains the training information and optimization results from all participating nodes (vehicle-mounted devices). This model has been aggregated and its correctness and integrity are guaranteed by the blockchain. The role of the global model is to be used for the next round of local training and optimization of intelligent vehicles (or other participating nodes). In the application scenario of Internet of Vehicles, vehicles will perform local training based on the global model to improve driving behavior prediction, traffic signal optimization, automatic driving algorithms, and other tasks, thereby providing more efficient and accurate decision support in subsequent applications.
[0133] In a specific implementation, the training results are aggregated to obtain a global model based on all participants by using the decentralized characteristics of the blockchain. The aggregated global model is updated and distributed to all participating nodes through the blockchain network, and each participating node performs the next round of local training based on the global model. The blockchain ensures the transparency and security of model updates, and all participants can view and verify the process and results of model updates in real time. The records of all training processes are saved as non-tamperable blockchain transaction logs, and each node can trace back and audit the training process by querying the blockchain to ensure that there is no external malicious attack. The aggregation algorithm can use weighted average or other adaptive aggregation methods, and the embodiments of the present application do not limit this.
[0134] Specifically, after all nodes submit their training results to the blockchain, the blockchain aggregates the contributions of each node through a smart contract and performs decentralized model aggregation, which includes calculating the contribution values of each node and updating the global model according to the contribution degree weighting; finally, the aggregated global model is updated and distributed to all nodes through the smart contract, ensuring that each participant can perform the next round of training based on the new global model, constantly updating and optimizing the local model and the global model.
[0135] In the embodiments of the present application, by dynamically adjusting and verifying the model parameters, quality evaluation, intelligent contract automatic verification, and the introduction of reward and punishment mechanism, the quality of model training and the collaboration effect of participants can be ensured; by using decentralized blockchain technology, transparency and efficiency are achieved, while preventing interference from malicious nodes, effectively ensuring the security and fairness of the system.
[0136] In specific implementation, the embodiments of the present application integrate federated learning and blockchain, potentially changing the intelligent vehicle networking with decentralization and insecurity. Specifically, using decentralized blockchain can eliminate the need for a central server in federated learning training in the traffic scenario, instead, a shared immutable ledger is used to aggregate the global model and distribute the global updates to learning clients for direct computation on devices. The non-centralization of model aggregation not only reduces the risk of single point failure, thereby improving the training reliability, but also reduces the burden on the central server in global model aggregation, especially when the intelligent vehicle networking has multiple clients. Learning updates are attached to immutable blocks for information exchange between clients during training, thereby ensuring high security of training against external attacks. Copying the blocks to the entire network also allows all clients to verify and track the training progress, ensuring high trust and transparency of the blockchain-enabled new framework. Eliminating the central server for model aggregation in the traffic scenario can reduce communication costs and attract more vehicle networking users to participate in data training based on the decentralized network topology of the intelligent vehicle networking, thereby improving the scalability of the intelligent vehicle networking. In addition, the embodiments of the present application focus on the research of the blockchain-enabled federated learning new framework, in the process of model training based on federated learning, the information necessary for training the model is transmitted between participants through the blockchain, but the data cannot be transmitted, so as to effectively perform the calculation based on federated learning while protecting the privacy of users.
[0137] The steps S101 to S105 shown in the embodiments of the present application are as follows: obtaining the to-be-trained vehicle-mounted sensor data corresponding to a plurality of intelligent vehicles in a vehicle networking system; performing identity authentication on each intelligent vehicle through a blockchain network to determine a plurality of target intelligent vehicles participating in federated learning; each target intelligent vehicle trains a local traffic control model according to the corresponding to-be-trained vehicle-mounted sensor data, obtains a plurality of local model training results, and sends each local model training result to the blockchain network; evaluating each local model training result through a smart contract in the blockchain network to determine a plurality of qualified model training results; aggregating each qualified model training result through the blockchain network to obtain a global model, and distributing the global model to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model; and the local traffic control model is used to realize intelligent management and control of a traffic scene. The embodiments of the present application use federated learning, so that the intelligent vehicle trains the model locally without uploading the original data to the blockchain network, thereby reducing the risk of user privacy leakage; the use of the blockchain technology eliminates the single-point failure risk brought by the traditional centralized scheme, and the decentralized model aggregation method enables the training results of all participating nodes to be effectively verified and monitored, preventing malicious attacks and data tampering. At the same time, the automatic model quality evaluation based on the blockchain smart contract ensures that the aggregated global model has high quality, thereby improving the reliability of the traffic control system. By introducing the blockchain technology in combination with federated learning, the need for a large amount of data transmission is reduced, the communication cost is reduced, and the security and reliability of the federated learning process in the vehicle networking system are improved. At the same time, the local traffic control model can be updated in real time according to the global model, and through the continuous updating and optimization of the local traffic control model, the intelligent vehicle can better adapt to complex traffic scenes and achieve more accurate traffic control.
[0138] To explain the principle of the technical scheme of the present application in detail, the overall process of the present application will be described below in combination with some specific embodiments. It should be easily understood that the following is an explanation of the technical principle of the present application and cannot be regarded as a limitation of the present application.
[0139] Please refer to Figure 2 , Figure 2 is a blockchain-enabled federated learning framework design structure provided by the embodiments of the present application, Figure 2 is a blockchain-enabled federated learning framework. The traffic control model training method based on blockchain and federated learning provided in the embodiments of the present application works based on this federated learning framework, as shown in Figure 2 The specific working content and working principle of each data processing layer in the blockchain-enabled federated learning framework are as follows:
[0140] (1) Data access layer;
[0141] 1) Model Invocation: In this layer, the invocation of the model is triggered by the blockchain network, and the model is called through the execution of the smart contract. When the model is shared among nodes, it is accessed through an API interface, which conforms to the transparency and decentralization characteristics of blockchain technology.
[0142] 2) Model Transaction: Model transaction refers to the exchange of parameters during model updating, and the transaction is recorded by the blockchain to ensure the integrity of data and model updating.
[0143] 3) Parameter Configuration: Each participant adjusts and configures the parameters of the model according to the training needs. The tamper-proof nature of the blockchain ensures the transparency and security of these configuration processes.
[0144] 4) API Interface: Provides a communication interface for model access and configuration, ensuring secure transmission of information between nodes.
[0145] (2) Smart Contract Layer;
[0146] 1) Automated Model Aggregation: In the federated learning framework, the model aggregation process is automated, and all models from different nodes are aggregated through blockchain technology without the intervention of a central server.
[0147] 2) Automated Parameter Verification: The smart contract verifies the validity of the model parameters submitted by each node, ensuring that only qualified parameters can enter the aggregation process of the global model.
[0148] 3) Automated Reputation Scoring: To encourage high-quality model contributions, the smart contract also scores the reputation of nodes based on the quality of their contributions, and the incentive mechanism promotes participants to comply with the norms and prevents malicious behavior.
[0149] (3) Incentive Mechanism Layer;
[0150] 1) Minimization of Resource Overhead: This layer optimizes the use of computing resources through smart contracts, reducing unnecessary resource waste and reducing operating costs, especially in a decentralized environment.
[0151] 2) Maximization of Node Utility: By rewarding and incentivizing participants, the maximum utility output of the node is ensured, i.e., the node provides high-quality model updates as much as possible.
[0152] 3) Maximization of Overall Benefits: The incentive mechanism ensures the maximization of the overall benefits of the federated learning process through incentives and penalties for nodes, i.e., the improvement of model training quality and efficiency.
[0153] (4) Consensus protocol layer;
[0154] 1) Node contribution proof: The consensus mechanism of the blockchain (such as PoW or PoS) ensures that each node proves its effectiveness according to its contribution, ensuring the honesty of participants.
[0155] 2) Collaborator parameter audit: The blockchain provides audit functions for the uploading and updating of parameters for all nodes, ensuring that collaborators do not upload false parameters.
[0156] 3) Block accounting right competition: Nodes obtain the opportunity to account for blocks according to their contribution, ensuring the decentralization and security of the blockchain through the right to account for blocks.
[0157] (5) Network communication layer;
[0158] 1) P2P (Peer-to-Peer) communication network: All nodes communicate directly through the P2P network, without relying on a central server, in line with the distributed nature of blockchain technology, enhancing decentralization and data privacy.
[0159] 2) Gossip protocol: This protocol is used to quickly disseminate information and data, ensuring that nodes in the network can quickly obtain global information.
[0160] 3) Auxiliary communication facilities: Ensure communication and synchronization between nodes, which can enhance the stability and reliability of information transmission.
[0161] (6) Data storage layer;
[0162] 1) Transaction data block: Each upload and update of model parameters is recorded in the blockchain in the form of a transaction, ensuring the immutability of information.
[0163] 2) Hash chain structure: The hash value of each data block is linked to the previous block, forming a chain structure, enhancing data security.
[0164] 3) Merkle data verification: The Merkle tree used for data verification helps ensure that the transmitted data is complete and accurate, and can efficiently verify data in the blockchain.
[0165] (7) Federated learning layer;
[0166] 1) Distributed model training: The training process of the model is distributed, with each node performing local training using local data and sharing model parameters to prevent data leakage.
[0167] 2) Adaptive model aggregation: Based on the contribution and training quality of different nodes, use adaptive methods for model aggregation to optimize the final global model.
[0168] 3) Privacy requirement awareness: During model training, privacy protection requirements are fully considered, and data privacy is ensured not to be leaked through encryption technologies such as homomorphic encryption or differential privacy technology.
[0169] 4) Node training incentive: Each node is rewarded by providing high-quality training results, encouraging nodes to train efficiently.
[0170] 5) Joint training group construction: Each node is formed into a training group, and more efficient training is performed through intra-group collaboration to improve model quality.
[0171] 6) Model parameter audit: The uploaded model parameters are audited to ensure the quality and credibility of the parameters for further optimization of the global model.
[0172] Through the mutual cooperation of each level of the above federal learning framework, the safety, transparency and efficiency of the entire training process are guaranteed, and the addition of smart contracts, decentralized protocols and privacy protection mechanisms can effectively reduce communication costs and improve training quality.
[0173] In the embodiments of the present application, the overall implementation process of the traffic control model training method based on blockchain and federal learning is as follows:
[0174] Step one, data preprocessing and participant authentication;
[0175] Obtain the local data of the intelligent vehicle, preprocess the local data of the intelligent vehicle, remove the noise in the data, and extract the traffic scene related features. At the same time, the identity of each participating node is authenticated by the blockchain system to ensure that only legal devices participate in federal learning. Due to the non-tamperability and consensus mechanism of the blockchain, the legality of each participant is ensured, thereby avoiding the addition of malicious nodes and improving the credibility of the overall system.
[0176] Step two, local model training;
[0177] Each participating node trains a deep learning model according to its own sensor data, and uploads the trained model parameters to the blockchain network. By transmitting only the trained model parameters to the blockchain network instead of the original data, data privacy is protected. Since the data does not leave the local device, the privacy information of the user is protected, and the security risks that may be caused by data centralization are also avoided.
[0178] Step three, blockchain record and intermediate parameter storage;
[0179] The training results (model parameters and loss function) are recorded in the blockchain, and the decentralized nature of the blockchain eliminates the dependence on traditional centralized servers. The intermediate parameters of each training process are stored in the tamper-proof blocks of the blockchain, effectively avoiding the risks of data tampering and privacy leakage; at the same time, the contribution and training quality of each node are also recorded, ensuring the transparency and traceability of the model.
[0180] Step four, model aggregation and update;
[0181] The decentralized nature of the blockchain is used for model aggregation. The training quality of each node is automatically evaluated by the smart contract, ensuring that the global model updated in each round is based on qualified model parameters. This decentralized aggregation method improves the security and transparency of the training process. Among them, the existence of malicious nodes is identified and punished by the smart contract, ensuring the fairness and quality of the system; for the nodes that submit high-quality model parameters, the smart contract will give rewards.
[0182] Step five, model update and distribution;
[0183] The aggregated global model is distributed to all participating nodes through the blockchain network, and each participating node updates the local training based on the global model, ensuring the transparency and security of the update process. All training records and model update logs are stored in the blockchain, ensuring the high credibility of the training process. The tamper-proof nature of the blockchain allows every detail of the training process to be traced back and verified, preventing external malicious attacks.
[0184] In specific implementation, the specific implementation process of the traffic control model training method based on blockchain and federated learning is as follows:
[0185] (1) Data collection and training; each participant (i.e. intelligent vehicle) trains based on its local sensor data (such as speed, position, direction, etc.); each participant (i.e. intelligent vehicle) can obtain its corresponding training parameters (intermediate parameters) by training the local model. These intermediate parameters usually include network weights, bias values and loss function values, etc. In this process, the training data itself does not leave the vehicle, but is encrypted (such as homomorphic encryption or differential privacy) to ensure user data privacy.
[0186] (2) Generate a block and upload the intermediate parameters; after local training, each participant (i.e. intelligent vehicle) will generate a training result (such as model parameters, loss function values, etc.), and package it into a "training result block", which will be uploaded to the network for storage through the blockchain network. Each block contains the following content:
[0187] 1) Training results: such as the parameters of the model (e.g. weights and biases) and the calculated loss function;
[0188] 2) Verification information: including the ID of the participants to ensure legitimacy, signatures, timestamps, etc. for verifying the source of the submitted results;
[0189] 3) Smart contract verification: each uploaded block triggers a smart contract on the blockchain, which performs preliminary verification on the uploaded training results, checking whether they meet specific format and legality requirements.
[0190] For example, assume vehicle A uploads its training result block, which includes the trained model weights, biases, loss value, and is accompanied by a digital signature of the on-board device. The smart contract will first verify the validity of these data, and if verified, generate a "legal" tag and store it on the blockchain.
[0191] (3) Aggregated intermediate parameters: Once multiple vehicles have submitted their corresponding training results, the system will aggregate these training results. Aggregation is based on the decentralized nature of the blockchain, rather than through a centralized parameter server.
[0192] Decentralized aggregation: the model parameters (e.g. weights, biases) contained in each uploaded block will be verified and weighted averaged or other aggregation methods by other nodes (such as vehicle B, vehicle C). The specific aggregation method can be defined through the smart contract:
[0193] 1) Weighted average: according to the quality of each node's training (such as the low or high of the loss function, the good or bad of the training effect), different weights are given for aggregation.
[0194] 2) Other aggregation methods: such as adaptive aggregation algorithm, weighted aggregation based on node reputation, etc.
[0195] For example, assume vehicles A, B, C upload weights W A , W B , W C , and after verifying their validity through the smart contract, the aggregated weight is W agg = α * W A + β * W B + γ * W C , where α, β, γ are weight coefficients based on the contribution of each vehicle model.
[0196] (4) Verification and validation:
[0197] 1) Verify intermediate parameters: To ensure that the uploaded intermediate parameters (such as model weights) have not been tampered with, the blockchain's tamper-proof nature ensures that each submitted block and training result has a digital signature and that the integrity of the block data is ensured through a hash chain. Each submitted training result needs to be verified by multiple nodes in the blockchain network to ensure that the submitted result has not been maliciously tampered with;
[0198] 2) Verification mechanism: The verification process is automatically executed by the smart contract, and the specific operations include:
[0199] Verification parameters: Verify whether the model parameters in the training result meet the predetermined standards (for example, whether the loss function is low enough, whether the model parameters meet a certain range);
[0200] Verify the legitimacy of the submitted training result: Check whether the participant's identity is legal (for example, verify using the vehicle's public key) to prevent malicious nodes from submitting false results;
[0201] Verify integrity: Through the hash link of the blockchain, ensure that the submitted block has not been tampered with. If the data of a certain block has changed, the hash value of the subsequent block will change, causing the entire chain to fail, so that illegal operations can be discovered in a timely manner.
[0202] For example, assume that the training parameters submitted by vehicle B do not pass the smart contract verification process (such as a high loss function or an unqualified model), the system will reject the addition of this block, and the punishment mechanism will handle vehicle B accordingly (such as reducing the reputation score, suspending participation in training, etc.).
[0203] (5) Aggregated global model: After aggregation, the global parameters of the model (i.e., the weighted average of all participants' training results) are generated and distributed to all participants through the blockchain network.
[0204] Transparency and audit: Each node can query its own contribution through the blockchain, as well as the contributions of other participants and the parameter update log of the entire training process. The transparency and tamper-proof nature of the blockchain ensures the fairness and traceability of all model updates and training processes.
[0205] For example, the global model parameters will be distributed to all participating vehicles through the blockchain, and each node will use it as an initialization parameter to start the next round of local training after receiving the global model. The process of global model update, the contribution of each node, and the reason for model update will be stored in the log of the blockchain, which can be audited at any time.
[0206] Through the above process, the blockchain can centrally aggregate and verify the intermediate parameters generated in the training process in a decentralized manner while ensuring data privacy, data integrity and tamper resistance, thereby ensuring the transparency, security and reliability of the traffic scene model training in the intelligent vehicle networking.
[0207] In the embodiments of the present application, the blockchain-enabled federated learning framework constructs the centralized parameter server of federated learning into a decentralized parameter aggregation chain, records the intermediate parameters of the traffic scene model training process as evidence by using the blockchain, and encourages the collaborative nodes to verify the model parameters, punishes the participating nodes that upload false parameters or low-quality models to constrain their self-interest. In addition, the model quality is used as the basis for evaluation to realize dynamic adjustment of the intermediate parameter privacy noise and adaptive model aggregation to protect user privacy and resist potential vehicle network attacks. By replacing the traditional centralized parameter server with a decentralized blockchain network, the risks of data privacy leakage and centralized system in traditional model training are avoided, and the security, reliability and efficiency of the system and model training are improved.
[0208] It is worth noting that although the embodiments of the present application propose a decentralized solution, in actual application, the data can still be transmitted to a trusted central server for model aggregation, and the data privacy can be protected by encryption means, but the scheme of transmitting data to a trusted central server for model aggregation is vulnerable to single point failure and malicious attacks, and the data privacy is difficult to be completely protected. In addition, other distributed storage technologies such as IPFS (InterPlanetary File System, InterPlanetary File System) can be used to replace the blockchain for model parameter storage and distribution, but the decentralization and non-tamperability of the blockchain proposed in the embodiments of the present application can better ensure the security of the system compared to these distributed storage technologies. Therefore, in the federated learning framework design provided in the embodiments of the present application, the blockchain network, the smart contract and the encryption algorithm are necessary structures, and the central server is an optional structure. Specifically, the blockchain network is used to store the intermediate parameters in the training process and provide decentralized support for model aggregation; the smart contract is used to evaluate the quality of the model parameters provided by the participants and reward or punish the nodes according to the quality; the encryption algorithm is used to protect data privacy and ensure the security of data in the training process. However, in some low requirement scenarios, a traditional centralized server can be used for model aggregation, but the security of the server needs to be ensured.
[0209] It should be noted that the embodiments only briefly and schematically illustrate the general process of the traffic control model training method based on blockchain and federated learning, and the detailed description of each step can refer to the related content in the foregoing embodiments, which will not be repeated here. It can be understood that the present application does not limit this.
[0210] The embodiment of the application obtains the to-be-trained vehicle-mounted sensor data corresponding to a plurality of intelligent vehicles in a vehicle networking system; performs identity authentication on each intelligent vehicle through a blockchain network to determine a plurality of target intelligent vehicles participating in federated learning; each target intelligent vehicle trains a local traffic control model according to the corresponding to-be-trained vehicle-mounted sensor data, obtains a plurality of local model training results, and sends each local model training result to the blockchain network; each local model training result is evaluated through a smart contract in the blockchain network to determine a plurality of qualified model training results; each qualified model training result is aggregated through the blockchain network to obtain a global model, and the global model is distributed to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model; the local traffic control model is used to realize intelligent management and control of a traffic scene. The embodiment of the application adopts a federated learning mode, so that the intelligent vehicle trains the model locally without uploading the original data to the blockchain network, thereby reducing the risk of user privacy leakage; the blockchain technology is adopted to eliminate the single-point failure risk brought by the traditional centralized scheme, the decentralized model aggregation mode enables the training results of all participating nodes to be effectively verified and monitored, preventing malicious attacks and data tampering, and at the same time, the automatic model quality evaluation based on the blockchain smart contract ensures that the aggregated global model has high quality, thereby improving the reliability of the traffic control system; by introducing the blockchain technology in combination with the federated learning, the need for a large amount of data transmission is reduced, the communication cost is reduced, and the security and reliability of the federated learning process in the vehicle networking system are improved; at the same time, the local traffic control model can be updated in real time according to the global model, and through continuous updating and optimization of the local traffic control model, the intelligent vehicle can better adapt to complex traffic scenes and realize more accurate traffic control.
[0211] The key points of the embodiment of the application are:
[0212] (1) Decentralized model aggregation: by introducing the blockchain technology, the traditional centralized parameter server is replaced by the decentralized blockchain ledger, eliminating the risk of single-point failure and improving the security and reliability of the system.
[0213] (2) Intermediate parameter privacy protection: encryption algorithms (such as homomorphic encryption, differential privacy, etc.) are used to protect the intermediate parameters generated during the training process, ensuring that the data content cannot be leaked or tampered with even during transmission.
[0214] (3) Automatic evaluation mechanism of smart contract: the automatic model quality evaluation and punishment mechanism based on the blockchain smart contract ensures that each participant provides qualified model updates, encouraging cooperation while punishing malicious nodes.
[0215] (4) Trustworthiness and transparency: The immutability and transparency of blockchain enable the model training process, parameter updates and node contributions to be traced and verified in real time, which improves the trustworthiness and security of the system.
[0216] In summary, the technical effects of the embodiments of this application include the following:
[0217] (1) Improved system security and reliability: By adopting blockchain technology, the system eliminates the single point of failure risk associated with traditional centralized solutions. Furthermore, the immutability and transparency of the blockchain ensure that the contributions and training process of each node are traceable and verifiable. All updates during the training process are transparently recorded in the blockchain, enhancing the system's trustworthiness. The decentralized model aggregation method allows for effective verification and monitoring of the training results of all nodes, preventing malicious attacks and data tampering; and the fact that each node and the training process are recorded on the blockchain ensures the security of data and model updates.
[0218] (2) Enhanced data privacy protection: Intermediate parameters generated during training are protected by encryption technology and recorded on the blockchain, preventing data leakage or tampering during transmission. Compared with traditional solutions, this approach ensures the integrity of user privacy by transmitting only model parameters and not the data itself.
[0219] (3) Effectiveness of the incentive and penalty mechanism: The automated model quality evaluation and incentive mechanism implemented through smart contracts ensures that each participant provides high-quality model updates. Malicious nodes submitting low-quality models will be identified and penalized, ensuring the fairness and effectiveness of the federated learning process.
[0220] (4) Reduced communication costs: Traditional centralized servers require frequent transmission of large amounts of raw data, while the embodiments of this application reduce the need for large-scale data transmission through decentralized model training and parameter transmission. Each node only uploads model parameters, thereby significantly reducing communication bandwidth and latency. Through this solution, the communication cost of the vehicle-to-everything (V2X) system can be reduced by approximately 30%-50%.
[0221] (5) Improved model training efficiency: The decentralized model aggregation method not only reduces the dependence on central servers, but also improves the efficiency of model training by automatically evaluating and optimizing model updates through smart contracts. Experiments show that the model training framework combining blockchain and federated learning can shorten the training time by 20%-40% compared to traditional methods.
[0222] (5) Enhance the scalability of the system: through the blockchain technology and the decentralized aggregation, each participating node in the Internet of Vehicles can independently train and participate in the update of the global model. The system can be expanded with the increase of participating nodes, while ensuring the data privacy of each node and the efficient use of computing resources. With the increase of the number of nodes, the training efficiency and system scalability gradually improve, and the scalability is stronger in theory.
[0223] The embodiments of the present application effectively solve the technical problems of traditional vehicle networking systems in data privacy, model training efficiency, security and system scalability by introducing the combination of blockchain technology and federated learning. Through the design of decentralization and encryption technology, the overall security, transparency and trust of the system are improved. At the same time, by using smart contract and decentralized aggregation, the efficiency and fairness of the training process are ensured, which has significant technical advantages and practical value.
[0224] Please refer to Figure 3 The embodiments of the present application also provide a traffic control model training system 300 based on blockchain and federated learning, which can implement the traffic control model training method based on blockchain and federated learning. The system 300 includes the following modules:
[0225] The trained vehicle sensor data acquisition module 301 is used to acquire the trained vehicle sensor data corresponding to a plurality of intelligent vehicles in the vehicle networking system;
[0226] The intelligent vehicle identity authentication module 302 is used to authenticate the identity of each intelligent vehicle through the blockchain network, and determine a plurality of target intelligent vehicles participating in federated learning;
[0227] The local traffic control model training module 303 is used to train the local traffic control model according to the corresponding trained vehicle sensor data of each target intelligent vehicle, obtain a plurality of local model training results, and send each local model training result to the blockchain network;
[0228] The local model training result evaluation module 304 is used to evaluate each local model training result through the smart contract in the blockchain network, and determine a plurality of qualified model training results;
[0229] The global model aggregation module 305 is used to aggregate each qualified model training result through the blockchain network, obtain a global model, and distribute the global model to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model; the local traffic control model is used to realize intelligent management and control of traffic scenes.
[0230] It can be understood that the contents in the above method embodiments are all applicable to the present system embodiments, the present system embodiments specifically implement the functions same as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.
[0231] The present application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above traffic control model training method based on blockchain and federated learning when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0232] It can be understood that the contents in the above method embodiments are all applicable to the present device embodiments, the present device embodiments specifically implement the functions same as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.
[0233] Please refer to Figure 4 , Figure 4 The hardware structure of the electronic device of another embodiment is illustrated, which includes:
[0234] The processor 401 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the present application;
[0235] The memory 402 can be implemented in the form of a ROM (Read-Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 402 can store an operating system and other application programs. When the technical solutions provided by the present application are implemented by software or firmware, the related program codes are stored in the memory 402 and are called and executed by the processor 401 to implement the traffic control model training method based on blockchain and federated learning of the present application;
[0236] The input / output interface 403 is used to realize information input and output;
[0237] The communication interface 404 is used to realize the communication interaction between the present device and other devices. The communication can be realized by a wired manner (such as a USB, a network cable, etc.) or a wireless manner (such as a mobile network, WIFI, Bluetooth, etc.);
[0238] a bus 405 for transmitting information between the various components (e.g., the processor 401, the memory 402, the input / output interface 403, and the communication interface 404) of the device;
[0239] The processor 401, the memory 402, the input / output interface 403, and the communication interface 404 are communicatively connected to each other within the device through the bus 405.
[0240] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the traffic control model training method based on the blockchain and federated learning.
[0241] It can be understood that the contents in the above method embodiments are applicable to the present storage medium embodiments. The present storage medium embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.
[0242] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged with respect to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0243] The traffic control model training method and system based on the blockchain and federated learning provided by the embodiments of the present application obtain the to-be-trained vehicle-mounted sensor data corresponding to a plurality of intelligent vehicles in a vehicle networking system; perform identity authentication on each intelligent vehicle through a blockchain network to determine a plurality of target intelligent vehicles participating in federated learning; each target intelligent vehicle trains a local traffic control model according to the corresponding to-be-trained vehicle-mounted sensor data, obtains a plurality of local model training results, and sends each local model training result to the blockchain network; each local model training result is evaluated through a smart contract in the blockchain network to determine a plurality of qualified model training results; each qualified model training result is aggregated through the blockchain network to obtain a global model, and the global model is distributed to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model; the local traffic control model is used to realize intelligent management and control of a traffic scene. The embodiments of the present application use the federated learning method, so that the intelligent vehicle trains the model locally without uploading the original data to the blockchain network, thereby reducing the risk of user privacy leakage; the blockchain technology is used to eliminate the single-point failure risk caused by the traditional centralized scheme, the decentralized model aggregation method enables the training results of all participating nodes to be effectively verified and monitored, preventing malicious attacks and data tampering, and at the same time, the automatic model quality evaluation based on the blockchain smart contract ensures that the aggregated global model has high quality, thereby improving the reliability of the traffic control system; by introducing the blockchain technology combined with the federated learning, the need for a large amount of data transmission is reduced, the communication cost is reduced, and the security and reliability of the federated learning process in the vehicle networking system are improved; at the same time, the local traffic control model can be updated in real time according to the global model, and through continuous updating and optimization of the local traffic control model, the intelligent vehicle can better adapt to complex traffic scenes and realize more accurate traffic control.
[0244] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0245] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figures shown, or combine certain steps or different steps.
[0246] The system embodiments described above are merely illustrative, and units described as separate components can or can not be physically separate, i.e., can be located in one place or can be distributed over multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purposes of the embodiments.
[0247] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functional modules / units in the system and the device can be implemented by software, firmware, hardware or a suitable combination thereof.
[0248] In several embodiments provided in the present application, it should be understood that the disclosed system and method can be implemented in other manners. For example, the system embodiments described above are merely illustrative, and the division of the above units is merely a logical function division, and there can be another division manner in actual implementation, e.g., multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between the units can be indirect coupling or communication connection through some interface, and can be electrical, mechanical or in other forms.
[0249] The units described as separate components above can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place or can be distributed over multiple network units. Part or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.
[0250] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and the scope of the rights of the embodiments of the present application is not limited thereto. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the rights of the embodiments of the present application.
Claims
1. A traffic control model training method based on blockchain and federated learning, characterized in that, The method comprises the following steps: Obtaining a plurality of intelligent vehicles corresponding to the vehicle-mounted sensor data to be trained in a vehicle networking system; Through a blockchain network, the identity of each intelligent vehicle is authenticated to determine a plurality of target intelligent vehicles participating in federated learning; Each target intelligent vehicle trains a local traffic control model according to the corresponding vehicle-mounted sensor data to be trained, obtains a plurality of local model training results, and sends each local model training result to the blockchain network; Through the smart contract in the blockchain network, each local model training result is evaluated to determine a plurality of qualified model training results; Through the blockchain network, each qualified model training result is aggregated to obtain a global model, and the global model is distributed to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model; the local traffic control model is used to realize intelligent management and control of the traffic scene; The evaluation of each local model training result through the smart contract in the blockchain network to determine a plurality of qualified model training results comprises: Through the smart contract in the blockchain network, the training quality of each local model training result is evaluated to determine whether each local model training result meets the preset training quality standard; Through the smart contract, the compliance of each local model training result is checked to determine whether each local model training result meets the preset compliance standard; The local model training result meeting the preset training quality standard and the preset compliance standard is taken as the qualified model training result.
2. The method of claim 1, wherein, Before obtaining the vehicle-mounted sensor data to be trained corresponding to a plurality of intelligent vehicles in a vehicle networking system, the method further comprises: Obtaining a plurality of local vehicle-mounted sensor data corresponding to the intelligent vehicles in the vehicle networking system; Each local vehicle-mounted sensor data is encrypted using a target encryption algorithm, and each encrypted local vehicle-mounted sensor data is preprocessed to obtain a plurality of vehicle-mounted sensor data to be trained.
3. The method of claim 2, wherein, The encryption of each local vehicle-mounted sensor data using the target encryption algorithm and the preprocessing of each encrypted local vehicle-mounted sensor data to obtain a plurality of vehicle-mounted sensor data to be trained comprises: Each local vehicle-mounted sensor data is encrypted using the target encryption algorithm, and each encrypted local vehicle-mounted sensor data is respectively denoised to obtain a plurality of local clean sensor data; Each local clean sensor data is respectively processed for feature extraction to obtain a plurality of local initial traffic feature data; Each local initial traffic feature data is respectively processed for data fusion to obtain a plurality of local multi-source traffic feature data; Each local multi-source traffic feature data is subjected to deep learning to extract a plurality of local multi-source key traffic feature data; The local multi-source key traffic feature data is respectively selected and dimensionally reduced to obtain the vehicle-mounted sensor data to be trained.
4. The method of claim 1, wherein, The method further comprises: The intermediate parameters generated in the training process of the local traffic control model are encrypted by using a target encryption algorithm.
5. The method of claim 1, wherein, The method further comprises: The target intelligent vehicle corresponding to the local model training result meeting the preset training quality standard is encouraged; The target intelligent vehicle corresponding to the local model training result not meeting the preset training quality standard is punished.
6. The method of claim 1, wherein, The global model is obtained by aggregating the qualified model training results through the blockchain network, and the global model is distributed to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model, which comprises: The global model is obtained by aggregating the qualified model training results through the blockchain network by using the decentralized characteristics; The global model is distributed to each target intelligent vehicle through the blockchain network, so that each target intelligent vehicle trains the corresponding local traffic control model according to the global model parameters in the global model to obtain an updated local traffic control model. 7.A traffic control model training system based on blockchain and federated learning, characterized in that, The system comprises the following modules: A vehicle-mounted sensor data to be trained acquisition module is configured to acquire vehicle-mounted sensor data to be trained corresponding to a plurality of intelligent vehicles in a vehicle networking system; An intelligent vehicle identity authentication module is configured to authenticate the identity of each intelligent vehicle through a blockchain network to determine a plurality of target intelligent vehicles participating in federated learning; A local traffic control model training module is configured to train a local traffic control model according to the corresponding vehicle-mounted sensor data to be trained by each target intelligent vehicle to obtain a plurality of local model training results, and send each local model training result to the blockchain network; A local model training result evaluation module is configured to evaluate each local model training result through a smart contract in the blockchain network to determine a plurality of qualified model training results; A global model aggregation module is configured to aggregate each qualified model training result through the blockchain network to obtain a global model, and distribute the global model to each target intelligent vehicle, so that each target intelligent vehicle updates the local traffic control model according to the global model; the local traffic control model is used to realize intelligent management and control of a traffic scene; The local model training result evaluation module is specifically configured to: Evaluate the training quality of each local model training result through the smart contract in the blockchain network to determine whether each local model training result meets a preset training quality standard; Check the compliance of each local model training result through the smart contract to determine whether each local model training result meets a preset compliance standard; The local model training result satisfying the preset training quality standard and the preset compliance standard is taken as the qualified model training result.
8. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the method in any one of claims 1 to 6.
Citation Information
Patent Citations
Parking prediction model training method and system based on federal learning and blockchain
CN113592102A
Incentive-driven block chain federal learning method
CN113657608A