Next Article in Journal
A Hybrid DSCNN-GRU Based Surrogate Model for Transient Groundwater Flow Prediction
Next Article in Special Issue
Dynamic UAV Inspection Boosted by Vehicle Collaboration Under Harsh Conditions in the IoT Realm
Previous Article in Journal
Experimental and Theoretical Evaluation of Incident Solar Irradiance on Photovoltaic Power Plants Under Real Operating Conditions: Fixed Tilt Angle System vs. Horizontal Single-Axis Tracker
Previous Article in Special Issue
Synchronous Remote Calibration for Electricity Meters: Application and Optimization
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Blockchain-Based Collaborative Storage Scheme for Roadside Unit Clusters in Social Internet of Vehicles

by
Dai Hou
1,
Lan Wei
2,
Lei Zheng
1,
Geng Wu
1,
Jiaxing Hu
2,
Chenxi Dong
1,
Xinru Li
2 and
Kai Peng
2,*
1
State Grid Hubei Information & Telecommunication Company, Wuhan 430048, China
2
Hubei Key Laboratory of Internet of Intelligence, School of Electronic Information and Communications, Huazhong University of Science and Technology, Wuhan 430074, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(8), 4573; https://doi.org/10.3390/app15084573
Submission received: 21 March 2025 / Revised: 16 April 2025 / Accepted: 20 April 2025 / Published: 21 April 2025
(This article belongs to the Special Issue IoT and Edge Computing for Smart Infrastructure and Cybersecurity)

Abstract

:
With the gradual application of blockchain technology in the domain of Social Internet of Vehicles (SIoV), the increasing volume of blockchain data has imposed significant storage pressure on roadside units (RSUs). Collaborative storage schemes, which organize RSUs into clusters to jointly store content for vehicles, have been explored. However, existing collaborative storage solutions in IoV primarily focus on caching content and are not well-suited to the deployment constraints of blockchain networks. Building on blockchain’s decentralized characteristics and data integrity mechanisms, this paper proposes a collaborative storage scheme that reduces RSU storage loads while sustaining distributed ledger operations in SIoV. Specifically, the RSU Access Preference-based Spectral Clustering Algorithm (RAPSCA) is proposed to address RSU clustering by analyzing both the RSUs’ access preferences for blockchain data and their resource availability. Subsequently, the Vehicle Service Priority-based Greedy Block Allocation Algorithm (VSPGBAA) is devised for intra-cluster storage allocation, which considers vehicles’ dwell times and block access probabilities to reduce overall access costs. Experimental results indicate that, compared to baseline algorithms, the proposed method achieves a 27.7% reduction in cost and a 3.5-fold decrease in execution time, thereby demonstrating the feasibility of collaborative storage optimization in blockchain-enabled SIoV.

1. Introduction

With the rapid development of the Internet of Things (IoT) technology, a wide variety of smart devices are becoming interconnected. Internet of Vehicles (IoV), a key IoT application in the vehicular domain, integrates vehicles, roadside units (RSUs), and cloud platforms to form a collaborative network for resource sharing. This integration significantly enhances data exchange efficiency and improves the intelligence level of transportation systems. Building upon the foundation of IoV, Social Internet of Vehicles (SIoV) introduces social relationships into vehicular networks, enabling vehicles to interact based on trust relationships and shared interests. This transformation allows vehicles to evolve from passive data transmission nodes into intelligent entities that actively construct and manage social relationship networks. Consequently, SIoV further promotes internal information exchange and resource sharing within the network [1,2,3,4].
Blockchain offers a promising solution for distributed reputation management in SIoV through decentralization, data immutability, and smart contract automation [5,6,7]. In blockchain-enabled SIoV, blockchain serves as a trusted infrastructure that records vehicle interactions through a distributed ledger and consensus mechanisms, ensuring data authenticity and reliability. However, the integration of blockchain introduces additional storage burdens to SIoV systems. Due to the append-only nature and multiple-replica storage mechanism of blockchain, its storage demand continuously increases over time [8]. For RSU nodes with limited and heterogeneous storage resources, this ever-growing demand may become a performance bottleneck, thereby impacting the scalability and operational efficiency of the entire SIoV system [9,10,11].
A feasible approach to addressing storage performance challenges in SIoV is collaborative storage. This method enables blockchain data to be distributed across multiple storage nodes, with each node storing only a portion of the data. When full data access is required, nodes can efficiently retrieve missing blocks through an inter-node data exchange mechanism, thereby reducing the storage burden on individual nodes and enhancing overall resource utilization. Several studies have explored collaborative storage in blockchain, such as leveraging the InterPlanetary File System (IPFS) [12] or employing consistent hashing-based encoding schemes [13] for distributed storage. However, these studies primarily focus on storage balance and fairness, overlooking access costs in the SIoV context. Therefore, designing an optimized collaborative storage scheme tailored for RSUs in blockchain networks is essential to improving the performance and efficiency of SIoV systems.
There are still several challenges in optimizing collaborative storage for RSUs in a blockchain-enabled SIoV system:
  • In traditional IoV systems, RSUs operate independently without clustering or collaboration. In blockchain-enabled SIoV, RSUs must collaboratively maintain blockchain integrity despite limited storage resources. The full-node storage model imposes high demands, restricting resource-constrained RSUs from participating in consensus, thereby limiting network scalability. Existing clustering methods, based on geographical location or network topology, overlook vehicles’ block access patterns. Thus, an RSU clustering strategy that integrates blockchain data characteristics while addressing storage constraints is essential for enhancing efficiency and performance.
  • In a collaborative storage cluster, block allocation among RSUs directly impacts vehicle access latency and service quality. Existing methods, relying on general content popularity, fail to account for vehicle mobility and block access correlations, leading to higher access costs. Therefore, developing an RSU cluster-based storage allocation scheme tailored to blockchain scenarios is crucial for minimizing vehicle access costs and enhancing system performance.
To overcome these challenges, this paper innovatively proposes a blockchain-based RSU cluster architecture and intra-cluster collaborative storage strategy for SIoV. Spectral clustering is employed to dynamically group RSUs into clusters, which ensures decentralized, adaptive aggregation of RSUs with limited storage resources into cohesive clusters, collaboratively maintaining blockchain integrity. Meanwhile, the collaborative storage strategy enables each RSU to prioritize and store blockchain data autonomously, which ensures low-cost, resource-efficient decisions that align with RSUs’ computational constraints. Specifically, the main contributions of this paper are as follows:
  • This paper proposes an RSU cluster architecture for blockchain-enabled SIoV. In traditional blockchain systems, each node maintains a complete copy of the distributed ledger to achieve decentralized trust consensus. However, such a full replication model encounters significant resource constraints in SIoV scenarios. The collaborative storage scheme proposed in this paper leverages RSU clustering strategies and block allocation mechanisms to reduce the storage burden on individual nodes, ensuring that each cluster can still deliver complete blockchain services and thus balancing decentralization with operational efficiency.
  • This paper introduces the RSU Access Preference-based Spectral Clustering Algorithm (RAPSCA) to optimize RSU grouping. Unlike traditional methods that rely solely on physical distance or communication cost, RAPSCA incorporates vehicle block access behaviors and storage availability, ensuring more efficient and rational resource allocation for collaborative storage. Additionally, to optimize intra-cluster block allocation, the Vehicle Service Priority-based Greedy Block Allocation Algorithm (VSPGBAA) is designed. This method reduces access latency and improves storage utilization by considering vehicle dwell time, block access probability, and RSU storage availability.
  • Extensive experiments evaluate the proposed methods in terms of storage hit rate, access cost, and runtime efficiency. Experimental results indicate that, compared to baseline algorithms, the proposed method achieves a 27.7% reduction in per-vehicle access costs for required blockchain blocks, and a 3.5-fold decrease in average algorithm execution time measured on identical hardware configurations.

2. Related Work

2.1. Blockchain-Enabled IoV System

Blockchain technology has been recognized as a promising solution for addressing trustworthy data sharing in the IoV. Javaid et al. [6] integrated blockchain with public key infrastructure (PKI) to manage vehicle identity information in SIoV, proposing a checkpoint-based dynamic consensus mechanism to achieve trusted vehicle access control. Vishwakarma et al. [14] tackled the high computational and communication overhead in blockchain-enabled IoV by introducing an SDN-based lightweight blockchain security protocol, which modifies the Practical Byzantine Fault Tolerance (PBFT) consensus algorithm [15] to reduce computational and communication costs in secure message propagation. Lin et al. [16] developed a P2P computing resource trading system for IoV, utilizing a two-stage Stackelberg game mechanism to optimize pricing utilities for buyers and sellers under consortium blockchain environments.
The above-mentioned works primarily focus on security and trust management in IoV [6,14,16], often customizing blockchain consensus mechanisms to fit vehicular network scenarios. However, the storage scalability challenges introduced by blockchain in IoV systems remain largely overlooked. For RSUs with limited and heterogeneous storage resources, efficiently managing ever-growing blockchain data while providing low-access-cost services to vehicles remains an open and complex problem. We address blockchain storage allocation in SIoV by proposing a collaborative storage approach based on RSU clustering. By leveraging cooperative storage, our method enhances RSU storage efficiency and optimizes overall network service quality.

2.2. Collaborative Caching in IoV

Several studies have explored collaborative caching as a means of optimizing storage in IoV. Wang et al. [17] proposed a content popularity-based collaborative caching method, utilizing LSTM to predict vehicle user requests and applying reinforcement learning to maximize cache hit rates. Alnagar et al. [18] designed both cooperative and non-cooperative RSU proactive caching schemes, where vehicle mobility patterns were predicted to optimize content allocation, thereby reducing communication delays in vehicular ad hoc networks. Hu et al. [19] considered the limited capacity of RSUs and developed an RSU caching scheme based on a multi-object auction mechanism, aiming to maximize the volume of data downloaded by vehicle users.
While existing studies have proposed effective solutions for collaborative caching in RSU-based IoV scenarios [17,18,19], they primarily consider RSUs as service providers that distribute general-purpose content from third-party providers to improve the user experience of vehicles. These works often focus on enhancing content allocation efficiency through vehicle mobility prediction and content popularity analysis, thereby laying a foundation for storage optimization in IoV. However, they give limited attention to the challenges of collaborative storage in blockchain-based environments. In contrast, our work targets the blockchain-enabled SIoV scenario, where RSUs not only provide services to vehicles but also serve as blockchain network nodes. To preserve the integrity of the distributed ledger, our proposed scheme requires each RSU cluster to collaboratively maintain at least one complete copy of the blockchain, and we optimize the storage strategy accordingly under these stricter network constraints to improve both system efficiency and service quality.

2.3. Blockchain Storage Scalability

The issue of blockchain storage scalability has been widely studied in existing research. Luu et al. [20] proposed sharding in blockchain networks, where each shard is managed by an independent committee responsible for transaction management and storage. While this approach significantly reduces the amount of blockchain data stored on individual nodes, it introduces high processing latency when handling cross-shard transactions, thereby increasing the network consensus cost. Xu et al. [21] proposed pruning the blockchain state, offloading old blocks to the cloud to reduce storage consumption in local networks. Although this method effectively optimizes local storage costs, it compromises blockchain integrity within the local network, making it unsuitable for systems with high backhaul latency. Hassanzadeh-Nazarabadi et al. [13] introduced the LightChain architecture, which employs a distributed hash table (DHT) for distributed blockchain storage allocation, allowing nodes in the network to store only a portion of the blockchain data. However, this approach primarily focuses on load balancing in block distribution and does not optimize access costs resulting from the allocation strategy. Li et al. [12] integrated the InterPlanetary File System (IPFS) into IoT blockchain systems, delegating storage tasks to distributed trusted third parties. However, the introduction of third-party storage raises additional latency issues that remain unresolved. Xu et al. [22] proposed the concept of “consensus unit”, which aggregates multiple different network nodes into one consensus unit, enabling nodes to jointly store and maintain blockchain data.
Although these mentioned studies improve blockchain storage scalability in their respective contexts [12,13,20,21,22], their studies either lack comprehensive modeling tailored to the SIoV scenario or have optimization objectives that differ from the problem we address. Therefore, these solutions cannot be directly applied to the system we propose. The studies by Luu et al. [20] and Xu et al. [21] focus on blockchain data pruning as the core idea. However, the damage to blockchain integrity caused by this approach means that it is only applicable to specific scenarios. The study by Li et al. [12] needs to take into account the credibility and stability of third-party systems. The schemes proposed by Hassanzadeh-Nazarabadi et al. [13] and Xu et al. [22] are similar to collaborative storage architectures, but there is still room for improvement in the detailed strategies for block allocation. In this paper, we design an RSU cluster-based collaborative storage scheme that accounts for blockchain storage demands in SIoV and the mobility characteristics of vehicle users. By employing RSU clustering and a distributed block storage strategy, our approach further improves blockchain storage efficiency while reducing block access costs for vehicle users.

3. System Model

In this section, we present a detailed description of the blockchain-based RSU cluster collaborative storage model in SIoV. Given the limited storage resources of RSUs, we organize them into collaborative storage clusters. Within each cluster, RSU nodes share storage resources to jointly maintain blockchain integrity while providing efficient block data query services for vehicles.

3.1. RSU Cluster Cooperative Storage System Model

In blockchain-enabled social Internet of Vehicles, RSU nodes collect reputation change information generated by vehicles within their service range. This information is encapsulated into blocks as transactions and submitted to the blockchain network through a consensus mechanism for recording. As full nodes in the blockchain network, RSUs are required to store a complete copy of the blockchain data locally to provide services to vehicles. However, as the blockchain network grows over time, the increasing length and volume of blockchain data exceed the storage capacity of individual RSUs, preventing resource-limited RSUs from participating in the blockchain consensus process as full nodes. To address this issue, the model proposed in this paper organizes multiple RSUs into collaborative storage clusters, enabling them to jointly maintain blockchain data integrity. Within each cluster, RSUs store only a portion of the blockchain data while still providing essential services such as reputation queries and transaction verification for vehicles. If an RSU lacks the required block data locally, it can retrieve the missing blocks from other RSUs within the cluster, ensuring service continuity and efficiency.
As shown in Figure 1, the system primarily consists of vehicles, RSUs, a cloud server, and a blockchain network that provides reputation activity recording and authentication for the vehicular social network. Vehicles act as primary users, collecting information about themselves and their surroundings while interacting and communicating with other vehicles or RSUs through built-in communication devices. When multiple vehicles generate activities within the social network, all reputation update information related to the involved vehicles is encapsulated into blocks by RSUs and appended to the blockchain via the consensus network connected to the cloud server. The vehicular network cluster is defined as the set of multiple RSUs and vehicles within a specific region. The set of vehicles participating in social activities is represented as V = { v 1 , v 2 , , v M } , the set of RSUs that construct the blockchain network, store blockchain data, and provide services is denoted as R = { r 1 , r 2 , , r N } , where the available storage capacity of an RSU r i is represented as r c i . Assuming that the current blockchain state consists of K blocks, the complete blockchain ledger is expressed as B = { b 1 , b 2 , , b K } , where the size of block b k is defined as s k . In the cooperative storage system of the RSU cluster, the RSU cluster is represented as C L U = { C 1 , C 2 , , C L } , where each cluster C l = { r 1 l , r 2 l , , r N l l } consists of multiple RSUs that collectively store all blocks in the blockchain B, and  N l is the number of RSU nodes in cluster C l .
In the system, RSU nodes and cloud nodes act as consensus nodes to construct the blockchain network collaboratively, maintaining consistency and integrity while providing query and verification services to vehicle users. When vehicle users need to obtain data from the blockchain, such as vehicle reputation status and historical reputation change records, they can choose to retrieve this information either from nearby RSU nodes or remote cloud nodes based on their current location. Upon receiving a query request from a vehicle, the RSU or cloud node queries the local or cluster ledger for block data and transmits the complete block information to the vehicle. Meanwhile, all vehicles participating in the SIoV within the cluster store lightweight block header data. Upon retrieving block data from RSU nodes or the cloud nodes, they can independently verify the integrity and authenticity of the data using the locally stored block headers, ensuring data reliability. By leveraging these immutable and tamper-proof reputation profiles recorded in the blockchain, vehicles dynamically establish social relationships such as trust-based collaborations or resource sharing with other entities, thereby enabling decentralized and credibility-driven interactions within the SIoV.
For the block deployment and vehicle access process, taking the system in Figure 1 as an example, we cluster RSUs into three clusters C 1 , C 2 , and C 3 . Assuming that the current blockchain ledger is B = { b 1 , b 2 , , b 6 } , then in addition to being stored as a backup in the cloud, the blockchain data also need to be deployed within the RSU clusters C 1 , C 2 , and C 3 . For cluster C 1 , which consists of four RSUs r 1 r 4 , unlike traditional full nodes that need to store the entire blockchain, each RSU in the cluster only stores a subset of the blockchain blocks, while storing only block headers for the remaining blocks to support basic verification. The cluster must collaboratively ensure that at least one complete copy of the blockchain data is available within the storage cluster. For the RSU node r 3 within the collaborative storage cluster, even if it does not store all blockchain blocks locally, it can still provide services to vehicles through RSU collaboration. Considering RSU r 3 within the collaborative storage cluster as shown in Figure 1, it stores the full data of block b 6 while only keeping the block headers of the remaining blocks. When vehicle v 2 requests the data contained in block b 2 from r 3 , the RSU first checks whether it has stored block b 2 locally. Upon detecting the absence of this block, r 3 sends a request via the R2R (RSU-to-RSU) link to another RSU within the cluster, r 2 which has stored block b 2 . After retrieving the required block data, r 3 transmits it to vehicle v 2 via the R2V (RSU-to-Vehicle) link.
Based on the full-node constraints imposed by blockchain, all RSUs within a cluster C l must collaboratively store at least one complete copy of the blockchain ledger to support verification and consensus functions. Therefore, the total storage capacity of the RSU cluster must satisfy the following condition:
r i C l r c i η b k B s k , η 1
where η is an adjustment factor that ensures the cluster meets the fundamental storage constraints while reserving additional storage capacity to accommodate newly generated blocks within the cluster. A larger η value enhances the cluster’s fault tolerance against individual node failures but also increases the overall storage resource requirements, potentially necessitating additional nodes to maintain stable cluster operation. Subject to the constraint in Equation (1), any RSU node within the cluster can selectively store the complete data of certain blocks while retaining only block header information for the remaining blocks. This approach optimizes the utilization of storage resources.

3.2. Block Access Probability Model

In SIoV, when vehicles establish social relationships or engage in information exchange, they typically need to verify each other’s identity and reputation information. In this system, a vehicle’s reputation update information is packaged into blocks by RSUs and becomes part of the blockchain. Due to the random block packaging mechanism in blockchain, a single block may contain reputation update records for multiple vehicles. Similarly, a vehicle’s identity and reputation updates may be stored across different blocks. For a given vehicle, the proportion of its relevant information in each block varies, leading to different access preferences for different blocks during identity and reputation verification. To better account for vehicle access preferences in block deployment, we define the access probability of vehicle v m to block b k as P m k , which is expressed as follows:
P m k = c o r m k · P f ( b k , A k )
where c o r m k represents the correlation between vehicle v m and block b k , which is determined by the random block packaging mechanism of the blockchain. When a block contains multiple transactions related to the same vehicle, its correlation with that vehicle is stronger. Consequently, when the vehicle’s reputation information needs to be verified, this block is more likely to be requested. Consider a block b k that contains n l transactions, represented as T x k = { T x 1 k , T x 2 k , , T x n l k } , where each transaction may involve multiple vehicles. Let y m k denote the relevance of a transaction within block b k to any vehicle in the cluster. If transaction T x l k is associated with vehicle v m (i.e., it contains the reputation information of vehicle v m ), then y l m k = 1 . Otherwise, if transaction T x l k does not involve node v m , then y l m k = 0 . Thus, the correlation between vehicle v m with block b k is defined as follows:
c o r m k = | T x l k | y l m k = 1 | n l
Additionally, P f ( b k , A k ) represents the baseline query probability based on historical query frequency. Since different blocks exhibit varying access frequencies, with newer blocks generally containing more recent vehicle reputation updates, we incorporate both correlation and access frequency into our analysis. By examining historical social behavior patterns, we estimate block access behavior within the current cycle. Following the definition provided in reference [21], we assume that the query frequency follows an exponential decay pattern. Thus, the baseline query probability for block b k , given its block age A k , is expressed as follows:
P f ( b k , A k ) = [ 0 A k F 0 ( b k ) e α t d ( t ) ] 1
where F 0 ( b k ) denotes the initial query frequency of b k at the time of block generation, and the block age A k starts from an initial value of 0 at the time of block creation and gradually increases as new blocks are generated.

3.3. Block Data Transmission Model

Block data retrieval latency is a critical metric in collaborative storage systems, as it reflects the quality of service in the network. In the proposed collaborative storage scheme, vehicles obtain block data from RSUs through two possible transmission links: RSU-to-RSU (R2R) and RSU-to-Vehicle (R2V). Therefore, it is essential to model the latency of both R2R and R2V transmission links.

3.3.1. R2V Transmission Latency

For R2V communication, data transmission between an RSU and a vehicle occurs through wireless propagation. The communication rate between RSU r i and vehicle v m is given by [23]:
C R i m = B i m log 2 1 + p i h i m 2 σ 2
where B i m denotes the available spectrum bandwidth of RSU r i , p i represents the transmit power of r i , h i m denotes the channel gain between RSU r i and v m , and  σ represents the noise power spectral density.
The transmission latency incurred when RSU r j transmits a single block b k of size s k to vehicle v m can be expressed as follows:
T D ( r i , ν m , b k ) = s k C R i m = s k B i m log 2 1 + p i h i m 2 σ 2

3.3.2. R2R Transmission Latency

For R2R communication, where RSUs are connected via wired links, the transmission latency incurred when RSU r j transmits a block b k of size s k to RSU r i can be expressed as follows:
T D ( r j , r i , b k ) = s k B i j
where B i j denotes the available transmission bandwidth between RSU r j and RSU r i .

4. Problem Formulation

4.1. Block Access Cost

Considering the process in which a vehicle requests access to a block from an RSU within the cluster, we define the decision variable x i k , which determines the storage status of a block in an RSU. This variable indicates whether block b k is stored in RSU r i . The decision variable set for RSU cluster C l is denoted as X l = { x i k r i C l , b k B } which forms an N l × K matrix. Here, x i k = 1 indicates that RSU r i has stored block b k , while x i k = 0 indicates that RSU r i does not store block b k . The block allocation decision table X is maintained by the cloud server and synchronized across all RSUs in the cluster. Additionally, each RSU can update this table based on local real-time network conditions. If a vehicle requests block b k data from RSU r i while x i k = 0 (i.e., RSU r i does not store the block b k data), the RSU must query X l to identify the RSU within the cluster that holds the complete copy of block b k and has the lowest expected access latency. Let RSU r j be the selected node that retrieves the block and transmits it to RSU r i , which then forwards the block to the requesting vehicle. Thus, the latency cost for vehicle v m to obtain block b k from RSU r i is defined as follows:
T D m k = T D ( r i , v m , b k ) + ( 1 x i k ) · T D ( r j , r i , b k )
Assuming that the service ranges of RSUs in the system do not overlap, an RSU can transmit block data to a vehicle only when the vehicle is within its coverage area. If the retrieval delay for block data from an RSU exceeds the vehicle’s dwell time within the RSU’s coverage, the vehicle must instead obtain the data from a remote cloud server via a backhaul link, discarding any incomplete data fragments [24]. This process incurs a higher additional access latency cost. We define the set of blocks of interest for vehicle v m as B m = { b k b k B , P m k > 0 } . Let Δ C denote the cost of a single data access from the cloud server. For a vehicle v m located within the coverage area of RSU r i , we define the vehicle’s dwell time within vehicle v m ’s coverage as t m d . Given the block set B m , the total block access cost for vehicle v m is defined as follows:
C m = b k B m T D m k · P m k , b k B m T D m k t m d Δ C + b k B m T D m k · P m k , b k B m T D m k > t m d
For the overall vehicle access process, the access cost is determined by the following factors:
  • The vehicle’s access probability for a block.
  • The latency cost for the vehicle to retrieve the block from an RSU.
  • Whether the vehicle can obtain all required block data directly from RSUs.
Among these factors, the latency cost for a vehicle to retrieve a block from an RSU is influenced by both the clustering strategy and the block allocation strategy within the cluster. This latency cost directly impacts whether the vehicle needs to retrieve data via the backhaul link from the remote cloud server. Therefore, it is essential to design an effective collaborative storage scheme for RSU clusters to optimize the access cost for vehicles served by the cluster.

4.2. Optimization Objective

The blockchain collaborative storage optimization problem in SIoV is formally defined as follows: The system consists of multiple RSUs with limited available storage resources, where each RSU r i serves a set of vehicles V i , and the service areas of different RSUs do not overlap. The challenge is to partition RSUs into L cluster C L U , and distribute all blocks in the current blockchain ledger B across N l RSUs within each cluster C l while respecting the storage constraints of RSUs. The goal is to minimize the total block access cost incurred by all vehicles in the system when performing reputation verification. The optimization objective is formulated as follows:
min C l C L U r i C l v m V i C m
s . t . r i C l r c i η b k B s k , η 1
r i C l x i k 1 , b k B
b k B x i k · s k r c i , r i C l
Equation (11) regulates the formation of clusters, ensuring that the total storage capacity of all RSUs within a cluster is at least equal to the total size of the blockchain, thereby guaranteeing that the formed cluster can store a complete copy of the blockchain. Equations (12) and (13) govern the block allocation process within the cluster, ensuring that each block in the blockchain is stored at least once within the cluster to meet the demand of any vehicle served by the RSUs in the cluster, while also ensuring that the number of blocks allocated to a single RSU does not exceed its own storage capacity.

5. Algorithm

This section addresses the proposed problem in two key components: RSU clustering and intra-cluster block allocation. To this end, this paper introduces RAPSCA and VSPGBAA. RAPSCA clusters RSUs into collaborative storage groups based on block access similarity and resource availability, establishing the foundation for VSPGBAA. Operating within these clusters, VSPGBAA optimizes block allocation by considering vehicle dwell time and block access probabilities, ensuring that each RSU stores an optimal subset of blocks. This approach reduces access costs for vehicles while enhancing data retrieval efficiency. Together, these algorithms constitute the blockchain-based RSU cluster collaborative storage scheme, improving data access services in SIoV.

5.1. RSU Clustering

In the proposed system, since RSU nodes have limited available storage resources, it is essential to cluster RSUs to form RSU clusters that can efficiently provide full blockchain query services for vehicles. To achieve effective clustering, it is necessary to consider not only the distance between RSU nodes but also the block access preferences of the vehicles served by each RSU.
Therefore, we propose RAPSCA, which incorporates both spatial relationships and vehicle access behaviors to optimize clustering. Under the collaborative storage architecture, redundant storage of critical block data within clusters is allowed. This strategy ensures that redundant copies can better satisfy the data needs of multiple nodes, thereby improving overall storage efficiency. The pseudocode for RAPSCA is presented in Algorithm 1.
The algorithm consists of six main steps: determining the number of clusters, similarity matrix construction, Laplacian matrix computation, spectral decomposition, feature normalization, and K-means clustering with a minimum capacity constraint. To better illustrate the role of RAPSCA in collaborative storage, we further explain the steps of the algorithm as follows:
  • Determining the Number of Clusters: The number of clusters can be determined based on the storage resources of RSU nodes in the system and the storage constraints of individual clusters, as follows:
    L = r i R r c i η k = 1 K s k
    Equation (14) ensures that each cluster satisfies the storage resource constraints imposed by blockchain size requirements within the cluster. Simultaneously, it partitions RSU nodes into the maximum feasible number of clusters to optimally preserve the decentralized characteristics of the system.
  • Similarity Matrix Construction: As mentioned earlier, due to the random block packaging mechanism in blockchain, a single block may contain reputation update records for any vehicle. Therefore, even if vehicles are distributed across different RSUs and have never had direct social interactions, their reputation updates may still be packaged into the same block. From the packaging results, we can infer that RSUs exhibit certain similarities in their preferences for blocks, even if they serve different sets of vehicles. However, modifying the blockchain packaging mechanism to introduce systematic patterns or preferences could compromise the security and decentralization of the blockchain. Thus, this paper assumes that the block packaging process is random and unpredictable. Instead of modifying the packaging mechanism, we analyze the existing block data and their associated vehicle relationships to determine the similarity in block demand among RSU nodes.
    As previously defined, the set of blocks of interest for vehicle v m is represented as B m . Since RSU r i needs to consider the block access probabilities of all vehicles within its coverage area, the set of required blocks for RSU r i is given by the following:
    B r i = v m V i B m
    where V i represents the set of vehicles within the coverage area of RSU r i . Referring to the interest similarity described in reference [25], we define the weight between RSU nodes r i and r j based on their block demand similarity. Specifically, the weight is determined by the cosine similarity of their required block sets, multiplied by the Gaussian kernel function of their physical distance d i j :
    w i , j = s B ( r i , r j ) = B r i B r j 1 B r i 2 · B r j 2 · G K ( r i , r j )
    where B r i 2 = B r i represents the number of blocks required by RSU r i , B r i B r j 1 denotes the number of blocks that RSU r i and r j have in common demand, and  G K ( r i , r j ) represents the Gaussian kernel function, which quantifies the spatial aggregation of RSU nodes based on their geographical proximity. It is defined as follows:
    G K ( r i , r j ) = exp ( d i j 2 / σ 2 )
    where σ is a parameter that controls the strength of the distance relationship.
    Based on the above block demand similarity definition, the similarity matrix between nodes can be expressed as follows:
    W R S U = w 1 , 1 w 1 , N w N , 1 w N , N
    At the same time, for each RSU node, its degree can be computed as d i = j = 1 N w i , j . Thus, the degree matrix D R S U can be expressed as follows:
    D R S U = d 1 d N
  • Laplacian Matrix Computation: After obtaining the similarity matrix W R S U and the degree matrix D R S U , the Laplacian matrix can be expressed as L R S U = D R S U W R S U . At the same time, we perform normalization on the Laplacian matrix, yielding L n o r m :
    L n o r m = D 1 / 2 L D 1 / 2
  • Spectral Decomposition: Perform eigen decomposition on the normalized Laplacian matrix L n o r m to obtain the eigenvalues Λ = { λ 1 , λ 2 , , λ N } and the corresponding eigenvectors U = { u 1 , u 2 , , u N } . From these, select the smallest L eigenvalues λ 1 λ L and construct the matrix U L = { u 1 , u 2 , , u L } by using their corresponding eigenvectors as column vectors.
  • Feature Normalization: Normalize each row of the eigenvector matrix U L to obtain the final feature matrix F.
  • K-means Clustering with Minimum Capacity Constraint: Using each row of the feature matrix F as an input sample, perform K-means clustering with constraints, obtaining the clustering result C L U .
Algorithm 1 RSU Access Preference-based Spectral Clustering Algorithm (RAPSCA)
Require: RSU set R, vehicle set V i within each RSU coverage area
Ensure: number of clusters L, RSU Cluster C L U
  1:
L r i R r c i η k = 1 K s k
  2:
for each pair of RSU nodes r i and r j  do
  3:    
Compute the Euclidean distance d i j between nodes r i and r j based on the location information { x r i , y r i } and { x r j , y r j }
  4:    
Compute the weight w i , j between r i and r j based on B r i and B r j : w i , j = s B ( r i , r j ) = B r i B r j 1 B r i 2 · B r j 2 · G K ( r i , r j )
  5:
end for
  6:
Construct the similarity matrix W R S U
  7:
Compute the node degree d i = j = 1 N w i , j and obtain the degree matrix D R S U = { d i }
  8:
Compute the Laplacian matrix L R S U = D R S U W R S U
  9:
Normalize the Laplacian matrix L n o r m = D 1 / 2 L D 1 / 2
10:
Perform eigen decomposition on the normalized Laplacian matrix L n o r m to obtain eigenvalues Λ = { λ 1 , λ 2 , , λ N } and corresponding eigenvectors U = { u 1 , u 2 , , u N }
11:
Select the smallest L eigenvalues λ 1 λ L and form the matrix U L = { u 1 , u 2 , , u L } with their corresponding eigenvectors as column vectors.
12:
Compute F [ i , : ] = U L [ i , : ] U L [ i , : ] to construct the normalized feature matrix F
13:
Use K-means clustering with a minimum capacity constraint S K = η k = 1 K s k , η 1 to cluster each row of the feature matrix F as an input sample, obtaining clustering results  { C l } .
14:
C L U { C l }
For the complexity analysis, first, constructing the similarity matrix requires computing the weight relationship between every pair of RSU nodes, resulting in a complexity of O ( n 2 ) . Next, computing the Laplacian matrix involves row-wise normalization, which also has a complexity of O ( n 2 ) . The spectral decomposition has a complexity of O ( n 3 ) , while feature normalization has a complexity of O ( n L ) . The K-means clustering with minimum capacity constraints has a complexity of O ( n L T ) , where T represents the number of iterations. Thus, the total time complexity of RAPSCA is O ( n 3 ) .

5.2. Intra-Cluster Block Allocation

In Algorithm 1, the clustering of RSUs into collaborative storage clusters has been completed. Since each RSU cluster must collaboratively store at least one complete copy of the blockchain, it is necessary to determine the specific block allocation within the cluster, i.e., which blocks each RSU in the cluster should store. When addressing the block allocation problem, in addition to considering the block access probabilities of the vehicles served by each RSU, it is also important to take into account the priority of the vehicles being served.
As shown in Figure 2, we consider a vehicle v m located within the coverage area of RSU r i , with a required block set B m . The states of v m during the block allocation process can be categorized into three cases:
  • State 1: Vehicle v m 1 has just entered the coverage area of r i and will remain for a relatively long dwell time t m 1 d before leaving.
  • State 2: Vehicle v m 2 has a shorter dwell time t m 2 d compared to t m 1 d .
  • State 3: Vehicle v m 3 is about to leave the coverage area of r i with a very short dwell time t m 3 d .
At the same time, different block allocation strategies will result in RSU r i storing different block sets. The entire block set B m may be fully deployed in r i , or only a subset of B m may be stored. When r i  does not fully store all the blocks in B m , it has to request the missing blocks from other RSUs in the cluster, which will introduce additional access latency. Since excessive access latency may force a vehicle to switch to the remote cloud server for data retrieval, resulting in extra access costs, the system must carefully balance the acceptable access latency for vehicles with the expected access latency of the deployment strategy to enhance its effectiveness.
Based on the above scenario, we define τ 0 as the transmission delay required to transfer a standard-sized block from an RSU to a vehicle. For a vehicle v m 3 that is about to leave the RSU coverage area, if  t m 3 d < τ 0 , then regardless of whether r i stores the blocks required by v m 3 , the vehicle will not be able to complete the block access process within the coverage area of r i . Therefore, in this case, the service priority of the RSU for v m 3 is very low. When t m d > τ 0 , vehicles with smaller dwell times require lower transmission latency, meaning that from the perspective of the RSU, these vehicles should be given higher priority. As a result, the service priority for vehicle v m 2 is higher than that for v m 1 . Within the coverage area of a single RSU, the service priority of r i for vehicle v m , denoted as P R ( t m d ) , can be expressed as follows:
P R ( t m d ) = σ ( t m d τ 0 ) · 1 + μ e ω ( t m d τ 0 )
where σ ( t m d τ 0 ) is the Sigmoid function, defined as follows: σ ( t m d τ 0 ) = 1 / 1 + e θ ( t m d τ 0 ) . When the vehicle dwell time t m d approaches the threshold τ 0 , the rapid saturation property effectively filters out vehicle requests with extremely short dwell times, thereby preventing resource wastage. Conversely, when t m d > τ 0 , the service priority gradually decreases with increasing dwell time, thus prioritizing vehicles with shorter dwell times. These vehicles not only have a sufficient time window for data transmission but are also more sensitive to latency. The adjustment factor μ controls the global scaling of the interest value, while ω determines the smoothness of the exponential decay. Together, these parameters optimize the shape of the priority curve, making it adaptable to various application scenarios.
At the RSU level, the demand of RSU r i for block b k can be expressed as follows:
Ω i k = v m V i P m k · P R ( t m d )
Within an RSU cluster, the transmission latency between nearby RSUs are relatively low, meaning that the block allocation strategy for one RSU will impact the storage demand of RSUs within a certain range. Specifically, suppose block b k is allocated to RSU r i for storage, i.e.,  x i k = 1 . Let C i n e i g h b o r represent the set of RSUs within the neighboring region of r i . After the allocation, both r i and the neighboring RSUs in C i n e i g h b o r will have a reduced demand for the next allocation of block b k because they can retrieve it from r i with low latency. The extent of this demand reduction is determined by the physical distance between RSUs. Based on this scenario, we define the block demand function of RSU r i for b k as follows:
Q ( r i , b k ) = Ω i k + r j C i n e i g h b o r λ i j · ( 1 x j k ) · Ω j k , x i k = 0 0 , x i k = 1
If x i k = 1 , then RSU r i has already stored block b k , meaning that no additional storage resources are required for redundant storage of b k . In this case, the block demand function value of r i for block b k reduces to 0. If  x i k = 0 and x j k = 0 , it indicates that neither r i nor its neighboring RSUs have stored block b k . In this case, the block demand function value of r i for block b k will increase as the number of neighboring RSUs that require b k also increases. The parameter λ i j is a physical weight factor, determined by the distance between RSUs within the cluster:
λ i j = D l max D i j D l max
where D l max represents the Euclidean distance between the two most distant RSUs within the cluster.
Based on the above definitions, this paper proposes VSPGBAA. The algorithm first calculates the vehicle service priority in each RSU based on vehicle dwell time and defines the block demand for each RSU. Then, it considers the dynamic changes in RSU block demand during the allocation process. Finally, the algorithm further optimizes the overall access cost by utilizing the remaining available storage space within the cluster. The complete process of the proposed algorithm is presented in Algorithm 2.
The overall process of Algorithm 2 consists of three main steps: Initialization—Greedy Allocation—Cost Optimization. First, in the initialization step, we process the vehicle-related information for each RSU, computing the vehicle service priority and block access probability to determine the block demand of each RSU. Since each RSU cluster must store a complete copy of all blockchain blocks, we ensure this requirement in the greedy allocation step by assigning each block at least once. This guarantees that all RSUs in the cluster can provide complete block data query services for vehicles. During the allocation, blocks are assigned in descending order of demand, prioritizing those with higher demand to achieve a near-optimal allocation that minimizes access cost. After each allocation, we update the impact of the current allocation on neighboring RSUs. Once all blocks have been allocated, the cluster constraint is satisfied, and the remaining storage space can be used for further access cost optimization. In the cost optimization step, we iteratively select the most critical RSU-block pair based on the demand function to perform redundant block allocation. This process is repeated whenever storage space is available, maximizing the utilization of storage resources within the cluster.
Algorithm 2 Vehicle Service Priority-based Greedy Block Allocation Algorithm (VSPGBAA)
Require: The set of all blocks B, an RSU cluster C l , the set of vehicles within the coverage of each RSU V i
Ensure: Block allocation strategy X in the RSU cluster C l
  1:
for  r i in C l  do
  2:   
Compute the service priority of each vehicle in r i ’s coverage based on its dwell time: P R ( t m d ) = σ ( t m d τ 0 ) · 1 + μ e ω ( t m d τ 0 )
  3:   
Compute the block access probability P m k based on the correlation between vehicles and blocks and the baseline query probability, then obtain the block demand of r i : Ω i k = v m V i P m k · P R ( t m d )
  4:
end for
  5:
Initialize X = { ϕ } ; that is, the initial allocation state is empty.
  6:
Sort blocks in descending order based on Ω i k to obtain B s o r t
  7:
for  b k in B s o r t  do
  8:    
Select the RSU node r i with the highest demand function value Q ( r i , b k ) for block b k , where the block size is given by s k
  9:    
if the node r i ’s remaining storage capacity r c i > s k  then
10:     
Set x i k = 1 , allocate block b k to RSU node r i
11:     
Update remaining storage: r c i r c i s k
12:     
Update the demand function Q * for r i and and its neighboring RSUs C i n e i g h b o r
13:    
else
14:     
Select r j in descending order based on Q ( r j , b k ) and repeat the process until r c j > s k
15:    
end if
16:
end for
17:
while any RSU node in cluster C l has remaining available storage capacity r c > 0  do
18:    
Select the RSU node r i and block b k with the highest demand function value Q ( r i , b k )
19:    
if the node r i ’s remaining storage capacity r c i > s k  then
20:     
Set x i k = 1 , allocate block b k to RSU node r i
21:     
Update remaining storage: r c i r c i s k
22:     
Update the demand function Q * for r i and its neighboring RSUs C i n e i g h b o r
23:    
end if
24:
end while
For the complexity analysis, first, VSPGBAA defines the block demand for each RSU based on the association between the vehicles it serves and the blocks and then sorts the blocks by demand. The complexity of this step is O ( N l M i K + K log K ) , where M i is the number of vehicles served by RSU r i , and K is the number of blocks to be allocated. Then, VSPGBAA performs the initial allocation of each block and updates the block demand function of RSU nodes, with a complexity of O ( K N l ) . Finally, VSPGBAA utilizes the remaining available storage space in the cluster to perform redundant block replication for further access cost optimization, with a complexity of O ( K N ¯ l ) , where N ¯ l ( N ¯ l N l ) represents the average number of neighboring RSUs for each RSU. Thus, the overall complexity of VSPGBAA is O ( N l M i K + K log K ) .

6. Evaluation

In this section, we evaluate the effectiveness and performance of the proposed algorithm through a Python 3.10.16-based simulation of an IoV system with blockchain data. The experiments were conducted on a machine equipped with an Intel i5 processor and 16 GB of RAM, with system initialization based on the data described later in this paper. Each test randomly generates a varying number of RSUs and vehicle devices, and every experiment is executed 20 times to assess the algorithm’s performance. For evaluation metrics, we focus on the storage hit rate of the collaborative storage scheme, the overall access cost for vehicles in the system, and the runtime of the algorithm. Since the proposed strategy can be described as a constraint-based caching scheme, the storage hit rate, similar to the cache hit rate, is defined as the percentage of block access requests completed within the vehicle’s dwell time. A higher storage hit rate indicates that more vehicles can access block data without relying on the backhaul link to the remote cloud server.

6.1. Experimental Setup

We consider a system consisting of multiple RSU nodes and vehicle devices, which are randomly distributed within a specified area. In this system, RSU nodes generate and store blockchain data, while vehicles access these blocks based on their individual demands. Given the heterogeneity of available storage resources among RSUs at a given time, we assume that the available storage capacity of each RSU node follows a normal distribution within the range of [ 200 ,   800 ] MB. The communication cost between RSUs depends on their positions and the network topology. RSU nodes can communicate either directly or via multi-hop transmission. Meanwhile, vehicles move within the coverage area of RSUs, request block data, and eventually leave the RSU coverage area after a certain period. The dwell time of a vehicle within an RSU’s coverage area follows a uniform distribution within the range [ 0 , t d ] .
Hyperledger Fabric [26] is a permissioned blockchain platform that has been widely adopted in IoT and IoV applications [27,28] due to its robust security features and flexible architecture. We utilize the Hyperledger Fabric consortium blockchain platform to construct the blockchain network, adopting its default parameter constraints. Specifically, the block size is limited to 10 MB, each block can contain a maximum of 10 transactions, and the maximum data size per transaction is 512 KB. We assume that the blockchain network has been running for a certain period, and the existing block sizes follow a uniform distribution within the range [ 5 ,   10 ] MB. For each newly created block, its initial query frequency is randomly assigned as F 0 , while its block age A k starts from 0 and gradually increases as new blocks are generated.
For the proposed RSU clustering scheme, we choose the following clustering algorithms for comparison based on VSPGBAA as the allocation algorithm:
  • Random Clustering: RSU nodes are clustered randomly with their neighboring nodes without considering vehicle access preferences until each cluster satisfies the blockchain storage capacity constraint.
  • Single-Cluster Scheme: No preprocessing is applied to RSU nodes. Instead, all RSUs are treated as a single cluster, and block allocation is performed directly within this global cluster. In the subsequent block allocation phase, all methods adopt the VSPGBAA algorithm proposed in this paper.
For the proposed intra-cluster block allocation scheme, we perform clustering based on the RAPSCA algorithm and select the following allocation algorithms for comparison:
  • Two-Step Greedy Algorithm (TSGA) [22]: This algorithm considers the impact of the allocation process on total access cost. For each allocation step, it pre-evaluates the change in total query cost after allocation and selects the decision that results in the greatest cost reduction. After each allocation, it iterates over all blocks and RSUs, updating the expected query cost for further decisions.
  • Node First Algorithm [29]: This algorithm first selects the RSU that has the highest demand for each block to store its first backup copy. Then, for each RSU, it considers only local demand, sequentially storing the most required blocks until the available storage capacity is fully utilized.
  • Random Allocation: This algorithm does not consider RSU block demand but ensures that each block has at least one backup to maintain blockchain ledger integrity within the cluster. After initial placement, blocks are sorted based on their demand, and randomly assigned to RSUs with available storage until all storage resources in the cluster are utilized.

6.2. Performance Evaluation

6.2.1. RSU Clustering Performance Evaluation

To verify the effectiveness of the proposed RAPSCA algorithm, this paper evaluates the vehicle access cost and the algorithm’s impact on the overall block allocation running time under different numbers of RSU nodes, varying blockchain lengths, and different numbers of clusters.
  • Impact of the number of RSU nodes on the RSU Clustering Process: As shown in Figure 3a,b, the system is configured with a fixed block count of 200, a vehicle-to-RSU ratio of 10:1, a fixed cluster number of 3, while the number of RSU nodes varies from 60 to 160. As shown in Figure 3a, as the number of nodes increases, the access cost of the RAPSCA algorithm approaches that of the single-cluster scheme and outperforms the adjacent random clustering strategy. The single-cluster scheme is a cooperative storage method commonly adopted in traditional vehicular networks, relying on a fully centralized architecture to achieve globally distributed storage. Although this scheme enables near-optimal block allocation through centralized scheduling, its centralized design contradicts the decentralization principle of blockchain. Experimental results indicate that the RAPSCA algorithm effectively reduces access costs through a multi-cluster coordination mechanism while preserving the decentralized characteristics of blockchain, without causing a significant negative impact on system performance.
    Furthermore, the impact of the algorithm on the execution time of the block allocation process is illustrated in Figure 3b. As the system scales up, the execution time of the block allocation algorithm increases accordingly. In the single-cluster scheme, the complexity of the network topology rises significantly with the growing number of nodes, leading to a substantial increase in the execution time of the block allocation process. In contrast, the cluster partitioning mechanism effectively reduces the solution space, thereby improving the algorithm’s computational efficiency.
  • Impact of the number of blocks on the RSU Clustering Process: As shown in Figure 4a,b, the system is configured with 120 RSUs, 1200 vehicles, three clusters, while the block count varies from 100 to 500. As shown in Figure 4a, as the number of stored blocks within a cluster increases, the overall access cost for vehicles in the cluster also rises. This is because, with a fixed number of RSUs and cluster size, the total storage resources of the system remain limited, leading to a reduction in the average number of block copies. Consequently, some RSUs may need to request block data from more distant nodes, increasing access latency. Additionally, as the number of blocks grows, the range of data involved in vehicle queries for historical blocks expands, further elevating access costs. At the same time, the block access cost of RAPSCA is significantly lower than that of the random clustering strategy and comparable to the single-cluster scheme. When the block count is high, the access cost of the single-cluster scheme is slightly lower than RAPSCA. This is because, with fewer block copies available, the number of locations where a single RSU in the RAPSCA scheme can directly access a required block is lower than in the single-cluster mode, resulting in additional data transmission overhead.
    As shown in Figure 4a,b, as the block count increases, RAPSCA maintains relatively low access costs while also improving the overall efficiency of the algorithm. Therefore, this algorithm is well-suited for RSU devices with limited computational and storage resources, demonstrating strong adaptability in large-scale block storage scenarios.
  • Impact of the number of clusters on the RSU Clustering Process: As shown in Figure 5a,b, the system is configured with 120 RSUs, 1200 vehicles, and 200 blocks, while the number of clusters varies from 3 to 7. As shown in Figure 5a, the RAPSCA algorithm achieves access costs comparable to the single-cluster scheme, and its access cost remains stable as the number of clusters changes. This indicates that the RAPSCA clustering process does not introduce additional access overhead. When sufficient storage resources are available in the IoV system, a well-designed clustering strategy ensures that the total access cost remains at an optimal level, without imposing extra burdens due to cluster partitioning. However, since strong trust relationships among RSUs are only guaranteed within individual clusters, improper cluster partitioning may disrupt critical communication paths, making it difficult for some RSUs to directly access required blocks. This would increase access latency and significantly raise the overall system access cost. Therefore, a well-structured cluster partitioning strategy not only optimizes storage resource utilization efficiency but also reduces system access overhead, enhancing the overall performance of the SIoV system.
    As shown in Figure 5b, as the number of clusters increases, the number of RSUs per cluster decreases, leading to a reduction in the runtime of the block allocation algorithm. Although increasing the number of clusters improves overall algorithm efficiency, it also reduces the total storage resources within each cluster. Therefore, in practical applications, parameters such as η and the number of clusters should be carefully chosen to ensure that clusters are reasonably partitioned while maintaining sufficient storage resources within each cluster.

6.2.2. Intra-Cluster Block Allocation Performance Evaluation

To evaluate the effectiveness of the VSPGBAA algorithm, the experiments compare its storage hit rate, total access cost within the cluster, and algorithm runtime under different numbers of RSU nodes, varying vehicle counts, and different blockchain lengths. The baseline algorithms are introduced in the experiment setup in Section 6.1.
  • Impact of the number of RSU nodes on Intra-Cluster Block Allocation: As shown in Figure 6a–c, the system is configured with a fixed block count of 300, a fixed vehicle-to-RSU ratio of 9:1, and a fixed number of three clusters, while the number of RSU nodes varies from 20 to 100. As illustrated in Figure 6a,b, when the number of RSU nodes within a cluster is small, the storage hit rate and total access cost of VSPGBAA are close to those of TSGA. However, as the number of RSUs within the cluster increases, the storage hit rate of VSPGBAA remains stable but is slightly lower than that of TSGA. Specifically, compared to TSGA, VSPGBAA incurs 16.4% higher access cost, and achieves a 36% lower cache hit rate, but significantly improves efficiency with a 16× shorter runtime. Meanwhile, as shown in Figure 6c, the running time of TSGA increases sharply as the number of RSUs in the cluster grows, greatly exceeding that of VSPGBAA, NodeFirst, and the random allocation strategy. This is because TSGA globally updates the entire system state for each block allocation, whereas VSPGBAA only updates the local neighborhood affected by the allocation. As a result, VSPGBAA reduces computational overhead while maintaining competitive performance, making it adaptable to different cluster sizes. Furthermore, compared to NodeFirst, VSPGBAA reduces total access cost by 26.9%, improves the cache hit rate by 34%, but requires 19.5% more runtime. This trade-off highlights VSPGBAA’s ability to balance efficiency and performance, demonstrating its potential in large-scale deployments.
  • Impact of the number of vehicles on Intra-Cluster Block Allocation: As shown in Figure 7a–c, the system consists of three clusters, 20 RSUs, and 300 blocks to be allocated, while the total number of vehicles varies from 20 to 180. As illustrated in Figure 7a,b, as the number of vehicles increases, the volume of access requests within the cluster grows, leading to a linear increase in total access cost, while the storage hit rate remains relatively stable. The storage hit rate of VSPGBAA is slightly lower than that of TSGA but significantly outperforms the random and NodeFirst allocation strategies. Specifically, compared to TSGA, VSPGBAA incurs a 32.9% higher access cost, and achieves a 10.6% lower cache hit rate, but compensates with a 6.7× shorter runtime, demonstrating a strong trade-off between efficiency and performance. Meanwhile, as shown in Figure 7c, the runtime of TSGA increases significantly with the number of vehicles, greatly exceeding that of VSPGBAA and NodeFirst. Additionally, compared to NodeFirst, VSPGBAA reduces total access cost by 61.5%, and improves the cache hit rate by 20.2%, but requires 25% more runtime. This highlights VSPGBAA’s ability to handle high-traffic vehicular environments effectively, striking a balance between computational efficiency and system performance.
  • Impact of the number of blocks on the RSU Clustering Process: As shown in Figure 8a–c, the system consists of three clusters, 60 RSU nodes, and 540 vehicles, while the number of blocks to be allocated varies from 200 to 600. As illustrated in Figure 8a,b, as the number of blocks increases, the storage hit rate declines, while the total access cost gradually rises. This is because the increasing amount of block data reduces the available storage space for redundant copies within the cluster, thereby limiting the effectiveness of access cost optimization. Under different block counts, VSPGBAA maintains a storage hit rate comparable to TSGA and significantly outperforms the random allocation strategy. Specifically, compared to TSGA, VSPGBAA incurs a 14.3% higher access cost, and experiences a 46.5 percentage point lower cache hit rate, but achieves a 14× shorter runtime, demonstrating a strong efficiency advantage. Meanwhile, as shown in Figure 8c, TSGA’s runtime increases significantly with the number of blocks, far exceeding that of VSPGBAA. Additionally, compared to NodeFirst, VSPGBAA reduces total access cost by 11.3%, improves the cache hit rate by 39.1%, but requires 9% more runtime. By effectively balancing storage hit rate, access cost, and computational efficiency, VSPGBAA ensures an optimized storage allocation strategy while significantly enhancing performance.

7. Discussion and Conclusions

In this paper, a blockchain-based RSU cluster collaborative storage scheme was proposed to address the storage scalability issue in blockchain-enabled SIoV. First, we introduced RAPSCA to tackle the RSU clustering problem, where RSUs were grouped into collaborative storage clusters based on block access preference similarity and resource conditions. Then, we designed VSPGBAA, which optimally allocated blocks to RSUs within each cluster by considering both the dwell time of vehicles and their block access probability. The proposed collaborative storage scheme effectively reduced the storage burden on individual RSUs while also optimizing the vehicle access cost introduced by the cluster-based architecture.
Through simulation experiments, the proposed scheme has demonstrated robust optimization performance and high computational efficiency. It is important to acknowledge that the current validation was conducted in a simulation setting. Thus, the lack of real-world IoT device heterogeneity and dynamic network topology variations may limit the direct applicability of the findings. Future work will focus on validating the framework in edge computing environments that incorporate actual vehicular nodes. In addition, the following key research directions are identified for further investigation:
  • Dynamic Cluster Adaptation: While the current RSU clustering assumes static networks, practical SIoV requires mechanisms addressing vehicular mobility and load fluctuations. Future research will focus on developing an adaptive cluster reorganization mechanism that dynamically adjusts cluster membership based on real-time monitoring of storage utilization, inter-node latency, and blockchain query patterns.
  • Large-Scale Validation in Heterogeneous Edge Environments: The simulation-based evaluation will expand to physical testbeds combining heterogeneous edge devices and intermittent connectivity scenarios. Priority will be given to ultra-dense urban deployments where storage-consensus latency coupling impacts service reliability.
  • Storage-Consensus Co-Design: Building upon honest-but-curious assumptions, future research will formalize Byzantine-resilient storage strategies, particularly anti-collusion mechanisms against storage-aware Sybil attacks. This involves co-optimizing Proof-of-Storage parameters with cluster formation criteria to prevent adversarial coalitions without compromising access efficiency.

Author Contributions

Conceptualization, D.H. and K.P.; data curation, G.W.; investigation, L.W.; methodology, C.D.; resources, K.P.; software, J.H.; validation, L.W. and J.H.; writing—original draft, L.W. and X.L.; writing—review and editing, L.W. and L.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded in part by the Key Research and Development Program of Hubei Province under grant 2023BAB074, in part by the Key Research and Development Program of Hubei Province under grant 2024BAB016, in part by the Key Research and Development Program of Hubei Province under grant 2024BAB031.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Acknowledgments

The authors would like to thank Ying Li (State Grid Hubei Information & Telecommunication Company) for her support in providing technical resources and infrastructural assistance for simulation and modeling. Her contributions to the experimental setup, access to internal platforms, and valuable insights during the review discussions are gratefully acknowledged.

Conflicts of Interest

Authors Dai Hou, Lei Zheng, Geng Wu and Chenxi Dong were employed by the company State Grid Hubei Information & Telecommunication Company. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Butt, T.A.; Iqbal, R.; Shah, S.C.; Umar, T. Social Internet of Vehicles: Architecture and Enabling Technologies. Comput. Electr. Eng. 2018, 69, 68–84. [Google Scholar] [CrossRef]
  2. Maglaras, L.A.; Al-Bayatti, A.H.; He, Y.; Wagner, I.; Janicke, H. Social Internet of Vehicles for Smart Cities. J. Sens. Actuator Netw. 2016, 5, 3. [Google Scholar] [CrossRef]
  3. Peng, K.; Wang, L.; He, J.; Cai, C.; Hu, M. Joint Optimization of Service Deployment and Request Routing for Microservices in Mobile Edge Computing. IEEE Trans. Serv. Comput. 2024, 17, 1016–1028. [Google Scholar] [CrossRef]
  4. Butt, T.A.; Iqbal, R.; Salah, K.; Aloqaily, M.; Jararweh, Y. Privacy Management in Social Internet of Vehicles: Review, Challenges and Blockchain Based Solutions. IEEE Access 2019, 7, 79694–79713. [Google Scholar] [CrossRef]
  5. Yang, Z.; Yang, K.; Lei, L.; Zheng, K.; Leung, V.C.M. Blockchain-Based Decentralized Trust Management in Vehicular Networks. IEEE Internet Things J. 2019, 6, 1495–1505. [Google Scholar] [CrossRef]
  6. Javaid, U.; Sikdar, B. A Secure and Scalable Framework for Blockchain Based Edge Computation Offloading in Social Internet of Vehicles. IEEE Trans. Veh. Technol. 2021, 70, 4022–4036. [Google Scholar] [CrossRef]
  7. Khan, W.Z.; Arshad, Q.u.A.; Hakak, S.; Khan, M.K.; Saeed-Ur-Rehman. Trust Management in Social Internet of Things: Architectures, Recent Advancements, and Future Challenges. IEEE Internet Things J. 2021, 8, 7768–7788. [Google Scholar] [CrossRef]
  8. Wang, Y.; Wang, H.; Cao, Y. Comprehensive Review of Storage Optimization Techniques in Blockchain Systems. Appl. Sci. 2025, 15, 243. [Google Scholar] [CrossRef]
  9. Heo, J.W.; Ramachandran, G.S.; Dorri, A.; Jurdak, R. Blockchain Data Storage Optimisations: A Comprehensive Survey. ACM Comput. Surv. 2024, 56, 179:1–179:27. [Google Scholar] [CrossRef]
  10. Xu, B.; Guo, J.; Ma, F.; Hu, M.; Liu, W.; Peng, K. On the Joint Design of Microservice Deployment and Routing in Cloud Data Centers. J. Grid Comput. 2024, 22, 42. [Google Scholar] [CrossRef]
  11. Hafeez, S.; Khan, A.R.; Al-Quraan, M.M.; Mohjazi, L.; Zoha, A.; Imran, M.A.; Sun, Y. Blockchain-Assisted UAV Communication Systems: A Comprehensive Survey. IEEE Open J. Veh. Technol. 2023, 4, 558–580. [Google Scholar] [CrossRef]
  12. Li, Y.; Yu, Y.; Wang, X. Three-Tier Storage Framework Based on TBchain and IPFS for Protecting IoT Security and Privacy. ACM Trans. Internet Technol. 2023, 23, 37:1–37:28. [Google Scholar] [CrossRef]
  13. Hassanzadeh-Nazarabadi, Y.; Küpçü, A.; Özkasap, Ö. LightChain: Scalable DHT-Based Blockchain. IEEE Trans. Parallel Distrib. Syst. 2021, 32, 2582–2593. [Google Scholar] [CrossRef]
  14. Vishwakarma, L.; Nahar, A.; Das, D. LBSV: Lightweight Blockchain Security Protocol for Secure Storage and Communication in SDN-Enabled IoV. IEEE Trans. Veh. Technol. 2022, 71, 5983–5994. [Google Scholar] [CrossRef]
  15. Castro, M.; Liskov, B. Practical Byzantine Fault Tolerance. In Proceedings of the Third Symposium on Operating Systems Design and Implementation, Lake New Orleans, LA, USA, 22–25 February 1999; OSDI ’99. pp. 173–186. [Google Scholar]
  16. Lin, X.; Wu, J.; Mumtaz, S.; Garg, S.; Li, J.; Guizani, M. Blockchain-Based On-Demand Computing Resource Trading in IoV-Assisted Smart City. IEEE Trans. Emerg. Top. Comput. 2021, 9, 1373–1385. [Google Scholar] [CrossRef]
  17. Wang, R.; Kan, Z.; Cui, Y.; Wu, D.; Zhen, Y. Cooperative Caching Strategy with Content Request Prediction in Internet of Vehicles. IEEE Internet Things J. 2021, 8, 8964–8975. [Google Scholar] [CrossRef]
  18. AlNagar, Y.; Gohary, R.H.; Hosny, S.; El-Sherif, A.A. Mobility-Aware Edge Caching for Minimizing Latency in Vehicular Networks. IEEE Open J. Veh. Technol. 2022, 3, 68–84. [Google Scholar] [CrossRef]
  19. Hu, Z.; Zheng, Z.; Wang, T.; Song, L.; Li, X. Roadside Unit Caching: Auction-Based Storage Allocation for Multiple Content Providers. IEEE Trans. Wirel. Commun. 2017, 16, 6321–6334. [Google Scholar] [CrossRef]
  20. Luu, L.; Narayanan, V.; Zheng, C.; Baweja, K.; Gilbert, S.; Saxena, P. A Secure Sharding Protocol For Open Blockchains. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, 24–28 October 2016; CCS ’16. pp. 17–30. [Google Scholar] [CrossRef]
  21. Xu, M.; Feng, G.; Ren, Y.; Zhang, X. On Cloud Storage Optimization of Blockchain with a Clustering-Based Genetic Algorithm. IEEE Internet Things J. 2020, 7, 8547–8558. [Google Scholar] [CrossRef]
  22. Xu, Z.; Han, S.; Chen, L. CUB, a Consensus Unit-Based Storage Scheme for Blockchain System. In Proceedings of the 2018 IEEE 34th International Conference on Data Engineering (ICDE), Paris, France, 16–19 April 2018; pp. 173–184. [Google Scholar] [CrossRef]
  23. Ning, Z.; Zhang, K.; Wang, X.; Guo, L.; Hu, X.; Huang, J.; Hu, B.; Kwok, R.Y.K. Intelligent Edge Computing in Internet of Vehicles: A Joint Computation Offloading and Caching Solution. IEEE Trans. Intell. Transp. Syst. 2021, 22, 2212–2225. [Google Scholar] [CrossRef]
  24. Wang, Y.T.; Lin, T.Y.; Sou, S.I.; Chen, L.A.; Tsai, M.H.; Chen, Y.R.; Tu, C.H. Markov Clustering-Based Content Placement in Roadside-Unit Caching With Deadline Constraint. IEEE Trans. Intell. Transp. Syst. 2024, 25, 11881–11892. [Google Scholar] [CrossRef]
  25. Han, X.; Wang, L.; Park, S.; Cuevas, Á.; Crespi, N. Alike People, Alike Interests? A Large-Scale Study on Interest Similarity in Social Networks. In Proceedings of the 2014 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM 2014), Beijing, China, 17–20 August 2014; pp. 491–496. [Google Scholar] [CrossRef]
  26. Androulaki, E.; Barger, A.; Bortnikov, V.; Cachin, C.; Christidis, K.; De Caro, A.; Enyeart, D.; Ferris, C.; Laventman, G.; Manevich, Y.; et al. Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains. In Proceedings of the Thirteenth EuroSys Conference, Porto, Portugal, 23–26 April 2018; EuroSys ’18. pp. 1–15. [Google Scholar] [CrossRef]
  27. Liu, Y.; Feng, Y.; Sakurai, K. Hyperledger Fabric-Based Multi-Channel Structure for Data Exchange in Internet of Vehicles. Electronics 2025, 14, 572. [Google Scholar] [CrossRef]
  28. Honar Pajooh, H.; Rashid, M.; Alam, F.; Demidenko, S. Hyperledger Fabric Blockchain for Securing the Edge Internet of Things. Sensors 2021, 21, 359. [Google Scholar] [CrossRef] [PubMed]
  29. Peng, K.; Xie, J.; Wei, L.; Hu, J.; Hu, X.; Deng, T.; Hu, M. Clustering-Based Collaborative Storage for Blockchain in IoT Systems. IEEE Internet Things J. 2024, 11, 33847–33860. [Google Scholar] [CrossRef]
Figure 1. Collaborative storage system of RSU cluster based on blockchain.
Figure 1. Collaborative storage system of RSU cluster based on blockchain.
Applsci 15 04573 g001
Figure 2. Illustration of vehicle access within an RSU.
Figure 2. Illustration of vehicle access within an RSU.
Applsci 15 04573 g002
Figure 3. Results of clustering algorithms with the number of RSU nodes.
Figure 3. Results of clustering algorithms with the number of RSU nodes.
Applsci 15 04573 g003
Figure 4. Results of clustering algorithms with the number of blocks.
Figure 4. Results of clustering algorithms with the number of blocks.
Applsci 15 04573 g004
Figure 5. Results of clustering algorithms with the number of clusters.
Figure 5. Results of clustering algorithms with the number of clusters.
Applsci 15 04573 g005
Figure 6. Results of block allocation algorithms with the number of RSU nodes.
Figure 6. Results of block allocation algorithms with the number of RSU nodes.
Applsci 15 04573 g006
Figure 7. Results of block allocation algorithms with the number of vehicles.
Figure 7. Results of block allocation algorithms with the number of vehicles.
Applsci 15 04573 g007
Figure 8. Results of block allocation algorithms with the number of blocks.
Figure 8. Results of block allocation algorithms with the number of blocks.
Applsci 15 04573 g008
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Hou, D.; Wei, L.; Zheng, L.; Wu, G.; Hu, J.; Dong, C.; Li, X.; Peng, K. A Blockchain-Based Collaborative Storage Scheme for Roadside Unit Clusters in Social Internet of Vehicles. Appl. Sci. 2025, 15, 4573. https://doi.org/10.3390/app15084573

AMA Style

Hou D, Wei L, Zheng L, Wu G, Hu J, Dong C, Li X, Peng K. A Blockchain-Based Collaborative Storage Scheme for Roadside Unit Clusters in Social Internet of Vehicles. Applied Sciences. 2025; 15(8):4573. https://doi.org/10.3390/app15084573

Chicago/Turabian Style

Hou, Dai, Lan Wei, Lei Zheng, Geng Wu, Jiaxing Hu, Chenxi Dong, Xinru Li, and Kai Peng. 2025. "A Blockchain-Based Collaborative Storage Scheme for Roadside Unit Clusters in Social Internet of Vehicles" Applied Sciences 15, no. 8: 4573. https://doi.org/10.3390/app15084573

APA Style

Hou, D., Wei, L., Zheng, L., Wu, G., Hu, J., Dong, C., Li, X., & Peng, K. (2025). A Blockchain-Based Collaborative Storage Scheme for Roadside Unit Clusters in Social Internet of Vehicles. Applied Sciences, 15(8), 4573. https://doi.org/10.3390/app15084573

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop