Blockchain Traffic Data Access Control System
Through blockchain technology's data fragmented storage and smart contract-driven distributed retrieval and reorganization, the security and stability problems in traffic data storage and access are solved, efficient and secure data access and management are achieved, and the needs of intelligent transportation systems are met.
Patent Information
- Application Number
- CN202510220793.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-02-27
AI Technical Summary
The existing traffic data storage and access methods have difficulty in ensuring data integrity and lack of frequency control and traffic balance mechanisms for access control, resulting in poor data security and insufficient system stability, which cannot meet the needs of high concurrent access.
Blockchain technology is used to store data fragmented, traffic data is divided into multiple data fragments and stored in various nodes of the blockchain network. Smart contract-driven distributed retrieval and restructuring technology is used to combine access frequency monitoring and traffic load evaluation for resource allocation and frequency regulation.
Improve the security and availability of data, ensure the integrity and confidentiality of data, realize efficient access and reorganization, improve the scalability and flexibility of the system, and be able to respond to traffic management decisions in a timely manner.
Smart Images

Figure CN120145418B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic data management, and particularly 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 rich and diverse information such as traffic flow, vehicle driving trajectories, road conditions, traffic accidents, etc. These traffic data are of extremely high value for aspects such as traffic management, optimization of intelligent transportation systems, urban planning, and traffic safety guarantee, 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 impossible to handle 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. When facing high-concurrency access, the nodes where the hot data is located are prone to overload, resulting in 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, cannot effectively trace and manage data access behaviors, and is 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, and 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, divide traffic data into multiple data fragments and disperse them for storage in each node of the blockchain network, effectively reducing the storage pressure of a single node and improving the storage efficiency. At the same time, by 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 divide 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 = {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 ), 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 within 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 . Use the public key P to encrypt it 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 analyzes 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 nodes. 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, ensuring 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 the CPU usage rate CPU u and the memory occupancy rate MEM u , and the network status evaluation indicators include the bandwidth utilization rate BW u and the network latency NET d ;
[0014] The resource allocation and frequency regulation module, based on the monitoring and evaluation results of the access frequency monitoring module and the traffic load evaluation module, coordinates and transfers access requests through the smart contract, and restricts the access frequency of the nodes where the 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 k of the node, the current network bandwidth B k and the historical data access response time T k . By calculating the comprehensive weight W 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, so as 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, in the data reorganization algorithm, the logical relationship of the data association relationship A in the metadata information M of data fragments is as follows:
[0018] For traffic flow data, it is associated according to time sequence and geographical location information. The traffic data fragments at the same monitoring point within consecutive time segments are grouped together. Its logical relationship is based on the chronological order along the time axis;
[0019] For traffic flow data fragments at different monitoring points but within the same road section and area during the same period, logical associations are established according to geographical coordinate information so that the dynamic changes in traffic flow in this area can be restored 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 location and time, and the data fragments of the driving trajectories of affected vehicles during the accident period are mutually associated.
[0021] Furthermore, the access frequency monitoring module uses a sliding window count to statistically 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 = [c1, c2, …, c w . When a new access request arrives, the count c k within the current window is incremented by 1. Here, k represents the k-th 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 timestamp 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 ensure the consistency of all node data.
[0022] Furthermore, for each blockchain node k, the traffic load L k of the traffic load assessment module is where ω1, ω2, ω3, ω4 are traffic load coefficients. Using the calculated L k value and the light load threshold L th1 and the overload threshold L th2Compare to determine the current load status of the node, and the load status includes light load, normal load, and over load.
[0023] Further, 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 as overloaded, and part of the access requests are transferred to the lightly loaded node through the coordination of the smart contract, and the access frequency of the node where the hot data fragment is located is restricted;
[0025] When the load L of the node where the hot data fragment is located k <L th1 it is determined as lightly loaded, and the access requests of the overloaded node are received;
[0026] When the load L of the node where the hot data fragment is located th1 <L k <L th2 it is determined as normal load, and its load status is monitored in real time.
[0027] Further, the smart contract is also responsible for maintaining the consistency of traffic data updates, and the maintenance process is as follows:
[0028] When there is a traffic data update, the smart contract broadcasts a data update notice U to all blockchain nodes, and the notice U contains the identifier ID u 、version number V u and the update content summary C u , after receiving the notice, 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 compares and verifies them. 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, determines the set of failed nodes F = {f1, f2,..., f s} according to the feedback information of the node, and selects nodes from other successfully updated nodes as data source nodes. The selected set of data nodes is S =
[0030] {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 condition of the data source node By calculating the reliable transmission factor of each data source node where λ and μ are transmission coefficients, according to the RTF i Sort the data source nodes according to the size of, that is, preferentially transmit updated data from the node with a large RTF i 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 feature 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 dealing 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. After the 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 in part in the subsequent specification, and in part, 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] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0036] Figure 1It is a flowchart of the operation steps of the blockchain traffic data access control system;
[0037] Figure 2 It is a flowchart of users accessing traffic data;
[0038] Figure 3 It is a flowchart of resource allocation and frequency regulation. Specific implementation manners
[0039] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following will, in conjunction with the accompanying drawings and preferred embodiments, elaborate in detail on the specific implementation manners, structures, features and their effects of the present invention as follows.
[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 safe 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 = {d1, d2,..., 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 binary digits of H(d i ) are within the interval [a j , b j , then d i is allocated to F j . This method enables the data to be relatively evenly dispersed into different fragment sets, which is conducive to subsequent distributed storage and management. In the encryption processing stage, the system generates a public key P and a private key S. For each data fragment f ij (representing 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 using 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 the confidentiality of the data. The data fragments are stored, and the node selection strategy of the data fragmentation storage module is used. 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 to select the storage node, where α, β, and γ are weight coefficients, and their values depend on the degree of importance the system attaches to different factors. For example, when the system pays more attention to 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 analyzes the key information in the request, including the time range T of the required data r , the geographical area 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 the 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, the 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 at the same time period, logical associations are established according to the geographical coordinate information. Through this association method, the dynamic changes in 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 travel trajectory data, that is, the traffic control measure data fragments corresponding to the accident location and time, and the vehicle travel trajectory data fragments of the affected vehicles during the accident period are associated with each other to comprehensively understand the scope of influence of the accident and the subsequent handling situation.
[0044] The access frequency monitoring module is deployed on each blockchain node and 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 = [c1, c2, …, 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 CPU usage rate CPU u and memory occupancy rate MEM u , and the network condition evaluation indicators include bandwidth utilization rate BW u and 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 influence 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 CPU usage rate in traffic load evaluation. The calculated value of L 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. The described load status includes light load, normal load, and overload, where: when the load L k >L th2 of the node where the hot data fragment is located, 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 the access requests of 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 assessment 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 and network connection status of the nodes. 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 notice U to all blockchain nodes. The notice U contains the identifier ID u , version number V u and the update content summary C u . After receiving the notice, the node looks up 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, it uses the update content C u to update the data fragment and returns the hash value of the updated fragment 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 confirms that the data update is successful and records the new version number and hash value on the block lock. During the data update process, when a node update fails, the smart contract starts a recovery mechanism. It determines the set of failed nodes F = {f1, f2,..., f s} according to the feedback information of the nodes, selects nodes from other successfully updated nodes as data source nodes, and the selected set of data nodes is S = {s1, s2,..., 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, sort the data source nodes according to the size of RTF i . Preferentially transmit the update data from the node with a larger RTF i to the failed node to ensure that the data of all nodes can maintain a consistent updated 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 contains 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 of the user's request, and searches for and obtains relevant data fragments in the blockchain network.
[0050] During the data fragment collection process, 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 into 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) to the nodes of the blockchain for subsequent auditing and analysis.
[0052] In summary, this embodiment elaborates in detail the working principles and implementation processes of each module of the blockchain traffic data access control system. Through the hash value fragmentation and intelligent node selection strategy of the data fragmentation storage module, the secure and efficient storage of data is achieved; the retrieval and recombination module uses smart contracts and data association relationships 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 precise monitoring and judgment of the nodes where the hot data fragments are located, efficient resource allocation and access frequency regulation are achieved, 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 assessment module will continuously collect and analyze the data access and load information of each node. The traffic load assessment module conducts a comprehensive assessment based on the hardware resources and network status indicators of each blockchain node. Among them, the hardware resource assessment indicators include CPU utilization, CPU u , memory usage MEM u , network status evaluation indicators include bandwidth utilization BW u , network delay NET d , for each blockchain node k, its traffic load Here ω1, ω2, ω3, and ω4 are traffic load coefficients, which are used to reflect the influence of each indicator on the node load. Once the node load L k Exceeds 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 builds a node resource and load relationship. For example, there are nodes n1, n2, n3…n in the system. m , for the overloaded node n where the hot data fragment is located h , the smart contract will calculate other nodes’ 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 Sort the deployable nodes by their size, select the appropriate target node from the nodes with the highest sorting, and hThe partial access requests are transferred over. 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 intact 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 strategy. The preset strategy 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 situation of the system. The smart contract continuously monitors the load situation 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 strategy 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 the 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 the token bucket parameters. In this way, the traceability and auditability of the operations are achieved, which is convenient for system administrators to monitor and analyze the running situation 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 of each node 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 the 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 changes or modifications to equivalent embodiments 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 modification, equivalent change and modification 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. The data fragmentation storage module uses a hash value-based fragmentation technology to fragment the traffic data, 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 ), use the hash value range to assign it to different fragment sets F j In which j = 1, 2, ..., m, m is the number of fragment sets, that is, when H(d i )'s first k binary values are 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 Represents 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 reassembly module receives the user's data access request, queries and obtains the corresponding data fragments in the blockchain network through smart contract driving, and uses the data reassembly 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 blockchain for data fragment index information I related to the key information. The index information I contains the storage location information of the data fragments 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 delays and data transmission errors occur, the smart contract automatically obtains the same data fragments 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 blockchain consensus mechanism; 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 delay NET 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 High nodes are used for storage to ensure balanced 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, sequence identifier O and data association relationship A. According to the logical relationship defined in A, the collected data fragments f are reorganized. 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 the continuous time segment are grouped together. The logical relationship is based on the order of the time axis. For traffic flow data fragments of the same period at different monitoring points but within the same road section and area, logical associations are established based on geographic coordinate information so that the dynamic changes in traffic flow in the area can be restored when reassembled; 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 a sliding window to 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 =[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 = (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 timestamp of each access request is recorded. Used to calculate the access time interval, i.e. and For different access orders and Get the time interval The access source information is through the source IP address IP 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 synchronized to other nodes through the consensus mechanism of the 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, and the calculated L k Value and light load threshold L th1 and overload threshold L th2 The comparison is performed to determine the current load status of the node, where the load status 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 high, it is determined to be overloaded. Through smart contract coordination, some access requests are transferred to lightly loaded nodes, and the access frequency of the nodes where the hot data fragments are located is restricted. When the node where the hot data fragment is located is loaded with L k <L th1 When , it is determined to be 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. 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 Summary C 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 update is confirmed to be successful, 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 the 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 their size, i.e. prioritize RTF i The large node transmits updated data to the failed node 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