A Method for Constructing an Adaptive Content Selection System for Vehicle-to-Everything (V2X) Networks
By using an adaptive content selection system to dynamically select transmission content and introduce an information caching mechanism, the problems of device heterogeneity and time-varying networks in the Internet of Vehicles (IoV) are solved, enabling efficient model training and information interaction and improving the intelligence level of the IoV.
Patent Information
- Application Number
- CN202511145394.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-08-15
AI Technical Summary
In the context of connected vehicles, decentralized federated learning suffers from issues such as device heterogeneity, time-varying networks, and limited communication bandwidth, leading to low training efficiency and security risks, and making it difficult to balance communication costs and model performance.
An adaptive content selection system is adopted to dynamically select transmission model gradients or lightweight data prototype features by monitoring the network bandwidth, energy consumption and computing power of working nodes in real time. An information caching mechanism is also introduced to optimize information interaction and model aggregation and expand the coverage of information interaction.
While ensuring model performance, it reduces communication load, improves training efficiency, enhances the intelligence level of traffic prediction and decision-making, optimizes resource allocation, and is suitable for vehicle-to-everything (V2X) and intelligent transportation scenarios.
Smart Images

Figure CN120730342B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of vehicle networking and distributed machine learning technology, and more specifically, to a method for constructing an adaptive content selection system for vehicle networking. Background Technology
[0002] With the rapid development of mobile IoT and edge computing, training data sources have shifted from cloud data centers to terminal devices. Federated learning has made an irreplaceable contribution in enabling training using data from terminal devices while protecting privacy. However, the single-level tree topology of centralized federated learning puts enormous communication pressure on parameter servers. Furthermore, with the massive increase in the number of terminal devices, the impact of parameter servers on the entire system is growing, undoubtedly becoming a significant communication bottleneck. For example, when using 100 terminal devices to collaboratively train a VGG16 model (approximately 138MB) and complete a single global interaction, the federated learning parameter server needs to consume more than 13GB of bandwidth, which can easily cause network congestion when mobile devices are communicating wirelessly. Although some studies have proposed hierarchical federated learning, introducing edge servers to alleviate the pressure on parameter servers in centralized federated learning, both parameter servers and edge servers can be considered aggregation centers in federated learning, making them highly important and vulnerable to attacks, posing serious security risks.
[0003] To alleviate the communication pressure on parameter servers in centralized federated learning architectures and avoid single points of failure, decentralized federated learning (DFL) emerged. The idea behind DFL can be traced back to the decentralized parallel stochastic gradient descent algorithm D-PSGD, which is considered the first work to prove that D-PSGD has the same convergence rate as centralized algorithms. Its underlying theory is consensus-based distributed optimization. In DFL, worker nodes exchange data through a communication topology; each node only needs to communicate with a limited number of neighbors, rather than relying on a parameter server. Generally, the performance of decentralized distributed learning is determined by the communication topology. The higher the connectivity of the communication topology, the less information loss in model aggregation and the faster the convergence speed, but it may lead to network congestion, longer communication times, and higher synchronization costs. However, by limiting the number of neighbors of a node and compressing the transmitted content, the bandwidth requirements for model aggregation can be reduced, accelerating the training process. Due to these advantages, DFL has been widely used in many fields such as military, healthcare, recommender systems, and connected vehicles. Especially in the field of connected vehicles, the performance of mobile devices (such as mobile phones, tablets, laptops, autonomous vehicles, drones, and autonomous navigation robots) has improved rapidly, enabling tasks that combine deep learning and distributed decision-making (such as traffic light and signal recognition, road condition perception, intelligent obstacle avoidance, and intelligent road planning) to be implemented on mobile terminals. This not only utilizes the computing power of mobile devices but also protects user privacy.
[0004] However, decentralized federated learning still has at least the following problems:
[0005] 1) Device heterogeneity mainly includes heterogeneity in computing power, energy consumption, and data distribution. Heterogeneous computing power refers to differences in computing capabilities among devices, which affects the speed and efficiency of model training. Heterogeneous energy consumption refers to the limited energy resources of devices; frequent communication, local training, and aggregation operations consume significant battery resources. Uneven data distribution is a classic problem in federated learning. Especially in decentralized training within connected vehicle scenarios, the computing power, energy, and dataset distribution of participating devices vary greatly, requiring the selection of suitable neighbors to complete training and achieving a trade-off between communication costs and model performance.
[0006] 2) Time-varying networks refer to communication networks that change in real time, with limited and heterogeneous communication bandwidth. Under limited communication channels and network conditions, the size of the transmitted content will severely affect the training efficiency of the system, requiring a balance between data interaction volume and model performance with limited resources.
[0007] Based on this, the present invention provides a method for constructing an adaptive transmission content selection system for the Internet of Vehicles, in order to solve the above-mentioned technical problems. Summary of the Invention
[0008] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a method for constructing an adaptive transmission content selection system for the Internet of Vehicles.
[0009] To achieve the above objectives, the present invention provides the following technical solution:
[0010] A first aspect of the present invention provides a method for constructing an adaptive content selection system for vehicle-to-everything (V2X) networks, the method comprising:
[0011] S1. Initialization settings: Determine the worker nodes and their characteristics in the decentralized federated learning system DFL, initialize the global local model, and set the training parameters.
[0012] These characteristics include the network bandwidth, energy consumption, and computing power of the working nodes;
[0013] S2. Local Model Training and Interactive Content Preparation: Monitor the characteristics of each working node in real time, train the local model on the local data of each working node that meets the conditions, and generate two types of interactive resources synchronously after the training is completed.
[0014] Among them, the two types of interactive resources are local model weight update information and lightweight local data category prototype information;
[0015] S3. Information Interaction and Content Transmission: An adaptive content selection algorithm and information caching mechanism are used to complete the interaction of information between each working node and its neighboring working nodes within its instantaneous communication range.
[0016] S4, Model Aggregation Update: Each worker node shares the information generated by local training and the content received from neighboring worker nodes to complete the local model update and iteration;
[0017] S5. Update Termination: Repeat steps S2 to S4 until the preset convergence condition is met or the maximum number of communication rounds is reached.
[0018] The present invention is further configured such that, in step S1, the calculation process of the network bandwidth is as follows:
[0019] Let the inbound and outbound bandwidths of worker node k in round t be expressed as follows: and ;
[0020] Assuming bandwidth is evenly distributed, the link Network bandwidth is In the formula, , Let represent the number of neighboring nodes of worker node k and worker node j in round t, respectively.
[0021] The present invention is further configured such that, in step S1, the calculation process for energy consumption is as follows:
[0022] During the training phase, the training energy consumption of worker node k in round t is: In the formula, This represents the number of processor cycles required for worker node k to execute one data sample. For the local dataset of device k, Represents the dataset The number of samples, This represents the processor cycle frequency of worker node k. This represents the number of local iterations. This represents the effective capacitance coefficient of the chip used in device k.
[0023] During the model interaction phase, the training energy consumption of worker node k in round t is: ,
[0024] In the formula, ,in, Let k be the transmission rate of device k. For bandwidth, For background noise, Let k be the channel gain of the working node. For the communication time of the device, For the size of the transmitted data;
[0025] The total energy consumption of worker node k is .
[0026] The present invention is further configured such that, in step S1, the computing power satisfies the following constraints:
[0027] ,
[0028] In the formula, Links between worker nodes k and j bandwidth, For the first Wheel link bandwidth resources, Let k be the energy budget for working node k in round t.
[0029] The present invention is further configured such that, in step S2, the model training process is as follows:
[0030] Each worker node participating in training computes its stochastic gradient using the local training dataset;
[0031] Then, the worker node updates its local model.
[0032] The present invention is further configured such that, in step S3, the adaptive interactive content selection algorithm is specifically analyzed as follows:
[0033] In the Internet of Vehicles (IoV), each working node adaptively selects the interactive content based on the current network bandwidth and the energy of the working node.
[0034] The interactive content includes two categories: local model weight update information and lightweight local data category prototype information.
[0035] The present invention is further configured such that, in step S3, during information interaction and content transmission, in the interaction phase, priority is given to sharing local data category prototype information, and when network bandwidth allows, the sharing of local model weight update information is increased.
[0036] The present invention is further configured such that, in step S3, the information caching mechanism includes:
[0037] Each worker node is allowed to store and transmit local model update information received from encountered worker nodes in its historical interactions;
[0038] The Least Recently Used (LRU) principle is used to update and cache information, and timestamps are used for filtering.
[0039] The present invention is further configured such that, in step S4, the update iteration formula of the local model is:
[0040] ,
[0041] In the formula, This represents a subgraph containing worker node k and its neighbors. Indicates the aggregation rule used. It is the local model weight of worker node k after aggregation in round t. Let k be the set of neighboring worker nodes. This represents the candidate local models that worker node i will aggregate in round t.
[0042] A second aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the above-described method for constructing an adaptive transmission content selection system for vehicle-to-everything (V2X) networks.
[0043] The third invention of the present invention provides a computer-readable storage medium storing a computer program, which, when executed, implements the above-described method for constructing an adaptive transmission content selection system for the Internet of Vehicles.
[0044] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0045] This invention provides a method for constructing an adaptive transmission content selection system for the Internet of Vehicles (IoV). It employs an adaptive transmission content selection algorithm, enabling each working node to dynamically perceive real-time channel conditions and node resources, intelligently selecting transmission model gradients or lightweight data prototype features to reduce communication load while ensuring model performance. Simultaneously, an information caching mechanism is introduced, designing a least recently used cache update mechanism. Leveraging the spatiotemporal information transmission network formed by high-speed vehicle movement, multi-hop propagation of information within the network is achieved, effectively expanding the coverage of information interaction and improving model performance and training efficiency in mobile scenarios. This effectively overcomes the impact of intermittent communication between working nodes in high-speed mobile scenarios on model convergence and accuracy. It can be well applied to IoV, intelligent transportation, and other scenarios, improving the speed of vehicle and traffic condition prediction, enhancing the intelligence level of real-time traffic decision-making, and improving the intelligence level of traffic management, public safety, and environmental monitoring in smart cities without sharing private data. It achieves optimized resource allocation and has broad application value and promising prospects. Attached Figure Description
[0046] Figure 1 A flowchart of the method provided by the present invention;
[0047] Figure 2 A schematic diagram of the overall flow of the method provided by the present invention;
[0048] Figure 3 This is a schematic diagram illustrating the generation and interaction of category prototypes in this invention;
[0049] Figure 4 This is a schematic diagram illustrating the effect of the model testing accuracy of the present invention;
[0050] in, Figure 4 (a) is a schematic diagram of the model test accuracy of the experimental group VGG9-MNIST-NonIIDp=0.8;
[0051] Figure 4 (b) is a schematic diagram of the model test accuracy of the experimental group VGG9-CIFAR10-NonIIDp=0.8;
[0052] Figure 4 (c) is a schematic diagram of the test accuracy of the ResNet9-CIFAR10-NonIIDp=0.8 model in the experimental group;
[0053] Figure 4 (d) is a schematic diagram of the test accuracy of the ResNet9-CIFAR100-NonIIDp=0.8 model in the experimental group;
[0054] Figure 5 A schematic diagram illustrating the effect of training time used to achieve uniform accuracy in this invention;
[0055] in, Figure 5 (a) is a schematic diagram showing the effect of training time required for the experimental group VGG9-MNIST to achieve uniform accuracy;
[0056] Figure 5 (b) is a schematic diagram showing the effect of training time required for the experimental group VGG9-CIFAR10 to achieve uniform accuracy;
[0057] Figure 5 (c) is a schematic diagram showing the effect of training time required for the experimental group ResNet9-CIFAR10 to achieve uniform accuracy;
[0058] Figure 5 (d) is a schematic diagram showing the effect of training time required for the experimental group ResNet9-CIFAR100 to achieve uniform accuracy;
[0059] Figure 6 A schematic diagram illustrating the effect of communication overhead consumed to achieve uniform accuracy in this invention;
[0060] in, Figure 6(a) is a schematic diagram showing the effect of communication overhead consumed by the experimental group VGG9-MNIST to achieve uniform accuracy;
[0061] Figure 6 (b) is a schematic diagram showing the effect of communication overhead consumed by the experimental group VGG9-CIFAR10 to achieve uniform accuracy;
[0062] Figure 6 (c) is a schematic diagram showing the effect of communication overhead consumed by the experimental group ResNet9-CIFAR10 to achieve uniform accuracy;
[0063] Figure 6 (d) is a schematic diagram showing the effect of communication overhead consumed by the experimental group ResNet9-CIFAR100 to achieve uniform accuracy;
[0064] Figure 7 A schematic diagram of the structure of an electronic device provided by the present invention;
[0065] Figure 8 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. Detailed Implementation
[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0067] Example 1
[0068] Please see Figure 1 , Figure 2 and Figure 3 As shown in the figure, this embodiment provides a method for constructing an adaptive content selection system for vehicle-to-everything (V2X) networks. The method includes:
[0069] S1. Initialization settings: Determine the worker nodes and their characteristics in the decentralized federated learning system DFL, initialize the global local model, and set the training parameters.
[0070] These characteristics include the network bandwidth, energy consumption, and computing power of the working nodes.
[0071] As an example, suppose in a decentralized federated learning system DFL consisting of N worker nodes, each worker node k uses a local dataset. Training local model weights The goal of DFL is to find the model weights that minimize the weighted average loss for N clients. :
[0072] (1);
[0073] in, It is the local loss function of the k-th working node. It refers to the weights of the local model. and a single data sample The loss, This represents the objective function of DFL.
[0074] In this implementation, it should be noted that DFL typically includes Round local iteration and In each round of global aggregation, local model training, model exchange, and model aggregation are performed sequentially.
[0075] Furthermore, in this step, due to communication capacity limitations, the bandwidth available to each working node in the DFL is finite. Assuming bandwidth is evenly distributed among neighbors, the bandwidth of a link depends on the minimum of its inbound and outbound bandwidths. Therefore, the network bandwidth calculation process is provided as follows:
[0076] Let the inbound and outbound bandwidths of worker node k in round t be expressed as follows: and ;
[0077] Assuming bandwidth is evenly distributed, the link The network bandwidth is:
[0078] (2);
[0079] In the formula, , Let represent the number of neighboring nodes of worker node k and worker node j in round t, respectively.
[0080] At the same time, it should be noted that due to the asymmetry of the link, the link and The bandwidth may be different.
[0081] Furthermore, in this step, energy consumption includes both the training phase and the model interaction phase. The specific calculation process for energy consumption is as follows:
[0082] During the training phase, the energy consumption for training worker node k in round t is:
[0083] (3);
[0084] In the formula, This represents the number of processor cycles required for worker node k to execute one data sample. For the local dataset of device k, Represents the dataset The number of samples, This represents the processor cycle frequency of worker node k. This represents the number of local iterations. This represents the effective capacitance coefficient of the chip used in device k.
[0085] During the model interaction phase, the training energy consumption of worker node k in round t is:
[0086] (4);
[0087] In the formula, ,in, Let k be the transmission rate of device k. For bandwidth, For background noise, Let k be the channel gain of the working node. For the communication time of the device, For the size of the transmitted data;
[0088] The total energy consumption of worker node k is:
[0089] (5);
[0090] In mobile decentralized federated learning scenarios, due to communication resource constraints, each worker node may not be able to request the model from all neighboring worker nodes. Therefore, each worker node needs to select an appropriate subset of neighbors. More neighbors will help with faster convergence, but will consume more bandwidth. Assume the bandwidth resource for each link in round t is... In practice, because bandwidth is time-varying and measurable, the bandwidth constraint for each link is... :
[0091] (6);
[0092] On the other hand, worker nodes with lower energy consumption may be unable to complete the entire process of local training, model interaction, and model aggregation, resulting in information loss. To mitigate this impact, the total energy consumption of worker node k in round t should not exceed the energy budget for that round. ,Right now:
[0093] (7);
[0094] Therefore, computing power satisfies the following constraints:
[0095] (8);
[0096] In the formula, Links between worker nodes k and j bandwidth, For the first Wheel link bandwidth resources, Let k be the energy budget for working node k in round t.
[0097] Furthermore, in order to effectively balance the requirements of low overhead and high performance, and to achieve the propagation of neighboring nodes and model information as much as possible under unstable network conditions, so as to enable the model to converge quickly, our goal can be expressed as optimizing the global loss function in formula (1) under the condition that the communication bandwidth and energy of the working nodes are limited:
[0098] (9).
[0099] S2. Local Model Training and Interactive Content Preparation: Monitor the characteristics of each working node in real time, train the local model on the local data of each working node that meets the conditions, and generate two types of interactive resources synchronously after the training is completed.
[0100] Among them, the two types of interactive resources are local model weight update information and lightweight local data category prototype information;
[0101] The model training process is as follows: For each worker node participating in the training, its stochastic gradient is calculated using the local training dataset. Then, update its local model using worker node k:
[0102] (10)
[0103] In the formula, It's the learning rate. This represents the local model of worker node k at the start of round t of global training (generally the latest global model). This represents the candidate local model that worker node k will aggregate in round t.
[0104] S3. Information Interaction and Content Transmission: An adaptive content selection algorithm and information caching mechanism are used to complete the interaction of information between each working node and its neighboring working nodes within its instantaneous communication range.
[0105] It should be noted that after each working node completes its local model training, it sets its local model... It sends data to its connected neighbors through the established communication network and receives local models from its neighbors.
[0106] In DFL, the communication network can be modeled as a connected undirected graph. , recorded as .in, A vertex is a collection of worker nodes. This represents the set of links connecting worker nodes. For example, in round t, it is represented by... The set of links connecting worker nodes is represented by an adjacency matrix. This represents the network topology of P2P communication in DFL, where if If the value is 0, then the value is 0; otherwise, the value is 0. The neighbor set of worker node k is represented as... The degree matrix is defined as a diagonal matrix, where .
[0107] In addition, during information exchange and content transmission, priority is given to sharing local data category prototype information during the interaction phase, and sharing local model weight update information is increased when network bandwidth allows.
[0108] It should be noted that in mobile scenarios, worker nodes need to quickly select neighbors to complete information exchange based on current bandwidth conditions and energy consumption. Dynamic bandwidth changes mean that some neighbors may be unable to meet transmission requirements within a specific timeframe, while devices with insufficient energy cannot participate in model training and updates. To effectively meet these constraints, we need a flexible and efficient information exchange method to ensure that each worker node can exchange the maximum amount of information within limited communication resources and energy budgets.
[0109] The adaptive interactive content selection algorithm primarily selects interactive content adaptively based on the current network bandwidth and the energy of the working node.
[0110] In federated learning, exchanging local model weight update information is a common practice. Each worker node uses a weighted average aggregation strategy to complete the local model update.
[0111] (11);
[0112] In the formula, Let k be the model weight of worker node k in round t. Let k represent the set of neighboring nodes of worker node k in round t. This represents the number of neighboring nodes of worker node k in round t.
[0113] Exchanging local data category prototype information can correct the problem of insufficient concentration of category representation distribution under high mobility. Furthermore, because prototype information is much smaller than weight information, it reduces communication overhead. The calculation of local data category prototype information also includes two stages: local category prototype preparation and global category prototype aggregation. It is worth noting that, similar to the aggregation of global model weights, in decentralized federated learning, the aggregation of global category prototypes also involves each worker node aggregating its own global category prototype. The training objective remains that the global category prototypes of each worker node will tend to be consistent.
[0114] As an example, suppose worker nodes i and k are on their local datasets respectively. and The training was completed above, among which and Different label statistical distributions are possible. Our goal is to make the global category prototypes of all working nodes converge, while still requiring data that identifies all categories. Let... To obtain the complete set of categories for the dataset, in the initial stage, each worker node may only have the global categories. A subset of the working nodes, where there can be overlap between the working nodes.
[0115] During the local category prototype preparation phase, each worker node calculates the category prototype based on its local dataset. Each worker node aggregates a prototype for each category in its local data, such as... Figure 3 As shown, worker node 1 will obtain prototypes of 4 categories, worker node 3 will obtain prototypes of 5 categories, and worker node 5 will obtain prototypes of 3 categories. Assume the geometric center of the z-th category of data is defined as the prototype. Then, in worker node k, the prototype of category z It is the local dataset of worker node k. The mean of the embedding vectors of the z-th class samples can be expressed as:
[0116] (12);
[0117] In the formula, It is a local dataset A subset consisting of training samples belonging to class z. For the forward computation of the model, It is a computational method for representation layers from input to intermediate representations. Representation layers refer to all layers except the last one.
[0118] Furthermore, by introducing a class-based prototype approach to address the issue of insufficient concentration in class representation distribution under high mobility, the objective of decentralized federated learning can be refined as follows:
[0119] (13);
[0120] in, , It refers to the weights of the local model. and a single data sample The loss, The number of neighboring nodes. It is the number of samples belonging to class z among all working nodes. It is a measure of local prototypes and corresponding global prototype The regularization term for the distance between them.
[0121] Each working node has a global prototype of a certain type. This is obtained by aggregating the prototype shared by its neighboring nodes:
[0122] (14);
[0123] In the formula, This represents the prototype of category z from worker node k. This represents the number of worker nodes with category z. Represents the set of working nodes The total number of samples in category z.
[0124] It is worth noting that in decentralized federated learning, since the local global models of each node will eventually converge to a consensus, the local global model obtained by aggregating the prototypes of each node's neighbors is the system's global prototype. The approximate value, that is:
[0125] (15);
[0126] Therefore, the label of sample x Predict the representation vector of the available measurement samples and prototype The L2 distance between them is represented as:
[0127] (16);
[0128] As an example, now with Figure 2 From the perspective of working node 1, explain the process of exchanging category prototype information, such as Figure 3 As shown.
[0129] After each worker node completes local training and prepares its own category prototype, it will exchange information. Worker node 1 will receive information shared by its neighbors worker nodes 2, 3 and 5. In the aggregation phase, in addition to completing weight aggregation according to formula (11), prototype aggregation will also be completed by category according to formula (14), and finally a global set of all category prototypes will be formed, which will be broadcast to its neighbors in the next round of information sharing.
[0130] In high-speed, decentralized interaction scenarios, communication between worker nodes can only occur within their respective transmission ranges. If worker nodes encounter each other infrequently, the information available for aggregation will not be sufficient to support rapid model convergence. To expand the scope of model information sharing, we introduce an information caching mechanism to store data received by worker nodes from previously encountered nodes. When a node encounters a new node, it will not only transmit its own data but also the cached data from other nodes.
[0131] The information caching mechanism includes:
[0132] Each worker node is allowed to store and transmit local model update information received from encountered worker nodes in its historical interactions;
[0133] The Least Recently Used (LRU) principle is used to update and cache information, and timestamps are used for filtering.
[0134] As an example, suppose the cached data of worker node k in the t-th round is Worker nodes not only exchange their local information but also share their cached information. Therefore, in the aggregation phase, the improved formula (11) is as follows:
[0135] (17);
[0136] Similarly, the prototype aggregation, with the introduction of a buffer, further refines formula (14) as follows:
[0137] (18);
[0138] in, The weighting of local data. and These represent the weight information and prototype information in the Buffer, respectively.
[0139] Furthermore, to ensure the model's eventual convergence, we assume that the joint graph of the peer-to-peer network across multiple rounds is strongly connected, and that peer-to-peer communication is non-blocking. Additionally, to control the impact of stale information on the system, we propose a Least Recently Used (LRU) cache update method, using timestamps to assist in filtering and maximize cache benefits.
[0140] In this way, each working node can not only directly obtain information about its neighbors, but also indirectly obtain information about its neighbors' neighbors, which helps to promote data propagation and improve the convergence speed of DFL. It is worth noting that the point-to-point network topology is dynamic and sparse; considering the impact of outdated information, a threshold is set. To control the impact of stale information on the system, remove stale information from the cache of each worker node that exceeds a certain threshold. The model information is processed. When all information in the cache is within an acceptable range of obsolescence, the freshest information is selected to replace the obsolete information within the maximum capacity of the cache pool. After the information exchange is complete, each worker node aggregates its local model information in parallel.
[0141] S4, Model Aggregation Update: Each worker node shares the information generated by local training and the content received from neighboring worker nodes to complete the local model update and iteration;
[0142] The update and iteration formula for the local model is as follows:
[0143] In the formula, This represents a subgraph containing worker node k and its neighbors. Indicates the aggregation rule used. It is the local model weight of worker node k after aggregation in round t. Let k be the set of neighboring worker nodes. This represents the candidate local models that worker node i will aggregate in round t.
[0144] S5. Update Termination: Repeat steps S2 to S4 until the preset convergence condition is met or the maximum number of communication rounds is reached.
[0145] In this embodiment, the maximum number of communication rounds for the experimental group of the training dataset MNIST is set to 100 rounds, and the maximum number of communication rounds for the experimental groups of the training datasets CIFAR10 and CIFAR100 is set to 200 rounds.
[0146] Performance testing:
[0147] 1) The datasets used in the experiment included: the MNIST handwritten digit dataset, and the CIFAR10 and CIFAR100 datasets created by the Canadian Institute for Advanced Study, which were divided into two main data distribution types: Independent and Identically Distributed (IID) and Non-Independent and Identically Distributed (NonIID). In the IID scenario, worker nodes were randomly assigned datasets of equal size. In the Non-IID scenario, the proportion of different data types on the client side was adjusted using p-values to simulate the Non-IID distribution of the data. In the experiment, p was set to three groups: 0.2, 0.5, and 0.8.
[0148] 2) Models: The experiments used the visual geometry group model VGG9 and the residual neural network ResNet9 as training models. The VGG9 model was trained on the MNIST and CIFAR10 datasets, and the ResNet9 model was trained on the CIFAR10 and CIFAR100 datasets.
[0149] 3) Key parameter settings: In the experiment, the VGG9 model group was set to 10 working nodes, and the ResNet9 model group was set to 20 working nodes. The maximum number of training epochs for the MNIST dataset group was 100, and the maximum number of training epochs for the CIFAR10 and CIFAR100 groups was set to 200; the early stopping setting was 20 for all groups. In addition, the learning rate for the MNIST and CIFAR10 datasets was set to 0.01, and the learning rate for the CIFAR100 dataset was set to 0.005. All datasets used the SGD optimizer, with momentum set to 0.9, local update count set to 2, and batch size set to 32.
[0150] 4) Communication Configuration: It is assumed that nodes communicate with their neighboring nodes via a Local Area Network (LAN) or a Wide Area Network (WAN). The experiment simulates the heterogeneity and dynamism of a point-to-point network by randomly allocating bandwidth to each node. Different latency levels for each node are also simulated.
[0151] Four experimental groups were set up to evaluate the overall performance of the proposed method: VGG9-MNIST, VGG9-CIFAR10, ResNet9-CIFAR10, and ResNet9-CIFAR100. The best accuracy of the proposed method and the baseline method in the four experimental groups is shown in Table 1.
[0152] Table 1. Model's Best Accuracy
[0153]
[0154] Table 1 shows that our proposed method achieves comparable accuracy to the baseline across different models and datasets, particularly outperforming all baselines in the NonIIDp=0.8 scenario: in the VGG9-MNIST, VGG9-CIFAR10, ResNet9-CIFAR10, and ResNet9-CIFAR10 scenarios, the model accuracy of our proposed method is improved by an average of 4.71%, 9.41%, 10.88%, and 5.93% compared to the baseline, respectively. Furthermore, Figure 4The model test accuracy of the proposed method in various experimental groups under the scenario of NonIIDp=0.8 is shown. The results show that the accuracy of the proposed method is more stable and has the least oscillation during the training process. The reason why the proposed method can achieve higher accuracy than the baseline in highly heterogeneous environments is that the proposed method introduces an information caching mechanism and designs a least recently used cache update mechanism. By leveraging the spatiotemporal information transmission network formed by the high-speed movement of vehicles, information can be propagated in multiple hops within the network, effectively expanding the coverage of information interaction and improving the model performance in mobile scenarios.
[0155] In addition, we statistically analyzed the training time and communication volume required for each group of methods to achieve uniform accuracy, as follows: Figure 5 and Figure 6 As shown. For example, Figure 5 (a) represents the time required for the proposed method and the comparison methods to achieve the same accuracy under different dataset heterogeneity in the VGG9-MNIST scenario. The horizontal axis represents the distribution of the dataset and the same accuracy level achieved by the two methods, and the vertical axis represents the training time. Experimental results show that, under different models and datasets, the proposed method DFLTrans outperforms all baselines in terms of both training time and communication overhead in achieving uniform accuracy.
[0156] Specifically, such as Figure 5 Regarding training time: in scenarios with IID, NonIID (p=0.2), NonIID (p=0.5), and NonIID (p=0.8), the proposed method reduces training time by an average of 47.96%, 43.21%, 51.13%, and 76.50% compared to the suboptimal method, respectively. The advantage of the proposed method becomes more significant as the heterogeneity of the dataset increases. This is mainly due to the design of the caching mechanism, which trades storage space for training efficiency.
[0157] In terms of communication traffic overhead, such as Figure 6 As shown, in scenarios with IID, NonIID (p=0.2), NonIID (p=0.5), and NonIID (p=0.8), the communication overhead of our proposed method is reduced by an average of 43.55%, 33.47%, 38.48%, and 69.51% compared to the suboptimal method, respectively. Similarly, as the heterogeneity of the dataset increases, the advantage of our proposed method in terms of communication overhead becomes even more significant. This is thanks to the design of the adaptive content selection module, which can select smaller interactive content for transmission when communication conditions are limited, reducing communication overhead and improving training efficiency; furthermore, the caching mechanism ensures the richness of training data, thereby guaranteeing model accuracy.
[0158] In summary, the method presented in this application focuses on finite and time-varying communication networks and edge devices with varying computing power and energy consumption. It proposes a decentralized federated learning method for heterogeneous devices with adaptive content selection. Through an adaptive interactive content selection algorithm, this method effectively reduces communication overhead while ensuring model performance. Simultaneously, by leveraging a caching mechanism to increase the amount of transmitted information, it improves model performance and training efficiency in mobile scenarios. The method presented in this application demonstrates significant effectiveness in reducing training time and communication overhead.
[0159] Example 2
[0160] Please see Figure 7 As shown, this embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the construction method of the adaptive transmission content selection system for vehicle networking provided by any of the above methods.
[0161] Since the electronic device described in this embodiment is the electronic device used to implement the construction method of the adaptive transmission content selection system for vehicle-to-everything (V2X) in this application embodiment, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the construction method of the adaptive transmission content selection system for V2X described in this application embodiment. Therefore, how the electronic device implements the method in this application embodiment will not be described in detail here. Any electronic device used by those skilled in the art to implement the construction method of the adaptive transmission content selection system for V2X in this application embodiment falls within the scope of protection of this application.
[0162] Example 3
[0163] Please see Figure 8 As shown, this embodiment discloses a computer-readable storage medium, including a memory, a processor, and a computer program stored on the memory and running on the processor. When the processor executes the computer program, it implements the construction method of the adaptive transmission content selection system for vehicle networking provided by any of the above methods.
[0164] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters, weights, and thresholds in the formulas are set by those skilled in the art according to the actual situation.
[0165] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired or wireless network. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0166] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0167] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0168] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only one method, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0169] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0170] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0171] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0172] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for constructing an adaptive content selection system for vehicle-to-everything (V2X) networks, characterized in that, The method includes: S1. Initialization settings: Determine the worker nodes and their characteristics in the decentralized federated learning system DFL, initialize the global local model, and set the training parameters. These characteristics include the network bandwidth, energy consumption, and computing power of the working nodes; The objectives for defining the characteristics are as follows: In the formula, , It refers to the weights of the local model. and a single data sample The loss, The number of neighboring nodes. It is the number of samples belonging to class z among all working nodes. It is a measure of local prototypes and corresponding global prototype The regularization term for the distance between them. For the energy budget of working node k in round t, Let t be the total energy consumption of worker node k in round t. For bandwidth constraints of each link, For link Network bandwidth; S2. Local Model Training and Interactive Content Preparation: Monitor the characteristics of each working node in real time, train the local model on the local data of each working node that meets the conditions, and generate two types of interactive resources synchronously after the training is completed. Among them, the two types of interactive resources are local model weight update information and lightweight local data category prototype information; S3. Information Interaction and Content Transmission: An adaptive content selection algorithm and information caching mechanism are used to complete the interaction of information between each working node and its neighboring working nodes within its instantaneous communication range. The expression for updating local model weights in the information caching mechanism is as follows: ; The expression for the prototype information of the local data category is: ; In the formula, The weighting of local data. and These represent the weight information and prototype information in the Buffer, respectively. This represents the prototype of category z from worker node k. This represents the number of worker nodes with category z. Represents the set of working nodes The total number of samples in class z. Let k represent the set of neighboring nodes of worker node k in round t. This represents the number of neighboring nodes of worker node k in round t; S4, Model Aggregation Update: Each worker node shares the information generated by local training and the content received from neighboring worker nodes to complete the local model update and iteration; S5. Update Termination: Repeat steps S2 to S4 until the preset convergence condition is met or the maximum number of communication rounds is reached.
2. The method according to claim 1, characterized in that, In step S1, the network bandwidth is calculated as follows: Let the inbound and outbound bandwidths of worker node k in round t be expressed as follows: and ; Assuming bandwidth is evenly distributed, the link Network bandwidth is In the formula, , Let represent the number of neighboring nodes of worker node k and worker node j in round t, respectively.
3. The method according to claim 1, characterized in that, In step S1, the calculation process for energy consumption is as follows: During the training phase, the training energy consumption of worker node k in round t is: In the formula, This represents the number of processor cycles required for worker node k to execute one data sample. For the local dataset of device k, Represents the dataset The number of samples, This represents the processor cycle frequency of worker node k. This represents the number of local iterations. This represents the effective capacitance coefficient of the chip used in device k. During the model interaction phase, the training energy consumption of worker node k in round t is: In the formula, ,in, Let k be the transmission rate of device k. For bandwidth, For background noise, Let k be the channel gain of the working node. For the communication time of the device, For the size of the transmitted data; The total energy consumption of working node k is .
4. The method for constructing an adaptive transmission content selection system for vehicle-to-everything (V2X) networks according to claim 3, characterized in that, In step S1, the computing power satisfies the following constraints: In the formula, Links between worker nodes k and j bandwidth, For the first Wheel link bandwidth resources Let k be the energy budget for working node k in round t.
5. The method for constructing an adaptive transmission content selection system for the Internet of Vehicles according to claim 1, characterized in that, In step S2, the model training process is as follows: Each worker node participating in training computes its stochastic gradient using the local training dataset; Then, the worker node updates its local model.
6. The method for constructing an adaptive transmission content selection system for vehicle-to-everything (V2X) networks according to claim 1, characterized in that, In step S3, during information interaction and content transmission, prioritizing the sharing of local data category prototype information during the interaction phase, and increasing the sharing of local model weight update information when network bandwidth allows.
7. The method for constructing an adaptive transmission content selection system for vehicle-to-everything (V2X) networks according to claim 1, characterized in that, In step S3, the information caching mechanism includes: Each worker node is allowed to store and transmit local model update information received from encountered worker nodes in its historical interactions; The Least Recently Used (LRU) principle is used to update and cache information, and timestamps are used for filtering.
8. The method for constructing an adaptive transmission content selection system for the Internet of Vehicles according to claim 1, characterized in that, In step S4, the update iteration formula for the local model is: In the formula, This represents a subgraph containing worker node k and its neighbors. Indicates the aggregation rule used. It is the local model weight of worker node k after aggregation in round t. Let k be the set of neighboring worker nodes. This represents the candidate local models that worker node i will aggregate in round t.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the construction method of the adaptive transmission content selection system for vehicle networking as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed, implements the construction method of the adaptive transmission content selection system for the Internet of Vehicles as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Method and system for decentralized federated learning
CN116745780A
Methods, circuits, devices and systems for adaptive knoweldge transfer in communication networks
WO2025145348A1