Block chain-based distributed traffic signal control method and device, and medium

By adopting a distributed control method based on blockchain in the traffic signal control system, the problem of data being easily tampered with in the traditional centralized control mode is solved, and the secure transmission and storage of data is realized, and the reliability and efficiency of the traffic signal system are improved.

CN119992854AActive Publication Date: 2025-05-13JINAN GOLDENWORLD HIGHWAY INDUSTRY DEVELOPMENT CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510449796.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-05-13
Estimated Expiration
2045-04-11

AI Technical Summary

Technical Problem

In the traditional traffic signal control architecture, centralized control mode is mostly adopted, and data is easily tampered with, which affects the planning and scheduling of the entire urban traffic.

Method used

A distributed traffic signal control method based on blockchain is adopted, and by receiving requests from data upload terminals, security value prediction is made, the main node and child nodes are determined, and the traffic signal data is encrypted. A network topology model is built based on the historical data and load data of the blockchain network, the transmission path of encrypted data blocks is planned, and the data is securely transmitted and stored.

Benefits of technology

By predicting security value of data upload terminals, the risk of data being maliciously tampered can be reduced; through the encryption and decentralized storage of blockchain, the security and reliability of data in transmission and storage are ensured, and the transmission efficiency and long-term availability of traffic signal data are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992854A_ABST
    Figure CN119992854A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a distributed traffic signal control method and device based on a block chain and a medium, belongs to the technical field of intelligent traffic, and solves the problem that urban traffic planning and scheduling are affected due to the fact that data in a traditional traffic signal control mode is extremely easy to tamper. Comprising the steps of performing security value prediction on a data uploading terminal; when the security value accords with an adjustment threshold value, determining a main node and sub-nodes in the block chain network, and encrypting traffic signal data corresponding to each node; determining a segmentation factor corresponding to each node, and based on the segmentation factors, dividing the encrypted data of each node into a plurality of encrypted data blocks; constructing a network topology model based on historical traffic signal transmission data corresponding to the block chain network and load data of each node, performing path planning on the plurality of encrypted data blocks, and screening out forwarding nodes in the block chain network; and performing data verification and storage on the received encrypted data block through the forwarding node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent transportation technology, and in particular to a distributed traffic signal control method, device and medium based on blockchain. Background Art

[0002] With the acceleration of urbanization and the increasing traffic volume, the importance of traffic signal systems as key infrastructure to ensure the orderly operation of urban traffic has become increasingly prominent. Traffic signal data covers multi-dimensional information such as signal light status, traffic flow, and vehicle speed. The accuracy and security of these data are directly related to the efficient operation of the traffic system and the safety and convenience of public travel.

[0003] In the traditional traffic signal control architecture, a centralized control mode is mostly used. In this mode, traffic signal data is stored in a central server, which processes data, issues commands, and controls the system. However, in the centralized control mode, data transmission depends on a specific communication link. If the link fails or is interfered with, data transmission will be interrupted, thus affecting the normal operation of the traffic signal system. In addition, since all data is stored in a centralized manner, once the central server is attacked by hackers, malware is invaded, or internal management loopholes occur, the data can be easily tampered with, thus affecting the planning and scheduling of the entire city's traffic. Summary of the invention

[0004] The embodiments of the present application provide a distributed traffic signal control method, device and medium based on blockchain, which are used to solve the following technical problems: In traditional traffic signal control architecture, a centralized control mode is mostly adopted, and data is extremely easy to be tampered with, thereby affecting the planning and scheduling of the entire city's traffic.

[0005] The present application embodiment adopts the following technical solutions: The embodiment of the present application provides a distributed traffic signal control method based on blockchain. It includes receiving a traffic signal storage request sent by a data upload terminal, predicting a security value for the data upload terminal; when the security value meets the adjustment threshold, determining a master node and a child node in the blockchain network, and encrypting the traffic signal data corresponding to the master node and the child node respectively; determining the segmentation factors corresponding to the master node and the child node respectively, and dividing the encrypted data of each node into multiple encrypted data blocks based on the segmentation factors; constructing a network topology model based on the historical traffic signal transmission data corresponding to the blockchain network and the load data of each node, and performing path planning for multiple encrypted data blocks based on the network topology model, so as to screen out forwarding nodes in the blockchain network; performing data verification on the received encrypted data block through the forwarding node, and storing the traffic signal encrypted data corresponding to the encrypted data block if the verification passes.

[0006] The embodiment of the present application can intercept data from unsafe terminals by predicting the security value of the data upload terminal, reduce the possibility of data being maliciously tampered with or injected with risky data from the source, and ensure the security of the entire traffic signal data ecosystem. Secondly, by determining the main node and sub-node in the blockchain network, the traffic signal data is encrypted, making it difficult to steal or crack the data during transmission and storage. A network topology model is constructed based on the historical traffic signal transmission data of the blockchain network and the load data of each node, and the transmission path is planned for the encrypted data block, so that the data can avoid congested nodes and choose the optimal path for transmission, reducing transmission delays and improving the transmission efficiency of data from the upload terminal to the storage node. The embodiment of the present application stores the encrypted traffic signal data in the blockchain network, and utilizes the distributed storage characteristics of the blockchain. The data is dispersed and stored in multiple nodes. Even if some nodes fail, the data can still be obtained from other nodes, improving the reliability of data storage and ensuring the long-term availability of traffic signal data.

[0007] In one implementation of the present application, a traffic signal storage request sent by a data upload terminal is received, and a security value prediction is performed on the data upload terminal, specifically including: obtaining a terminal identifier corresponding to the data upload terminal, and determining the historical upload data in a historical database based on the terminal identifier; aligning the time series data in the historical upload data to extract multidimensional features in the aligned data; wherein the multidimensional features include at least one of the mean, variance, minimum value, and maximum value; inputting the multidimensional features into a preset long short-term memory network to output the time series features corresponding to the data upload terminal through the preset long short-term memory network; classifying the time series features, and determining a classification weight value based on the classification result; and, based on the interval between the current time of receiving the traffic signal storage request and the time of the most recent data upload, determining a time decay factor; and, based on the number and frequency of attacks on the blockchain network within a preset time period, determining a risk control coefficient; and, based on the classification weight value, the security value corresponding to the data upload terminal is determined.

[0008] In one implementation of the present application, based on the classification weight value, the time decay factor and the risk control coefficient, the security value corresponding to the data upload terminal is determined, specifically including: Function-based: ; ; Determine the security value corresponding to the data upload terminal; where, is a safe value; is the classification weight value; is the time decay factor; is the risk adjustment coefficient; is the adjustment function; It is the preset function threshold used to adjust the regulation function.

[0009] In one implementation of the present application, a master node and a child node are determined in a blockchain network, and traffic signal data corresponding to the master node and the child node are encrypted, specifically including: determining a first traffic intersection where a controlled traffic light is located based on the traffic signal data; determining multiple second traffic intersections associated with the first traffic intersection based on a traffic network diagram; constructing a traffic signal set based on traffic signals corresponding to the first traffic intersection and multiple second traffic intersections; determining reference traffic data that periodically appears in the traffic signal set, and encoding and replacing the reference traffic data based on a preset traffic signal dictionary table; wherein the preset traffic signal dictionary table includes multiple reference traffic data, and also includes encodings corresponding to multiple reference traffic data; constructing reference encrypted data based on the replaced encoding and the data in the traffic signal set that has not been replaced; symmetrically encrypting the reference encrypted data through the master node and the child node, and determining the hash values ​​corresponding to each node to encrypt the traffic signal data corresponding to the master node and the child node.

[0010] In one implementation of the present application, the split factors corresponding to the main node and the child node are determined, and based on the split factors, the encrypted data of each node is divided into multiple encrypted data blocks, specifically including: based on the traffic network diagram, determining a first traffic light group whose correlation is greater than a first preset threshold, so as to divide the traffic network diagram into multiple traffic control areas based on the position of the first traffic light group; in the traffic control area, determining a second traffic light group whose correlation is greater than a second preset threshold, so as to divide the traffic control area into multiple traffic control sub-areas based on the position of the second traffic light group; wherein the second preset threshold is greater than the first preset threshold; determining the split factor corresponding to the main node based on the number of traffic control areas, so as to divide the encrypted data corresponding to the main node into multiple encrypted data blocks based on the split factor; and determining the split factor corresponding to the child node based on the number of traffic control sub-areas, so as to divide the encrypted data corresponding to the child node into multiple encrypted data blocks based on the split factor.

[0011] In one implementation of the present application, a network topology model is constructed based on the historical traffic signal transmission data corresponding to the blockchain network and the load data of each node, specifically including: taking each node as a vertex and the connection between the nodes as an edge to construct the topology structure corresponding to the blockchain network; based on the topology structure, determining the historical transmission data between vertex groups with an associated relationship, so as to determine the historical weight value based on the historical transmission data; based on the current load data and network delay data corresponding to the vertex group, obtaining the current weight value of the vertex group; and, inputting the historical transmission data, the current load data and the network delay data into a preset node trend prediction model, and outputting the dynamic change information corresponding to the vertex group based on the preset node trend prediction model, so as to determine the predicted weight value based on the dynamic change information; based on the historical weight value, the current weight value and the predicted weight value, obtaining the reference weight value between the vertex groups; and constructing a network topology model based on the topology structure and the reference weight value corresponding to the blockchain network.

[0012] In one implementation of the present application, path planning is performed on multiple encrypted data blocks based on a network topology model to screen out forwarding nodes in the blockchain network, specifically including: when the traffic signal is an emergency signal, the distance from all nodes to the source node is initialized to infinity, and a node set with an undetermined shortest path is created; in each iteration, a reference node that is closest to the source node and whose load is not greater than a preset load threshold is determined in the node set, and the reference distance from the adjacent node corresponding to the reference node to the source node is updated; if the path to the adjacent node through the reference node is less than the reference distance, the reference node is updated to be a forwarding node of the adjacent node; until the iteration ends, the optimal path is determined in the node set based on the multiple forwarding nodes determined.

[0013] In one implementation of the present application, path planning is performed for multiple encrypted data blocks based on a network topology model to screen out forwarding nodes in the blockchain network, specifically including: when the data volume of the encrypted data block is greater than a preset data volume threshold, determining the number of sub-stream splits based on the data volume corresponding to the data block and the load data corresponding to the blockchain network; splitting the data block into multiple sub-streams based on the number of sub-stream splits; and determining a balanced load path based on the data volumes corresponding to the multiple sub-streams and the data transmission volumes corresponding to each node.

[0014] The embodiment of the present application provides a distributed traffic signal control device based on blockchain, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: receive a traffic signal storage request sent by a data upload terminal, and predict a security value for the data upload terminal; when the security value meets the adjustment threshold, determine a master node and a child node in the blockchain network, and encrypt the traffic signal data corresponding to the master node and the child node respectively; determine the segmentation factors corresponding to the master node and the child node respectively, and based on the segmentation factors, divide the encrypted data of each node into multiple encrypted data blocks; construct a network topology model based on the historical traffic signal transmission data corresponding to the blockchain network and the load data of each node, so as to plan paths for multiple encrypted data blocks respectively based on the network topology model, so as to screen out forwarding nodes in the blockchain network; perform data verification on the received encrypted data blocks through the forwarding nodes, and when the verification passes, store the traffic signal encrypted data corresponding to the encrypted data blocks.

[0015] A non-volatile computer storage medium provided by an embodiment of the present application stores computer executable instructions, and the computer executable instructions are configured to: receive a traffic signal storage request sent by a data upload terminal, and predict a security value for the data upload terminal; when the security value meets an adjustment threshold, determine a master node and a child node in a blockchain network, and encrypt the traffic signal data corresponding to the master node and the child node respectively; determine a segmentation factor corresponding to the master node and the child node respectively, and based on the segmentation factor, divide the encrypted data of each node into a plurality of encrypted data blocks; construct a network topology model based on historical traffic signal transmission data corresponding to the blockchain network and load data of each node, and plan paths for the plurality of encrypted data blocks based on the network topology model, so as to screen out forwarding nodes in the blockchain network; perform data verification on the received encrypted data block through the forwarding node, and when the verification passes, store the traffic signal encrypted data corresponding to the encrypted data block.

[0016] At least one of the above technical solutions adopted in the embodiment of the present application can achieve the following beneficial effects: the embodiment of the present application can intercept data from unsafe terminals by predicting the security value of the data upload terminal, reduce the possibility of data being maliciously tampered with or injected with risky data from the source, and ensure the security of the entire traffic signal data ecosystem. Secondly, by determining the main node and sub-node in the blockchain network, the traffic signal data is encrypted, making it difficult to steal or crack the data during transmission and storage. A network topology model is constructed based on the historical traffic signal transmission data of the blockchain network and the load data of each node, and the transmission path is planned for the encrypted data block, so that the data can avoid congested nodes, select the optimal path for transmission, reduce transmission delay, and improve the transmission efficiency of data from the upload terminal to the storage node. The embodiment of the present application stores the encrypted traffic signal data in the blockchain network, and utilizes the distributed storage characteristics of the blockchain. The data is dispersed and stored in multiple nodes. Even if some nodes fail, the data can still be obtained from other nodes, which improves the reliability of data storage and ensures the long-term availability of traffic signal data. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings: Figure 1 A flow chart of a distributed traffic signal control method based on blockchain provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a distributed traffic signal control device based on blockchain provided in an embodiment of the present application.

[0018] Reference numerals: 200: Distributed traffic signal control device based on blockchain, 201: Processor, 202: Memory. DETAILED DESCRIPTION

[0019] The embodiments of the present application provide a distributed traffic signal control method, device and medium based on blockchain.

[0020] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0021] The technical solution proposed in the embodiment of the present invention is described in detail below with reference to the accompanying drawings.

[0022] Figure 1 A flow chart of a distributed traffic signal control method based on blockchain provided in an embodiment of the present application, such as Figure 1 As shown, the distributed traffic signal control method based on blockchain includes the following steps: Step 101: Receive a traffic signal storage request sent by a data uploading terminal, and perform safety value prediction on the data uploading terminal.

[0023] In one implementation of the present application, a terminal identifier corresponding to a data upload terminal is obtained, and historical upload data is determined in a historical database based on the terminal identifier. The time series data in the historical upload data is aligned to extract multidimensional features in the aligned data; wherein the multidimensional features include at least one of the mean, variance, minimum value, and maximum value. The multidimensional features are input into a preset long short-term memory network to output the time series features corresponding to the data upload terminal through the preset long short-term memory network. The time series features are classified, and a classification weight value is determined based on the classification result. And, based on the interval between the current time of receiving a traffic signal storage request and the time of the most recent data upload, a time decay factor is determined. And, based on the number and frequency of attacks on the blockchain network within a preset time period, a risk control coefficient is determined. Based on the classification weight value, the time decay factor, and the risk control coefficient, a security value corresponding to the data upload terminal is determined.

[0024] Specifically, when the data upload terminal sends a traffic signal storage request, the unique identifier of the terminal is first obtained. According to this identifier, an accurate search is performed in the historical database to locate all data records uploaded by the terminal in the past. The information stored in the historical database includes the content, upload time, data format, etc. of the traffic signal data uploaded by the terminal at different time points. Time series data is determined in the historical data record, and different time series data are adjusted to a comparable time scale through a dynamic time warping algorithm. After alignment, multidimensional features are extracted from these time series data. The extracted multidimensional features are input into a preset long short-term memory network. The memory unit in the network can remember important information in the past, and is updated and adjusted according to the current input, and the time series feature representation corresponding to the data upload terminal is output. The training process of the preset long short-term memory network is to take the data sample corresponding to the historical data upload terminal as input, and take the time series feature corresponding to the input sample as output sample to train the preset model to obtain the preset long short-term memory network.

[0025] Furthermore, the time series features of the preset long short-term memory network output are classified, and they are divided into different categories according to the historical behavior patterns of the terminal, such as security category, suspicious category, dangerous category, etc. The classification weight value is determined according to the category to which it belongs. The weight value corresponding to the security category is higher, and the weight value corresponding to the dangerous category is lower. The time decay factor reflects the impact of the time interval between the current time and the last data upload on the terminal security assessment. The shorter the interval, the more the recent behavior of the terminal can reflect the current state, and the time decay factor is closer to 1; the longer the interval, the smaller the impact, and the time decay factor is closer to 0. The risk control coefficient is determined based on the number and frequency of attacks on the blockchain network within a preset time period. The more attacks and the higher the frequency, the greater the overall risk of the network and the greater the risk control coefficient. The security value of the data upload terminal is determined by combining the classification weight value, the time decay factor and the risk control coefficient.

[0026] Specifically, based on the function: ; ; Determine the security value corresponding to the data upload terminal; where, is a safe value; is the classification weight value; is the time decay factor; is the risk adjustment coefficient; is the adjustment function; It is the preset function threshold used to adjust the regulation function.

[0027] Step 102: When the security value meets the adjustment threshold, the master node and the sub-node are determined in the blockchain network, and the traffic signal data corresponding to the master node and the sub-node are encrypted.

[0028] In one implementation of the present application, a first traffic intersection where a controlled traffic light is located is determined based on traffic signal data. Based on a traffic network diagram, multiple second traffic intersections that are associated with the first traffic intersection are determined. A traffic signal set is constructed based on the traffic signals corresponding to the first traffic intersection and the multiple second traffic intersections, respectively. Reference traffic data that periodically appears in the traffic signal set is determined, and based on a preset traffic signal dictionary table, the reference traffic data is encoded and replaced; wherein the preset traffic signal dictionary table includes multiple reference traffic data, and also includes multiple codes corresponding to the reference traffic data, respectively. Based on the replaced codes and the data in the traffic signal set that has not been replaced, reference encrypted data is constructed. The reference encrypted data is symmetrically encrypted through the main node and the child node, and the hash values ​​corresponding to each node are determined to encrypt the traffic signal data corresponding to the main node and the child node, respectively.

[0029] Specifically, traffic signal data includes information about the status of traffic lights, control instructions, etc. Through traffic signal data, the specific geographical location of the controlled traffic lights, i.e., the first traffic intersection, can be clearly identified. The traffic network diagram is a digital representation of the layout of urban traffic roads and the connection relationship between intersections. From the diagram, multiple second traffic intersections directly or indirectly connected to the first traffic intersection can be determined. There are correlations between these intersections, such as traffic flow interaction and signal light timing coordination. The traffic signal data corresponding to the first traffic intersection and multiple second traffic intersections are integrated to form a set, i.e., a traffic signal set, which covers the traffic signal status of multiple intersections at the same time or in a similar time period.

[0030] Furthermore, in the traffic signal set, a time series analysis method is used to find data patterns that appear periodically and repeatedly. These patterns reflect the regular changes of traffic signals during the normal operation cycle and are determined as reference traffic data. The preset traffic signal dictionary table in the embodiment of the present application is a pre-built mapping table, in which each reference traffic data corresponds to a unique code. Through the dictionary table, the reference traffic data is replaced with the corresponding code, which can compress the data volume, improve the efficiency of subsequent data processing and transmission, and enhance the confidentiality of the data to a certain extent.

[0031] Furthermore, the coded data after coding replacement is combined with other data in the traffic signal set that has not been replaced to form reference encrypted data. The master node and the sub-node are responsible for data processing and transmission in the blockchain network. The reference encrypted data is encrypted using a symmetric encryption algorithm. Specifically, the symmetric encryption algorithm uses the same key to encrypt and decrypt the data. During the encryption process, the master node and the sub-node use the shared key to encrypt the data and generate a ciphertext. At the same time, in order to ensure the integrity and traceability of the data, each node calculates a hash value for the encrypted data. By comparing the hash value, it can be determined whether the data has been tampered with during transmission or storage.

[0032] Step 103: Determine the segmentation factors corresponding to the master node and the child node respectively, and divide the encrypted data of each node into multiple encrypted data blocks based on the segmentation factors.

[0033] In one implementation of the present application, based on a traffic network diagram, a first traffic light group having a correlation greater than a first preset threshold is determined, so as to divide the traffic network diagram into multiple traffic control areas based on the location of the first traffic light group. In the traffic control area, a second traffic light group having a correlation greater than a second preset threshold is determined, so as to divide the traffic control area into multiple traffic control sub-areas based on the location of the second traffic light group; wherein the second preset threshold is greater than the first preset threshold. Based on the number of traffic control areas, a segmentation factor corresponding to the main node is determined, so as to divide the encrypted data corresponding to the main node into multiple encrypted data blocks based on the segmentation factor. And, based on the number of traffic control sub-areas, a segmentation factor corresponding to the child node is determined, so as to divide the encrypted data corresponding to the child node into multiple encrypted data blocks based on the segmentation factor.

[0034] Specifically, the nodes in the traffic network diagram represent traffic light groups, and the edges represent the correlation between the traffic light groups, wherein the correlation can be quantified based on factors such as traffic flow, geographical distance, and coordination of traffic light timing. By setting a first preset threshold, traffic light groups with a correlation greater than the threshold are screened out. These traffic light groups have a greater impact on each other during traffic operation, forming a closely related whole, namely, the first traffic light group. In each traffic control area, the correlation between the traffic light groups is further analyzed. Since the number of traffic light groups in the traffic control area is relatively small and the relationship between them is closer, a higher second preset threshold is set to screen out traffic light groups with stronger correlation, namely, the second traffic light group. Based on the locations of these traffic light groups, the traffic control area is divided again to form multiple traffic control sub-areas.

[0035] Furthermore, the master node is responsible for managing and processing the data of the entire traffic control area, while the child node processes the data of the traffic control sub-area. The segmentation factor is used to determine how many encrypted data blocks the encrypted data is divided into, and its value is related to the number of traffic control areas or traffic control sub-areas. For the master node, the more traffic control areas there are, the more dispersed the data that needs to be processed. In order to better manage and transmit data, the encrypted data corresponding to the master node is divided into a corresponding number of encrypted data blocks according to the number of traffic control areas. Similarly, the child node determines the segmentation factor according to the number of traffic control sub-areas and divides the corresponding encrypted data blocks.

[0036] Step 104: Based on the historical traffic signal transmission data corresponding to the blockchain network and the load data of each node, a network topology model is constructed to plan paths for multiple encrypted data blocks based on the network topology model, so as to screen out forwarding nodes in the blockchain network.

[0037] In one implementation of the present application, each node is taken as a vertex, and the connection between the nodes is taken as an edge to construct a topological structure corresponding to the blockchain network. Based on the topological structure, the historical transmission data between the vertex groups with an associated relationship is determined to determine the historical weight value based on the historical transmission data. Based on the current load data and network delay data corresponding to the vertex group, the current weight value of the vertex group is obtained. In addition, the historical transmission data, the current load data and the network delay data are input into a preset node trend prediction model, and based on the preset node trend prediction model, the dynamic change information corresponding to the vertex group is output to determine the predicted weight value based on the dynamic change information. Based on the historical weight value, the current weight value and the predicted weight value, the reference weight value between the vertex groups is obtained. Based on the topological structure and reference weight value corresponding to the blockchain network, a network topology model is constructed.

[0038] Specifically, in the blockchain network, each participating node, such as a signal machine in a traffic signal system, a data transmission terminal, etc., is regarded as a vertex, and the connection between nodes for data transmission is regarded as an edge. In this way, the node connection relationship of the blockchain network is presented in the form of a graph to form a topological structure.

[0039] Further, for the vertex groups with associated relationships, historical transmission data in the past period of time is obtained, including information such as the amount of data transmitted, transmission time, number of successful transmissions, number of failed transmissions, etc. The historical weight value that can reflect the historical transmission efficiency and stability between vertex groups is determined through the historical transmission data. For example, if a vertex group has frequently experienced data transmission delays or packet loss in history, then its historical weight value is relatively low, indicating that the reliability of data transmission through the vertex group is poor. Secondly, the current load data corresponding to the vertex group is obtained in real time, including the CPU usage rate, memory occupancy rate, network bandwidth occupancy of the node, etc., as well as network delay data, that is, the time required for data to be transmitted from one node to another. Combining these current state data, the current weight value of the vertex group is determined. The current weight value of the vertex group with high current load or large network delay will be reduced accordingly. In addition, the collected historical transmission data, current load data and network delay data are input into a pre-trained node trend prediction model. The node trend prediction model in the embodiment of the present application is constructed based on a machine learning algorithm recurrent neural network, which can learn the time series characteristics and trend relationships in the data. The node trend prediction model outputs dynamic change information corresponding to the vertex group by analyzing and processing the input data, such as predicting the load change trend and network delay change trend of the vertex group in the future. Based on this dynamic change information, the prediction weight value is determined, which reflects the quality of the future transmission performance of the vertex group predicted based on current and historical data.

[0040] Furthermore, the historical weight values, current weight values, and predicted weight values ​​are comprehensively considered, and weight calculation is performed by presetting weight coefficients to obtain reference weight values ​​between vertex groups. Different weight values ​​reflect the transmission performance of vertex groups in different time dimensions and states. By reasonably integrating this information, the transmission quality and reliability between vertex groups can be evaluated more comprehensively and accurately. Based on the previously constructed blockchain network topology, the calculated reference weight values ​​are assigned to the corresponding edges. In the topology, each edge not only represents the connection relationship between nodes, but also reflects the comprehensive performance of data transmission between nodes through the weight of the edge.

[0041] In one implementation of the present application, when the traffic signal is an emergency signal, the distances from all nodes to the source node are initialized to infinity, and a node set whose shortest path is not determined is created. In each iteration, a reference node that is closest to the source node and whose load is not greater than a preset load threshold is determined in the node set, and the reference distance from the adjacent node corresponding to the reference node to the source node is updated. If the path from the reference node to the adjacent node is less than the reference distance, the reference node is updated to be a forwarding node of the adjacent node. Until the iteration ends, the optimal path is determined in the node set based on the multiple forwarding nodes determined.

[0042] Specifically, when a traffic signal is detected as an emergency signal, in order to find the fastest transmission path from the source node, that is, the node that sends the emergency signal, to all other nodes, the relevant parameters are first initialized. The distances from all nodes to the source node are initialized to infinity, because before the calculation begins, the actual distances between these nodes and the source node are not known. At the same time, a node set with an undetermined shortest path is created. This set contains all nodes except the source node. Subsequently, the nodes closest to the source node will be gradually screened out from this set and their shortest paths will be determined.

[0043] Furthermore, in each iteration, it is necessary to find a node that is closest to the source node and whose load is not greater than a preset load threshold in the set of nodes for which the shortest path has not been determined, and use it as a reference node. The load of a node can be measured by indicators such as its CPU usage, memory occupancy, and network bandwidth occupancy. The preset load threshold is a standard value pre-set based on the hardware performance of the node and the network transmission capability to ensure that the selected node has sufficient resources to process and forward emergency signal data, and to avoid data transmission delays or losses due to excessive node load. After finding the reference node, update the reference distance from the adjacent node corresponding to the reference node to the source node. The reference distance in the embodiment of the present application refers to the estimated distance from the source node through the reference node to the adjacent node.

[0044] For example, suppose that in a city's traffic signal blockchain network, there are nodes A, B, C, D, and E, where node A is the source node. At this time, an emergency traffic signal is detected to be sent from node A. The distances from nodes B, C, D, and E to node A are initialized to infinity, which can be expressed as B (∞), C (∞), D (∞), and E (∞). Then create a node set S = {B, C, D, E} with an undetermined shortest path. In the first iteration, the nodes in the set S are evaluated. Assume that the load of node B is 60% CPU usage, 50% memory usage, and 40% network bandwidth usage. The preset load threshold is 70% CPU usage, 60% memory usage, and 50% network bandwidth usage. The load of node B does not exceed the threshold. By calculating, the distance from node B to the source node A is 10, while the distances from nodes C, D, and E to the source node A are still infinite under the current estimate. So node B is selected as the reference node. The neighboring nodes of node B are C and D. Update the reference distances of nodes C and D to source node A. Assume that the distance from node A to node B is 10, the distance from node B to node C is 5, and the distance from node B to node D is 3. Then the reference distance from node C to source node A through node B is updated to 10 + 5 = 15, and the reference distance from node D to source node A through node B is updated to 10 + 3 = 13. At this time, nodes C (15), D (13), and E (∞).

[0045] Furthermore, after updating the reference distance of the adjacent node, it is necessary to determine whether the path from the reference node to the adjacent node is less than the previously recorded reference distance. If so, the reference node is updated to be the forwarding node of the adjacent node. This means that a shorter path from the source node to the adjacent node has been found, and subsequent emergency signal data will be transmitted through this new forwarding node to improve transmission efficiency. Continue the above iterative process, and continuously update the reference node, the reference distance of the adjacent node, and the forwarding node. Until the set of nodes for which the shortest path has not been determined is empty, that is, the shortest paths of all nodes have been determined. At this point, based on the multiple forwarding nodes that have been determined, the optimal path from the source node to each node can be constructed. These optimal paths take into account the load conditions of the nodes, and can ensure the rapid transmission of emergency signals while avoiding the impact of node overload on the transmission effect.

[0046] In one implementation of the present application, when the data volume of the encrypted data block is greater than a preset data volume threshold, the number of sub-stream splits is determined based on the data volume corresponding to the data block and the load data corresponding to the blockchain network. The data block is split into multiple sub-streams based on the number of sub-stream splits. Based on the data volumes corresponding to the multiple sub-streams and the data transmission volumes corresponding to each node, a balanced load path is determined.

[0047] Specifically, when transmitting encrypted data blocks in a blockchain network, the data volume of the data block must first be evaluated. When the data volume of an encrypted data block is greater than the preset data volume threshold, it means that if the data block is not specially processed, it may bring a large load pressure to the nodes in the network, affecting the data transmission efficiency and even causing network congestion.

[0048] The load data of the blockchain network includes the current CPU usage, memory usage, network bandwidth usage, etc. of each node. By analyzing these load data, we can understand the current busyness of the network. At the same time, combined with the data volume of the data block, determine the appropriate number of sub-stream splits. The number of splits is determined based on the remaining processing capacity of the nodes in the network and the size of the data block. The purpose is to reasonably split the large data block into multiple smaller sub-streams so that it can be transmitted more evenly in the network and avoid overload of a single node due to processing too much data.

[0049] Further, based on the determined number of sub-stream splits, the original encrypted data block is split into multiple sub-streams according to certain rules. The splitting rules can be determined according to factors such as the structure and data type of the data block. For example, if the data block is traffic signal data arranged in time series, it can be evenly split according to the time sequence; if it is traffic signal parameter data of different types, it can be grouped and split according to the parameter type. Each sub-stream after splitting contains part of the information of the original data block, and the data volume of these sub-streams is relatively small, which is more suitable for distributed transmission in the network. Further, determining the balanced load path requires considering the data volume corresponding to multiple sub-streams and the data transmission volume corresponding to each node. The data transmission volume of each node can be obtained by monitoring the amount of data transmitted by the node within a period of time. By analyzing these data, a transmission path that can make the network load as balanced as possible is selected for each sub-stream. When selecting a path, nodes with low current load and sufficient remaining transmission capacity will be preferentially selected to form a transmission path, avoiding the distribution of multiple sub-streams to a few high-load nodes, thereby achieving load balancing of the entire network.

[0050] Step 105: The forwarding node performs data verification on the received encrypted data block, and if the verification passes, the traffic signal encrypted data corresponding to the encrypted data block is stored.

[0051] In one implementation of the present application, after receiving the encrypted data block, the forwarding node first performs integrity verification. This is usually achieved through a hash algorithm, such as using the SHA-256 hash function. At the data sending end, when the original traffic signal encrypted data is encapsulated into an encrypted data block, its hash value is calculated and the hash value is transmitted together with the data block. After receiving the data block, the forwarding node recalculates the hash value of the data block content, and then compares the calculation result with the received hash value. If the two are consistent, it means that the data has not been tampered with during the transmission process and the integrity is guaranteed; if they are inconsistent, it means that the data may have been destroyed or tampered with, and the data block will be marked as invalid. In addition to integrity verification, the forwarding node also needs to verify the legitimacy of the source of the data. In the blockchain network, each node has its unique identifier and public-private key pair. When sending the encrypted data block, the data sender will use its own private key to sign the data block. After receiving the data block, the forwarding node verifies the signature using the public key of the sender. If the signature verification passes, it means that the data does come from the sending node; conversely, if the signature verification fails, the forwarding node will refuse to receive the data block to prevent malicious nodes from forging data and entering the blockchain network.

[0052] Furthermore, once the encrypted data block passes the above verifications, the forwarding node needs to determine the storage location of the data. In a blockchain network, data is usually stored in a distributed manner. The forwarding node will determine whether to store the data in a local storage device or forward it to other specific nodes for storage based on the storage rules of the blockchain and its own node role. For example, if the forwarding node is a storage node and has sufficient local storage resources, it may store the data directly locally; if the forwarding node is only an intermediate forwarding role, it will select a suitable storage node for data forwarding based on the topological structure of the blockchain network and the distribution of storage nodes.

[0053] Furthermore, after storing the encrypted traffic signal data corresponding to the encrypted data block, the forwarding node will record the relevant storage information on the blockchain. This includes the unique identifier of the data block, storage time, storage location, etc. At the same time, in order to facilitate the query and retrieval of subsequent data, the forwarding node will establish a corresponding data index. The index can be constructed based on certain key features of the data block, such as the timestamp of the traffic signal data, the intersection logo, etc. Through the index, when it is necessary to query specific traffic signal data, the location where the data is stored can be quickly located, thereby improving data access efficiency.

[0054] Figure 2 A schematic diagram of the structure of a distributed traffic signal control device based on blockchain provided in an embodiment of the present application. Figure 2As shown, a distributed traffic signal control device 200 based on blockchain includes: at least one processor 201; and a memory 202 communicatively connected to the at least one processor 201; wherein the memory 202 stores instructions executable by the at least one processor 201, and the instructions are executed by the at least one processor 201 so that the at least one processor 201 can: receive a traffic signal storage request sent by a data upload terminal, and perform a security value prediction on the data upload terminal; when the security value meets the adjustment threshold, determine the master node and the child node in the blockchain network, and encrypt the traffic signal data corresponding to the master node and the child node respectively; determine the segmentation factors corresponding to the master node and the child node respectively, and divide the encrypted data of each node into multiple encrypted data blocks based on the segmentation factors; construct a network topology model based on the historical traffic signal transmission data corresponding to the blockchain network and the load data of each node, so as to perform path planning for multiple encrypted data blocks respectively based on the network topology model, so as to screen out forwarding nodes in the blockchain network; perform data verification on the received encrypted data block through the forwarding node, and store the traffic signal encrypted data corresponding to the encrypted data block if the verification passes.

[0055] A non-volatile computer storage medium provided by an embodiment of the present application stores computer executable instructions, and the computer executable instructions are configured to: receive a traffic signal storage request sent by a data upload terminal, and predict a security value for the data upload terminal; when the security value meets an adjustment threshold, determine a master node and a child node in a blockchain network, and encrypt the traffic signal data corresponding to the master node and the child node respectively; determine a segmentation factor corresponding to the master node and the child node respectively, and based on the segmentation factor, divide the encrypted data of each node into a plurality of encrypted data blocks; construct a network topology model based on historical traffic signal transmission data corresponding to the blockchain network and load data of each node, and plan paths for the plurality of encrypted data blocks based on the network topology model, so as to screen out forwarding nodes in the blockchain network; perform data verification on the received encrypted data block through the forwarding node, and when the verification passes, store the traffic signal encrypted data corresponding to the encrypted data block.

[0056] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0057] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and changes. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims

1. A distributed traffic signal control method based on blockchain, characterized in that: The method comprises: Receiving a traffic signal storage request sent by a data uploading terminal, and performing safety value prediction on the data uploading terminal; When the security value meets the adjustment threshold, a master node and a sub-node are determined in the blockchain network, and traffic signal data corresponding to the master node and the sub-node are encrypted respectively; Determine the segmentation factors corresponding to the master node and the child node respectively, and divide the encrypted data of each node into a plurality of encrypted data blocks based on the segmentation factors; Based on the historical traffic signal transmission data corresponding to the blockchain network and the load data of each node, a network topology model is constructed to respectively perform path planning for the plurality of encrypted data blocks based on the network topology model, so as to screen out forwarding nodes in the blockchain network; The received encrypted data block is verified by the forwarding node, and if the verification is passed, the traffic signal encrypted data corresponding to the encrypted data block is stored.

2. A distributed traffic signal control method based on blockchain according to claim 1, characterized in that: The receiving a traffic signal storage request sent by a data uploading terminal and performing safety value prediction on the data uploading terminal specifically includes: Acquire a terminal identifier corresponding to the data uploading terminal, and determine historical uploaded data in a historical database based on the terminal identifier; Performing alignment processing on the time series data in the historical uploaded data to extract multidimensional features from the aligned data; wherein the multidimensional features include at least one of a mean, a variance, a minimum value, and a maximum value; Inputting the multidimensional features into a preset long short-term memory network, so as to output the time series features corresponding to the data uploading terminal through the preset long short-term memory network; Classifying the time series features, and determining classification weight values ​​based on the classification results; and, determining a time decay factor based on an interval between a current time of receiving the traffic signal storage request and a time of a most recent data upload; And, based on the number and frequency of attacks on the blockchain network within a preset time period, determine the risk control coefficient; Based on the classification weight value, the time decay factor and the risk control coefficient, a security value corresponding to the data upload terminal is determined.

3. A distributed traffic signal control method based on blockchain according to claim 2, characterized in that: The determining, based on the classification weight value, the time attenuation factor and the risk control coefficient, a security value corresponding to the data upload terminal specifically includes: Function-based: ; ; Determining a security value corresponding to the data uploading terminal; in, is a safe value; is the classification weight value; is the time decay factor; is the risk adjustment coefficient; is the adjustment function; is a preset function threshold used to adjust the regulation function.

4. A distributed traffic signal control method based on blockchain according to claim 1, characterized in that: The determining of the master node and the sub-node in the blockchain network and encrypting the traffic signal data corresponding to the master node and the sub-node respectively specifically includes: Determining, based on the traffic signal data, a first traffic intersection where the controlled traffic light is located; Based on the traffic network diagram, determining a plurality of second traffic intersections associated with the first traffic intersection; constructing a traffic signal set based on the traffic signals corresponding to the first traffic intersection and the plurality of the second traffic intersections respectively; Determine reference traffic data that periodically appears repeatedly in the traffic signal set, and replace the reference traffic data with codes based on a preset traffic signal dictionary table; wherein the preset traffic signal dictionary table includes a plurality of reference traffic data, and also includes a plurality of codes corresponding to the reference traffic data; constructing reference encrypted data based on the replaced code and the unreplaced data in the traffic signal set; The reference encrypted data is symmetrically encrypted through the master node and the child node, and the hash value corresponding to each node is determined to encrypt the traffic signal data corresponding to the master node and the child node respectively.

5. A distributed traffic signal control method based on blockchain according to claim 1, characterized in that: The determining of the segmentation factors corresponding to the master node and the child node respectively, and dividing the encrypted data of each node into a plurality of encrypted data blocks based on the segmentation factors, specifically includes: Based on the traffic network diagram, determining a first traffic light group whose correlation is greater than a first preset threshold, so as to divide the traffic network diagram into a plurality of traffic control areas based on the position of the first traffic light group; In the traffic control area, determining a second traffic light group whose correlation is greater than a second preset threshold, so as to divide the traffic control area into a plurality of traffic control sub-areas based on the position of the second traffic light group; wherein the second preset threshold is greater than the first preset threshold; Determine a segmentation factor corresponding to the master node based on the number of the traffic control areas, so as to divide the encrypted data corresponding to the master node into a plurality of encrypted data blocks based on the segmentation factor; And, a segmentation factor corresponding to the sub-node is determined based on the number of the traffic control sub-areas, so as to divide the encrypted data corresponding to the sub-node into a plurality of encrypted data blocks based on the segmentation factor.

6. A distributed traffic signal control method based on blockchain according to claim 1, characterized in that: The network topology model is constructed based on the historical traffic signal transmission data corresponding to the blockchain network and the load data of each node, specifically including: Taking each node as a vertex and the connection between nodes as an edge, a topological structure corresponding to the blockchain network is constructed; Based on the topological structure, determining historical transmission data between vertex groups having an associated relationship, so as to determine a historical weight value based on the historical transmission data; Based on the current load data and network delay data corresponding to the vertex group, obtain the current weight value of the vertex group; And, inputting the historical transmission data, the current load data and the network delay data into a preset node trend prediction model, and outputting dynamic change information corresponding to the vertex group based on the preset node trend prediction model, so as to determine a prediction weight value based on the dynamic change information; Based on the historical weight value, the current weight value and the predicted weight value, obtaining a reference weight value between the vertex groups; Based on the topological structure corresponding to the blockchain network and the reference weight value, the network topology model is constructed.

7. A distributed traffic signal control method based on blockchain according to claim 1, characterized in that: The performing path planning for the plurality of encrypted data blocks based on the network topology model to screen out forwarding nodes in the blockchain network specifically includes: In the case where the traffic signal is an emergency signal, the distances from all nodes to the source node are initialized to be infinite, and a node set with an undetermined shortest path is created; In each iteration, a reference node which is closest to the source node and whose load is not greater than a preset load threshold is determined in the node set, and a reference distance from an adjacent node corresponding to the reference node to the source node is updated; If the path from the reference node to the adjacent node is less than the reference distance, updating the reference node as a forwarding node for the adjacent node; Until the iteration ends, an optimal path is determined in the node set based on the determined multiple forwarding nodes.

8. The distributed traffic signal control method based on blockchain according to claim 1 is characterized in that: The performing path planning for the plurality of encrypted data blocks based on the network topology model to screen out forwarding nodes in the blockchain network specifically includes: When the data volume of the encrypted data block is greater than a preset data volume threshold, the number of sub-stream splits is determined based on the data volume corresponding to the data block and the load data corresponding to the blockchain network; Splitting the data block into a plurality of sub-streams based on the sub-stream splitting number; A load balancing path is determined based on the data volumes respectively corresponding to the multiple sub-flows and the data transmission volumes respectively corresponding to the nodes.

9. A distributed traffic signal control device based on blockchain, characterized in that: The device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the method according to any one of claims 1 to 8.

10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions can execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Block chain data management method and system

    CN115134169A

  • Urban road traffic flow state estimation method and system based on block chain

    CN117671961A

  • Urban traffic planning method and device based on digital twinning and medium

    CN117854286A

  • Smart city intelligent traffic management and control system and method based on 5G

    CN118470991A

  • Tunnel traffic intelligent management and control method and device based on holographic perception and medium

    CN118609368A