Federated Learning Method, Roadside Unit, Vehicle Node and Base Station Based on Vehicular Network

By receiving and aggregating model training data of vehicle nodes in the Internet of Vehicles system, the problems of low communication efficiency and data security in the Internet of Vehicles federated learning are solved, and efficient distributed model sharing and privacy protection are achieved.

CN114492739BActive Publication Date: 2025-06-24BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210007360.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2025-06-24
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

The existing federated learning methods have data security and privacy protection problems in the Internet of Vehicles scenarios, high communication consumption and low communication efficiency.

Method used

By receiving the first transaction data sent by the vehicle node in the master-slave multi-chain vehicle networking system, the model training data pre-stored at the vehicle node locality is obtained, and global aggregation and consensus processing are performed, the second transaction data is generated, and sent to the base station to aggregate the global model.

Benefits of technology

It improves communication efficiency in the process of federated learning of the Internet of Vehicles, enhances the security sharing and privacy protection of vehicle data, avoids single point of failure, and reduces communication consumption and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114492739B_ABST
    Figure CN114492739B_ABST
Patent Text Reader

Abstract

The present application provides a federated learning method, a roadside unit, a vehicle node, and a base station based on the vehicle Internet of Things. The method includes: receiving first transaction data sent by each vehicle node in the slave chain to which it currently belongs in a master-slave multi-chain vehicle Internet of Things system, and respectively obtaining model training data pre-stored locally in the corresponding vehicle nodes according to the first transaction data; performing global aggregation and consensus processing on the model training data to generate second transaction data; autonomously sending the second transaction data to the base station in the master chain to which it belongs in the multi-chain vehicle Internet of Things system, so that the base station aggregates the received second transaction data to obtain a corresponding federated learning global model. The present application can enhance the secure sharing and privacy protection of vehicle data, effectively avoid single-point failures, reduce communication consumption and costs, and improve the communication efficiency in the process of federated learning using the vehicle Internet of Things, realizing efficient distributed model sharing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of federated learning, and particularly to a federated learning method, a roadside unit, a vehicle node, and a base station based on a vehicle-to-everything (V2X) network. Background Art

[0002] In the development of artificial intelligence, federated learning has become the focus of research on data sharing in the V2X network. Federated learning distributes training data on mobile devices, and the central server trains a model by aggregating the updated model parameters calculated locally, thus transforming the data sharing problem into a model sharing problem. In the process of uploading the federated learning model parameters, how to provide an incentive mechanism to improve the overall learning efficiency is a challenging problem.

[0003] Currently, the existing federated learning method is as follows: the road test unit selects a training task and sends the model parameters to each vehicle with which a communication connection is established. Each vehicle uses local data to dock with the received task model parameters, uploads them to the road test unit after local training, and the road test unit returns the generated new parameters to each vehicle through global aggregation. This method does not consider the reliability of the road test unit, and there are no corresponding measures for single-point failure and communication transmission security problems. Moreover, due to the increase in the number of vehicles and the limitation of wireless bandwidth, communication efficiency has become one of the bottlenecks for large-scale data sharing in this scenario.

[0004] That is to say, the existing federated learning methods have problems such as being unable to meet the requirements of data security and privacy protection, high communication consumption, and low communication efficiency. Summary of the Invention

[0005] In view of this, embodiments of the present application provide a federated learning method, a roadside unit, a vehicle node, and a base station based on a V2X network to eliminate or improve one or more defects existing in the prior art.

[0006] One aspect of the present application provides a federated learning method based on a V2X network, including:

[0007] Receiving first transaction data sent by each vehicle node in the slave chain to which it currently belongs in a master-slave multi-chain V2X system, and respectively obtaining model training data pre-stored locally in each corresponding vehicle node according to each piece of the first transaction data;

[0008] Performing global aggregation and consensus processing on each piece of the model training data to generate second transaction data;

[0009] Sending the second transaction data from the master-slave multi-chain V2X system to a base station in the master chain to which it belongs, so that the base station aggregates the received second transaction data to obtain a corresponding federated learning global model.

[0010] In some embodiments of the present application, the first transaction data includes: the hash value corresponding to the model training data;

[0011] Wherein, the hash value is generated after the vehicle node stores the model training data in the local IPFS unit;

[0012] Correspondingly, obtaining the model training data pre-stored locally in each corresponding vehicle node according to each of the first transaction data includes:

[0013] Verifying the authenticity of the first transaction data;

[0014] Respectively extracting the corresponding hash values from each of the first transaction data that has passed the authenticity verification;

[0015] Based on each of the hash values, extracting the model training data from the local data storage units of the corresponding vehicle nodes respectively, wherein the local data storage unit is an IPFS storage unit generated based on the IPFS storage protocol.

[0016] In some embodiments of the present application, the first transaction data further includes: the decreasing ratio of the loss function;

[0017] Correspondingly, before performing global aggregation and consensus processing on each of the model training data to generate the second transaction data, it further includes:

[0018] Respectively extracting the corresponding decreasing ratios of the loss function from each of the first transaction data;

[0019] Determining the reward rankings of each vehicle node based on the reverse sorting results of the decreasing ratios of each loss function;

[0020] Sending corresponding rewards to each vehicle node according to the reward rankings.

[0021] In some embodiments of the present application, performing global aggregation and consensus processing on each of the model training data to generate the second transaction data includes:

[0022] Performing global aggregation processing on each of the model training data to obtain the corresponding global model data, and using the global model data as the transaction data;

[0023] Initiating a consensus for the transaction data based on the target consensus mechanism to verify the global model data, and determining the transaction data after consensus as the second transaction data, wherein the target consensus mechanism is pre-generated based on the Byzantine Fault Tolerance Consensus Mechanism and the Delegated Proof of Stake Consensus Mechanism.

[0024] In some embodiments of the present application, sending the second transaction data to the base station in the main chain to which it belongs in the vehicle-to-everything (V2X) system of the master-slave multi-chain, so that the base station aggregates the received second transaction data to obtain a corresponding federated learning global model, includes:

[0025] Sending the second transaction data to the base station in the main chain to which it belongs in the V2X system of the master-slave multi-chain, so that the base station stores the global model data corresponding to each of the received second transaction data locally, returns corresponding rewards, globally aggregates the global model data to generate a federated learning global model, and then forges a block for the federated learning global model, initiates consensus and broadcast processing based on a target consensus mechanism, where the target consensus mechanism is pre-generated based on the Byzantine Fault Tolerance (BFT) consensus mechanism and the Delegated Proof of Stake (DPoS) consensus mechanism;

[0026] Receiving the rewards sent by the base station.

[0027] Another aspect of the present application provides a roadside unit, including:

[0028] A data acquisition module, configured to receive first transaction data sent by each vehicle node in the slave chain to which it currently belongs in the V2X system of the master-slave multi-chain, and respectively obtain model training data pre-stored locally in the corresponding vehicle nodes according to the first transaction data;

[0029] A data processing module, configured to perform global aggregation and consensus processing on the model training data to generate second transaction data;

[0030] A data sending module, configured to send the second transaction data to the base station in the main chain to which it belongs in the V2X system of the master-slave multi-chain, so that the base station aggregates the received second transaction data to obtain a corresponding federated learning global model.

[0031] Another aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the federated learning method based on vehicle-to-everything is implemented.

[0032] Another aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the federated learning method based on vehicle-to-everything is implemented.

[0033] Another aspect of the present application provides a vehicle node, which is used to perform the following:

[0034] In a vehicle - to - everything (V2X) system with a master - slave multi - chain, receive the federated learning global model broadcast by the base station, and train the federated learning global model based on local data to obtain corresponding model training data;

[0035] Store the model training data in the local data storage unit and generate a corresponding hash value, where the local data storage unit is an IPFS storage unit generated based on the IPFS storage protocol;

[0036] Package the descent ratio of the loss function and the hash value as the first transaction data, and send the first transaction data to the roadside unit in the slave chain to which it currently belongs, so that the roadside unit executes the federated learning method based on the vehicle - to - everything network.

[0037] Another aspect of this application provides a base station, which is used to perform the following:

[0038] Receive the second transaction data respectively sent by each roadside unit for executing the federated learning method based on the vehicle - to - everything network;

[0039] Store the global model data corresponding to each received second transaction data locally, and return corresponding rewards to the corresponding roadside units;

[0040] Perform global aggregation on each global model data to generate a federated learning global model;

[0041] Perform forged block processing on the federated learning global model, and initiate consensus for the federated learning global model based on the target consensus mechanism to verify the federated learning global model, where the target consensus mechanism is pre - generated based on the Byzantine Fault Tolerance (BFT) consensus mechanism and the Delegated Proof of Stake (DPoS) consensus mechanism;

[0042] Broadcast the federated learning global model in the master - slave multi - chain vehicle - to - everything system, so that each vehicle node and roadside unit perform the next round of training based on the federated learning global model.

[0043] The federated learning method based on the vehicle networking in this application. The roadside unit receives the first transaction data sent by each vehicle node in the slave chain where it is located in the master-slave multi-chain vehicle networking system, and respectively obtains the model training data pre-stored locally in the corresponding vehicle nodes according to each piece of the first transaction data, rather than directly obtaining the model training data sent by the vehicle nodes. This can improve the communication efficiency in the process of federated learning using vehicle networking. The roadside unit performs global aggregation and consensus processing on each piece of the model training data to generate the second transaction data, and sends the second transaction data to the base station in the master chain where it is located in the master-slave multi-chain system, so that the base station aggregates the received second transaction data to obtain the corresponding global model. By introducing the method of combining blockchain and federated learning into vehicle networking, an asynchronous federated learning architecture based on the master-slave chain system is formed, which can enhance the secure sharing and privacy protection of vehicle data while effectively avoiding single-point failures and reducing communication consumption and costs, and can achieve efficient distributed model sharing, especially suitable for dynamic vehicle scenarios. The additional advantages, objectives, and features of this application will be partially elaborated in the following description, and will become partially obvious to those of ordinary skill in the art after studying the following text, or can be learned according to the practice of this application. The objectives and other advantages of this application can be achieved and obtained through the structure specifically pointed out in the specification and the drawings.

[0044] Those skilled in the art will understand that the objectives and advantages that can be achieved by this application are not limited to the above specific descriptions, and the above and other objectives that can be achieved by this application will be more clearly understood according to the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings described herein are used to provide a further understanding of this application, and constitute a part of this application, but do not limit this application. The components in the drawings are not drawn to scale, but only to illustrate the principles of this application. For the convenience of showing and describing some parts of this application, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to this application. In the drawings:

[0046] Figure 1 It is a schematic diagram of the overall process of the federated learning method based on vehicle networking in an embodiment of this application.

[0047] Figure 2 It is a schematic diagram of the specific process of the federated learning method based on vehicle networking in an embodiment of this application.

[0048] Figure 3 It is a schematic diagram of the structure of the roadside unit in another embodiment of this application.

[0049] Figure 4 Schematic diagram of the interaction process between the content executed by the vehicle node and the content executed by the roadside unit in another embodiment of this application.

[0050] Figure 5 Schematic diagram of the structure of the vehicle-to-everything (V2X) system with a master-slave multi-chain in another embodiment of this application.

[0051] Figure 6 Schematic diagram of the interaction process among the content executed by the vehicle node, the content executed by the roadside unit, and the content executed by the base station in another embodiment of this application.

[0052] Figure 7 Schematic diagram of the process of the federated learning method based on vehicle-to-everything (V2X) provided by the application example of this application.

[0053] Figure 8 Schematic diagram of some examples of Fashion-MNIST provided by the application example of this application.

[0054] Figure 9 Schematic diagram of some examples of MNIST provided by the application example of this application.

[0055] Figure 10 Schematic diagram of the accuracy of MNIST with different numbers of users provided by the application example of this application.

[0056] Figure 11 Schematic diagram of the accuracy of Fashion-MNIST with different numbers of users provided by the application example of this application.

[0057] Figure 12 Schematic diagram of the overall accuracy of the comparison algorithm for MNIST provided by the application example of this application.

[0058] Figure 13 Schematic diagram of the overall accuracy of the comparison algorithm for Fashion-MNIST provided by the application example of this application.

[0059] Figure 14 Schematic diagram of the communication time overhead in the training phase provided by the application example of this application. Detailed implementation manners

[0060] To make the objectives, technical solutions, and advantages of this application clearer and more understandable, the following further elaborates on this application in combination with the implementation manners and the accompanying drawings. Herein, the illustrative implementation manners of this application and their descriptions are used to explain this application, but not to limit this application.

[0061] Here, it should also be noted that, in order to avoid obscuring the present application with unnecessary details, only the structures and / or processing steps closely related to the solution according to the present application are shown in the drawings, while other details less relevant to the present application are omitted.

[0062] It should be emphasized that the term "comprising / including" when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0063] Here, it should also be noted that, unless otherwise specified, the term "connection" in this text can not only refer to a direct connection, but also represent an indirect connection with an intermediate.

[0064] Hereinafter, embodiments of the present application will be described with reference to the drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0065] Supported by new generation information and communication technologies such as 5G and artificial intelligence, the Internet of Vehicles (IoV) realizes intelligent traffic management, dynamic information services, and vehicle intelligent control through multi-dimensional interaction methods such as vehicle-to-vehicle, vehicle-to-person, and vehicle-to-roadside environment. The IoV mainly consists of vehicle nodes, roadside units RSU (Roadside Unit), and base stations BS (Base Station). Data sharing between vehicles and each node plays a crucial role in improving the driving experience and enhancing in-vehicle services. The massive data in the IoV contains a large amount of personal sensitive information, such as vehicle trajectories, traffic information, and multimedia data, etc. The leakage of sensitive information has a direct and obvious negative impact on users. How to efficiently share data while protecting vehicle privacy is the main research direction in the current IoV field.

[0066] In the development process of artificial intelligence, federated learning has become the focus of research on IoV data sharing. Federated learning distributes the training data on mobile devices, and the central server trains the model by aggregating the updated model parameters calculated locally, thus transforming the data sharing problem into a model sharing problem. In the process of uploading the federated learning model parameters, how to provide an incentive mechanism to improve the overall learning efficiency is a challenging problem. Introducing blockchain technology into the federated learning architecture to provide a decentralized distributed security solution has become a research hotspot. With characteristics such as distributed storage, immutability, anonymity, and traceability, the distributed ledger feature of blockchain naturally ensures the consistency of model parameter data and the security and trustworthiness of data among multiple participants in federated learning, while providing a reliable contribution incentive evaluation mechanism. However, in the IoV scenario, due to the mobility of vehicles and unreliable vehicle-to-vehicle communication, the federated learning method integrating blockchain also faces the following technical problems:

[0067] The increase in vehicle data and the limitation of network wireless bandwidth in the vehicle networking make communication efficiency one of the bottlenecks for large-scale data sharing in the vehicle networking scenario. The additional computing and communication overheads generated by blockchain technology have a negative impact on the overall operating efficiency of the system. Secondly, the synchronous aggregation of the parameters of the federated learning model causes serious communication latency problems. Finally, due to the slack of devices such as vehicles and roadside units, the model learning efficiency decreases, and the overall performance of the system is limited. To understand the development of the existing technologies.

[0068] One of the existing federated learning methods is to provide a blockchain-based federated learning system and method. The system includes: a model training module for updating the machine learning model and aggregating the change values of the machine learning model during the federated learning process; a smart contract module based on blockchain technology for providing a decentralized control function and key management function during the federated learning process; a storage module based on the IPFS protocol for providing a decentralized information storage mechanism for the intermediate information aggregated during the federated learning process. The model training module, the smart contract module based on blockchain technology, and the storage module based on the IPFS protocol are simultaneously run on each node participating in the federated learning. The complete decentralization of the entire system is achieved, and the failure and withdrawal of any node will not affect other nodes to continue the federated learning, which has stronger robustness.

[0069] However, the above-mentioned federated learning method is a blockchain-based federated learning system that stores the parameters uploaded by each node participating in the federated learning locally through the IPFS protocol, and provides a decentralized control function through the smart contract module of the blockchain for the federated learning process to avoid single-point failures. Although this system can solve the privacy risk and single-point failure problems to a certain extent, the homomorphic encryption technology brings training latency to the federated learning training time, and at the same time, in the actual application scenario, each participating node may be slack due to the lack of an incentive mechanism, affecting the system efficiency.

[0070] The second existing federated learning method is to provide an Internet of Things personalized federated learning method based on blockchain in the field of blockchain technology. This solution includes: registration and authentication of terminal devices and edge computing devices. Each terminal device and edge computing device registers with the blockchain, and the blockchain authenticates each device and issues certificates; the blockchain smart contract creates a federated learning task, initializes the training model and parameters; the terminal device loads data samples and unloads them to the edge computing device for local model training; after encrypting the local training model parameters, the edge computing device uploads them to the blockchain. After the blockchain nodes reach a consensus, a new block is generated; the smart contract aggregates the model parameters, aggregates the model parameters, and updates the overall model; the smart contract determines whether the preset convergence condition of the model is reached. If not, the next round of training is carried out. If it is reached, the federated learning task is terminated; the edge computing device trains a personalized model based on the global model information combined with its own data. This solves the problem that the global model of traditional federated learning cannot meet the heterogeneity of Internet of Things devices in terms of storage, computing, and communication capabilities, while improving the security of private data and the Byzantine fault tolerance of the system.

[0071] However, the above-mentioned federated learning method includes the registration and authentication of terminal devices and edge computing devices. The terminal device loads data samples and unloads them to the edge computing device for local model training. The edge computing device encrypts the local training model parameters and uploads them to the blockchain. It does not consider the transmission security between the terminal device and the edge computing device and the security issues brought by parameter leakage.

[0072] The third existing federated learning method is to provide an efficient federated learning method in the vehicle-to-everything (V2X) scenario, including: Step 1: The roadside unit obtains a set of alternative learning tasks; Step 2: Select a training task; Step 3: Establish initial model parameters and send the training task and its network address to the vehicles within the coverage area; Step 4: Each vehicle parses the task information of the training task and then decides whether to participate in the training process; if it participates, it establishes a communication connection with the roadside unit through the network address; Step 5: Send the initial model parameters to each vehicle; Step 6: Each vehicle uses local data to perform local training on the current model parameters and uploads them to the roadside unit; Step 7: Once receiving the local training model uploaded by a certain vehicle, calculate its weight value in real time, aggregate it in real time to the global model, generate the current model parameters and return them to each vehicle in real time; Step 8: Iteratively execute Steps 6 to 7 until the set number of iterations is met.

[0073] However, the above-mentioned efficient federated learning method in the vehicle networking scenario provided by the federated learning method, in which the road test unit selects a training task and sends model parameters to each vehicle with which a communication connection is established. Each vehicle uses local data to dock with the received task model parameters, uploads them to the road test unit after local training, and the road test unit returns the generated new parameters to each vehicle through global aggregation. This method does not take into account the reliability of the road test unit. There are no corresponding measures for single-point failure and communication transmission security problems in this method. Moreover, in the vehicle networking data sharing scenario, due to the increase in the number of vehicles and the limitation of wireless bandwidth, communication efficiency has become one of the bottlenecks for large-scale data sharing in this scenario.

[0074] Based on this, the existing federated learning methods have problems such as being unable to meet the requirements of data security and privacy protection, high communication consumption, and low communication efficiency. To address this problem, this application respectively provides a federated learning method based on vehicle networking, a roadside unit for executing the federated learning method based on vehicle networking, an electronic device as an entity of the roadside unit, and a storage medium. It also provides vehicle nodes and base stations belonging to the vehicle networking system. The federated learning method based on vehicle networking in this application receives first transaction data sent by each vehicle node in the slave chain where it is located in the master-slave multi-chain vehicle networking system through the roadside unit, and respectively obtains the model training data pre-stored locally in each corresponding vehicle node according to each of the first transaction data, rather than the roadside unit directly obtaining the model training data sent by the vehicle nodes, which can effectively improve communication efficiency. The roadside unit generates second transaction data through global aggregation and consensus processing of each of the model training data, and sends the second transaction data to the base station in the master chain where it is located in the master-slave multi-chain system, so that the base station aggregates the received second transaction data to obtain a corresponding global model. By introducing the method of combining blockchain and federated learning into vehicle networking, an asynchronous federated learning architecture based on the master-slave chain system is formed, which can enhance the secure sharing and privacy protection of vehicle data while effectively avoiding single-point failure and reducing communication consumption and costs, and can achieve efficient distributed model sharing, improve communication efficiency in the process of federated learning using vehicle networking, and is particularly suitable for dynamic vehicle scenarios.

[0075] Based on the above, the present application also provides a roadside unit for implementing the vehicle-to-everything (V2X)-based federated learning method provided in one or more embodiments of the present application. The roadside unit may be a server. The V2X-based federated learning device may communicate with vehicle nodes, base stations, etc. on its own or through a third-party server, etc., so as to receive first transaction data sent by each vehicle node in the slave chain to which it currently belongs in the master-slave multi-chain V2X system, and respectively obtain model training data pre-stored locally in the corresponding vehicle nodes according to each of the first transaction data, and send the second transaction data to the base station in the master chain to which it belongs from the master-slave multi-chain V2X system, so that the base station aggregates the received second transaction data to obtain a corresponding federated learning global model. In addition, the roadside unit, the base station, and the vehicle nodes may also send calculation results, training process data, etc. to other client devices, etc. according to instructions for result display, so as to improve the efficiency and convenience of operation and maintenance personnel for evaluation and analysis, etc.

[0076] The part of the roadside unit for performing V2X-based federated learning may be executed in a server as described above. In another practical application scenario, all operations may also be completed in a client device. Specifically, it may be selected according to the processing capacity of the client device and the limitations of the user usage scenario, etc. The present application does not make a limitation in this regard. If all operations are completed in the client device, the client device may further include a processor for specific processing of V2X-based federated learning.

[0077] It can be understood that the client device may include any mobile device capable of loading applications, such as a smart phone, a tablet electronic device, a network set-top box, a portable computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, smart watches, smart bracelets, etc.

[0078] The above-mentioned client device may have a communication module (i.e., a communication unit) and may communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side. In other implementation scenarios, it may also include a server of an intermediate platform, such as a server of a third-party server platform having a communication link with the task scheduling center server. The server may include a single computer device, or may include a server cluster composed of multiple servers, or a server structure of a distributed device.

[0079] Any suitable network protocol can be used for communication between the above-mentioned server and the client device, including network protocols that have not been developed as of the filing date of this application. The network protocol can include, for example, TCP / IP protocol, UDP / IP protocol, HTTP protocol, HTTPS protocol, etc. Of course, the network protocol can also include, for example, RPC protocol (Remote Procedure Call Protocol) and REST protocol (Representational State Transfer) used on top of the above-mentioned protocols.

[0080] Specifically, detailed descriptions will be given respectively through the following various embodiments and application examples.

[0081] In order to solve the problems that existing federated learning methods cannot meet the requirements of data security and privacy protection, have high communication consumption and low communication efficiency, etc., this application provides an embodiment of a federated learning method based on vehicle-to-everything (V2X) network. Refer to Figure 1 The federated learning method based on the vehicle-to-everything (V2X) network executed by the roadside unit specifically includes the following content:

[0082] Step 100: Receive the first transaction data sent by each vehicle node in the slave chain to which it currently belongs in the master-slave multi-chain vehicle-to-everything (V2X) network system, and respectively obtain the model training data pre-stored locally in each corresponding vehicle node according to each of the first transaction data.

[0083] It can be understood that the first transaction data is the unique identification data or the unique reference data for retrieving the model training data pre-stored locally in the corresponding vehicle node. According to the first transaction data, the pre-stored model training data can be extracted locally at the corresponding vehicle node, and the model training data is obtained by the vehicle node using the locally real-time updated and stored data to perform model training on the global model of federated learning in the current iteration.

[0084] It can be understood that the master-slave multi-chain vehicle-to-everything (V2X) network system refers to a vehicle-to-everything (V2X) network that forms a master-slave multi-chain system. Among them, each base station in the vehicle-to-everything (V2X) network forms a master chain with multiple adjacent roadside units respectively, and each roadside unit forms a slave chain with multiple adjacent vehicle nodes respectively. Due to the dynamic movement characteristics of vehicle nodes, the structure of the slave chain will often change, which is specifically determined according to the distances between each moving vehicle node and each roadside unit.

[0085] In one or more embodiments of the present application, the determination of whether they are adjacent can be determined according to a preset distance threshold range or a distance comparison result. Suppose vehicle node A generates first transaction data during a journey. At this time, vehicle node A can check whether there is a roadside unit within the distance threshold range, and then process it according to the following situations:

[0086] (1) If there is a unique roadside unit within the distance threshold range, determine this roadside unit as the roadside unit in the slave chain where vehicle node A is currently located, and send the first transaction data to this roadside unit;

[0087] (2) If there are roadside units within the distance threshold range and they are not unique, select the one closest to vehicle node A itself among the multiple roadside units and send the first transaction data;

[0088] (3) If there is no roadside unit within the distance threshold range, select the roadside unit closest to vehicle node A itself currently and send the first transaction data.

[0089] Step 200: Perform global aggregation and consensus processing on each of the model training data to generate second transaction data.

[0090] Step 300: Send the second transaction data from the vehicle-to-everything (V2X) system of the master-slave multi-chain to the base station in the master chain to which it belongs, so that the base station aggregates the received second transaction data to obtain the corresponding federated learning global model.

[0091] As can be seen from the above description, the federated learning method based on V2X provided by the embodiments of the present application, by receiving the first transaction data sent by each vehicle node in the slave chain where it is located in the V2X system of the master-slave multi-chain, and respectively obtaining the model training data pre-stored locally in the corresponding vehicle nodes according to each of the first transaction data, rather than directly obtaining the model training data sent by the vehicle nodes by the roadside unit, can effectively improve the communication efficiency; the roadside unit performs global aggregation and consensus processing on each of the model training data to generate second transaction data, and sends the second transaction data to the base station in the master chain where it is located in the master-slave multi-chain system, so that the base station aggregates the corresponding global model based on the received second transaction data. By introducing the method of combining blockchain and federated learning into V2X, an asynchronous federated learning architecture based on the master-slave chain system is formed, which can enhance the secure sharing and privacy protection of vehicle data while effectively avoiding single point of failure and reducing communication consumption and cost, can achieve efficient distributed model sharing, improve the communication efficiency in the process of federated learning using V2X, and is particularly suitable for dynamic vehicle scenarios.

[0092] In order to further improve communication efficiency and security, in an embodiment of a federated learning method based on the vehicle network provided in this application, the first transaction data includes: the hash value corresponding to the model training data; wherein, the hash value is generated after the vehicle node stores the model training data in the local IPFS unit; correspondingly, see Figure 2 , step 100 of the federated learning method based on the vehicle network specifically includes the following content:

[0093] Step 110: Receive the first transaction data sent by each vehicle node in the slave chain to which it currently belongs in the vehicle network system of the master-slave multi-chain.

[0094] Step 120: Verify the authenticity of the first transaction data.

[0095] Step 130: Extract the respective corresponding hash values from each of the first transaction data that has passed the authenticity verification.

[0096] Step 140: Extract the model training data from the local data storage unit of each corresponding vehicle node based on each of the hash values, wherein the local data storage unit is an IPFS storage unit generated based on the IPFS storage protocol.

[0097] It can be understood that the Chinese translation of IPFS (Inter Planetary File System) is: InterPlanetary File System, which is a new hypermedia transfer protocol based on content addressing, distributed, and peer-to-peer.

[0098] As can be seen from the above description, the federated learning method based on the vehicle network provided in the embodiment of this application can, by extracting the corresponding hash values from each of the first transaction data and extracting the model training data from the local IPFS storage unit of each corresponding vehicle node based on each of the hash values, use the hash to replace the parameter content in the original transaction during the subsequent blockchain consensus process, thereby further improving the communication efficiency and data transmission security during the federated learning process using the vehicle network.

[0099] In order to further improve the convergence efficiency of the model, in an embodiment of the federated learning method based on the vehicle network provided in this application, the first transaction data further includes: the decrease ratio of the loss function; correspondingly, see Figure 2 , after step 120 and before step 200 of the federated learning method based on the vehicle network, it specifically further includes the following content:

[0100] Step 150: Extract the respective corresponding decrease ratios of the loss function from each of the first transaction data.

[0101] Step 160: Determine the reward rankings of the vehicle nodes based on the reverse sorting result of the decrease ratios of the respective loss functions.

[0102] Step 170: Send corresponding rewards to the respective vehicle nodes according to the reward rankings.

[0103] Specifically, after receiving a transaction from a vehicle, the roadside unit first checks the authenticity of the transaction, then searches for IPFS and extracts the parameters in the transaction to prepare for the subsequent aggregation process, and returns a reward to the vehicle. The roadside unit returns rewards following the following principle: all the results uploaded by the vehicles received are sorted in reverse order according to the ratio of the decrease in the loss function value. This is because it is expected that the vehicles can contribute more computing resources to the learning process to achieve the fastest convergence of the system.

[0104] As can be seen from the above description, in the federated learning method based on the vehicle network provided by the embodiments of the present application, by determining the reward rankings of the respective vehicle nodes based on the reverse sorting result of the decrease ratios of the respective loss functions, and sending corresponding rewards to the respective vehicle nodes according to the reward rankings, the vehicles can contribute more computing resources to the learning process to achieve the fastest convergence of the system, and thus can effectively further improve the efficiency of the federated learning process based on the vehicle network.

[0105] In order to further improve the performance of federated learning, in an embodiment of the federated learning method based on the vehicle network provided by the present application, refer to Figure 2 , the steps 200 in the federated learning method based on the vehicle network specifically include the following contents:

[0106] Step 210: Perform global aggregation processing on the respective model training data to obtain corresponding global model data, and use the global model data as transaction data.

[0107] Step 220: Perform global aggregation processing on the respective model training data to obtain corresponding global model data, and initiate a consensus for the transaction data based on the target consensus mechanism to verify the global model data, and determine the transaction data after the consensus as the second transaction data, where the target consensus mechanism is generated in advance based on the Byzantine fault tolerance consensus mechanism and the delegated proof of stake consensus mechanism.

[0108] As can be seen from the above description, the federated learning method based on the vehicle network provided by the embodiments of the present application uses the target consensus mechanism pre-generated based on the Byzantine fault tolerance consensus mechanism and the delegated proof of stake consensus mechanism to initiate consensus on the transaction data to verify the global model data, can provide an incentive mechanism for model sharing, effectively motivate vehicles to participate in learning, improve system efficiency, and better enhance system performance.

[0109] To further improve the efficiency and performance of federated learning based on the vehicle network, in an embodiment of the federated learning method based on the vehicle network provided by the present application, refer to Figure 2 , step 300 in the federated learning method based on the vehicle network specifically includes the following contents:

[0110] Step 310: Send the second transaction data from the vehicle network system of the master-slave multi-chain to the base station in its own master chain, so that the base station stores the global model data corresponding to each received second transaction data locally, returns corresponding rewards, and performs global aggregation on each global model data to generate a federated learning global model, and then forges a block, initiates consensus and broadcasts the process for the federated learning global model, where the target consensus mechanism is pre-generated based on the Byzantine fault tolerance consensus mechanism and the delegated proof of stake consensus mechanism.

[0111] Specifically, the base station aggregates all parameters, then starts forging a block and initiating consensus. The training of federated learning is an iterative process of minimizing the overall loss function along the negative gradient direction to improve the model accuracy. The base station that obtains the accounting right performs global aggregation calculation. The updated global model is verified during the consensus process and broadcast to all users participating in the training to start the next round of training. We repeat this process until the defined loss function converges or reaches our expected learning accuracy.

[0112] Step 320: Receive the rewards sent by the base station.

[0113] As can be seen from the above description, in the federated learning method based on vehicle-to-everything (V2X) provided by the embodiments of the present application, by sending the second transaction data to the base station in the main chain to which it belongs, so that the base station returns the corresponding rewards, and globally aggregating the global model data to generate a federated learning global model, and then forging blocks for the federated learning global model, initiating consensus and broadcasting processing based on the target consensus mechanism, the roadside unit itself can contribute more computing resources to the learning process to achieve the fastest convergence of the system, thereby effectively improving the efficiency of the federated learning process based on V2X. At the same time, by adopting the target consensus mechanism pre-generated based on the Byzantine fault tolerance consensus mechanism and the delegated proof of stake consensus mechanism to verify the federated learning global model, an incentive mechanism can be further provided for model sharing, which can effectively encourage roadside units to participate in learning, improve system efficiency, and better enhance system performance.

[0114] For the embodiments of the above federated learning method based on V2X, the present application further provides a roadside unit for implementing the federated learning method based on V2X. Refer to Figure 3 , the roadside unit specifically includes the following content:

[0115] A data acquisition module 10, configured to receive first transaction data sent by each vehicle node in the slave chain to which it currently belongs in a vehicle-to-everything system with multiple master and slave chains, and respectively obtain model training data pre-stored locally in the corresponding vehicle nodes according to the first transaction data;

[0116] A data processing module 20, configured to perform global aggregation and consensus processing on the model training data to generate second transaction data;

[0117] A data sending module 30, configured to send the second transaction data from the vehicle-to-everything system with multiple master and slave chains to the base station in the main chain to which it belongs, so that the base station aggregates the received second transaction data to obtain a corresponding federated learning global model.

[0118] The embodiments of the roadside unit provided by the present application can specifically be used to execute the processing flow of the embodiments of the above federated learning method based on V2X. Its functions will not be elaborated here and can refer to the detailed description of the embodiments of the above federated learning method based on V2X.

[0119] As can be seen from the above description, the roadside unit provided in the embodiment of the present application can effectively improve communication efficiency by receiving the first transaction data sent by each vehicle node in the slave chain where it is located in the vehicle-to-everything (V2X) system with a master-slave multi-chain structure, and respectively obtaining the model training data pre-stored locally in each of the corresponding vehicle nodes based on each of the first transaction data, rather than directly obtaining the model training data sent by the vehicle nodes; the roadside unit generates the second transaction data by performing global aggregation and consensus processing on each of the model training data, and sends the second transaction data to the base station in the master chain where it is located in the master-slave multi-chain system, so that the base station aggregates the received second transaction data to obtain the corresponding global model. By introducing the method of combining blockchain and federated learning into the V2X, an asynchronous federated learning architecture based on a master-slave chain system is formed, which can effectively avoid single-point failures, reduce communication consumption and costs while enhancing the secure sharing and privacy protection of vehicle data, can achieve efficient distributed model sharing, improve the communication efficiency in the process of federated learning using the V2X, and is particularly suitable for dynamic vehicle scenarios.

[0120] For the above embodiments of the federated learning method and roadside unit based on the V2X, the present application further provides a vehicle node. Refer to Figure 4 and the vehicle node is used to perform the following operations:

[0121] Step 010: Receive the federated learning global model broadcast by the base station in the V2X system with a master-slave multi-chain structure, and train the federated learning global model based on local data to obtain the corresponding model training data;

[0122] Step 020: Store the model training data in the local data storage unit and generate the corresponding hash value, where the local data storage unit is an IPFS storage unit generated based on the IPFS storage protocol;

[0123] Step 030: Package the decrease ratio of the loss function and the hash value into the first transaction data, and send the first transaction data to the roadside unit in the slave chain to which it currently belongs, so that the roadside unit executes the federated learning method of the V2X.

[0124] It can be understood that the roadside unit executes the federated learning method of the V2X with reference to the embodiments of the federated learning method of the V2X above, such as Figure 4 Steps 100 to 300 shown in

[0125] As can be seen from the above description, for the vehicle node provided in the embodiment of the present application, the model training data is stored in the local data storage unit and the corresponding hash value is generated, wherein the local data storage unit is an IPFS storage unit generated based on the IPFS storage protocol; the reduction ratio of the loss function and the hash value are packaged as the first transaction data, and the first transaction data is sent to the roadside unit in the slave chain to which the vehicle node currently belongs, rather than the roadside unit directly obtaining the model training data sent by the vehicle node, which can effectively improve the communication efficiency.

[0126] For the above embodiments of the federated learning method, roadside unit, and vehicle node based on the vehicle-to-everything (V2X) network, the present application further provides a base station. The base station and the roadside unit and the vehicle node respectively constitute the master-slave multi-chain V2X network system mentioned in one or more embodiments of the present application. Refer to Figure 5 and Figure 6 , and the base station is used to perform the following:

[0127] Step 410: Receive the second transaction data respectively sent by each roadside unit for executing the federated learning method based on the V2X network. It can be understood that the federated learning method based on the V2X network executed by the roadside unit refers to the embodiments of the federated learning method based on the V2X network above, such as Figure 6 the steps 100 to 300 shown in

[0128] Step 420: Store the global model data corresponding to each of the received second transaction data in the local, and return the corresponding rewards to the corresponding roadside units.

[0129] Step 430: Perform global aggregation on each of the global model data to generate a federated learning global model.

[0130] Step 440: Perform forging block processing on the federated learning global model, and initiate consensus for the federated learning global model based on the target consensus mechanism to verify the federated learning global model, wherein the target consensus mechanism is pre-generated based on the Byzantine fault tolerance consensus mechanism and the delegated proof of stake consensus mechanism.

[0131] Step 450: Broadcast the federated learning global model in the master-slave multi-chain V2X network system, so that each vehicle node and roadside unit perform the next round of training based on the federated learning global model.

[0132] As can be seen from the above description, the base station provided by the embodiments of the present application stores the global model data corresponding to each of the received second transaction data locally and returns corresponding rewards to the corresponding roadside units, enabling the roadside units to contribute more computing resources to the learning process to achieve the fastest convergence of the system, and further effectively improving the efficiency of the federated learning process based on the vehicle network. By performing forging block processing on the federated learning global model and initiating consensus on the federated learning global model based on the target consensus mechanism to verify the federated learning global model, where the target consensus mechanism is pre-generated based on the Byzantine fault tolerance consensus mechanism and the delegated proof of stake consensus mechanism, which can provide an incentive mechanism for model sharing, effectively motivating roadside units to participate in learning, improving system efficiency, and better enhancing system performance. In addition, the system mentioned in the system performance and system efficiency in one or more embodiments of the present application refers to the entire master-slave multi-chain vehicle network system.

[0133] In addition, to further illustrate the above-mentioned federated learning method, roadside unit, vehicle node, and base station based on the vehicle network in the present application, the present application also provides a specific application example of the federated learning method based on the vehicle network for further illustration. Specifically, it is a method for distributed sharing of vehicle network data that supports data privacy protection. In the vehicle network data sharing scenario, due to the increase in the number of vehicles and the limitation of wireless bandwidth, communication efficiency has become one of the bottlenecks for large-scale data sharing in this scenario. In addition, the single-point failure problem of traditional federated learning methods has also become another bottleneck. In this case, the application example of the present application solves the above problems by introducing a method that combines blockchain and federated learning. How to effectively avoid single-point failure and achieve efficient distributed model sharing while protecting the privacy of vehicle data is the focus of this application example. Specifically, the objectives of this application example are as follows:

[0134] (1) An asynchronous federated learning architecture based on the master-slave chain system is proposed to enhance the secure sharing and privacy protection of vehicle data. Compared with traditional blockchain-based methods, the hierarchical architecture proposed in this application example can effectively reduce communication consumption and is applicable to dynamic vehicle scenarios.

[0135] (2) This application example adopts an asynchronous model aggregation method to reduce communication delays caused by lagging vehicles and communication failures.

[0136] (3) An improved delegated proof of stake consensus mechanism with hybrid Byzantine fault tolerance is proposed, which can effectively motivate vehicles and roadside units to participate in learning and improve system efficiency.

[0137] This application example proposes an efficient distributed model sharing mechanism for vehicle networking data privacy. Based on the asynchronous federated learning technology and the blockchain system based on the master-slave chain as the infrastructure, the model parameters after local training by vehicles are uploaded to roadside units and base stations. After the model is aggregated at the base station, the updated parameters are sent down to the vehicles to complete data sharing. By introducing an improved delegated proof-of-stake consensus mechanism with hybrid Byzantine fault tolerance, an incentive mechanism is provided for model sharing to better improve system performance. In addition, this application example also incorporates the IPFS storage protocol to retain the model parameters locally to enhance data transmission security.

[0138] See Figure 7 , the federated learning method based on vehicle networking provided by the application example of this application specifically includes the following content:

[0139] S1: Vehicles calculate locally and send the results upward to neighboring roadside units. In the local training stage, each vehicle trains a local model based on its local data. The vehicle on the training dataset The loss function is:

[0140]

[0141] Among them, f u (w, x u , y u ) is the value of the loss function on the data sample (x u , y u ), ω is the parameter vector of the trained model, is the number of samples contained in the dataset. In different algorithms, the loss function has different calculation methods. This application example uses the gradient descent algorithm to calculate the loss function:

[0142]

[0143] Among them is the model parameter in the t-th iteration, η is the learning rate, is the loss function gradient of the parameter . This application example uses to represent the descent ratio of the loss function. The model parameters after local training are stored locally through IPFS. This is because we expect to improve communication efficiency. Therefore, in the subsequent blockchain consensus process, hashes are used to replace the parameter content in the original transactions. Because the model parameters of federated learning are huge compared to the values in general block transactions. For common datasets such as single-channel MNIST image data, the number of updated parameters each time is about 1MB. So the method we use to record model parameters in block transactions is to record its hash value. When the smart contract verifies the transaction, it needs to query IPFS to obtain the off-chain value.

[0144] Each vehicle will upload the hash value of the model parameters and the loss function descent ratio to the nearby roadside unit in the form of a transaction via a wireless network.

[0145]

[0146] The second item in the transaction being 0 means that the transaction is for the vehicle to upload the trained model parameters

[0147] S2: After receiving the transaction from the vehicle, the roadside unit first checks the authenticity of the transaction, then searches for IPFS and extracts the parameters in the transaction to prepare for the subsequent aggregation process, and returns a reward to the vehicle. The roadside unit returns the reward following the principle: all the results uploaded by the vehicles are sorted in reverse order according to the ratio of the loss function value reduction. This is because it is expected that the vehicles can contribute more computing resources to the learning process to achieve the fastest convergence of the system. For the sorted queue, assuming the vehicle uploads the transaction ranked at the nth position, then the reward it receives is:

[0148]

[0149] where I is the number of all vehicles participating in the learning, and the local reward of the roadside unit is set to 1 initially, and the transaction for the roadside unit to return the reward to the corresponding vehicle is:

[0150]

[0151] S3: The roadside unit aggregates the model parameters sent by all the vehicles participating in the training. The global aggregation method is as follows:

[0152]

[0153] The aggregated model parameters are used as a transaction to initiate a consensus by the roadside unit that obtains the block generation right. The transaction format included in the block initiated in the consensus stage is:

[0154]

[0155] where is used to confirm the identity of the block initiator, is the reward for this transaction after reaching the consensus, is the hash value representation of the model, is the accuracy of the model. After the consensus is passed, the main accounting node uploads the new transaction to the adjacent base station. The new transaction message is as follows:

[0156]

[0157] S4: Similar to the roadside unit, after receiving a transaction, the base station extracts the parameter values therein, stores them locally, and returns a reward:

[0158]

[0159] Among them, the first item of the consensus is the value in the previous iteration process value, p n is the local reward of b n and |J| is the total number of all roadside units participating in learning in the b n area.

[0160] S5: Similar to the previous process, the base station aggregates all parameters, and the finally globally aggregated loss function is defined as follows:

[0161]

[0162] Then start forging the block and initiate the consensus. The transaction at this time is:

[0163]

[0164] S6: The training of federated learning is an iterative process of improving the model accuracy by minimizing the overall loss function F(w) along the negative gradient direction. The base station that obtains the bookkeeping right performs global aggregation calculation. The updated global model is verified during the consensus process and broadcast to all users participating in the training to start the next round of training. We repeat this process until the defined loss function converges or reaches our expected learning accuracy α, (0 < α ≤ 1).

[0165] In summary, in order to make data sharing in the vehicle network environment more efficient and secure, solve the single-point failure problem in the federated learning architecture, and provide incentives for all users participating in the training, the application example of this application uses blockchain technology to propose a federated learning architecture based on the master-slave chain system to enhance the security and privacy protection of vehicle data sharing tasks. Compared with traditional blockchain-based methods or federated learning-based methods, the hierarchical architecture proposed in this application example can effectively reduce communication costs and is applicable to the dynamic scenarios of the vehicle network. The model of this application example adds an improved delegated proof-of-stake consensus mechanism with hybrid Byzantine fault tolerance to avoid the problem of system performance degradation caused by the slack of vehicles and roadside units, and can effectively motivate vehicles and roadside units to participate in the training.

[0166] The efficient distributed model sharing mechanism for vehicle network data privacy proposed in this application example provides a secure and efficient solution for data privacy in distributed edge computing. Aiming at the communication efficiency problem of the system, this application example proposes an improved delegated proof-of-stake consensus mechanism with hybrid Byzantine fault tolerance. In addition, to further improve the performance of the proposed scheme, an incentive mechanism is introduced into federated learning and the master-slave chain architecture to further enhance the overall operation efficiency of the system. The model is evaluated on two public datasets, and the model proposed in this application example has higher accuracy and lower time cost, finally realizing secure, reliable, intelligent and efficient data sharing.

[0167] In the example of this application example, the datasets we used are the MNIST dataset and the Fashion-MNIST dataset. Some examples of Fashion-MNIST are shown in Figure 8 。

[0168] This dataset contains training and test datasets. Each category in the training dataset contains 6,000 samples, and each category in the test dataset contains 1,000 samples. There are a total of 10 categories. Therefore, the training dataset has a total of 60,000 samples, and the test dataset has a total of 10,000 samples. The images in the dataset are a 28×28 pixel array, and the value of each pixel is an 8-bit unsigned integer (uint8) between 0 and 255. They are stored using a three-dimensional ND Array, and the last dimension represents the number of channels. Since they are grayscale images, the number of channels is 1. Some examples of MNIST are shown in Figure 9 。

[0169] This dataset contains 70,000 handwritten digit pictures, each of which is labeled with the corresponding digit. Each picture has 784 features because each picture has (28*28) 784 pixels, and the intensity of each pixel is represented by 0 (white) to 255 (black). The dataset is divided into two parts, containing 60,000 training pictures and 10,000 test pictures respectively.

[0170] Figure 10 and Figure 11The accuracy of the proposed scheme on the MNIST and Fashion-MNIST datasets is given under different numbers of users. To verify the effectiveness of the incentive mechanism proposed in this application example, the experiment set 3 users as low-quality participants. These 3 users have poor communication and computing capabilities, and provide poor model parameter quality for the model aggregation process by randomly disturbing the original parameters. The experimental results show that the scheme proposed in this application example has good precision. Due to the more complex structure of the dataset itself, the global accuracy result of Fashion-MNIST is slightly lower than that of MNIST, but it can also reach a relatively high accuracy, demonstrating the generality of the scheme proposed in this application example for the dataset.

[0171] When the number of users changes from 30, 60 to 90 respectively, as the number of iterations increases, the global accuracy result has a slight decrease but the difference is not significant. The small change in the experimental results shows that the proposed scheme has good scalability and can effectively reduce the impact of low-quality nodes on the overall federated learning result.

[0172] In the algorithm comparison experiment, this application example compares the proposed scheme with two baseline schemes, namely the local CNN training algorithm and the federated averaging algorithm. The dataset is divided into 100 subsets to be assigned to 100 data providers (i.e., users). The local CNN is trained on a local dataset and evaluated on the dataset aggregated by 100 users. The federated averaging algorithm is trained and evaluated on the entire datasets of 100 users. Figure 12 and Figure 13 shows that the performance of the scheme proposed in this application example is very close to that of federated averaging. However, federated averaging brings a relatively high risk of data security and privacy leakage to users. In addition, the accuracy of the local CNN is much lower than that of the other two methods. The reason is that in the local CNN training algorithm, the goal of local training is to minimize the loss of the local dataset. This results in its ability to obtain a local optimal solution, but it may still be a certain distance from the global optimal solution, so the accuracy is relatively low. Figure 12 and Figure 13 shows that the scheme proposed in this application example can still achieve a relatively high accuracy while ensuring data security and privacy protection.

[0173] Figure 14 Evaluated the running time performance of the proposed scheme and compared it with federated averaging. It can be seen from Figure 14 that the time overhead of the scheme proposed in this application example is significantly lower than that of other methods. This result shows that the scheme proposed in this application example has high running efficiency, can reduce the communication overhead of the system, and improve the system performance.

[0174] An embodiment of the present application further provides a computer device (i.e., an electronic device), which may include a processor, a memory, a receiver, and a transmitter. The processor is configured to execute the federated learning method based on vehicle networking mentioned in the above embodiment. The processor and the memory may be connected through a bus or other means. Taking the connection through the bus as an example, the receiver can be connected to the processor and the memory in a wired or wireless manner. The computer device is communicatively connected to a wireless multimedia sensor network and a video acquisition device to receive real-time motion data from sensors in the wireless multimedia sensor network and receive an original video sequence from the video acquisition device.

[0175] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., or a combination of the above types of chips.

[0176] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules corresponding to the federated learning method based on vehicle networking in the embodiment of the present application. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory, that is, implements the federated learning method based on vehicle networking in the above method embodiment.

[0177] The memory may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely provided relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0178] The one or more modules are stored in the memory and, when executed by the processor, execute the federated learning method based on vehicle networking in the embodiment.

[0179] In some embodiments of the present application, the user equipment may include a processor, a memory, and a transceiver unit. The transceiver unit may include a receiver and a transmitter. The processor, the memory, the receiver, and the transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to transmit and receive signals.

[0180] As an implementation manner, the functions of the receiver and the transmitter in the present application may be considered to be implemented by a transceiver circuit or a dedicated chip for transceiver. The processor may be considered to be implemented by a dedicated processing chip, a processing circuit, or a general-purpose chip.

[0181] As another implementation manner, it may be considered to use a general-purpose computer to implement the server provided in the embodiments of the present application. That is, the program codes for implementing the functions of the processor, the receiver, and the transmitter are stored in the memory, and the general-purpose processor implements the functions of the processor, the receiver, and the transmitter by executing the codes in the memory.

[0182] The embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the foregoing federated learning method based on vehicle networking are implemented. The computer-readable storage medium may be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0183] Those of ordinary skill in the art should understand that the various exemplary components, systems, and methods described in connection with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Specifically, whether to execute in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application. When implemented in a hardware manner, it may be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in a software manner, the elements of the present application are programs or code segments used to execute the required tasks. The program or code segment may be stored in a machine-readable medium, or transmitted through a data signal carried in a carrier wave on a transmission medium or a communication link.

[0184] It should be clear that the present application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.

[0185] In the present application, features described and / or illustrated for one embodiment can be used in the same or a similar manner in one or more other embodiments, and / or combined with the features of other embodiments or replace the features of other embodiments.

[0186] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and variations can be made to the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. A federated learning method based on the vehicle networking, characterized in that Executed by the roadside units of the main chain and the sub-chains in the vehicle networking system belonging to the same main-sub multi-chain, the method includes: Receiving first transaction data sent by each vehicle node in the sub-chain to which it currently belongs in the main-sub multi-chain vehicle networking system, and respectively obtaining model training data pre-stored locally in the corresponding vehicle nodes according to each of the first transaction data; Each base station in the main-sub multi-chain vehicle networking system respectively forms a main chain with multiple adjacent roadside units, and each roadside unit respectively forms a sub-chain with multiple adjacent vehicle nodes. The structure of the sub-chain is determined according to the distances between the moving vehicle nodes and the roadside units respectively; Performing global aggregation and consensus processing on each of the model training data to generate second transaction data; Sending the second transaction data from the main-sub multi-chain vehicle networking system to the base station in the main chain to which it belongs, so that the base station aggregates the received second transaction data to obtain the corresponding federated learning global model.

2. The federated learning method based on vehicle networking according to claim 1, characterized in that The first transaction data includes: the hash value corresponding to the model training data; Wherein, the hash value is generated after the vehicle node stores the model training data in the local IPFS unit; Correspondingly, the step of respectively obtaining the model training data pre-stored locally in the corresponding vehicle nodes according to each of the first transaction data includes: Verifying the authenticity of the first transaction data; Respectively extracting the corresponding hash values from each of the first transaction data that passes the authenticity verification; Extracting the model training data from the local data storage units of the corresponding vehicle nodes respectively based on each of the hash values, wherein the local data storage unit is an IPFS storage unit generated based on the IPFS storage protocol.

3. The federated learning method based on the vehicle networking according to claim 2, wherein The first transaction data further includes: the reduction ratio of the loss function; Correspondingly, before performing global aggregation and consensus processing on each of the model training data to generate second transaction data, it further includes: Respectively extracting the reduction ratio of the loss function corresponding to each of the first transaction data; Determining the reward rankings of the vehicle nodes based on the reverse sorting results of the reduction ratios of the loss functions; Sending corresponding rewards to each of the vehicle nodes according to the reward rankings.

4. The federated learning method based on the vehicle networking according to claim 1, wherein The step of performing global aggregation and consensus processing on each of the model training data to generate second transaction data includes: Performing global aggregation processing on each of the model training data to obtain the corresponding global model data, and using the global model data as the transaction data; Initiating a consensus for the transaction data based on the target consensus mechanism to verify the global model data, and determining the transaction data after consensus as the second transaction data, wherein the target consensus mechanism is pre-generated based on the Byzantine Fault Tolerance Consensus Mechanism and the Delegated Proof of Stake Consensus Mechanism.

5. The federated learning method based on vehicle networking according to claim 1, wherein The step of sending the second transaction data from the main-sub multi-chain vehicle networking system to the base station in the main chain to which it belongs, so that the base station aggregates the received second transaction data to obtain the corresponding federated learning global model, includes: Send the second transaction data to the base station in the main chain to which it belongs in the vehicle networking system of the master-slave multi-chain, so that the base station stores the global model data corresponding to each received second transaction data locally, returns the corresponding rewards, and performs global aggregation on each piece of the global model data to generate a federated learning global model, and then forging blocks, initiating consensus and broadcasting processing for the federated learning global model, where the target consensus mechanism is pre-generated based on the Byzantine Fault Tolerance Consensus Mechanism and the Delegated Proof of Stake Consensus Mechanism; Receive the rewards sent by the base station.

6. A roadside unit, characterized in that, The main chain and the sub-chain in the vehicle networking system of the master-slave multi-chain, the roadside unit includes: A data acquisition module, configured to receive the first transaction data sent by each vehicle node in the sub-chain to which it currently belongs in the vehicle networking system of the master-slave multi-chain, and respectively obtain the model training data pre-stored locally in the corresponding vehicle nodes according to each of the first transaction data; each base station in the vehicle networking system of the master-slave multi-chain forms a main chain with a plurality of adjacent roadside units respectively, and each roadside unit forms a sub-chain with a plurality of adjacent vehicle nodes respectively, and the structure of the sub-chain is determined according to the distances between the moving vehicle nodes and the roadside units respectively; A data processing module, configured to perform global aggregation and consensus processing on each piece of the model training data to generate second transaction data; A data sending module, configured to send the second transaction data to the base station in the main chain to which it belongs in the vehicle networking system of the master-slave multi-chain, so that the base station aggregates the received second transaction data to obtain the corresponding federated learning global model.

7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the federated learning method based on vehicle networking according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the federated learning method based on vehicle networking according to any one of claims 1 to 5.

9. A vehicle node, characterized in that, The vehicle node is used to execute the following content: Receive the federated learning global model broadcast by the base station in the vehicle networking system of the master-slave multi-chain, and train the federated learning global model based on local data to obtain the corresponding model training data; Store the model training data in the local data storage unit and generate the corresponding hash value, where the local data storage unit is an IPFS storage unit generated based on the IPFS storage protocol; Package the decrease ratio of the loss function and the hash value into the first transaction data, and send the first transaction data to the roadside unit in the sub-chain to which it currently belongs, so that the roadside unit executes the federated learning method based on vehicle networking according to any one of claims 1 to 5.

10. A base station, characterized in that, The base station is used to execute the following content: Receive the second transaction data respectively sent by each roadside unit for executing the federated learning method based on vehicle networking according to any one of claims 1 to 5; Store the global model data corresponding to each received second transaction data locally, and return the corresponding rewards to the corresponding roadside units; Globally aggregate each of the global model data to generate a federated learning global model; Perform forging block processing on the federated learning global model, and initiate consensus on the federated learning global model based on the target consensus mechanism to verify the federated learning global model, where the target consensus mechanism is pre-generated based on the Byzantine fault tolerance consensus mechanism and the delegated proof of stake consensus mechanism; Broadcast the federated learning global model in the vehicle networking system of the master-slave multi-chain, so that each vehicle node and roadside unit perform the next round of training based on the federated learning global model.

Citation Information

Patent Citations

  • Efficient federal learning method in Internet of Vehicles scene

    CN113313264A

  • Block chain-based distributed federal learning method and apparatus, and terminal device

    CN113408746A