A Blockchain-based Method Ensuring Integrity of Shared Data in a Distributed-Control Intersection Network

—In modern urban transportation systems, the efficient management of traffic intersections is crucial to ensure smooth traffic flow and reduce congestion. Distributed-control intersection networks, where control decisions are made collaboratively by multiple entities, offer promising solutions. However, maintaining the security and the integrity of shared data among these entities poses significant challenges, including the risk of data tampering and unauthorized modifications. This paper proposes a novel approach that leverages blockchain technology to address these integrity concerns based on intelligent agents. By utilizing the decentralized and transparent nature of blockchain, our method ensures the authenticity and immutability of shared data within the distributed-control intersection network. The paper presents a detailed architecture, highlighting the integration of blockchain into the existing infrastructure, and discusses the benefits of this approach in enhancing data integrity, trust, and overall system reliability. Through a case study and simulation results, the proposed approach demonstrates its effectiveness in maintaining the integrity of shared data, thereby contributing to the advancement of secure and efficient traffic management systems.


INTRODUCTION
In the face of rapidly expanding urban populations, the efficient management of traffic intersections has emerged as a critical aspect of modern urban transportation systems [1].Traditional traffic control mechanisms, reliant on centralized decision-making, struggle to accommodate the dynamic demands of increasingly congested road networks.This has spurred the development of distributed-control intersection networks, which offer a more adaptive and responsive approach to traffic management.In these networks, control decisions are distributed across multiple entities, allowing realtime adjustments based on traffic conditions, thereby improving overall traffic flow and reducing congestion [2].
The advantages of distributed-control intersection networks are evident, but they bring forth new challenges, particularly concerning the integrity of shared data among the participating entities.The accuracy and authenticity of data exchanged within these networks are pivotal for their successful operation.Co mpro mised or tampered data can lead to erroneous control decisions, potentially resulting in accidents, increased congestion, and even system-wide failures [3].Hence, the establishment of a robust method to ensure data integrity is crucial.
Blockchain technology continues to evolve, with new consensus mechanisms, scalability solutions, and use cases being developed.Understanding these fundamentals is crucial for grasping the potential impact of blockchain on various industries [4].This paper introduces a novel approach that leverages blockchain technology to address the integrity concerns in distributed-control intersection networks.Blockchain has emerged as a powerful tool for addressing data integrity concerns in distributed and decentralized systems.Initially introduced as the foundational technology underpinn ing cryptocurrencies like Bitcoin [5], blockchain has evolved to demonstrate its applicability beyond financial use cases.Its core features, including decentralized data management, immutability, and cryptographic security, make it an ideal candidate for ensuring data integrity in complex systems, such as distributed-control intersection networks.
By presenting a comprehensive analysis of the proposed methodology, backed by a practical case study and simulat ion results, this paper aims to contribute to the development of robust and trustworthy distributed-control intersection networks that can effectively address the challenges of modern urban transportation.The organization of this paper is as stated below: Section II outlines the related works.The various blockchain fundamentals are discussed in Section III.Section IV describes our proposed methodology.Section V includes the simulation results and discussion.Lastly, a conclusion is outlined in Section VI.

II. RELATED WORKS
In recent years, the integration of blockchain technology into various domains has garnered significant attention due to www.ijacsa.thesai.orgits potential to enhance security, and decentralization.In the context of distributed-control intersection networks, where efficient traffic management is crucial, the utilization of blockchain for ensuring the integrity of shared data has emerged as a promising avenue.Several related works have exp lored similar themes and provided insights into the application of blockchain in distributed-control systems and intersection networks.
Traditional static control systems may fail to handle emergency situations due to traffic jams.As a solution, Wireless Sensor Networks (WSNs) have gained attention for their ability to detect traffic and mitigate road congestion.K. Nellore and G. P. Hancke [6] have extensively explored traffic management systems that employ WSNs to prevent congestion, priorit ize emergency vehicles, and reduce the Average Waiting Time (AWT) at intersections.They offered a comprehensive survey of current urban traffic management strategies, particularly those focused on priority-based signaling, congestion reduction, and improving vehicle AWT.Z. Yang et al. [7] introduced a promising approach to address trust issues in vehicular networks through the use of blockchain and a decentralized trust management system.They introduced a solution to enhance the trustworthiness of messages exchanged among vehicles in vehicular networks, considering the challenging non-trusted environment.A. Daeichian and A. Haghani [8] employed a co mbination of fu zzy Q-learn ing (QL) and agent technologies to create a traffic light control framework.Each individual agent engages with neighboring agents, receiving rewards for their decisions.The control choices are determined based on the input of vehicle numbers to schedule the duration of the green traffic light phase.The primary objective is to optimize the reward and minimize the average delay time.A. Ikid id et al. [9] presented a novel approach to address traffic management challenges in Moroccan cities, with a focus on promoting emergency vehicle access and encouraging collective transportation modes.The proposed control system operates at signalized intersections with priority links in urban environments.This system combines mu lti-agent technology and fuzzy logic to effectively regulate traffic flows.
On the other hand, the significance of data integrity in distributed-control systems has prompted research into various methodologies.T. Rauter [10] emphasized the significance of maintaining the integrity of the entire distributed control system.He categorized specific properties that enable the verification and proof of integrity for various subsystems within the system.Q. Kong et al. [11] introduced a novel, efficient, and location privacy-preserving data sharing scheme with collusion resistance within the Internet of Vehicles (Io V) context.Furthermore, blockchain's decentralized nature has been leveraged for secure data sharing across multiple part ies.G. P. Joshi et al. [12] proposed a blockchain-based method for secure and privacy-preserving data sharing in vehicular networks.Although not specific to intersection networks, this work highlights the potential of blockchain in ensuring data integrity and security in vehicular environments.J. Cui et al. [13] proposed an innovative solution utilizing consortium blockchain technology to enable traceable and anonymous vehicle-to-vehicle (V2V) data sharing.It addresses critical issues in current vehicular networks, including data privacy, security, and trust, while also capitalizing on the advantages of emerg ing technologies such as blockchain and 5G. S. Kudva et al. [14] proposed an innovative approach to selecting miner nodes in vehicular blockchain applications.The proposed method, called the "Proof of Driving" protocol, associates "driving coins" with vehicle features, s uch as distance traveled, to enhance the randomness in selecting miner nodes.In [15], S. A. Bagloee et al. discussed how a blockchain-based platform can facilitate the deployment of tradable mobility permits (TMP), along with related benefits like dynamic toll pricing, emergency vehicle priority, heavy truck platooning, and connected vehicles.I. M. Varma and N. Ku mar introduced the convergence of Internet of Vehicles (Io V) and Software-Defined Networking (SDN), enhanced by blockchain technology, that offers a promising solution to address the complex challenges of vehicular networks, providing improved transportation, security, and network management while also presenting opportunities for further research and development [16].A set of approaches and protocols have been proposed to determine the feasibility of using blockchain for traffic data security [17] and [18].
While existing related works provide valuable insights into blockchain's potential in distributed-control intersection networks, certain challenges remain unexplored.Integrity of shared data is a crucial factor in real-time traffic management scenarios.Additionally, the interoperability between blockchain and existing traffic infrastructure requires further investigation.The research landscape regarding blockchain's role in ensuring the integrity of shared data in distributedcontrol intersection networks is steadily growing.By build ing upon the foundation laid by previous related works, this study aims to contribute to the understanding of how blockchain can effectively enhance data integrity and efficiency in traffic management systems.

III. BLOCKCHAIN FUNDAMENTALS
Blockchain is a revolutionary technology that serves as the foundation for cryptocurrencies like Bitcoin and has farreaching applications beyond digital currencies.At its core, blockchain is a decentralized and distributed digital ledger that records transactions in a secure, transparent, and immutable manner.Fig. 1 illustrates the benefits that arise from the adoption of blockchain.Blockchain technology has several features that make it highly suitable for ensuring data integrity in a distributedcontrol intersection network.Here are some key features: Blockchain operates on a decentralized network of nodes, where each node stores a copy of the entire blockchain.In a distributed-control intersection network, this decentralization ensures that no single entity has control over the entire system.This feature reduces the risk of a single point of failure and enhances the network's resilience.
 Immutability: Once data is recorded on the blockchain, it is extremely difficult to alter or delete [19].This immutability ensures that the historical data related to traffic control decisions and intersection activities remain tamper-proof, providing a reliable audit trail.
 Transparency: All participants in the network can view the data recorded on the blockchain [20].In the context of a distributed-control intersection network, this transparency ensures that all stakeholders, including traffic authorities, city planners, and even the public, can access relevant data, promoting trust and accountability.
 Consensus Mechanisms: Blockchain networks use consensus mechanisms to validate transactions or data entries.This ensures that all nodes in the network agree on the state of the blockchain.Consensus mechanisms such as Proof of Work (PoW) [21] or Proof of Stake (PoS) [22] can be used to ensure that intersection control decisions are agreed upon by the network, minimizing the risk of unauthorized changes.
 Data Integrity: Blockchain can be used to create a secure and tamper-evident record of intersection control decisions, traffic data, and other relevant information.This ensures that the data remains consistent and reliable [23], which is crucial for maintaining the efficiency and safety of the intersection network.
 Smart Contracts: Smart contracts are self-executing contracts with the terms directly written into code [24].In a distributed-control intersection network, smart contracts could automate and enforce specific rules and conditions, such as prioritizing emergency vehicles or optimizing traffic flow based on predefined criteria.
 Security: Blockchain networks use cryptographic techniques to secure data [25].This enhances the security of the intersection network, protecting it from unauthorized access, data breaches, and cyberattacks.
 Auditability: Every transaction or data entry on the blockchain is traceable.This auditability ensures that all changes to the intersection network's data can be tracked back to their source, providing accountability and facilitating investigations when necessary.
By leveraging these features, a blockchain-based approach can enhance the integrity of shared data in a distributed-control intersection network, reducing the risk of data manipulation, promoting trust among network participants, and contributing to more secure and efficient traffic management systems.

A. Problem Modeling
A distributed control system (DCS) for light control intersections is a sophisticated networked system designed to manage traffic flow and optimize vehicle and ped estrian movement at intersections.It utilizes advanced technologies and algorithms to efficiently control traffic signals, ensure safety, and minimize congestion.An intersection network consists of mult iple intersections that are strategically connected to form a network.These intersections can vary in size and complexity, ranging fro m simple crossroads to multilane junctions.Fig. 2 shows an overview of an intersection network with nine intersections, each intersection has four twoway roads.
The DCS is functionally and spatially distributed.Every intersection is viewed as a network sub-section and controlled by a community named Intersection Control Group (ICG) and consists of a group of autonomous, cooperative, and intelligent agents.Each community acts locally according to its data and communicates with others to coordinate actions.This system promotes flexibility, resilience and efficiency by enabling individual co mponents to contribute to an overall solution without depending on a single central authority.Co mmunication in these distributed systems involves the exchange of information between different interconnected autonomous communities.These communities often communicate via local or wide-area networks, which introduce a security challenge.
The control of each signalized intersection is performed by an ICG, which defines the signal plan.This plan is designed to optimize phase layout while adapting to the constantly changing intersection environment, with control of the entire intersection network being fully distributed and achieved through the collective capacity, communication, and coordination of the ICGs. Links agents: An agent represents each link, a "link" refers to a specific segment of road that connects two distinct points.An agent link is assigned to supervise each incoming link, with the aim of consistently and promptly monitoring the link state.These specific agents have a limited, local perspective of the environment.In order to maintain system simp licity, no agent is granted a comprehensive overview of the entire network, thereby reducing overall co mplexity.The goal of this agent is to provide the link state presented by the concentration D. The concentration of a particular road at a given point is the number N of vehicles present between p and p+∆p at an instant t, relative to the length of the section of lane (Eq.1).The concept of vehicular concentration refers to the density of vehicles occupying a specific section of a road at a given point in time.
 Phase agents: Two distinct agents are emp loyed to oversee phases within an intersection.The Activated Phase Agent handles the active phase, while the Inactive Phase Agent manages phases that are not currently active.The goal of this agent is to provide the phase state.
 Decision agent: The decision agent is the central element of the system architecture, responsible for updating the signal plan according to changes in the environment.This decision-making process is executed collaboratively to prevent isolated optimizations.
 Ensuring the integrity of communications poses significant challenges in this type of system.As data passes thro ugh different nodes and networks to reach the control group, it is susceptible to corruption, interception and unauthorized access

B. Overview of our Proposed System Model
We have seen in our earlier discussions the necessity to apply a new approach that can enhance the integrity of shared data in a distributed-control intersection network, reducing the risk of data manipulation, pro moting trust among network participants, and contributing to more secure and efficient traffic management systems.A decentralized network in our model main ly includes several intersections that communicate with each other by sharing information of link state.Hence, design goal of our work is to make the public blockchain usable in the distributed-control intersection networks by storing the local link state of each intersection, which will guarantee the integrity of the data exchanged between the different intersections. ICG: To maintain data integrity of shared link state, each ICG calculates link state then stores it in a new block within a specific b lockchain related to the intersection.In case of an intersection system failure, the ICG can then send a data query to ask for historical link state, in a particular mo ment, fro m the neighboring ICG's Blockchain.
 ICG Blockchain : each ICG Blockchain maintains the blocks corresponding to the different calculated link states.The blockchain records the history of intersection lin k states, therefore the use of the blockchain is essential in the event of an intersection system failure, so that the new signals plan of the intersection can be calculated based on the link states previously stored in the blockchain, thereby streamlin ing the decision-making process in the distributed-control system.
For the intersections, each generation of a lin k state is treated as a transaction on the blockchain.Every link state data is hashed and added to the blockchain, creating an immutable record.Hashes serve as a fingerprint o f the data, making it easy to detect any modifications.www.ijacsa.thesai.org

C. Data Integrity Auditing for Distributed-Control Intersection Networks
Shared data integrity auditing for distributed-control intersection networks using blockchain is a concept that applies the principles of blockchain technology to ensure the accuracy and reliability of data in intersection networks that employ a distributed control approach.In such networks, mult iple intersections or traffic management components collaborate to optimize traffic flow and enhance transportation efficiency.Blockchain can play a role in storing the exchanged data and maintaining its integrity among these distributed components.
Auditors (ICGs) can verify the integrity of data by comparing the expected data with the historical record s on the blockchain.Automated audits can be performed to constantly monitor and validate data against predefined criteria.All ICGs can independently verify the accuracy of data, promoting trust and transparency within the intersection network.
The provided pseudo-code outlines an algorithm for conducting data integrity auditing according to our proposal.This process ensures the accuracy and consistency of data stored in the blockchain, mitigating potential errors or tampering.
These are the steps of the algorithm:  The algorithm begins by checking if the target block index is within valid bounds.If not, it returns an error message indicating an invalid index.
 After that, it retrieves the target block fro m the blockchain using the provided index.
 Then, it calculates the hash of the expected data and compares it with the stored hash of the link state data within the target block.If they do not match, it concludes that the data integrity audit has failed.
 Next, the algorithm iterates through the blockchain starting fro m the block after the target block.It retrieves each block and its corresponding previous block to verify the chain's integrity.If the PreviousHash of a block does not match the BlockHash of its previous block, the algorith m concludes that the blockchain integrity has been compromised.
 For each block (except the target block), it calculates the hash of the link state data and compares it to the stored hash in the block.If they do not match, the data integrity audit fails.
 If all checks pass, the data integrity audit is successful.Previous Block = GetBlockByIndex(Blockchain, block.Index -1) 14: If block.PreviousHash !=Previous Block.BlockHash: 15: Return " Blockchain integrity compromised" This algorithm ensures data integrity auditing within a blockchain by verifying the consistency of data in the target block and checking the integrity of the entire blockchain.If any discrepancies are found during this audit process, it indicates potential errors or tampering within the blockchain, thus helping to maintain the reliability and trustworthiness of the data stored in the system.
Implementing data integrity auditing for distributed-control intersection networks using blockchain can offer several benefits:  Data Consistency: Blockchain's immutability ensures that data remains consistent and trustworthy across all components.www.ijacsa.thesai.org Enhanced Security: Blockchain's cryptographic mechanisms make data tampering extremely difficult.
 Interoperability: Different co mponents can work together while rely ing on a common source of truth provided by the blockchain.
 Real-time Auditing: Auditing processes can be automated and performed in real-t ime, minimizing the risk of errors going undetected.

V. SIMULATION RESULTS AND DISCUSSION
In this section, we provide a detailed overview of the implementation of our proposed blockchain-based method for ensuring the integrity of shared data in a distributed-control intersection network.The imp lementation was carried out using a combination of software tools, programming languages, and blockchain frameworks.
As shown in Fig. 5, our imp lementation follows a layered architecture, comprising the following components: 1) Simulation of urban traffic: To simulate various traffic scenarios we use AnyLogic software [26].AnyLogic is a javabased simulation software used for modeling and analyzing complex systems, including urban traffic.
2) Distributed control system: To develop the distributed control system we use agent-based feature in AnyLogic, wh ich allows to define the agent types, properties, and behaviors.
3) Blockchain network: We utilized the Ethereu m blockchain due to its established infrastructure and support for smart contracts.The blockchain network stores transaction data, including link state, network meta-data, and validation mechanisms.

4) Results extraction:
The results extraction phase involves collecting data generated fro m simu lation runs.This data is captured at designated points within the model.To evaluate our approach (method-2), we will co mpare it with a distributed control system without blockchain (method-1).We will use four scenarios that collectively help assess the blockchain-based method's effectiveness across varying levels of commun ication network state and in the face of system failure.
 Scenario 1: Low Network Co mmunication state: In this scenario, the network experiences a situation of low communication bandwidth and high latency.The data exchanges between IGCs, agents, and the blockchain nodes are slow and sporadic.Transactions take longer to propagate through the network, causing delays in data integrity verification and confirmation.This scenario tests the resilience of the blockchain-based method under adverse network conditions and assesses its ability to process and verify transactions with limited bandwidth and high latency.Without a blockchain, a low network commun ication state might lead to difficulties in transaction verification and data sharing. Scenario 4: System Failure: In the event of network communication failure, a blockchain system can continue to function locally on ICG.Once communication is restored, the system can automatically synchronize and reconcile the distributed ledger, ensuring data integrity and minimizing the risk of data loss.Network commun ication failure in a nonblockchain system could lead to data discrepancies, conflicts, and potentially control system failure.
By simu lating and analyzing these scenarios involving different network co mmun ication state (see Fig. 6) we can gain a comp rehensive understanding of how the blockchainbased method performs under various levels of network stability.In summary, b lockchain technology offers advantages like decentralization and stability in various network co mmunicat ion scenarios.However, its effectiveness depends on factors such as the specific use case, network www.ijacsa.thesai.orgconditions, and the degree of decentralization required.Nonblockchain systems might suffice for certain situations.In the following section, we explore a series of diverse scenarios that cover different urban traffic contexts and situations.These scenarios have been carefully selected to provide relevant examples of concrete traffic situations.Scenario 3: High Traffic Condition: During high traffic conditions, the intersection network experiences heavy congestion with a significant influ x of vehicles fro m various directions.This scenario pushes the limits of the system's capacity.
By simu lating and analyzing these scenarios, we can gain insights into the system's strengths, weaknesses, and areas for improvement, thereby refining the control of distributed intersection network under a range of conditions.Fig. 7 presents the average intersection throughput in PVU (Private Vehicle Unit) per hour.The graph shows that the effectiveness of blockchain in ameliorating average intersection throughput depends on congestion levels.While blockchain may not have a direct impact on the low congestion level, it could enhance the average intersection throughput in the medium and high traffic conditions by improving data access speed, collaboration, and coordination among various intersections, potentially contributing to more efficient traffic management and better throughput over time.
As shown in Fig. 8 the response latency of both methods follows a linear trend as the level of congestion increases.The proposed system achieves a latency between 1.22 and 1.83, while the traditional system achieves a latency between 1.32 and 1.95.Average response latency (ms) Method-1 Method-2 www.ijacsa.thesai.orgresilience, even when ICGs go offline, ensuring continuous data availability.
In summary, centralized systems might compro mise security, whereas decentralized and blockchain-based systems enhance security through decentralization, data integrity, availability, auditability, immutability, and transparency.While each approach has its strengths and limitations, blockchainbased systems exh ibit co mprehensive security features, making them particularly well suited for applications where trust and security are paramount.

VI. CONCLUSION
In conclusion, the research presented in this paper demonstrates the significant potential of utilizing blockchain technology to enhance the integrity and efficiency of shared data within a distributed-control intersection network.The implementation of a blockchain-based method has been shown to address the challenges associated with data integrity, trust, and transparency in this critical context.By leveraging the decentralized and immutable nature of blockchain, the proposed approach offers a robust solution for ensuring the authenticity and consistency of data exchanged among various intersection nodes.
The results of our experiments indicate that the blockchainbased method not only enhances the overall security posture of the intersection network but also contributes to the efficient management of the road traffic, reducing the risk of unauthorized modifications and data tampering.The blockchain records the history of intersection lin k states, therefore the use of the blockchain is essential in the event of an intersection system failure, so that the new signals plan of the intersection can be calculated based on the data previously stored in the blokchain, thereby streamlining the decisionmaking process in the distributed-control system.
It is worth noting that while this paper primarily focuses on the application of blockchain in a distributed-control intersection network, the concepts and insights presented herein have broader implications for other decentralized and data-sensitive systems.Future research could explore scalability and performance optimizat ion, as well as real-world deployment and integration of the proposed solution.As the adoption of blockchain technology continues to expand, the findings of this study contribute to the advancement of secure and trustworthy data sharing in distributed systems, paving the way for safer and more efficient urban traffic management and beyond.

Fig. 3
Fig. 3 presents an overview of distributed Urban Traffic management System.It generally involves of a set of control groups, each control group consists of: Fig. 4 illustrates how different components of our proposal are connected.Detailed descriptions of the proposed system are given in the following:  Creating blocks: In our model, each intersection system will have an associated blockchain database.All the records of link states are considered as transactions that are validated by the ICG and finally added into immutable blocks of the blockchain.The block contains the link state data, the merkle root, previous block hash, block size and timestamp.Timestamps in the blockchain ensure a chronological record of data. Calculat ing signals plan: Each ICG refers to the neighboring ICG blockchain in order to retrieve their link states that permit to calculate the signals plan of the current intersection.

 Scenario 3 :
High Network Co mmunication state: In a high network communication scenario, the network experiences heavy congestion and high communication demands.Data exchanges between ICG, agents, and blockchain nodes are frequent and rapid.This situation challenges the system's capacity to handle a large volume of transactions without compromising its integrity.The blockchain's ability to handle high transaction throughput and maintain data consistency is assessed, along with its ability to handle potential network bottlenecks.In a high network communication state, non-blockchain systems may struggle to maintain data consistency and handle the influ x of real-time transactions.

Scenario 1 :
Low Traffic Condition: In this scenario, the intersection network experiences a period of low traffic.The number of vehicles approaching the intersection is min imal, resulting in infrequent data updates and interactions.Scenario 2: Mediu m Traffic Condition: In a mediu m traffic scenario, the intersection network encounters a moderate volume of vehicles during peak hours.
Intermediate agent: The role of the intermediate agent is to establish coordination with the neighboring control group.It acts as a communication interface agent for the intersection control group and mediating external communications.This agent facilitates the exchange of incoming link states with intermediate agents in neighboring control groups.