Block chain traffic data access control system
Through blockchain technology and smart contracts, fragmented storage and distributed retrieval of traffic data are solved, and the problems of poor data security and high concurrent access in the existing technology are improved, the availability of data and the scalability of the system are improved, and the integrity and security of the data are ensured.
Patent Information
- Application Number
- CN202510220793.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-02-27
AI Technical Summary
The existing traffic data storage and access methods have problems such as difficult to ensure data integrity, poor security, and high requirements for high concurrent access and real-time performance, making it difficult to achieve efficient data retrieval and reorganization in a distributed environment.
Blockchain technology and smart contracts are adopted to divide traffic data into multiple data fragments and store them in a distributed manner through data fragmentation storage. The distributed retrieval and reorganization technology driven by smart contracts can be used to achieve efficient access and reorganization of data, and resource allocation and frequency regulation are carried out through access frequency monitoring and traffic load evaluation mechanisms.
It improves the availability of data and the scalability of the system, enhances the security and traceability of data, ensures the integrity and accuracy of data, can respond to high concurrent access needs in a timely manner, and meets the diversified needs of intelligent transportation systems.
Smart Images

Figure CN120145418A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic data management, and more specifically to a blockchain traffic data access control system. Background Art
[0002] With the acceleration of the urbanization process and the continuous improvement of traffic infrastructure, the amount of data generated in the traffic field has increased explosively, covering a rich variety of information such as traffic flow, vehicle driving trajectories, road conditions, and traffic accidents. These traffic data are of extremely high value for aspects such as traffic management, intelligent transportation system optimization, urban planning, and traffic safety assurance, and have become one of the key elements driving the development of modern transportation.
[0003] However, the current traditional traffic data storage and access methods have defects. In terms of data storage, a centralized storage architecture is adopted, and it is difficult to guarantee data integrity. Once the central server is attacked or fails, the data is extremely easy to be lost and tampered with, and it is also unable to cope with the situation where some nodes are damaged, resulting in poor data security; in terms of access control, there is a lack of effective frequency control and traffic balancing mechanisms. In the face of high-concurrency access, the nodes where the hot data is located are prone to overload, leading to a significant increase in access latency or even system crashes, and it cannot meet the traffic data application scenarios with high real-time requirements. At the same time, the traditional method is difficult to achieve efficient retrieval and reorganization of data in a distributed environment, lacks a resource allocation mechanism, and is unable to effectively trace and manage data access behaviors, making it difficult to ensure the legal and compliant use of data and the stable operation of the system.
[0004] In summary, the existing traffic data storage and access technologies can no longer meet the growing traffic data management needs. There is an urgent need for a solution that combines the advantages of blockchain technology to achieve stable storage and access of traffic data to solve these problems. Summary of the Invention
[0005] The purpose of the present invention is to make up for the deficiencies of the existing technology, and provide a blockchain traffic data access control system. It can, through a data fragmentation storage mechanism, split traffic data into multiple data fragments and disperse them for storage in each node of the blockchain network, effectively reducing the storage pressure on a single node and improving the storage efficiency. At the same time, using a distributed retrieval and reorganization technology driven by smart contracts, it realizes the efficient access and reorganization of data, ensuring that users can quickly obtain complete traffic data. This mechanism not only improves the availability of data, but also enhances the scalability and flexibility of the system, providing a strong guarantee for the data management and analysis of intelligent transportation systems.
[0006] To solve the above technical problems, the present invention provides the following technical solutions: a blockchain traffic data access control system, which consists of: a data fragmentation storage module, a retrieval and recombination module, an access frequency monitoring module, a traffic load assessment module, and a resource allocation and frequency regulation module;
[0007] The data fragmentation storage module is used to split traffic data into multiple data fragments, encrypt each data fragment, and disperse the encrypted data fragments to multiple blockchain nodes. Among them, the data fragmentation storage module uses hash value-based fragmentation technology to fragment traffic data. Specifically:
[0008] According to the traffic data set D = {d 1 , d 2 , …, d n}, where n is the number of data elements. For each traffic data element d i , calculate its hash value H(d i ), and use the hash value range to allocate it to different fragment sets F j . Among them, j = 1, 2, …, m, and m is the number of fragment sets. That is, when the first k-bit binary value of H(d i ) is in the interval [a j , b j , then d i is allocated to F j ;
[0009] When performing encryption processing, a public key P and a private key S are generated. For each data fragment f ij , f ij represents the i-th fragment in the j-th fragment set F j . Encrypt it with the public key P to get E(f ij , P), and disperse the encrypted data fragment E(f ij , P) to multiple blockchain nodes according to the node selection strategy;
[0010] The retrieval and recombination module receives the user's data access request, queries and obtains the corresponding data fragments in the blockchain network through smart contract drive, and uses the data recombination algorithm to restore the collected data fragments into complete traffic data. Among them, the retrieval process driven by the smart contract is:
[0011] When receiving the user's data access request R, the smart contract parses the key information in the request. The key information includes the time range T r of the required data, the geographical area G r , and the data type D t, query the data fragment index information I related to the key information on the blockchain. The index information I includes the storage location information of the data fragments in the blockchain nodes. According to the index information I, the smart contract sends a data acquisition request to the corresponding blockchain node. During the process of collecting data fragments, when there are data node response delays and data transmission errors, the smart contract automatically obtains the same data fragments from backup nodes and other available nodes according to the fault tolerance mechanism to ensure the integrity and accuracy of the data;
[0012] The access frequency monitoring module is deployed on each blockchain node, and is used to record and statistically analyze the number of access requests to data fragments, the access time interval, and the access source information in real time, and synchronize the monitoring data to other nodes through the consensus mechanism of the blockchain;
[0013] The traffic load evaluation module comprehensively evaluates the traffic load of each node in combination with the hardware resources and network status indicators of each blockchain node to determine the current load status of the node. Among them, the hardware resource evaluation indicators include CPU usage CPU u , memory occupancy rate MEM u , and the network status evaluation indicators include bandwidth utilization rate BW u , network latency NET d ;
[0014] Based on the monitoring and evaluation results of the access frequency monitoring module and the traffic load evaluation module, the resource allocation and frequency regulation module coordinates the transfer of access requests through the smart contract and restricts the access frequency of the nodes where hot data fragments are located.
[0015] Furthermore, the node selection strategy of the data fragmentation storage module is based on the remaining storage capacity C of the node k , the current network bandwidth B k and the historical data access response time T k . By calculating the comprehensive weight W of the node k =αC k +βB k +γT k , where α, β, and γ are weight coefficients, and select the node with a high comprehensive weight W k for storage to achieve the balanced distribution and efficient storage of data.
[0016] Furthermore, the data recombination algorithm in the retrieval and recombination module is based on the metadata information M of the data fragments, including the fragment number N, the sequence identifier O, and the data association relationship A. According to the logical relationship defined in A, the collected data fragments f ij are arranged and combined according to the sequence identifier O to restore the complete traffic data D.
[0017] Furthermore, the logical relationship of the data association relationship A in the metadata information M of the data fragments in the data reorganization algorithm is as follows:
[0018] For traffic flow data, it is associated according to the time sequence and geographical location information, and the traffic flow data fragments at the same monitoring point within consecutive time segments are grouped together. Its logical relationship is based on the chronological order on the time axis;
[0019] For traffic flow data fragments at the same time period but at different monitoring points within the same road section and area, logical associations are established according to the geographical coordinate information so as to be able to restore the dynamic changes of the traffic flow in this area during reorganization;
[0020] For traffic event data, causal associations are established between accident data, traffic control data, and vehicle driving trajectory data, that is, the data fragments of traffic control measures corresponding to the accident occurrence location and time, and the data fragments of the driving trajectories of the affected vehicles during the accident occurrence period are mutually associated.
[0021] Furthermore, the access frequency monitoring module uses sliding window counting to count the number of access requests. Using window w and time interval Δt, for each data fragment f ij , a count array C of access requests is maintained ij =[c 1 ,c 2 ,…,c w . When a new access request arrives, the count c k within the current window is incremented by 1. Here, k represents the kth access request and k=(t mod w)+1, where t is the current time and t is updated at a fixed time interval Δt. At the same time, the time stamp of each access request is recorded for calculating the access time interval, that is and are different access orders and to obtain the time interval The access source information is recorded through the source IP address IP s and the user identifier UID. The monitored access request count, access time interval, and access source information data are encapsulated into a data block B ij , and synchronized to other nodes through the consensus mechanism of the blockchain to make the data of all nodes consistent.
[0022] Furthermore, for each blockchain node k, the traffic load L k of the traffic load assessment module is where ω 1 , ω 2 , ω 3 , ω 4is the traffic load coefficient, and the calculated value of L is used k is compared with the light load threshold L th1 and the overload threshold L th2 to determine the current load status of the node, and the load status includes light load, normal load, and overload.
[0023] Furthermore, the judgment method of the load status in the traffic load evaluation module is as follows:
[0024] When the load L of the node where the hot data fragment is located k > L th2 , it is determined to be overloaded. The smart contract coordinates to transfer some access requests to lightly loaded nodes and restricts the access frequency of the node where the hot data fragment is located;
[0025] When the load L of the node where the hot data fragment is located k < L th1 , it is determined to be lightly loaded and receives access requests from overloaded nodes;
[0026] When the load L of the node where the hot data fragment is located th1 < L k < L th2 , it is determined to be normally loaded and its load status is monitored in real time.
[0027] Furthermore, the smart contract is also responsible for maintaining the consistency of traffic data updates, and its maintenance process is as follows:
[0028] When there is a traffic data update, the smart contract broadcasts a data update notification U to all blockchain nodes. The notification U contains the identifier ID u of the data to be updated, the version number V u and the update content summary C u . After receiving the notification, the node searches for the corresponding data fragment locally according to ID u and verifies that the version number V u is consistent with the local data. When the version numbers are consistent, the update content C u is used to update the data fragment and the hash value of the updated fragment is returned to the smart contract. The smart contract collects the hash values returned by the nodes and conducts comparison and verification. When the hash values returned by more than nodes are the same, it is confirmed that the data update is successful, and the new version number and hash value are recorded on the blockchain;
[0029] During the data update process, when the node update fails, the smart contract starts a recovery mechanism and determines the set of failed nodes F = {f 1 , f 2 , …, f s}, select nodes from other successfully updated nodes as data source nodes, and the selected set of data nodes is S =
[0030] {s 1 , s 2 , …, s t}, and the selection basis is the network connection stability W ij between the data node and the failed node and the load condition of the data source node By calculating the reliable transmission factor of each data source node i where λ and μ are transmission coefficients, sort the data source nodes according to the size of RTF i , that is, preferentially transmit updated data from the node with a large RTF to the failed node, so that the data of all nodes can maintain a consistent updated state.
[0031] Compared with the prior art, the blockchain traffic data access control system has the following beneficial effects:
[0032] First, by splitting and encrypting traffic data and storing it in multiple blockchain nodes, even if some nodes are maliciously attacked, it is difficult for attackers to obtain complete and valid data, effectively preventing the risk of data leakage and tampering, ensuring the integrity and confidentiality of data. At the same time, based on the immutable characteristic of the blockchain, the whole process of data access is reliably recorded, further enhancing the security and traceability of data. And by using smart contracts to drive distributed retrieval and recombination technology, it ensures that users can accurately obtain complete data, greatly improving data security, effectively coping with the data integrity problem when some nodes are attacked, and at the same time reducing the storage and transmission burden of a single node.
[0033] Second, the access frequency control and traffic balancing mechanism of the present invention can monitor and regulate the load of each node in real time, avoiding performance bottlenecks in the nodes where hot data is located due to excessive access. When data is fragmented and stored in multiple nodes, through intelligent resource allocation, it ensures that each node can operate stably, and data access requests can be quickly responded to, enabling traffic data to serve traffic management decisions in a timely and accurate manner, greatly improving the operation efficiency and service quality of the intelligent transportation system.
[0034] Other advantages, objectives and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0036] Figure 1 It is an operation step diagram of a blockchain traffic data access control system;
[0037] Figure 2 It is a flowchart for users to access traffic data;
[0038] Figure 3 It is a flowchart for resource allocation and frequency regulation. Specific Embodiments
[0039] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, will detail the specific embodiments, structures, features, and their effects according to the present invention.
[0040] Embodiment 1
[0041] As Figure 1 shown, this embodiment details the actual application process of the blockchain traffic data access control system. The system mainly includes a data fragmentation storage module, a retrieval and recombination module, an access frequency monitoring module, a traffic load assessment module, and a resource allocation and frequency regulation module, achieving the secure and efficient storage and access of traffic data, effectively solving the problems of poor security and low efficiency existing in traditional traffic data management methods, and providing reliable data support for the intelligent transportation system.
[0042] In traffic data management, the data fragmentation storage module of this system adopts a fragmentation technology based on hash values. Through the traffic data set D = {d 1 , d 2 , …, d n}, for each traffic data element d i , its hash value H(d i ) needs to be calculated. The hash value has one-wayness, ensuring the security of the data. According to the range of the hash value, the data elements are allocated to different fragment sets F j . Specifically, when the first k - bit binary value of H(d i ) is within the interval [a j , b j , then d i is allocated to F jIn this way, data can be relatively evenly dispersed into different fragment sets, which is beneficial for subsequent distributed storage and management. During the encryption process, the system generates a public key P and a private key S. For each data fragment f ij (indicating the i-th fragment in the j-th fragment set F j ), it is encrypted using the public key P to obtain E(f ij , P). By leveraging the pairing relationship between the public key and the private key, it is ensured that only the authorized party with the private key can decrypt the data, enhancing data confidentiality. The data fragments are stored. Using the node selection strategy of the data fragmentation storage module, based on the remaining storage capacity C k of the node, the current network bandwidth B k and the historical data access response time T k , the comprehensive weight W k of the node is calculated as W = αC k + βB k + γT k to select the storage node, where α, β, and γ are weight coefficients, and their values depend on the importance the system attaches to different factors. For example, when the system places more emphasis on the stability and response speed of data storage, the value of γ is increased; when the system is more concerned about the impact of network bandwidth on data transmission, the value of β is correspondingly increased. In this way, nodes with better comprehensive performance can be selected for storage, ensuring the balanced distribution and efficient storage of data.
[0043] When the user has a data access requirement, the retrieval and recombination module starts to work. When the data access request sent by the user is R, the smart contract first parses the key information in the request, including the time range T r of the required data, the geographical region G r and the data type D t, the smart contract queries the data fragment index information I related to these key information on the blockchain. The index information on the blockchain records the storage location information of the data fragments in the blockchain nodes. According to the index information I, the smart contract sends a data acquisition request to the corresponding blockchain nodes. During the process of collecting data fragments, when data node response delays and data transmission errors occur, the fault tolerance mechanism of the smart contract comes into play and automatically obtains the same data fragments from backup nodes and other available nodes. The backup nodes are set during the data storage stage and store redundant copies of the data to cope with such emergencies. In this way, the integrity and accuracy of the data are guaranteed; when the data fragments are collected, a data recombination algorithm is used to restore them into complete traffic data. The data recombination algorithm is based on the metadata information M of the data fragments, including the fragment number N, the sequence identifier O, and the data association relationship A. For traffic flow data, it is associated according to the time sequence and geographical location information. The traffic flow data fragments at the same monitoring point within consecutive time segments are grouped together, and their logical relationship is based on the chronological order on the time axis; for traffic flow data fragments at different monitoring points but in the same road section and area during the same time period, logical associations are established according to the geographical coordinate information. Through this association method, the dynamic changes of the traffic flow in this area can be restored during recombination, providing comprehensive and accurate information for traffic management; for traffic event data, causal associations are established between accident data, traffic control data, and vehicle driving trajectory data, that is, the data fragments of traffic control measures corresponding to the accident location and time, and the data fragments of the driving trajectories of affected vehicles during the accident period are mutually associated to comprehensively understand the impact range of the accident and subsequent handling situations.
[0044] The access frequency monitoring module is deployed on each blockchain node. It uses a sliding window count to statistically count the number of access requests. Using the window w and the time interval Δt, for each data fragment f ij , maintain an access request count array C ij = [c 1 , c 2 , …, c w . When a new access request arrives, increment the count c k within the current window by 1, where k = (t mod w) + 1, t is the current time and is updated at a fixed time interval Δt. At the same time, record the timestamp of each access request for calculating the access time interval. If and are different access orders and then the time interval Through these time interval data, the changing trend of the access popularity of the data fragments can be analyzed. The access source information is obtained through the source IP address IP sRecord it together with the user identification UID, encapsulate the monitored access request count, access time interval, and access source information data into a data block B ij and synchronize it to other nodes through the consensus mechanism of the blockchain to ensure the consistency of data among all nodes.
[0045] The traffic load evaluation module comprehensively evaluates the traffic load of each blockchain node by combining the hardware resources and network condition indicators of each blockchain node. The hardware resource evaluation indicators include the CPU usage rate CPU u and the memory occupancy rate MEM u , and the network condition evaluation indicators include the bandwidth utilization rate BW u and the network latency NET d . For each blockchain node k, its traffic load where ω 1 , ω 2 , ω 3 , ω 4 are traffic load coefficients. The determination of these coefficients needs to comprehensively consider the impact degree of different hardware resources and network conditions on the system performance. For example, if the CPU resources in the system are relatively tense while the network bandwidth is relatively sufficient, then the value of ω 1 is relatively large to highlight the importance of the CPU usage rate in traffic load evaluation. The calculated L k value is compared with the light load threshold L th1 and the overload threshold L th2 to determine the current load status of the node. The load status includes light load, normal load, and overload, where: when the load L k of the node where the hot data fragment is located > L th2 , it is determined to be overloaded, and at this time, resource allocation and frequency regulation are required; when the load L k < L th1 of the node where the hot data fragment is located, it is determined to be light load, and it can receive access requests from overloaded nodes to achieve reasonable utilization of resources; when the load L th1 < L k < L th2 of the node where the hot data fragment is located, it is determined to be normal load, and its load status is monitored in real time to detect potential problems in a timely manner.
[0046] When the traffic load evaluation module detects that the node where the hot data fragment is located is overloaded, the resource allocation and frequency regulation module starts to work. It coordinates through a smart contract to transfer some access requests to lightly loaded nodes. The smart contract first selects a lightly loaded node as the target node according to the load situation of the node and the network connection status. In terms of frequency regulation, it restricts the access frequency of the node where the hot data fragment is located to avoid performance bottlenecks caused by excessive access. At the same time, the smart contract is also responsible for maintaining the consistency of traffic data updates. When there is a traffic data update, the smart contract broadcasts a data update notification U to all blockchain nodes. The notification U contains the identifier ID u , version number V u and the update content summary C u . After receiving the notification, the node searches for the corresponding data fragment locally according to the ID u and verifies that the version number V u is consistent with the local data. When the version numbers are consistent, the update content C u is used to update the data fragment and the hash value of the updated fragment is returned to the smart contract. The smart contract collects the hash values returned by the nodes and conducts comparison verification. When the hash values returned by more than of the nodes are the same, it is confirmed that the data update is successful, and the new version number and hash value are recorded on the block lock. During the data update process, when a node update fails, the smart contract starts a recovery mechanism. According to the feedback information of the node, the set of failed nodes F = {f 1 , f 2 , …, f s} is determined. Nodes are selected from other successfully updated nodes as data source nodes. The selected set of data nodes is S = {s 1 , s 2 , …, s t}. The selection basis is the network connection stability W ij between the data node and the failed node and the load situation of the data source node . By calculating the reliable transmission factor of each data source node, where λ and μ are transmission coefficients, the data source nodes are sorted according to the size of the RTF i . The updated data is preferentially transmitted from the node with a large RTF i to the failed node to ensure that the data of all nodes can maintain a consistent update state.
[0047] As Figure 2 shown, the specific process of the blockchain traffic data access control system provided in this embodiment for data access is as follows:
[0048] The user sends a data access request to the blockchain traffic data access control system through the client. The request includes the user's identity authentication information, the description of the required traffic data (data type, time range, geographical area), and access permission credentials (digital certificate, encryption key).
[0049] The system first verifies the user's identity. Through the identity authentication mechanism and permission management smart contract on the blockchain, it checks whether the user has legitimate access rights. If the verification passes, the system starts the distributed retrieval mechanism according to the description information in the user's request, and searches for and obtains relevant data fragments in the blockchain network.
[0050] During the process of collecting data fragments, the system monitors the access frequency and traffic load of each node in real time. According to the access frequency control and traffic balancing mechanism, it dynamically allocates and regulates the data access requests to ensure the efficient acquisition of data and the stable operation of the system.
[0051] When all relevant data fragments are collected, the system uses the data recombination algorithm to restore them to complete traffic data and returns the data to the user client. At the same time, the system records the detailed log information of this data access (including access time, access user, accessed data content) on the blockchain node for subsequent auditing and analysis.
[0052] In summary, this embodiment details the working principles and implementation processes of each module of the blockchain traffic data access control system. Through the hash value fragmentation of the data fragmentation storage module and the intelligent node selection strategy, the secure and efficient storage of data is realized; the retrieval and recombination module uses the smart contract and data association relationship to ensure that users can accurately obtain the complete traffic data they need; the access frequency monitoring and traffic load evaluation module and the resource allocation and frequency regulation module cooperate with each other to ensure the stable operation of the system under high-concurrency access and the reasonable distribution of data. At the same time, the smart contract plays a key role in maintaining data update consistency. This embodiment provides a reliable technical guarantee for the application of traffic data to better meet the diverse needs of the intelligent transportation system.
[0053] Embodiment 2
[0054] As Figure 3 shown, this embodiment focuses on demonstrating the detailed implementation details of the resource allocation and frequency regulation process in the blockchain traffic data access control system. Through the accurate monitoring and judgment of the nodes where the hot data fragments are located, efficient resource allocation and access frequency regulation are realized, effectively ensuring the stable operation of the system under complex data access requirements, giving full play to the advantages of blockchain technology in the field of traffic data management, and improving the overall performance of the system and the quality of data services.
[0055] During the operation of the blockchain traffic data access control system, the resource allocation and frequency control modules continue to play a key role. When the system is in operation, the access frequency monitoring module and the traffic load evaluation module will continuously collect and analyze the data access and load information of each node. The traffic load evaluation module conducts a comprehensive evaluation based on the hardware resources and network status indicators of each blockchain node. Among them, the hardware resource evaluation indicators include CPU utilization rate, CPU u , memory usage MEM u , network status evaluation indicators include bandwidth utilization BW u ,Network delayNET d , for each blockchain node k, its traffic load Here's ω 1 ,ω 2 ,ω 3 ,ω 4 is the traffic load coefficient, which is used to reflect the impact of each indicator on the node load. Once the node load L k Exceeding the preset overload threshold L th2 , the resource allocation and frequency control module quickly starts the response mechanism. In terms of resource allocation, the smart contract first comprehensively collects the status information of each node in the system, including the remaining storage capacity C of the node. k 、Current network bandwidth B k , historical data access response time T k And the current load L k Based on this information, the smart contract constructs a node resource and load relationship. For example, there are nodes n in the system. 1 、n 2 、n 3 …n m , for the overloaded node n where the hot data fragment is located h , the smart contract will calculate other nodes for n h The resource attraction factor for node n i Its resource attraction factor Where δ and ∈ are coefficients, For node n i The current load, For node n i In this way, the remaining bandwidth of each node for the overloaded node n can be quantified h resource acceptance capacity and attractiveness.
[0056] Next, the smart contract attracts the resource according to the factor A. i The size of the deployable nodes is sorted, and the appropriate target node is selected from the nodes with the highest sorting. hThe partial access requests are transferred. During the transfer process, the smart contract ensures the reliability and integrity of data transmission. Using the encryption technology and data verification mechanism of the blockchain, it encrypts the transmitted data and conducts integrity verification at the receiving end. For example, it uses the hash algorithm to calculate the hash value of the transmitted data, and the receiving end confirms whether the data is complete and error-free by comparing the hash values. In terms of access frequency regulation, the system uses a token bucket to limit the access frequency of the node n h where the hot data fragments are located. A token bucket is set for node n h with a certain initial capacity C t and a token generation rate r t . When each access request arrives at n h , it needs to consume one token. When an access request arrives at node n h , the system first checks whether there are available tokens in the token bucket. If there are, it allows the access request to pass and takes out one token from the token bucket; if the token bucket is empty, it processes the access request according to the preset policy. The preset policy is to put the access request into the waiting queue and wait for token generation before processing, or classify and process the request according to its priority. At the same time, the smart contract dynamically adjusts the token generation rate r t according to the running status of the system. The smart contract continuously monitors the load condition of the node n h where the hot data fragments are located and the performance metrics of the entire blockchain network, such as the load changes of other nodes, the average latency of data access, the throughput of the system, etc. If within a period of time T m , it is found that the load of node n h still remains continuously higher than the preset load threshold L th2 , or the overall performance metrics of the system are significantly affected, the system will reduce the token generation rate r t according to the preset adjustment policy to further strengthen the restriction on the access frequency. On the contrary, if the load of node n h gradually decreases and the system performance returns to the normal level, the system will appropriately increase the token generation rate r t to improve the data access efficiency and avoid unnecessary impacts on normal data usage caused by excessive restriction of the access frequency
[0057] In addition, the smart contract also records all resource allocation and frequency regulation operation information on the blockchain nodes. These information include the time of allocation, the nodes involved, the number of transferred access requests, and the adjustment of token bucket parameters. In this way, the traceability and auditability of operations are realized, which is convenient for system administrators to monitor and analyze the running status of the system, discover potential problems in a timely manner and optimize them.
[0058] This embodiment details the implementation details of the resource allocation and frequency regulation process in the blockchain traffic data access control system. Through accurate traffic load assessment, scientific resource allocation algorithms, and a flexible token bucket frequency regulation mechanism, the system can effectively cope with the pressure brought by hot data access, ensure load balancing among nodes and efficient and stable data access. The smart contract plays a core coordination and management role throughout the process, ensuring the security and reliability of data transmission and the traceability of operations. The effective implementation of this resource allocation and frequency regulation process further improves the performance and reliability of the blockchain traffic data access control system, provides strong support for the secure management and efficient utilization of traffic data, and enables it to better adapt to complex and changing traffic data application scenarios.
[0059] The above are only preferred embodiments of the present invention and do not impose any form of limitation on the present invention. Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or variations equivalent to the above by using the disclosed technical content within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any brief modifications, equivalent variations, and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. Blockchain traffic data access control system, characterized by: The components of the system include: data fragmentation storage module, retrieval and reorganization module, access frequency monitoring module, traffic load assessment module and resource allocation and frequency control module; The data fragmentation storage module is used to divide the traffic data into multiple data fragments, encrypt each data fragment, and store the encrypted data fragments in multiple blockchain nodes in a dispersed manner. The data fragmentation storage module fragments the traffic data using a hash value-based fragmentation technology, specifically: According to the traffic data set D = {d1, d2, ..., d n }, where n is the number of data elements, for each traffic data element d i , calculate its hash value H(d i ), using the hash value range to assign them to different shard sets F j In which j = 1, 2, ..., m, m is the number of fragment sets, that is, when H(d i ) has a binary value of the first k bits in the interval [a j , b j ], then d i Assigned to F j middle; When performing encryption processing, a public key P and a private key S are generated. For each data fragment f ij , f ij Denotes the jth fragment set F j The i-th fragment in is encrypted using the public key P to obtain E(f ij , P), the encrypted data fragment E(f ij ,P) distributed storage to multiple blockchain nodes according to the node selection strategy; The retrieval and reorganization module receives the user's data access request, queries and obtains the corresponding data fragments in the blockchain network through the smart contract drive, and uses the data reorganization algorithm to restore the collected data fragments into complete traffic data. The retrieval process driven by the smart contract is as follows: After receiving the user's data access request R, the smart contract parses the key information in the request, including the time range T of the required data. r , Geographical area G r and data type D t , query the data fragment index information I related to the key information on the blockchain, the index information I includes the storage location information of the data fragment in the blockchain node, according to the index information I, the smart contract sends a data acquisition request to the corresponding blockchain node, in the process of collecting data fragments, when the data node response delay and data transmission error occurs, the smart contract automatically obtains the same data fragment from the backup node and other available nodes according to the fault tolerance mechanism to ensure the integrity and accuracy of the data; The access frequency monitoring module is deployed on each blockchain node to record and count the number of access requests to data fragments, access time intervals, and access source information in real time, and synchronize the monitoring data to other nodes through the consensus mechanism of the blockchain; The traffic load evaluation module combines the hardware resources and network status indicators of each blockchain node to comprehensively evaluate the traffic load of each node to determine the current load status of the node, wherein the hardware resource evaluation indicators include CPU usage CPU u , memory usage MEM u , network status evaluation indicators include bandwidth utilization BW u ,Network delayNET d ; The resource allocation and frequency control module coordinates the transfer of access requests through smart contracts based on the monitoring and evaluation results of the access frequency monitoring module and the traffic load evaluation module, and limits the access frequency of the nodes where the hot data fragments are located.
2. The blockchain traffic data access control system according to claim 1 is characterized in that: The node selection strategy of the data fragmentation storage module is based on the remaining storage capacity C of the node. k 、Current network bandwidth B k and historical data access response time T k , by calculating the comprehensive weight W of the node k =αC k +βB k +γT k , where α, β, and γ are weight coefficients, and the comprehensive weight W is selected k The nodes with high storage density are used for storage to ensure even distribution and efficient storage of data.
3. The blockchain traffic data access control system according to claim 1 is characterized in that: The data reorganization algorithm in the retrieval and reorganization module is based on the metadata information M of the data fragments, including the fragment number N, the sequence identifier O and the data association relationship A. According to the logical relationship defined in A, the collected data fragments f ij Arrange and combine the sequential identifiers O to restore the complete traffic data D.
4. The blockchain traffic data access control system according to claim 3 is characterized in that: The logical relationship of the data association relationship A in the metadata information M of the data fragments in the data reorganization algorithm is: For traffic flow data, the data is associated with the time sequence and geographic location information, and the flow data fragments of the same monitoring point in continuous time segments are grouped together. The logical relationship is based on the order of the time axis. For the traffic flow data fragments of the same period at different monitoring points but in the same road section and area, logical associations are established based on the geographic coordinate information so that the dynamic changes of the traffic flow in the area can be restored when reorganized; For traffic event data, a causal relationship is established between the accident data, traffic control data, and vehicle driving trajectory data, that is, the traffic control measures data fragments corresponding to the accident location and time, and the driving trajectory data fragments of the affected vehicles during the accident period are correlated with each other.
5. The blockchain traffic data access control system according to claim 1 is characterized in that: The access frequency monitoring module uses sliding window counting to count the number of access requests, using window w and time interval Δt for each data fragment f ij , maintain an access request count array C ij =[c1, c2, …, c w ], when a new access request arrives, the count c in the current window is k Add 1, where k represents the kth access request and k=(tmod w)+1, where t is the current time, where t is updated at a fixed time interval Δt, and at the same time, the timestamp of each access request is recorded Used to calculate the access time interval, that is, and For different access orders and Get the time interval The access source information is obtained through the source IP address s and user identification UID, and encapsulate the monitored access request times, access time interval and access source information data into data block B ij And synchronize it to other nodes through the consensus mechanism of blockchain to make the data of all nodes consistent.
6. The blockchain traffic data access control system according to claim 1 is characterized in that: The traffic load evaluation module is for each blockchain node k, and its traffic load L k for Among them, ω1, ω2, ω3, and ω4 are flow load coefficients. k Value and light load threshold L th1 and overload threshold L th2 The comparison is performed to determine the current load state of the node, where the load state includes light load, normal load, and overload.
7. The blockchain traffic data access control system according to claim 6 is characterized in that: The load status in the traffic load evaluation module is determined as follows: When the node where the hot data fragment is located is loaded with L k >L th2 When the number of nodes is too large, it is judged as overloaded, and some access requests are transferred to lightly loaded nodes through smart contract coordination, and the access frequency of the nodes where the hot data fragments are located is limited; When the node where the hot data fragment is located is loaded with L k <L th1 When , it is judged as lightly loaded and receives access requests from overloaded nodes; When the node where the hot data fragment is located is loaded with L th1 <L k <L th2 When the load is normal, it is determined to be normal load and its load status is monitored in real time.
8. The blockchain traffic data access control system according to claim 7 is characterized in that: The smart contract is also responsible for maintaining the consistency of traffic data updates, and the maintenance process is as follows: When traffic data is updated, the smart contract broadcasts a data update notification U to all blockchain nodes, and the notification U contains the identification ID of the data to be updated. u 、Version number V u and Update SummaryC u After receiving the notification, the node u Find the corresponding data fragment locally and verify the version number V u If the version number is consistent with the local data, the updated content C is used. u Update the data fragments and hash the updated fragments Return to the smart contract, the smart contract collects the hash value returned by the node, compares and verifies, and if it is greater than If the hash value returned by the node is the same, the data is confirmed to be updated successfully, and the new version number and hash value are recorded on the blockchain; During the data update process, when a node fails to update, the smart contract starts the recovery mechanism and determines the failed node set F = {f1, f2, ..., f s }, select a node from other successfully updated nodes as a data source node, the selected data node set is S = {s1, s2, ..., s t }, the selection is based on the network connection stability W between the data node and the failed node ij and the load of the data source node By calculating the reliable transmission factor of each data source node Where λ and μ are transmission coefficients, according to RTF i Sort the data source nodes by size, that is, prioritize RTF i Large nodes transmit updated data to failed nodes so that the data of all nodes can maintain a consistent updated state.
Citation Information
Patent Citations
Big data access control method based on block chain
CN117370451A
Method for realizing enterprise digital asset protection through cross-intranet communication and block chain
CN117997616A
Block chain distributed data storage technology
CN118842811A
Data encryption backup storage system and method based on information security
CN118898078A
Method and system for reading video data based on server
CN119011917A