Intelligent parking lot data acquisition control device and control method thereof
By integrating multi-frame image streams and geomagnetic induction waveforms in a smart parking lot, vehicle feature fingerprints are generated and encrypted. Combined with blockchain technology and smart contracts, the data fusion, privacy protection, and security issues of existing systems are solved, achieving efficient and secure parking lot management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHONGHUI DATONG TECH CO LTD
- Filing Date
- 2026-05-28
- Publication Date
- 2026-07-24
AI Technical Summary
Existing smart parking management systems rely on license plate recognition technology, which is easily affected by environmental factors and lacks multi-source data fusion, privacy protection, and fine-grained access control, resulting in insufficient recognition accuracy and security, and making it difficult to guarantee the authenticity and credibility of the data.
By acquiring multi-frame image streams and geomagnetic induction waveforms, the dense optical flow algorithm is used to extract the three-dimensional motion trajectory tensor and frequency domain feature vector. Combined with bilinear pooling neural networks, vehicle feature fingerprints are generated. Logistic chaotic mapping and ciphertext policy attribute base encryption algorithms are used for data desensitization and encryption. Finally, the practical Byzantine fault-tolerant consensus protocol and smart contracts of blockchain are used to achieve reliable data storage and hardware control.
It achieves efficient fusion of multi-dimensional sensing data, has advanced privacy encryption strategies to ensure the immutability and traceability of data, enhances the security and operational efficiency of the parking management system, and prevents malicious replay attacks.
Smart Images

Figure CN122313709B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of control, and in particular relates to a smart parking lot data acquisition and control device and its control method. Background Technology
[0002] Traditional smart parking management systems rely on license plate recognition or radio frequency identification (RFID) technology to manage vehicle entry and exit. These systems typically use cameras to capture vehicle images for character recognition or utilize short-range wireless communication to detect tags, comparing the results with local or cloud databases to control the gate opening. Data collection methods are relatively limited, and over-reliance on static image recognition makes them susceptible to environmental factors such as lighting, weather, and occlusion. Furthermore, they struggle to defend against fraudulent activities like license plate forgery, resulting in insufficient accuracy and security. Data storage often employs a centralized architecture, with critical data such as parking records and billing information stored on the operator's private servers. This not only exposes them to single points of failure and data breaches but also makes them highly vulnerable to malicious tampering. In the event of parking disputes or audits, the lack of immutable third-party evidence makes it difficult to guarantee the authenticity and credibility of the data, leading to a lack of trust between car owners and management.
[0003] Uploading raw parking data to the blockchain risks compromising user privacy, while simply uploading hash values fails to meet the demands of multi-dimensional feature verification. Existing solutions lack mechanisms for fusing and desensitizing multi-source sensor data, making it impossible to generate vehicle fingerprints that are both unique and privacy-protecting. Currently, there is a lack of tight linkage between on-chain data and off-chain hardware control; most systems use the blockchain merely as a post-event recording tool rather than directly driving hardware devices using smart contracts and consensus mechanisms, leaving the risk of discrepancies between records and actual data remaining. Furthermore, achieving fine-grained access control based on attributes and a zero-knowledge proof mechanism that allows for verification while ensuring data integrity remains a critical technical challenge in the smart parking field. Therefore, a smart parking data collection and control method is urgently needed that can integrate multi-dimensional sensor data, employ advanced privacy encryption strategies, and enable closed-loop hardware control through on-chain contracts. Summary of the Invention
[0004] This invention proposes a smart parking lot data acquisition and control device to address the problem that existing technologies struggle to integrate multi-dimensional sensing data, possess advanced privacy encryption strategies, and enable closed-loop hardware control via on-chain contracts. The device comprises the following modules:
[0005] The acquisition module is used to acquire a multi-frame image stream and geomagnetic induction waveform of the vehicle entry process by an acquisition terminal deployed at the entrance of the parking lot; extract a three-dimensional motion trajectory tensor from the multi-frame image stream using a dense optical flow algorithm, and convert the geomagnetic induction waveform into a frequency domain feature vector; input the three-dimensional motion trajectory tensor and the frequency domain feature vector into a preset bilinear pooling neural network for fusion calculation, and output a feature fingerprint vector that maps the vehicle entry event. The generation module is used to generate a random key stream using a preset Logistic chaotic mapping system, perform an XOR operation on the feature fingerprint vector to obtain desensitized data, and encrypt the desensitized data using a ciphertext policy attribute base encryption algorithm according to the parking area location attribute and the current time slot attribute to generate a transaction payload. A construction module is used to construct an on-chain request containing the transaction payload and a zero-knowledge proof of data integrity, and broadcast it to the verification nodes in the blockchain network; the verification nodes use a practical Byzantine fault-tolerant consensus protocol to sort and verify the on-chain request; after successful verification, the transaction payload is packaged into a new block and linked to the distributed ledger; The execution module is used to monitor the block height update status of the distributed ledger by smart contracts deployed on the chain and automatically trigger the verification process; while maintaining the encrypted state of the transaction payload, it verifies the reliability of the zero-knowledge proof of data integrity; if the verification result is true, the smart contract updates the on-chain parking space state machine and broadcasts the access permission event; after the IoT gateway detects the access permission event, it generates a hardware driver instruction containing a timed digital signature and sends it to the gate controller to execute the lifting action.
[0006] Preferably, the step of extracting the three-dimensional motion trajectory tensor from the multi-frame image stream using a dense optical flow algorithm includes: Calculate the displacement vectors of pixels in the current frame and the previous frame in a multi-frame image stream, and obtain the horizontal and vertical velocity components of each pixel. The horizontal and vertical velocity components are used as two channels to generate a two-dimensional optical flow feature map. By stacking the two-dimensional optical flow feature maps of N consecutive frames in chronological order, a three-dimensional motion trajectory tensor is constructed, consisting of the N-frame time span, image height H, image width W, and two channel dimensions.
[0007] Preferably, converting the geomagnetic induction waveform into a frequency domain feature vector includes: A Hanning window function is applied to the time-series data of the geomagnetic induction waveform to reduce spectral leakage; The windowed time series data is converted into a frequency domain signal using the Fast Fourier Transform algorithm; Calculate the amplitude spectrum of the frequency domain signal, and select a fixed number of amplitude values of the first K frequency points in ascending order of frequency to form the frequency domain feature vector.
[0008] Preferably, the step of fusing the three-dimensional motion trajectory tensor and the frequency domain feature vector into a preset bilinear pooling neural network to output a feature fingerprint vector mapping the vehicle entry event includes: The spatial feature map of the three-dimensional motion trajectory tensor is extracted using the first branch of the convolutional neural network. A one-dimensional feature vector of the frequency domain feature vector is extracted using a fully connected neural network branch. The spatial feature map is multiplied by the one-dimensional feature vector in the channel dimension to obtain a bilinear feature matrix. The bilinear feature matrix is subjected to global average pooling and L2 normalization to output the feature fingerprint vector.
[0009] Preferably, the step of generating a random key stream using a preset Logistic chaotic mapping system includes: Set the initial state values and control parameters for the Logistic mapping; A continuous chaotic sequence of floating-point numbers is generated using an iterative formula. Each floating-point number in the chaotic sequence of floating-point numbers is mapped to an integer between 0 and 255; The integers are converted into 8-bit binary codes and concatenated in the order of generation to form a binary random key stream.
[0010] Preferably, the step of encrypting the de-identified data using a ciphertext policy attribute-based encryption algorithm to generate a transaction payload, based on the parking area location attributes and the current time slot attributes, includes: Define an access control tree structure, and map the parking area location attribute and the current time slot attribute to the leaf nodes of the access control tree respectively; Choose a polynomial for each node of the access control tree, where the constant term of the root node polynomial is associated with a secret fragment of the master key; The ciphertext component is calculated using the attribute parameters corresponding to the leaf nodes and the secret fragmentation. The de-identified data, access control tree structure, and ciphertext components are combined to generate the transaction payload.
[0011] Preferably, the verification node uses a practical Byzantine fault-tolerant consensus protocol to sort and verify the on-chain requests, including: The master node will broadcast a pre-prepared message containing the on-chain request to all slave nodes; After verifying the validity of the pre-prepared message signature, the slave node broadcasts the prepared message to other nodes; Once a node has collected preparation messages from more than two-thirds of the total number of nodes in the network, it broadcasts the commit message to other nodes. Once a node collects submission messages from more than two-thirds of the total number of nodes in the entire network, it confirms that the consensus verification for the on-chain request has been completed.
[0012] Preferably, after the IoT gateway detects the access permission event, it generates hardware driver instructions containing a time-limited digital signature, including: The IoT gateway obtains the current system time's UTC timestamp and the transaction hash value of the access permission event; Construct an instruction string that includes the instruction code, device ID, the UTC timestamp, and the transaction hash value; The hash digest of the instruction string is calculated using the SHA-256 algorithm; The security module built into the IoT gateway is invoked, and a digital signature is generated by asymmetric encryption of the hash digest using a pre-stored private key; The digital signature is appended to the end of the instruction string to form the hardware driver instruction.
[0013] Furthermore, the present invention also relates to a smart parking lot data acquisition and control method, comprising the following steps: A data acquisition terminal deployed at the entrance of a parking lot acquires a multi-frame image stream and a geomagnetic induction waveform of the vehicle entry process; a three-dimensional motion trajectory tensor is extracted from the multi-frame image stream using a dense optical flow algorithm, and the geomagnetic induction waveform is converted into a frequency domain feature vector; the three-dimensional motion trajectory tensor and the frequency domain feature vector are input into a preset bilinear pooling neural network for fusion calculation, and a feature fingerprint vector mapping the vehicle entry event is output. A random key stream is generated using a preset Logistic chaotic mapping system. The feature fingerprint vector is then XORed to obtain desensitized data. Based on the parking area location attributes and the current time slot attributes, the desensitized data is encrypted using a ciphertext policy attribute-based encryption algorithm to generate a transaction payload. A request to upload the transaction payload and a zero-knowledge proof of data integrity is constructed and broadcast to the verification nodes in the blockchain network. The verification nodes use a practical Byzantine fault-tolerant consensus protocol to sort and verify the request to upload the data. After verification, the transaction payload is packaged into a new block and linked to the distributed ledger. The smart contract deployed on the blockchain monitors the block height update status of the distributed ledger and automatically triggers the verification process; while maintaining the encrypted state of the transaction payload, it verifies the reliability of the zero-knowledge proof of data integrity; if the verification result is true, the smart contract updates the on-chain parking space state machine and broadcasts the access permission event; after the IoT gateway detects the access permission event, it generates a hardware driver instruction containing a timed digital signature and sends it to the gate controller to execute the gate lifting action.
[0014] Optionally, the step of extracting the three-dimensional motion trajectory tensor from the multi-frame image stream using a dense optical flow algorithm includes: Calculate the displacement vectors of pixels in the current frame and the previous frame in a multi-frame image stream, and obtain the horizontal and vertical velocity components of each pixel. The horizontal and vertical velocity components are used as two channels to generate a two-dimensional optical flow feature map. By stacking the two-dimensional optical flow feature maps of N consecutive frames in chronological order, a three-dimensional motion trajectory tensor is constructed, consisting of the N-frame time span, image height H, image width W, and two channel dimensions.
[0015] Optionally, converting the geomagnetic induction waveform into a frequency domain feature vector includes: A Hanning window function is applied to the time-series data of the geomagnetic induction waveform to reduce spectral leakage; The windowed time series data is converted into a frequency domain signal using the Fast Fourier Transform algorithm; Calculate the amplitude spectrum of the frequency domain signal, and select a fixed number of amplitude values of the first K frequency points in ascending order of frequency to form the frequency domain feature vector.
[0016] Optionally, the step of fusing the three-dimensional motion trajectory tensor and the frequency domain feature vector into a preset bilinear pooling neural network to output a feature fingerprint vector mapping the vehicle entry event includes: The spatial feature map of the three-dimensional motion trajectory tensor is extracted using the first branch of the convolutional neural network. A one-dimensional feature vector of the frequency domain feature vector is extracted using a fully connected neural network branch. The spatial feature map is multiplied by the one-dimensional feature vector in the channel dimension to obtain a bilinear feature matrix. The bilinear feature matrix is subjected to global average pooling and L2 normalization to output the feature fingerprint vector.
[0017] Optionally, generating a random key stream using a preset Logistic chaotic mapping system includes: Set the initial state values and control parameters for the Logistic mapping; A continuous chaotic sequence of floating-point numbers is generated using an iterative formula. Each floating-point number in the chaotic sequence of floating-point numbers is mapped to an integer between 0 and 255; The integers are converted into 8-bit binary codes and concatenated in the order of generation to form a binary random key stream.
[0018] Optionally, the step of encrypting the de-identified data using a ciphertext policy attribute-based encryption algorithm to generate a transaction payload, based on the parking area location attributes and the current time slot attributes, includes: Define an access control tree structure, and map the parking area location attribute and the current time slot attribute to the leaf nodes of the access control tree respectively; Choose a polynomial for each node of the access control tree, where the constant term of the root node polynomial is associated with a secret fragment of the master key; The ciphertext component is calculated using the attribute parameters corresponding to the leaf nodes and the secret fragmentation. The de-identified data, access control tree structure, and ciphertext components are combined to generate the transaction payload.
[0019] Optionally, the verification node uses a practical Byzantine fault-tolerant consensus protocol to sort and verify the on-chain requests, including: The master node will broadcast a pre-prepared message containing the on-chain request to all slave nodes; After verifying the validity of the pre-prepared message signature, the slave node broadcasts the prepared message to other nodes; Once a node has collected preparation messages from more than two-thirds of the total number of nodes in the network, it broadcasts the commit message to other nodes. Once a node collects submission messages from more than two-thirds of the total number of nodes in the entire network, it confirms that the consensus verification for the on-chain request has been completed.
[0020] Optionally, after the IoT gateway detects the access permission event, it generates hardware driver instructions containing a time-limited digital signature, including: The IoT gateway obtains the current system time's UTC timestamp and the transaction hash value of the access permission event; Construct an instruction string that includes the instruction code, device ID, the UTC timestamp, and the transaction hash value; The hash digest of the instruction string is calculated using the SHA-256 algorithm; The security module built into the IoT gateway is invoked, and a digital signature is generated by asymmetric encryption of the hash digest using a pre-stored private key; The digital signature is appended to the end of the instruction string to form the hardware driver instruction.
[0021] This invention integrates multi-frame image streams from parking lot entrances with geomagnetic induction waveforms, extracts three-dimensional motion trajectories using a dense optical flow algorithm, and combines this with frequency domain features to output a high-dimensional feature fingerprint via a bilinear pooling neural network. Data is double-encrypted using Logistic chaotic mapping and a ciphertext policy attribute-based encryption algorithm, achieving data desensitization and fine-grained access control. Leveraging the distributed ledger and practical Byzantine fault-tolerant consensus protocol of blockchain technology, the immutability and traceability of on-chain data are ensured. In particular, the use of zero-knowledge proof mechanisms allows smart contracts to verify data integrity without decryption. The timely digital signature instructions generated by the IoT gateway prevent malicious replay attacks, constructing a trusted closed loop from front-end perception and on-chain storage to end-user execution, enhancing the security and operational efficiency of the parking management system. Attached Figure Description
[0022] Figure 1 System architecture diagram; Figure 2 This is a schematic diagram of the process of calculating the feature fingerprint vector; Figure 3 This is a schematic diagram of the root node and leaf nodes. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] In the first embodiment, the present invention proposes a smart parking lot data acquisition and control device, comprising the following modules: The acquisition module is used to acquire a multi-frame image stream and geomagnetic induction waveform of the vehicle entry process by an acquisition terminal deployed at the entrance of the parking lot; extract a three-dimensional motion trajectory tensor from the multi-frame image stream using a dense optical flow algorithm, and convert the geomagnetic induction waveform into a frequency domain feature vector; input the three-dimensional motion trajectory tensor and the frequency domain feature vector into a preset bilinear pooling neural network for fusion calculation, and output a feature fingerprint vector that maps the vehicle entry event. System structure such as Figure 1As shown, the system includes a parking lot entrance data acquisition device. This device includes at least a camera and a geomagnetic sensor. Preferably, a camera installed at the parking lot entrance and a three-axis geomagnetic sensor buried 10cm underground serve as the acquisition terminals. When an infrared trigger detects a vehicle entering, the camera is simultaneously activated to acquire 30 consecutive frames of image data, and the geomagnetic induction signal is recorded for 3 seconds at a sampling rate of 100Hz. For the acquired multi-frame image stream, the Farneback dense optical flow algorithm is used to calculate the horizontal and vertical displacement components of each pixel between adjacent frames. The displacement components of all pixels are stacked according to the time sequence to construct a three-dimensional motion trajectory tensor with dimensions of height multiplied by width multiplied by the number of time channels. Simultaneously, a fast Fourier transform is performed on the time-domain geomagnetic induction waveform to calculate the amplitude of each frequency component. The top 32 frequency components with the largest amplitudes are selected to form a frequency domain feature vector. A neural network model with two branches is constructed, where the first branch is a three-dimensional convolutional neural network used to process the three-dimensional motion trajectory tensor to extract visual feature maps, and the second branch is a multilayer perceptron used to process the frequency domain feature vector to extract magnetic field feature maps. An outer product operation is performed on the visual feature map and the magnetic field feature map to achieve bilinear pooling fusion. The fused matrix is flattened and mapped through a fully connected layer to a 128-dimensional numerical sequence, which serves as the unique feature fingerprint vector representing the vehicle entry event. See [link to documentation]. Figure 2 .
[0025] In an optional embodiment, the extraction of the three-dimensional motion trajectory tensor from the multi-frame image stream using a dense optical flow algorithm includes: Calculate the displacement vectors of pixels in the current frame and the previous frame in a multi-frame image stream, and obtain the horizontal and vertical velocity components of each pixel. The horizontal and vertical velocity components are used as two channels to generate a two-dimensional optical flow feature map. By stacking the two-dimensional optical flow feature maps of N consecutive frames in chronological order, a three-dimensional motion trajectory tensor is constructed, consisting of the N-frame time span, image height H, image width W, and two channel dimensions.
[0026] The Farneback dense optical flow algorithm is used to process the video stream detected by the acquisition terminal. The image preprocessing size is set to 224×224 pixels, H=224, W=224, to adapt to the input specifications of the subsequent neural network. For a continuous video frame sequence, the displacement of each pixel between frame t and frame t-1 is calculated to obtain the horizontal displacement field covering the entire image. and vertical displacement field To eliminate interference from sudden changes in illumination and sensor noise, and to prevent abnormally large displacement values from affecting network weights, [the following measures were taken]. and The values are truncated, limiting the range of the two values to between [-20, 20] pixels; the truncated floating-point values are linearly mapped to the grayscale space of [0, 255], thereby generating a two-dimensional optical flow feature map containing two channels.
[0027] To detect the temporal motion pattern during vehicle entry, a time window parameter N=16 was set, meaning 16 consecutive frames of optical flow feature maps were selected as a group of input units. These feature maps were stacked and stitched together strictly according to their timestamps in the time dimension. The constructed three-dimensional motion trajectory tensor has dimensions (16, 224, 224, 2), where 16 represents the temporal depth, 224 represents the spatial resolution, and 2 represents the optical flow component channels. This tensor, as a high-dimensional data structure, can completely represent the spatiotemporal motion details of the vehicle at the moment of entering the gate.
[0028] In an optional embodiment, converting the geomagnetic induction waveform into a frequency domain feature vector includes: A Hanning window function is applied to the time-series data of the geomagnetic induction waveform to reduce spectral leakage; The windowed time series data is converted into a frequency domain signal using the Fast Fourier Transform algorithm; Calculate the amplitude spectrum of the frequency domain signal, and select a fixed number of amplitude values of the first K frequency points in ascending order of frequency to form the frequency domain feature vector.
[0029] In the signal preprocessing stage, the geomagnetic sensor collects magnetic field disturbance data as vehicles pass by at a sampling frequency of 100Hz, and extracts a time series segment with a length of M=256 sampling points. To suppress spectral leakage caused by non-periodic truncation, a Hanning window is used to weight the original sequence x(n), and the calculation formula is as follows: The processed sequence is The windowed time-domain signal is converted into a frequency-domain complex sequence using the Fast Fourier Transform algorithm, and the magnitude of each frequency point is calculated to obtain the amplitude spectrum. The formula is as follows: .
[0030] During the feature extraction stage, since the geomagnetic disturbances caused by vehicles are concentrated in the low-frequency band, the feature extraction parameter K=32 is set. The amplitude values of the first 32 frequency points are extracted in ascending order from 0Hz. These 32 floating-point values are then L2-norm normalized to ensure they are distributed within the [0,1] interval, constructing a 1×32 frequency domain feature vector. This vector represents the specific frequency response fingerprint of different vehicle models to the geomagnetic field.
[0031] In an optional embodiment, the step of fusing the three-dimensional motion trajectory tensor and the frequency domain feature vector into a preset bilinear pooling neural network to output a feature fingerprint vector mapping the vehicle entry event includes: The spatial feature map of the three-dimensional motion trajectory tensor is extracted using the first branch of the convolutional neural network. A one-dimensional feature vector of the frequency domain feature vector is extracted using a fully connected neural network branch. The spatial feature map is multiplied by the one-dimensional feature vector in the channel dimension to obtain a bilinear feature matrix. The bilinear feature matrix is subjected to global average pooling and L2 normalization to output the feature fingerprint vector.
[0032] The bilinear pooling neural network structure comprises a 3D convolutional branch and a fully connected branch. The 3D convolutional branch processes video stream data and consists of five consecutively stacked 3D convolutional blocks, each containing a 3D convolutional layer, a 3D max-pooling layer, and a linear rectified unit activation function. The fully connected branch processes frequency domain data and consists of three fully connected layers. The outputs of the two branches are combined in a fusion layer via an outer product operation, connected to a global average pooling layer, and then connected to a dimensionality-reduced fully connected layer as the output layer. The training set uses a synchronized dataset of video and geomagnetic signals containing various vehicle entry and exit scenarios in a parking lot. The dataset is divided into training and validation sets, containing sample data under different lighting conditions, vehicle types, and driving speeds. Each sample is labeled with a vehicle behavior category. End-to-end supervised learning is used during training. The processed 3D motion trajectory tensor and frequency domain feature vector are input into the network in pairs, and the network outputs the predicted vehicle behavior category probability. The cross-entropy loss function is used to calculate the error between the prediction result and the true label. The stochastic gradient descent algorithm is used to backpropagate the error and update the network parameters until the loss function converges. The network model's input includes a 3D motion trajectory tensor with dimensions 16×224×224×2 and a frequency domain feature vector with dimension 32. The network model's output is a feature fingerprint vector with dimension 128.
[0033] The generation module is used to generate a random key stream using a preset Logistic chaotic mapping system, perform an XOR operation on the feature fingerprint vector to obtain desensitized data, and encrypt the desensitized data using a ciphertext policy attribute base encryption algorithm according to the parking area location attribute and the current time slot attribute to generate a transaction payload. Specifically, the Logistic chaotic mapping equation is initialized, and control parameters are set. The value is set to 4.0, and an initial value is generated based on the current millisecond-level timestamp. ,in Between 0 and 1; according to the equation The algorithm iteratively calculates according to the rules, with the number of iterations equal to the number of bits in the feature fingerprint vector; it uses a threshold function to convert the chaotic sequence generated by the iteration into a binary random key stream; it converts the 128-dimensional feature fingerprint vector into a binary stream, performs a bitwise XOR operation with the random key stream, and outputs masked and desensitized data; it defines an attribute set, including the parking lot unique number attribute and the current time period attribute; it initializes the ciphertext policy attribute-based encryption system, generates the system master key and public parameters; it formulates an access control policy, which restricts access to the data to only decryption terminals with the corresponding parking lot number and within a specified time window; it inputs the public parameters, access control policy, and desensitized data into the encryption algorithm, calculates and generates ciphertext data containing the access policy, and encapsulates the ciphertext data into a transaction payload to be uploaded to the blockchain.
[0034] In an optional embodiment, generating a random key stream using a preset Logistic chaotic mapping system includes: Set the initial state values and control parameters for the Logistic mapping; A continuous chaotic sequence of floating-point numbers is generated using an iterative formula. Each floating-point number in the chaotic sequence of floating-point numbers is mapped to an integer between 0 and 255; The integers are converted into 8-bit binary codes and concatenated in the order of generation to form a binary random key stream.
[0035] The Logistic chaotic mapping model is selected, and the iterative equation is: To ensure unpredictability, instead of using a fixed initial value, the hash value of the latest block on the blockchain is read in real time, the last 8 bits are truncated and normalized to the (0,1) range as the initial state value. Control parameters Setting it to 4.0 ensures chaotic properties.
[0036] Based on the data length L of the feature fingerprint vector, iteratively calculate and generate a sequence of floating-point numbers of length L. For each floating-point number in the sequence... Using formula The floating-point number is discretized into integers in the range [0, 255]. Each integer corresponds to a one-byte key, which are concatenated to form a one-time pad binary random key stream. This mechanism leverages the sensitivity of chaotic systems to initial values and the randomness of blockchain hashes to achieve high-strength streaming encryption.
[0037] In an optional embodiment, the step of encrypting the de-identified data using a ciphertext policy attribute-based encryption algorithm to generate a transaction payload, based on the parking area location attribute and the current time slot attribute, includes: Define an access control tree structure, and map the parking area location attribute and the current time slot attribute to the leaf nodes of the access control tree respectively; Choose a polynomial for each node of the access control tree, where the constant term of the root node polynomial is associated with a secret fragment of the master key; The ciphertext component is calculated using the attribute parameters corresponding to the leaf nodes and the secret fragmentation. The de-identified data, access control tree structure, and ciphertext components are combined to generate the transaction payload.
[0038] Due to the high computational cost of attribute-based encryption, a hybrid encryption mechanism of "AES + CP-ABE" is adopted. A 256-bit AES symmetric key is randomly generated. The key is then used to encrypt the de-identified feature data in AES-GCM mode, generating ciphertext. .
[0039] Construct the access control tree corresponding to the linear secret sharing scheme, for example, with the policy "(Region = Area A) AND (Time = Peak Period)". Utilize the CP-ABE algorithm to... Encapsulation and encryption are performed. A polynomial is selected for each node in the tree. The constant term of the root node's polynomial is associated with the master secret or master key, and the leaf nodes are associated with attribute parameters. In one embodiment, the leaf nodes are associated with both location and time slot attributes. The generated key ciphertext is then calculated. It includes information that can only be recovered if a specific set of attributes is satisfied. The mathematical components. The transaction load structure is as follows: Header, , PolicyTree This approach ensures data confidentiality while implementing fine-grained access control. Optionally, the Header includes at least the following key fields: reference block height and initialization vector. The reference block height records the blockchain block height referenced when generating the chaotic keystream. During decryption, the decryption end, such as an audit server or data analysis center, uses this height to look up the corresponding block hash value in the local ledger, serving as the source for generating the initial state value of the Logistic mapping. The initialization vector is used as the random initialization vector for the AES-GCM encryption mode, ensuring the randomness of the ciphertext for the same data. A two-layer hybrid encryption mechanism can also be used to ensure the highest security. The first layer, streaming obfuscation, uses the Logistic chaotic keystream to perform an XOR operation on the feature fingerprint vector, disrupting the statistical characteristics of the data and preventing side-channel attacks. The second layer, payload encryption, uses the desensitized data output from the first layer as plaintext and encrypts it using the AES-GCM algorithm.
[0040] A construction module is used to construct an on-chain request containing the transaction payload and a zero-knowledge proof of data integrity, and broadcast it to the verification nodes in the blockchain network; the verification nodes use a practical Byzantine fault-tolerant consensus protocol to sort and verify the on-chain request; after successful verification, the transaction payload is packaged into a new block and linked to the distributed ledger; Specifically, the SHA256 hash value of the transaction payload is calculated as the commitment object; a zero-knowledge proof string is generated using the zkSNARKs algorithm, which mathematically proves that the sender owns the preimage corresponding to the hash value and that the data has not been tampered with without revealing the plaintext content of the transaction payload; the transaction payload, hash value, zero-knowledge proof string, and timestamp of the request are encapsulated into a JSON-formatted on-chain request data packet; the request is broadcast to all blockchain verification nodes via a P2P network protocol; after receiving the request, the master node in the verification nodes generates a pre-preparation message containing a sequence number and broadcasts it; after receiving the pre-preparation message, each replica node performs signature verification and broadcasts a preparation message; when any node receives preparation messages from more than two-thirds of the nodes, it broadcasts a commit message; when any node receives commit messages from more than two-thirds of the nodes, consensus is confirmed; the verification nodes then construct a Merkle tree based on the transaction payload, calculate the Merkle tree root, combine the hash value of the previous block and a random number to generate a new block header, and append the new block to the locally stored blockchain database.
[0041] In an optional embodiment, the verification node uses a practical Byzantine fault-tolerant consensus protocol to sort and verify the on-chain requests, including: The master node will broadcast a pre-prepared message containing the on-chain request to all slave nodes; After verifying the validity of the pre-prepared message signature, the slave node broadcasts the prepared message to other nodes; Once a node has collected preparation messages from more than two-thirds of the total number of nodes in the network, it broadcasts the commit message to other nodes. Once a node collects submission messages from more than two-thirds of the total number of nodes in the entire network, it confirms that the consensus verification for the on-chain request has been completed.
[0042] The consensus process follows the three-phase flow of the PBFT protocol, assuming the total number of validating nodes N ≥ 3f + 1. In the Pre-prepare phase, the master node sorts and broadcasts the requests. In the Prepare phase, nodes exchange confirmation information to ensure the entire network agrees on the sequence numbers of the requests. In the Commit phase, nodes confirm that enough nodes in the network are ready to execute the transaction. A "ZKP pre-check" step is added to the consensus verification logic, whereby nodes run the ZKP verification algorithm Verify before sending the Prepare message. The zero-knowledge proof (Hash) only participates in the consensus vote for a transaction if the zero-knowledge proof is valid, thereby intercepting invalid data at the consensus level and preventing junk data from polluting the ledger.
[0043] The execution module is used to monitor the block height update status of the distributed ledger by smart contracts deployed on the chain and automatically trigger the verification process; while maintaining the encrypted state of the transaction payload, it verifies the reliability of the zero-knowledge proof of data integrity; if the verification result is true, the smart contract updates the on-chain parking space state machine and broadcasts the access permission event; after the IoT gateway detects the access permission event, it generates a hardware driver instruction containing a timed digital signature and sends it to the gate controller to execute the lifting action.
[0044] Specifically, a Solidity smart contract is written and deployed. The contract includes a mapping table to record parking space status and defines a parameterized access permission event. The contract's internal logic polls the on-chain block height in real-time via a block listening interface. Once an increase in height is detected, it reads transaction data from the new block. It then calls a verification function within the contract, passing in the hash value of the transaction payload and a zero-knowledge proof string, and performs on-chain pairing operations to verify the mathematical reliability of the proof. If the verification function returns a Boolean truth value, the parking space status variable for the corresponding parking lot is updated from idle to occupied, triggering a log broadcast of the access permission event, which includes the vehicle's hash ID. A local IoT gateway in the parking lot runs a listening script, subscribing to specific event topics of the smart contract via a Web3 interface. Upon detecting an access permission event, a control message containing an instruction ID, the current UTC timestamp, and a gate-raising action code is immediately generated. This control message is signed using the gateway's private key and an elliptic curve digital signature algorithm. The signed instruction is sent to the gate controller via RS485 serial communication protocol. The controller verifies the signature's validity and the timestamp's timeliness; upon confirmation, it drives the motor to raise the gate for passage. A parking space state machine is deployed in a blockchain smart contract to manage and maintain the real-time status of physical parking spaces, such as whether they are vacant or occupied. It records the state variables of each parking space through an on-chain mapping table. When the smart contract verifies the transaction load and zero-knowledge proof of a vehicle entering the parking lot, the state machine automatically triggers the preset state transition rules, such as updating the state value from 0 to 1. This enables a reliable, immutable, real-time mapping and synchronization of the occupancy status of physical parking spaces on a decentralized distributed ledger.
[0045] In an optional embodiment, after the IoT gateway detects the access permission event, it generates hardware driver instructions containing a time-limited digital signature, including: The IoT gateway obtains the current system time's UTC timestamp and the transaction hash value of the access permission event; Construct an instruction string that includes the instruction code, device ID, the UTC timestamp, and the transaction hash value; The hash digest of the instruction string is calculated using the SHA-256 algorithm; The security module built into the IoT gateway is invoked, and a digital signature is generated by asymmetric encryption of the hash digest using a pre-stored private key; The digital signature is appended to the end of the instruction string to form the hardware driver instruction.
[0046] The IoT gate obtains a Unix timestamp accurate to milliseconds via the NTP service and extracts the TxHash of on-chain events. It constructs a JSON instruction: '{“cmd”:“OPEN”,“ts”:1678886400500,“tx”:“0x...”}'. To prevent instruction replay attacks, the gate controller only responds to instructions whose timestamps are within the current time window.
[0047] The gateway invokes the RSA-2048 private key in the onboard TPM / SE security module to sign the SHA-256 digest of the instruction, generating a Base64 encoded signature string. Upon receiving the instruction, the gate controller verifies the signature using a pre-set public key. Only under the dual conditions of a compliant signature and a valid timestamp will the underlying circuit trigger the relay, ensuring that only legitimate events confirmed by blockchain consensus can physically open the gate. The device described in this invention is particularly suitable for vehicle access control in confidential units or high-value storage areas, prioritizing security over efficiency. However, those skilled in the art should understand that to improve efficiency, the IoT gateway incorporates a lightweight verification node. While the building module broadcasts on-chain requests, the IoT gateway performs ZKP verification and whitelist comparison locally in parallel. If local verification passes, the IoT gateway, without waiting for the entire blockchain network to complete consensus, immediately generates a hardware driver instruction with a pre-execution flag, driving the gate to open and compressing the passage time to milliseconds. The blockchain network continues to execute PBFT consensus. After the smart contract confirms the block is uploaded to the chain, if the verification result is inconsistent with the gateway's pre-execution action, an abnormal alarm event will be triggered, and the vehicle ID will be locked in the on-chain blacklist, while the credit guarantee deposit of the associated account will be deducted. The whitelist is created by users registering via mobile terminals or by administrators adding users. Users upload basic vehicle information and payment vouchers through the mobile application. The system backend uses the same bilinear pooling neural network to extract the vehicle's baseline feature fingerprint vector and calculate its hash value. The hash values of all authorized vehicles are constructed into a Merkle tree, and the root hash value of this tree is stored in the on-chain smart contract as the whitelist anchor. When generating zero-knowledge proofs of data integrity, the construction module specifically uses the zk-SNARKs algorithm to generate membership proofs. The inputs to this proof include: the currently collected and generated feature fingerprint vector as secret input, the Merkle path corresponding to the fingerprint, and the root hash value stored in the smart contract as public input.
[0048] In a second embodiment, the present invention also provides a smart parking lot data acquisition and control method, comprising the following steps: Step S1: The acquisition terminal deployed at the entrance of the parking lot acquires a multi-frame image stream and geomagnetic induction waveform of the vehicle entry process; the multi-frame image stream is processed by a dense optical flow algorithm to extract a three-dimensional motion trajectory tensor, and the geomagnetic induction waveform is converted into a frequency domain feature vector; the three-dimensional motion trajectory tensor and the frequency domain feature vector are input into a preset bilinear pooling neural network for fusion calculation, and the feature fingerprint vector mapping the vehicle entry event is output. Step S2: Generate a random key stream using a preset Logistic chaotic mapping system; perform an XOR operation on the feature fingerprint vector to obtain de-identified data; based on the parking area location attributes and current time slot attributes, use a ciphertext policy attribute base encryption algorithm to encrypt the de-identified data to generate a transaction payload. Step S3: Construct an on-chain request containing the transaction payload and a zero-knowledge proof of data integrity, and broadcast it to the verification nodes in the blockchain network; the verification nodes use a practical Byzantine fault-tolerant consensus protocol to sort and verify the on-chain request; after successful verification, the transaction payload is packaged into a new block and linked to the distributed ledger. Step S4: The smart contract deployed on the chain monitors the block height update status of the distributed ledger and automatically triggers the verification process; while maintaining the encrypted state of the transaction payload, it verifies the reliability of the zero-knowledge proof of data integrity; if the verification result is true, the smart contract updates the on-chain parking space state machine and broadcasts the access permission event; after the IoT gateway detects the access permission event, it generates a hardware driver instruction containing a timed digital signature and sends it to the gate controller to execute the gate lifting action.
[0049] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0050] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A smart parking lot data acquisition and control device, characterized in that, Includes the following modules: The acquisition module is used to acquire multi-frame image streams and geomagnetic induction waveforms of vehicles entering the parking lot by the acquisition terminal deployed at the entrance of the parking lot. The Dense Optical Flow (DOB) algorithm is used to extract a three-dimensional motion trajectory tensor from the multi-frame image stream. This extraction includes: calculating the displacement vectors of pixels in the current and previous frames of the multi-frame image stream; obtaining the horizontal and vertical velocity components of each pixel; generating a two-dimensional optical flow feature map using the horizontal and vertical velocity components as two channels; stacking the two-dimensional optical flow feature maps of N consecutive frames in chronological order to construct a three-dimensional motion trajectory tensor composed of an N-frame time span, image height H, image width W, and the dimensions of the two channels; and converting the geomagnetic induction waveform into a frequency domain feature vector. This conversion includes: applying a Hanning window function to the time-series data of the geomagnetic induction waveform to reduce spectral leakage; converting the windowed time-series data into a frequency domain signal using a Fast Fourier Transform (FFT) algorithm; and calculating the frequency domain... The amplitude spectrum of the signal is obtained, and the amplitude values of the first K frequency points are selected in ascending order of frequency to form the frequency domain feature vector. The three-dimensional motion trajectory tensor and the frequency domain feature vector are input into a preset bilinear pooling neural network for fusion calculation to output a feature fingerprint vector mapping the vehicle entry event. The process of inputting the three-dimensional motion trajectory tensor and the frequency domain feature vector into a preset bilinear pooling neural network for fusion calculation to output a feature fingerprint vector mapping the vehicle entry event includes: extracting the spatial feature map of the three-dimensional motion trajectory tensor using a first convolutional neural network branch; extracting the one-dimensional feature vector of the frequency domain feature vector using a fully connected neural network branch; performing an outer product operation between the spatial feature map and the one-dimensional feature vector in the channel dimension to obtain a bilinear feature matrix; and performing global average pooling and L2 normalization processing on the bilinear feature matrix to output the feature fingerprint vector. The generation module is used to generate a random key stream using a preset Logistic chaotic mapping system, perform an XOR operation on the feature fingerprint vector to obtain desensitized data, and encrypt the desensitized data using a ciphertext policy attribute base encryption algorithm according to the parking area location attribute and the current time slot attribute to generate a transaction payload. A construction module is used to construct an on-chain request containing the transaction payload and a zero-knowledge proof of data integrity, and broadcast it to the verification nodes in the blockchain network; the verification nodes use a practical Byzantine fault-tolerant consensus protocol to sort and verify the on-chain request; after successful verification, the transaction payload is packaged into a new block and linked to the distributed ledger; The execution module is used to monitor the block height update status of the distributed ledger by smart contracts deployed on the chain and automatically trigger the verification process; while maintaining the encrypted state of the transaction payload, it verifies the reliability of the zero-knowledge proof of data integrity; if the verification result is true, the smart contract updates the on-chain parking space state machine and broadcasts the access permission event; after the IoT gateway detects the access permission event, it generates a hardware driver instruction containing a timed digital signature and sends it to the gate controller to execute the lifting action.
2. The device according to claim 1, characterized in that, The generation of a random key stream using a preset Logistic chaotic mapping system includes: Set the initial state values and control parameters for the Logistic mapping; A continuous chaotic sequence of floating-point numbers is generated using an iterative formula. Each floating-point number in the chaotic sequence of floating-point numbers is mapped to an integer between 0 and 255; The integers are converted into 8-bit binary codes and concatenated in the order of generation to form a binary random key stream.
3. The device according to claim 1, characterized in that, The step of encrypting the de-identified data using a ciphertext policy attribute-based encryption algorithm to generate a transaction payload, based on the parking area location attributes and current time slot attributes, includes: Define an access control tree structure, and map the parking area location attribute and the current time slot attribute to the leaf nodes of the access control tree respectively; Choose a polynomial for each node of the access control tree, where the constant term of the root node polynomial is associated with a secret fragment of the master key; The ciphertext component is calculated using the attribute parameters corresponding to the leaf nodes and the secret fragmentation. The de-identified data, access control tree structure, and ciphertext components are combined to generate the transaction payload.
4. The device according to claim 1, characterized in that, The verification node uses a practical Byzantine fault-tolerant consensus protocol to sort and verify the on-chain requests, including: The master node will broadcast a pre-prepared message containing the on-chain request to all slave nodes; After verifying the validity of the pre-prepared message signature, the slave node broadcasts the prepared message to other nodes; Once a node has collected preparation messages from more than two-thirds of the total number of nodes in the network, it broadcasts the commit message to other nodes. Once a node collects submission messages from more than two-thirds of the total number of nodes in the entire network, it confirms that the consensus verification for the on-chain request has been completed.
5. The device according to claim 1, characterized in that, After the IoT gateway detects the access permission event, it generates hardware driver instructions containing a time-limited digital signature, including: The IoT gateway obtains the current system time's UTC timestamp and the transaction hash value of the access permission event; Construct an instruction string that includes the instruction code, device ID, the UTC timestamp, and the transaction hash value; The hash digest of the instruction string is calculated using the SHA-256 algorithm; The security module built into the IoT gateway is invoked, and a digital signature is generated by asymmetric encryption of the hash digest using a pre-stored private key; The digital signature is appended to the end of the instruction string to form the hardware driver instruction.
6. A smart parking lot data acquisition and control method, characterized in that, Includes the following steps: The data acquisition terminal deployed at the entrance of the parking lot acquires multi-frame image streams and geomagnetic induction waveforms of the vehicle entry process; The Dense Optical Flow (DOB) algorithm is used to extract a three-dimensional motion trajectory tensor from the multi-frame image stream. This extraction includes: calculating the displacement vectors of pixels in the current and previous frames of the multi-frame image stream; obtaining the horizontal and vertical velocity components of each pixel; generating a two-dimensional optical flow feature map using the horizontal and vertical velocity components as two channels; stacking the two-dimensional optical flow feature maps of N consecutive frames in chronological order to construct a three-dimensional motion trajectory tensor composed of an N-frame time span, image height H, image width W, and the dimensions of the two channels; and converting the geomagnetic induction waveform into a frequency domain feature vector. This conversion includes: applying a Hanning window function to the time-series data of the geomagnetic induction waveform to reduce spectral leakage; converting the windowed time-series data into a frequency domain signal using a Fast Fourier Transform (FFT) algorithm; and calculating the frequency domain... The amplitude spectrum of the signal is obtained, and the amplitude values of the first K frequency points are selected in ascending order of frequency to form the frequency domain feature vector. The three-dimensional motion trajectory tensor and the frequency domain feature vector are input into a preset bilinear pooling neural network for fusion calculation to output a feature fingerprint vector mapping the vehicle entry event. The process of inputting the three-dimensional motion trajectory tensor and the frequency domain feature vector into a preset bilinear pooling neural network for fusion calculation to output a feature fingerprint vector mapping the vehicle entry event includes: extracting the spatial feature map of the three-dimensional motion trajectory tensor using a first convolutional neural network branch; extracting the one-dimensional feature vector of the frequency domain feature vector using a fully connected neural network branch; performing an outer product operation between the spatial feature map and the one-dimensional feature vector in the channel dimension to obtain a bilinear feature matrix; and performing global average pooling and L2 normalization processing on the bilinear feature matrix to output the feature fingerprint vector. A random key stream is generated using a preset Logistic chaotic mapping system. The feature fingerprint vector is then XORed to obtain desensitized data. Based on the parking area location attributes and the current time slot attributes, the desensitized data is encrypted using a ciphertext policy attribute-based encryption algorithm to generate a transaction payload. A request to upload the transaction payload and a zero-knowledge proof of data integrity is constructed and broadcast to the verification nodes in the blockchain network. The verification nodes use a practical Byzantine fault-tolerant consensus protocol to sort and verify the request to upload the data. After verification, the transaction payload is packaged into a new block and linked to the distributed ledger. The smart contract deployed on the blockchain monitors the block height update status of the distributed ledger and automatically triggers the verification process; while maintaining the encrypted state of the transaction payload, it verifies the reliability of the zero-knowledge proof of data integrity; if the verification result is true, the smart contract updates the on-chain parking space state machine and broadcasts the access permission event; after the IoT gateway detects the access permission event, it generates a hardware driver instruction containing a timed digital signature and sends it to the gate controller to execute the gate lifting action.