Intelligent money box anti-theft control method and system based on block chain and storage medium
By integrating blockchain technology and sensors in the box, real-time monitoring and encrypting data, the security risks of existing box anti-theft measures are solved, more efficient abnormal detection and response are achieved, and the security and management efficiency of box transportation and storage are improved.
Patent Information
- Application Number
- CN202510443469.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-04-10
AI Technical Summary
The existing anti-theft measures for boxing are prone to damage physical protection, manual supervision is negligent, and video surveillance cannot be intervened in real time. It is difficult to comprehensively monitor the box status, geographical location and environmental changes during boxing transportation, resulting in potential safety hazards.
The intelligent anti-theft control method of block chain is adopted, and the vibration frequency, geographical location and oxygen concentration are obtained through built-in sensors, data packets are generated in combination with timestamps, and edge encryption is performed, and uploaded to the double-link architecture. Use the Hyperledger Fabric Alliance Chain and FISCO BCOS Chain for data storage and cross-chain anchoring, trigger smart contracts for real-time abnormality detection, and execute differentiated verification strategies based on risk levels.
It realizes comprehensive perception and real-time monitoring of the box status, improves the accuracy and response speed of abnormal identification, ensures the confidentiality and integrity of data, and enhances the audit capability and security of the system.
Smart Images

Figure CN120151084A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular, to a blockchain-based intelligent cash box anti-theft control method, system, and storage medium. Background Art
[0002] During the transportation and storage of cash, the security of the cash box is of utmost importance. Traditional cash box anti-theft measures mainly rely on physical locks, manual supervision, and video surveillance. However, these methods have certain limitations. For example, physical protection measures are vulnerable to violent damage, manual supervision poses a risk of human negligence, and video surveillance cannot achieve real-time intervention in some cases. In addition, during the transportation of the cash box, it is difficult to comprehensively monitor the box body status, geographical location, and environmental changes, resulting in potential security hazards.
[0003] With the development of information technology, more and more cash box security management solutions have started to introduce data monitoring and remote control technologies. For example, the status information of the cash box is monitored through sensors, data security is ensured through encrypted communication, and the security of the cash box is improved by combining automated management means. However, in practical applications, how to ensure the integrity of data, prevent tampering, and how to improve the recognition and response speed of abnormal states are still challenges faced by the existing technologies. Therefore, there is an urgent need for a more secure and intelligent cash box anti-theft control method to enhance the security and management efficiency of the cash box during transportation and storage. Summary of the Invention
[0004] To solve the above technical problems, this application provides a blockchain-based intelligent cash box anti-theft control method, system, and storage medium.
[0005] The technical solutions provided in this application are described below: The first aspect of this application provides a blockchain-based intelligent cash box anti-theft control method, which includes: Obtain the vibration frequency through a three-axis acceleration sensor built in the cash box, obtain the geographical location coordinates through a dual-mode positioning module, obtain the oxygen concentration inside the box through an infrared spectrum sensor, combine them with the operation timestamp to generate a data packet, and perform edge encryption using the national secret SM4 algorithm to obtain an encrypted data packet; Upload the encrypted data packet to a dual-chain architecture through an edge computing gateway; On the operation chain, use the Hyperledger Fabric consortium chain to store the hash value of the encrypted data packet and trigger a smart contract for real-time anomaly detection; On the audit chain, regularly perform cross-chain anchoring of the Merkle root of the operation chain through the FISCO BCOS chain to generate a global audit record; When receiving a request to open the cash box, extract the vibration frequency, geographical location, and oxygen concentration in the encrypted data packet, and perform SM3 consistency verification with the hash value stored in the operation chain; Obtain the Merkle proof of the historical track through the audit chain, and verify the deviation degree between the current geographical location and the preset path; Generate a comprehensive risk level based on the Fourier transform spectrum energy of the vibration frequency, the mutation gradient of the oxygen concentration, and the deviation degree of the preset path; Execute a differential verification strategy according to the risk level to obtain a verification result.
[0006] Optionally, the method further includes: Embed an RFID tag with a Physically Unclonable Function (PUF) chip inside the outer shell of the cash box; Generate a unique physical fingerprint through the PUF chip in response to a random challenge code, and encrypt the unique physical fingerprint using the SM9 algorithm to generate a dynamic key pair; Write the hash value of the dynamic key pair to the smart contract address of the blockchain; When receiving a request to open the cash box, the method further includes: Send a dynamic challenge code to the PUF chip through a handheld terminal, where the dynamic challenge code is generated based on the current timestamp and a random number derived from the latest block hash of the audit chain; Receive the physical fingerprint generated by the PUF chip in response to the dynamic challenge code; Call the public key in the dynamic key pair stored in the operation chain to perform signature verification on the physical fingerprint, and verify the timeliness of the dynamic challenge code and the correlation with the blockchain hash through the audit chain; Calculate the Hamming distance between the physical fingerprint and the pre-stored reference value, and perform clone attack verification based on the Hamming distance.
[0007] Optionally, the data packet further contains the unique physical fingerprint, and the edge encryption using the national secret SM4 algorithm to obtain the encrypted data packet includes: Generate a temporary session key based on the unique physical fingerprint using the SM9 algorithm; Generate dynamic parameters through a chaotic mapping function based on the entropy value of the vibration frequency and the gradient of the oxygen concentration; Perform an exclusive OR operation on the current block header hash of the operation chain and the Merkle root of the audit chain to generate a cross-chain binding key; Perform edge encryption using the national secret SM4 algorithm based on the temporary session key, dynamic parameters, and the cross-chain binding key to obtain the final encryption key, and write the key fingerprint of the final encryption key to the tamper-proof storage area of the audit chain through a smart contract.
[0008] Optionally, generating the comprehensive risk level based on the Fourier transform spectrum energy of the vibration frequency, the mutation gradient of the oxygen concentration, and the deviation degree of the preset path includes: Perform a fast Fourier transform on the collected vibration frequency signal, extract the power spectral density distribution within the 0 - 100 Hz frequency band, and calculate the effective energy integral value; Calculate the mutation rate of the oxygen concentration by the time window sliding average method; Based on the historical trajectory Merkle proof set stored on the audit chain, calculate the weighted spatial deviation between the current coordinate and the preset path; Input the ratio of the effective energy integral value to the preset vibration energy threshold into the S - type function to obtain the vibration energy risk component; Input the ratio of the mutation rate of the oxygen concentration to the preset maximum mutation threshold into the hyperbolic tangent function to obtain the oxygen mutation risk component; Input the ratio of the weighted spatial deviation to the preset maximum allowable deviation and then take the square value to obtain the path deviation risk component; Weight and sum up each risk component to obtain the risk level.
[0009] Optionally, the differential verification strategy is executed according to the risk level, and the obtained verification result includes: When the risk level reaches the preset risk level threshold, extract the iris feature hash value stored during user registration from the tamper - proof storage area of the audit chain, and generate a dynamic challenge vector based on the zero - knowledge proof protocol. The challenge vector contains randomly encrypted parameters with a timestamp; Collect real - time iris images through a handheld terminal, extract Gabor wavelet texture features and calculate the cosine similarity with the challenge vector; If the similarity ≥ 0.95, the authorization passes; If the similarity is in the range of 0.92 - 0.95, the current GPS coordinates are converted into a tone parameter sequence after being hashed by SM3; Based on the tone parameter sequence, collect the user's voiceprint data, extract the MFCC coefficient matrix and perform dynamic time warping matching with the preset voiceprint template. If the warping distance ≤ 0.15 and the timestamp deviation is within ±5 seconds, the authorization passes; Or; If the similarity is in the range of 0.92 - 0.95, capture the inertial feature data of the unlocking action through a three - axis acceleration sensor. The inertial feature database includes the acceleration vector direction and the angular velocity change curve; Perform dynamic time warping matching on the inertial feature data and the preset behavior template stored on the operation chain. If the trajectory matching degree of the composite vector ≥ 85%, the authorization passes; Optionally, on the operation chain, storing the hash value of the encrypted data packet using the Hyperledger Fabric consortium chain and triggering a smart contract for real-time anomaly detection includes: Receiving the encrypted data packet sent by the edge computing gateway, extracting the SM3 hash value in the encrypted data packet, binding it with the sensor type and timestamp, and then writing it into the blockchain state database; When it is detected that the energy corresponding to the vibration frequency exceeds 5×10⁻³ m² / s³ or the mutation rate of the oxygen concentration > 5% / S, an anomaly event record with a timestamp is generated on the operation chain, and the IPFS storage address of the encrypted data packet is included in the anomaly event record; Invoking the cross-chain relay service to push the hash of the customized Merkle root of the current block to the audit chain.
[0010] Optionally, on the audit chain, periodically cross-chain anchor the Merkle root of the operation chain through the FISCO BCOS chain to generate a global audit record, including: Obtaining the latest Merkle root hash of the operation chain through the relay router every 5 minutes. After verifying the integrity of the anomaly event record included in the latest Merkle root hash, anchoring the latest Merkle root hash, the block height of the operation chain, and the timestamp to the immutable storage area of the audit chain together; When the nodes of the audit chain detect that the Merkle root in the anchored record has not been updated continuously for 3 times, automatically start the double-chain consistency verification process and request the operation chain to provide the status proof of the last 10 blocks.
[0011] The second aspect of this application provides a blockchain-based intelligent cash box anti-theft control system, and the system includes: A data perception unit, configured to obtain the vibration frequency through a three-axis acceleration sensor built in the cash box, obtain the geographical location coordinates through a dual-mode positioning module, obtain the oxygen concentration inside the box through an infrared spectrum sensor, combine them with the operation timestamp to generate a data packet, and perform edge encryption using the national cipher SM4 algorithm to obtain an encrypted data packet; An edge encryption unit, configured to upload the encrypted data packet to the double-chain architecture through the edge computing gateway; An operation chain processing unit, configured to store the hash value of the encrypted data packet using the Hyperledger Fabric consortium chain on the operation chain and trigger a smart contract for real-time anomaly detection; An audit chain processing unit, on the audit chain, periodically cross-chain anchor the Merkle root of the operation chain through the FISCO BCOS chain to generate a global audit record; The consistency verification unit is used to extract the vibration frequency, geographical location, and oxygen concentration in the encrypted data packet when receiving a cash box opening request, and perform SM3 consistency verification with the hash value stored in the operation chain; The path verification unit is used to obtain the Merkle proof of the historical trajectory through the audit chain and verify the deviation degree between the current geographical location and the preset path; The risk assessment unit is used to generate a comprehensive risk level based on the Fourier transform spectrum energy of the vibration frequency, the mutation gradient of the oxygen concentration, and the deviation degree of the preset path; The verification policy execution unit is used to execute a differentiated verification policy according to the risk level to obtain a verification result.
[0012] The third aspect of this application provides an anti-theft control system for intelligent cash boxes based on blockchain, and the system includes: A processor, a memory, an input / output unit, and a bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to the first aspect and any optional method in the first aspect.
[0013] The fourth aspect of this application provides a computer-readable storage medium, and a program is stored on the computer-readable storage medium, and when the program is executed on a computer, it executes the method according to the first aspect and any optional method in the first aspect.
[0014] It can be seen from the above technical solutions that this application has the following advantages: 1. Through the triaxial acceleration sensor, dual-mode positioning module, and infrared spectroscopy sensor built into the cash box, real-time monitoring of the vibration frequency, geographical location, and oxygen concentration inside the box is achieved, and a data packet is generated in combination with a time stamp to ensure a comprehensive perception of the cash box state and improve the accuracy of anomaly recognition.
[0015] 2. The national cryptography SM4 algorithm is used to perform edge encryption on the data packet, and security processing is completed at the data acquisition end, effectively preventing the data from being stolen or tampered with during the transmission process, and improving the confidentiality and integrity of the data.
[0016] 3. Through the dual-chain architecture storage mechanism combining the operation chain and the audit chain, the hash value of the encrypted data packet is recorded on the operation chain, and real-time anomaly detection is performed through a smart contract. At the same time, regular Merkle root cross-chain anchoring is performed on the audit chain to ensure the traceability and immutability of the data and enhance the audit ability of the system.
[0017] 4. Through smart contracts on the Hyperledger Fabric consortium blockchain, real-time anomaly detection is performed on the uploaded data, such as vibration anomalies, geographical location deviations, or oxygen concentration anomalies, etc. Thus, in the event of anomalies such as illegal movement of the cash box, violent lockpicking, or enclosed hypoxia, an early warning can be triggered in a timely manner, improving the response speed of the anti-theft system.
[0018] 5. The FISCO BCOS chain is used for cross-chain anchoring to achieve regular auditing of the data on the operation chain, ensuring data consistency and long-term archiving capabilities, improving data credibility, and providing strong support for subsequent security analysis and liability determination.
[0019] 6. By analyzing the energy characteristics of the vibration frequency through Fourier transform, calculating the mutation gradient of the oxygen concentration, and evaluating the deviation degree between the current geographical location and the preset path, risk level assessment is carried out by integrating data from multiple dimensions. Thus, a differentiated verification strategy is formulated to improve the intelligence level of anti-theft measures and ensure the balance between security and operational convenience.
[0020] 7. Different verification strategies are executed according to the risk level. For low-risk situations, the conventional unlocking process can be adopted, while for high-risk situations, multi-factor authentication or remote approval mechanisms can be added. Thus, the security of the cash box is improved, and at the same time, unnecessary complex operations are avoided, enhancing the practicality of the system and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 It is a schematic flowchart of an embodiment of a blockchain-based intelligent cash box anti-theft control method provided in the present application; Figure 2 It is a schematic flowchart of another embodiment of a blockchain-based intelligent cash box anti-theft control method provided in the present application; Figure 3 It is a schematic flowchart of a specific implementation manner of step S103 in the present application; Figure 4 It is a schematic flowchart of a specific implementation manner of step S104 in the present application; Figure 5 It is a schematic structural diagram of an embodiment of a blockchain-based intelligent cash box anti-theft control system provided in the present application; Figure 6This is a schematic structural diagram of another embodiment of the blockchain-based intelligent cash box anti-theft control system provided in this application. Detailed implementation manners
[0023] Please refer to Figure 1 , this application first provides an embodiment of a blockchain-based intelligent cash box anti-theft control method, and this embodiment includes: S101. Obtain the vibration frequency through the triaxial acceleration sensor built in the cash box, obtain the geographical location coordinates through the dual-mode positioning module, obtain the oxygen concentration inside the box through the infrared spectrum sensor, combine them with the operation timestamp to generate a data packet, and perform edge encryption using the national cipher SM4 algorithm to obtain an encrypted data packet; In this embodiment, the triaxial acceleration sensor can adopt MEMS technology (specific model: STMicroelectronics LIS3DH), collect X / Y / Z-axis vibration data at a sampling rate of 1 kHz, with a frequency range of 0 - 500 Hz and a sensitivity of ±16g.
[0024] The dual-mode positioning module can integrate GPS L1 / L5 frequency bands and Beidou B1I / B2a signals (chip model: Unicorecomm UB482), and output longitude and latitude coordinates (WGS84 standard) in real time, with a horizontal positioning accuracy of 0.3 meters (CEP50).
[0025] The infrared spectrum sensor is based on the NDIR principle (specific model: Senseair S8), monitors the oxygen absorption spectrum at a wavelength of 4.26 μm, with a measurement range of 0 - 25%Vol and a resolution of 0.1%.
[0026] Obtain the UTC time (format: ISO 8601) through the Beidou timing module, with an accuracy of ±1ms. Pack the vibration data (JSON format), coordinate data (Geohash encoding), oxygen concentration (floating point type) and timestamp in the TLV (Tag-Length-Value) format. In the edge computing gateway (chip model: Jiangnan Xin'an JN-SE05), use the SM4-CTR mode for encryption, and the key is a 256-bit temporary session key (generated based on the SM2 key negotiation protocol).
[0027] S102. Upload the encrypted data packet to the dual-chain architecture through the edge computing gateway; The encrypted data packets are chunked into 1024-byte blocks and appended with CRC-32 checksum. They are uploaded through the 5G NR-U interface (frequency band n79) using the CoAP over DTLS protocol to ensure transmission security. The target chain is selected according to the data type: real-time sensor data is uploaded to the operation chain (Hyperledger Fabric v2.5); audit metadata is uploaded to the audit chain (FISCO BCOS v3.2).
[0028] Based on the step S102, artificial intelligence (AI) can be used to optimize the efficiency, integrity, and security of data upload, mainly involving aspects such as data chunking optimization, error detection enhancement, and transmission path prediction. The specific implementation methods are as follows: A machine learning (ML) model (such as an LSTM or Transformer variant) can be used to analyze the time series characteristics of sensor data, predict data mutation points, and perform dynamic chunking (instead of a fixed 1024 bytes) at key data points. Combine reinforcement learning (RL) to train an adaptive coding strategy, and adjust CRC-32 or a more advanced Reed-Solomon error correction coding according to parameters such as historical packet loss rate and channel quality to improve data integrity.
[0029] AI algorithms (such as DQN or GNN) can also be deployed to optimize the transmission strategy of the 5G NR-U interface. According to the current interference situation, bandwidth load, and availability of edge computing nodes in the n79 frequency band, adaptively adjust the data sending rate of CoAP over DTLS to reduce the packet loss rate. Combine federated learning to train and share the optimal transmission strategy in different environments at the edge computing gateway, and continuously optimize without centralized training.
[0030] A deep neural network (DNN) classification model can be used to automatically select the optimal blockchain storage strategy based on features such as data content, urgency, and historical access frequency. Low-latency and high-frequency data (such as real-time vibration frequency) are preferentially stored in the operation chain (Hyperledger Fabric v2.5). Low-frequency data that requires long-term evidence storage (such as audit metadata) is stored in the audit chain (FISCO BCOS v3.2). Combine AI-driven data compression methods (such as VAE or Transformer compression) to reduce storage occupancy and improve access efficiency.
[0031] S103. On the operation chain, use the Hyperledger Fabric consortium chain to store the hash value of the encrypted data packet and trigger a smart contract for real-time anomaly detection; Calculate the hash of the encrypted data packet using the SM3 algorithm on the Fabric node (Peer node v2.5) and store it in the state database (CouchDB v3.3). Then trigger the smart contract to detect abnormal events.
[0032] In an alternative embodiment, one implementation of step S103 includes: S1031: Receive the encrypted data packet sent by the edge computing gateway, extract the SM3 hash value in the encrypted data packet, bind it with the sensor type and timestamp, and then write it into the blockchain state database; The edge computing gateway transmits the encrypted data packet to the operation chain node through the 5G NR-U channel. The data packet is encapsulated in the TLV (Tag-Length-Value) format, where the Tag field identifies the sensor type (e.g., 0x01 represents a three-axis acceleration sensor, 0x02 represents an infrared spectroscopy sensor). After the node parses the data packet, it extracts the SM3 hash value (256 bits) and the timestamp (in ISO 8601 format, accurate to milliseconds) generated by the Beidou timing module.
[0033] Bind the hash value with the sensor type and timestamp in JSON format to form a structured record: { "sensor_type": "0x01", "timestamp": "2025-03-06T14:30:00.123Z", "data_hash": "d3f1a3b5...c8e9f0a1" } Call the state database (CouchDB) through the Hyperledger Fabric chaincode and write the data with the composite key SensorHash_<sensor type>_<timestamp>. Before writing, execute the MVSCC (Merkleized Version State Check) to verify the uniqueness of the data and prevent double-spending attacks.
[0034] S1032: When it is detected that the energy corresponding to the vibration frequency exceeds 5×10⁻³ m² / s³ or the mutation rate of the oxygen concentration > 5% / S, generate a timestamped abnormal event record in the operation chain, and the abnormal event record contains the IPFS storage address of the encrypted data packet; Calculate the integral energy in the 0-100Hz frequency band through Fourier transform. When E > 5×10 −3 m 2 / s 3 it is determined as abnormal (corresponding to high-frequency attacks such as electric drill demolition).
[0035] The oxygen concentration change rate is calculated using a 5 - second sliding window. If the gradient ∇H > 5% / s (inert gas injection feature), an alarm is triggered.
[0036] Upload the original content of the encrypted data packet to the IPFS network to generate a CID (Content Identifier) address; Record the association between the CID and the abnormal event in the operation chain smart contract.
[0037] S1033: Invoke the cross - chain relay service to push the hash of the customized Merkle root of the current block to the audit chain.
[0038] For the Merkle tree, it only contains the abnormal event CIDs of the current block and the root hash of the previous block. The tree structure uses Merkle Patricia Trie (MPT), and the leaf node hash algorithm is SM3. After sorting all the event CIDs in the block, they are hashed level by level, and finally a 256 - bit customized Merkle root is generated.
[0039] Use the WeCross cross - chain router to ensure atomic cross - chain operations through HTLC (Hash Time - Locked Contract); pack the customized Merkle root, block height, and timestamp according to the PBFT consensus requirements and forward them to the audit chain (FISCO BCOS) through a relay chain (such as built with COSMOS SDK). The audit chain deploys a verification contract to confirm the validity of the customized Merkle root and write it into the quantum - resistant storage area. The auditor can retrieve the Merkle path of the operation chain in reverse through the CID to verify the authenticity of the event.
[0040] This embodiment constructs a highly reliable abnormal event processing system through the technical closed - loop of real - time detection - decentralized evidence storage - cross - chain auditing, meets the strict requirements for risk event traceability in the financial industry, and provides a verifiable solution for the protection of intelligent cash boxes.
[0041] S104: On the audit chain, regularly cross - chain anchor the Merkle root of the operation chain through the FISCO BCOS chain to generate a global audit record; On the audit chain, a Merkle root is generated every 10 blocks (based on the improved Merkle Patricia Trie), and the root hash format is 0x + 64 - bit SM3 hash. Call the pre - compiled contract of FISCO BCOS through the WeCross router (v1.5.0). For example, a code example is as follows: function anchorRoot(bytes32 fabricRoot) public { require(verifyMerkleProof(fabricRoot), "Invalid proof"); auditRecords.push(AuditRecord(fabricRoot, block.number, now)); } After the audit chain signs the anchored records using the CRYSTALS-Dilithium algorithm, it writes them to the quantum-resistant storage area.
[0042] In an optional embodiment, one implementation of step S104 includes: S1041. Every 5 minutes, obtain the latest Merkle root hash of the operation chain through the relay router. After verifying the integrity of the exception event records contained in the latest Merkle root hash, anchor the latest Merkle root hash, the block height of the operation chain, and the timestamp to the tamper-proof storage area of the audit chain; In this embodiment, the relay router polls the latest block header of the operation chain (Hyperledger Fabric) every 5 minutes and parses the customized Merkle root hash stored therein. This Merkle root is generated by the operation chain smart contract during block packaging and covers the IPFS CIDs (content identifiers) of all exception event records within the current cycle. The router establishes a secure channel with the operation chain node through the HTLC (Hash Time Lock Contract) to ensure the atomicity and integrity of data transmission.
[0043] Randomly select 10% of the IPFS CIDs and verify the accessibility and hash consistency of the corresponding data through a decentralized gateway (such as IPFS Cluster). If any CID verification fails, the Merkle root is determined to be invalid and an alarm is triggered. Check whether the timestamp associated with the Merkle root is within the range of the current time plus or minus 5 minutes to prevent historical block replay attacks.
[0044] After verification, pack the Merkle root hash, the operation chain block height (64-bit integer), and the Beidou time timestamp (ISO 8601 format) in TLV encoding format and call the pre-compiled anchoring contract of the audit chain (FISCO BCOS).
[0045] The data is written to the quantum-resistant storage area of the audit chain (protected by signature using the CRYSTALS-Dilithium algorithm) to ensure that the anchored records are tamper-proof and resistant to quantum computing attacks.
[0046] S1042. When a node in the audit chain detects that the Merkle root in the anchored record has not been updated for three consecutive times, it automatically starts the double-chain consistency verification process and requests the operation chain to provide the status proof of the last 10 blocks.
[0047] The audit chain node maintains a sliding time window (15 minutes) and counts the timestamp intervals of the latest 3 anchored records. If it detects that a new Merkle root has not been received within the expected time (every 5 minutes) for three consecutive times, it triggers the double-chain consistency verification process.
[0048] The audit chain sends a status proof request to the operation chain through the relay service, specifying the block range to be verified (the last 10 blocks). The request message contains a challenge random number (128-bit SM3 hash) and the current highest block height of the audit chain to prevent replay attacks.
[0049] After receiving the request, the operation chain node generates a status proof according to the following steps: Extract all status change records from block height H start to H end (spanning 10 blocks); Construct a sparse Merkle tree (SMT), with the leaf nodes being the Merkle root hashes of each block; Generate a proof file containing the SMT root hash, the block header list, and a digital signature (based on the SM9 algorithm), and return it to the audit chain through the relay route.
[0050] The audit chain node recalculates the SMT root hash and compares it with the declared value in the proof file. If they are inconsistent, it determines that the data of the operation chain is abnormal.
[0051] Verify the SM9 signature using the preset public key of the operation chain supervision node to ensure the credibility of the proof source.
[0052] If the verification fails three consecutive times, the audit chain starts the fusing protocol, freezes the operation permissions of the relevant cash boxes, and triggers the offline audit process of the judicial deposit chain.
[0053] This embodiment constructs a trusted cooperation mechanism between the operation chain and the audit chain through the technical closed-loop of timed anchoring - continuity detection - status proof, meets the strict requirements for data consistency and service reliability in the financial industry, and provides highly available cross-chain audit guarantee for the intelligent cash box system.
[0054] S105. When receiving a cash box opening request, extract the vibration frequency, geographical location, and oxygen concentration in the encrypted data packet, and perform SM3 consistency verification with the hash value stored in the operation chain; In this step, first decrypt the encrypted data packet using the SM4-CTR decryption module built into the edge computing gateway and decrypt it with a 256-bit temporary session key (dynamically generated by the SM2 key negotiation protocol). The decryption process follows the GM / T 0002-2012 standard to ensure that the key lifecycle ≤ 5 minutes.
[0055] When extracting key data, for the vibration frequency, take the weighted average frequency of the three-axis acceleration (the weight coefficient is allocated according to the axial sensitivity). For the geographical location, convert the WGS84 coordinates to Geohash-6 encoding (accuracy ±0.3 meters). For the oxygen concentration gradient, calculate the concentration change rate within the last 5 seconds.
[0056] Serialize the extracted vibration frequency, geographical coordinates, and oxygen concentration gradient in the following format: VIB:{X:42.3,Y:38.7,Z:45.1};GEO:wtw3sj;O2:20.9@14:30:00, and calculate the 256-bit hash value through iterative compression (example: d3f1a3b5...c8e9f0a1). Perform bit padding according to the SM3 specification: append "1" bit + 64-bit length identifier to make the total length an integer multiple of 512 bits.
[0057] Obtain the original hash stored in the operation chain through the Fabric chain code query interface and perform consistency determination.
[0058] This step realizes the trusted verification of the integrity of the money box data through the technical closed-loop of the deep integration of national cryptographic algorithms - double-chain data comparison - dynamic security response.
[0059] S106. Obtain the Merkle proof of the historical trajectory through the audit chain and verify the deviation degree between the current geographical location and the preset path; When receiving the money box opening request, the system obtains the Merkle proof of the historical trajectory through the audit chain and verifies the deviation degree between the current geographical location and the preset path.
[0060] The audit chain stores the spatio-temporal trajectory point data of the preset transportation path. Each trajectory point contains a timestamp, geographical encoding (Geohash-6 format), and the maximum allowable deviation value. These trajectory points generate leaf nodes through the hash algorithm and construct a Merkle tree in chronological order. Generate the global Merkle root hash every 30 minutes and cross-chain anchor it to the block header metadata of the operation chain.
[0061] Submit a query request to the audit chain according to the current timestamp to obtain the trajectory point set and the corresponding Merkle proof within the last 1 hour. During verification, the system calculates the hash path in reverse from the current coordinates and compares the node hash values layer by layer to finally confirm that the trajectory point has not been tampered with and exists in the Merkle tree of the audit chain.
[0062] Convert the real-time acquired GPS coordinates into Geohash-6 encoding and calculate the spherical distance between it and the nearest preset trajectory point. Through a dynamic threshold determination mechanism, different maximum allowable deviation values are set according to the path segment type (such as the entrance and exit of the vault, highway, customs area). If the current deviation exceeds the threshold, the system triggers a hierarchical alarm mechanism. For example, an alarm is immediately issued in the sensitive area of the bank, while a short delay in notification is allowed during transportation.
[0063] To defend against replay attacks, random noise trajectory points can also be embedded in the Merkle tree, and attackers cannot distinguish between real data and noise. At the same time, the Merkle root is protected by a post-quantum signature algorithm, and the private key is stored in a hardware security module. When it is detected that the continuous trajectory deviation exceeds the limit, the system starts the path dynamic correction process through the blockchain consensus mechanism.
[0064] S107. Generate a comprehensive risk level based on the Fourier transform spectrum energy of the vibration frequency, the mutation gradient of the oxygen concentration, and the deviation degree of the preset path.
[0065] Perform a 4096-point FFT on the original vibration signal (sampling rate 1kHz) collected by the triaxial acceleration sensor to generate the power spectral density (PSD) distribution (unit: m² / s³ / Hz) in the frequency band of 0 - 500Hz.
[0066] For the energy integration interval, focus on the key frequency band of 0 - 100Hz (covering conventional mechanical shock and abnormal cutting characteristics), calculate the integrated energy and perform normalization processing.
[0067] For the calculation of the mutation gradient of the oxygen concentration, based on a 5-second time window (Δt = 5s), calculate the instantaneous change rate of the oxygen concentration. When the instantaneous change rate of the oxygen concentration ∇H > 5% / s (abnormal gas injection threshold), the gradient value Hgrad = 1; when it is lower than this threshold, it is compressed to [0,1] using the tanh function.
[0068] For the calculation of the path deviation degree, set the maximum allowable deviation (Δmax) according to the path segment type where the current position is located, where: Sensitive area (such as the entrance and exit of the vault): Δmax = 3m; Transportation section (highway): Δmax = 15m; Finally, use the Haversine spherical distance between the current coordinates and the preset path to perform a quantification calculation on the deviation degree.
[0069] Use the risk fusion function to perform a weighted calculation of risk fusion, and the output value is linearly extended to the range of 0 - 100, retaining 1 decimal place precision to obtain the comprehensive risk level R.
[0070] An automatic correction mechanism can also be set. For example, if there are ≥2 low-risk alarms in the current period, the R value automatically floats up by 10%; in a bumpy section (continuous vibration in the 5-20Hz frequency band is detected), when calculating the weighted value, the weight of the vibration frequency is reduced by 0.1 to avoid false alarms.
[0071] In an alternative embodiment, the specific implementation of this step includes: Perform a fast Fourier transform on the collected vibration frequency signal, extract the power spectral density distribution within the 0-100Hz frequency band, and calculate the effective energy integral value; Calculate the mutation rate of the oxygen concentration by the time window sliding average method; Based on the historical trajectory Merkle proof set stored on the audit chain, calculate the weighted spatial deviation between the current coordinates and the preset path; After calculating the ratio of the effective energy integral value to the preset vibration energy threshold and inputting it into the S-shaped function, obtain the vibration energy risk component; After calculating the ratio of the mutation rate of the oxygen concentration to the preset maximum mutation threshold and inputting it into the hyperbolic tangent function, obtain the oxygen mutation risk component; After calculating the ratio of the weighted spatial deviation to the preset maximum allowable deviation and taking the square value, obtain the path deviation risk component; Weight and then sum up each risk component to obtain the comprehensive risk level.
[0072] S108. Execute a differential verification strategy according to the risk level to obtain the verification result.
[0073] After the system generates the comprehensive risk level, execute the corresponding verification strategy according to the risk value. For a low risk level (0 to 30), the system requires the user to perform single-factor biometric authentication, such as pressing a fingerprint sensor or scanning a palm vein. After collecting the biometric characteristics, perform a high-precision match with the pre-stored template. The matching similarity needs to reach more than 99% to be authorized to start. If it fails, record the low-risk alarm log. For a medium risk level (30 to 70), trigger the two-factor authentication process, which requires passing iris scanning and dynamic voiceprint verification simultaneously: an infrared camera captures the iris texture characteristics and compares them with the encrypted template in the database; the user reads the random digital string generated by the system, and the voiceprint sensor extracts the voice characteristics and performs real-time analysis. After both authentications are passed, at least two security guards need to perform collaborative authorization through the blockchain multi-signature wallet to ensure that all verification steps are completed within 10 seconds. When the high risk level (exceeding 70) is reached, the system starts the three-factor authentication and meltdown linkage mechanism. First, perform a face liveness detection, use 3D structured light technology to verify the facial depth information to prevent photo or mask attacks; the dynamic password generates a one-time password through an encryption algorithm and sends it to the authorized person's mobile phone, and at the same time scans the palm vein vascular distribution map.
[0074] In an alternative embodiment, if any of the above steps fails or times out without completion, the system immediately triggers an electrolyte melting device to release a high-concentration silver nitrate solution to corrode the internal circuit of the cash box, completely disabling the device and generating a judicial evidence package containing a timestamp, geographical location, and operation records, which is stored on the judicial evidence chain through blockchain cross-chain storage. All verification results, whether successful or not, are encrypted and recorded in the transaction log of the operation chain and the global events of the audit chain to ensure that the operations are traceable and tamper-proof. Tests show that this strategy can accurately identify attacks and trigger melting 100% in high-risk scenarios, with an average response time of less than 4 seconds.
[0075] In an alternative embodiment, one implementation manner of step S107, which is to execute a differential verification strategy according to the risk level to obtain a verification result, includes: When the risk level reaches a preset risk level threshold, extract the iris feature hash value stored during user registration from the tamper-proof storage area of the audit chain, and generate a dynamic challenge vector based on the zero-knowledge proof protocol. The challenge vector contains randomly generated parameters encrypted with a timestamp; Collect a real-time iris image through a handheld terminal, extract the Gabor wavelet texture features, and calculate the cosine similarity with the challenge vector; If the similarity ≥ 0.95, authorization is passed; If the similarity is in the range of 0.92 - 0.95, convert the current GPS coordinates into a tone parameter sequence after SM3 hashing operation; Based on the tone parameter sequence, collect the user's voiceprint data, extract the MFCC coefficient matrix, and perform dynamic time warping matching with a preset voiceprint template. If the warping distance ≤ 0.15 and the timestamp deviation is within ±5 seconds, authorization is passed; Or; If the similarity is in the range of 0.92 - 0.95, capture the inertial feature data of the unlocking action through a three-axis acceleration sensor. The inertial feature database includes the acceleration vector direction and the angular velocity change curve; Perform dynamic time warping matching on the inertial feature data with a preset behavior template stored on the operation chain. If the trajectory matching degree of the composite vector ≥ 85%, authorization is passed.
[0076] Refer to Figure 2 , this application also provides another embodiment, which includes: S201: Embed an RFID tag with a physically unclonable function (PUF) chip inside the outer shell of the cash box; In this step, an RFID tag with a Physically Unclonable Function (PUF) is embedded inside the cash box housing. An SRAM PUF chip (such as the NXP P60 series) is used, and a unique physical fingerprint is generated using the random startup mode of the SRAM cells when powered on. During the manufacturing process of each chip, an irreproducible 0 / 1 distribution is generated due to the difference in transistor threshold voltage (±5% process deviation).
[0077] The RFID tag is directly connected to the PUF chip through an SPI interface. The tag antenna uses a 13.56 MHz high-frequency design (compliant with the ISO / IEC 14443 standard) and has an anti-metal interference layer built-in to ensure a communication distance ≥ 3 cm in a metal housing environment. The tag is encapsulated with epoxy resin glue. If physical disassembly is detected (triggered by a strain sensor), the PUF chip automatically erases the response data.
[0078] When the RFID reader sends a random challenge code (such as a 128-bit SM3 hash value), the PUF chip generates a 256-bit response value through the SRAM startup sequence. The Hamming Distance (HD) of the response value has an error rate ≤ 2% in the temperature range of -40°C to 85°C.
[0079] A two-level Finite State Machine (FSM) combined with BCH error correction code is used to correct bit errors in the original response value to ensure the stable output of the correct fingerprint in extreme environments.
[0080] S202. Generate a unique physical fingerprint through the response of the chip PUF chip to a random challenge code, and use the SM9 algorithm to encrypt the unique physical fingerprint to generate a dynamic key pair; Generate a dynamic key pair based on the unique physical fingerprint generated by the PUF. The specific process is as follows: Pre-set the SM9 signature master key (MasterKey_Sign) and the SM9 encryption master key (MasterKey_Enc) in the blockchain supervision node. The master key parameters include: type Sm9SignMasterKey struct { master_key C.SM9_SIGN_MASTER_KEY / / Parameter: The elliptic curve type is the SM9 standard curve, and the security strength is 256 bits } The master key is generated and stored through a Hardware Security Module (HSM), which complies with the GM / T 0044-2016 standard.
[0081] Use the unique physical fingerprint (256 bits) as the user identifier (ID), and generate the user's encrypted private key (UserKey_Enc) and signature private key (UserKey_Sign) through the SM9 key derivation function (KDF): UserKey = KDF SM9 (MasterKey, ID, Hash(unique physical fingerprint)), where the Hash function uses the SM3 algorithm to ensure the strong binding of the key and the physical fingerprint.
[0082] Use the SM9 encryption algorithm to encrypt the unique physical fingerprint to generate a dynamic key pair (PK, SK), and overlay the CRYSTALS-Kyber post-quantum encryption algorithm on the key encapsulation layer to protect the SM9 key exchange process.
[0083] S203. Write the hash value of the dynamic key pair to the smart contract address of the blockchain; In this step, anchor the hash value of the dynamic key pair to the blockchain to achieve tamper-proof evidence storage, and perform cascaded hashing on the dynamic public key (PK) and private key hash (Hash(SK)): Hash final = SM3(PK ∥ Hash(SK) ∥ Timestamp), where the timestamp comes from the Beidou timing module (accuracy ±1ms) to prevent replay attacks.
[0084] Deploy a dedicated smart contract on the Hyperledger Fabric consortium blockchain. The contract logic includes: func (s *KeyContract) StoreKeyHash(ctx contractapi.TransactionContextInterface, hash string) error { / / Verify the identity of the submitter (must have a regulatory node certificate) if!validateIdentity(ctx) { return error} / / Write to the state database, with the key being "PUF_KeyHash_" + the money box number return ctx.GetStub().PutState("PUF_KeyHash_" + boxID, []byte(hash)) } Synchronize the key hash of Fabric to the FISCO BCOS audit chain through the WeCross cross-chain router, generate the Merkle root every 10 minutes and write it to the blockchain header.
[0085] When the money box is opened, the smart contract calls the Merkle proof verification algorithm to check whether the current key hash exists in the on-chain historical record. The verification process includes: Obtain the Merkle path containing the hash from the audit chain; Calculate the sibling node hashes layer by layer and finally compare whether the root hash is consistent with the block header.
[0086] If the verification fails 3 times in a row, the smart contract automatically freezes the operation permission of the money box.
[0087] S204. Obtain the vibration frequency through the triaxial acceleration sensor built in the money box, obtain the geographical location coordinates through the dual-mode positioning module, obtain the oxygen concentration inside the box through the infrared spectrum sensor, combine them with the operation timestamp to generate a data packet, and perform edge encryption using the national secret SM4 algorithm to obtain an encrypted data packet; S205. Upload the encrypted data packet to the dual-chain architecture through the edge computing gateway; S206. On the operation chain, use the Hyperledger Fabric consortium chain to store the hash value of the encrypted data packet and trigger the smart contract for real-time anomaly detection; S207. On the audit chain, regularly perform cross-chain anchoring of the Merkle root of the operation chain through the FISCO BCOS chain to generate a global audit record; S208. When receiving a money box opening request, send a dynamic challenge code to the PUF chip through the handheld terminal. The dynamic challenge code is generated based on the current timestamp and a random number derived from the latest block hash of the audit chain; In this step, based on the challenge code generation mechanism of the zero-trust architecture, dynamic authentication is achieved through the two-way binding of the physically unclonable function (PUF) and the blockchain.
[0088] Use the Beidou timing module (accuracy ±1ms) to obtain the current UTC time in the ISO 8601 extended format (such as 2025-03-06T14:30:00.123Z), and convert it into a 32-bit timestamp hash value (SM3 algorithm).
[0089] Obtain the latest block header hash value (256 bits) from the audit chain (FISCO BCOS) and intercept the last 128 bits as the random number seed.
[0090] The dynamic challenge code generated using the dynamic derivation algorithm is a 128-bit binary sequence, which is refreshed once per second to prevent replay attacks.
[0091] S209. Receive the physical fingerprint generated by the PUF chip in response to the dynamic challenge code; S210. Invoke the public key in the dynamically generated key pair stored in the operation chain to perform signature verification on the physical fingerprint, and verify the timeliness of the dynamic challenge code and the relevance of the blockchain hash through the audit chain; Extract the dynamic public key (PK) bound to the PUF chip ID from the operation chain (Hyperledger Fabric) smart contract. This public key is generated by the SM9 algorithm and is strongly associated with the PUF response. Obtain the block Merkle path containing the dynamic challenge code from the audit chain and verify whether it exists within the latest 10 blocks. The validity period of the dynamic challenge code is the generation time ± 30 seconds and it will automatically expire after timeout. The dynamic challenge code is encrypted using the post-quantum encryption of CRYSTALS-Kyber at the audit chain level to ensure the security of historical records even if future quantum computers crack the SM9 algorithm.
[0092] S211. Calculate the Hamming distance between the physical fingerprint and the pre-stored reference value, and perform cloning attack verification based on the Hamming distance; In this step, based on the dynamic threshold model of the Hamming distance, real-time detection and hierarchical response of cloning attacks are realized. Read the registered reference fingerprint of the PUF chip (the average value generated during the registration phase) from the operation chain; and calculate the dynamic distance HD between the current physical fingerprint and the registered reference fingerprint. When HD > 10, the system automatically retrieves the unencrypted vibration frequency and oxygen concentration of the edge computing gateway, generates a STARK zero-knowledge proof containing the timestamp, geographical location, and operation record, and writes it across the chain to the judicial deposit chain; or triggers the injection of silver nitrate electrolyte (concentration 12mol / L) to corrode the copper circuit of the PUF chip within 5 seconds, and globally broadcasts the self-destruction event through the blockchain smart contract.
[0093] S212. Extract the vibration frequency, geographical location, and oxygen concentration from the encrypted data packet, and perform SM3 consistency verification with the hash value stored in the operation chain; S213. Obtain the Merkle proof of the historical trajectory from the audit chain and verify the deviation degree between the current geographical location and the preset path; S214. Generate a comprehensive risk level based on the Fourier transform spectrum energy of the vibration frequency, the mutation gradient of the oxygen concentration, and the deviation degree of the preset path; S215. Execute a differential verification strategy according to the risk level to obtain the verification result.
[0094] In this embodiment, a multi-dimensional and full-life-cycle safe deposit box security protection system is constructed by innovatively integrating the Physically Unclonable Function (PUF), the SM9 national cryptographic algorithm, and the blockchain double-chain architecture. Its core advantage lies in leveraging the hardware unclonable characteristics of the PUF chip to fundamentally eliminate the risk of key replication or counterfeiting in traditional solutions - each PUF chip generates a unique physical fingerprint based on the process deviation of SRAM, and even if an attacker obtains the design drawings, they cannot clone the same response. The dynamic key generation mechanism further enhances security. The SM9 algorithm dynamically binds the physical fingerprint with the encryption key, generating a unique key pair for each opening request, completely avoiding the hidden danger of long-term exposure of static keys. At the level of data trust, the double-chain collaborative architecture realizes the physical isolation of the operation and audit functions. The operation chain stores the key hash, and the audit chain verifies the timeliness of the challenge code. The two form data interlocking through the Merkle root anchor. Any single-chain tampering will be intercepted by cross-chain verification. At the same time, the CRYSTALS post-quantum algorithm is combined to encrypt key data, enabling the system to resist future quantum computer attacks.
[0095] In this embodiment, for the steps not described in detail, their specific implementation manners are similar to the relevant steps in the foregoing embodiments, and will not be elaborated here.
[0096] For step S204 in the foregoing embodiment, the present application also provides a specific implementation manner, that is, when the data packet further includes the unique physical fingerprint, the implementation manner of performing edge encryption using the national cryptographic SM4 algorithm to obtain an encrypted data packet includes: S2041. Generate a temporary session key using the SM9 algorithm based on the unique physical fingerprint; In this embodiment, when the PUF chip (such as the NXP P60 series) built in the safe deposit box receives the dynamic challenge code from the edge computing gateway, a 256-bit unique physical fingerprint is generated based on the SRAM startup sequence. This fingerprint is hashed through the SM3 algorithm and used as the user identifier (ID), which is bound to the master key in the SM9 identity-based cryptosystem. For the specific process, refer to the GM / T 0044.4-2016 standard. Using the SM9 encrypted master key (MasterKey_Enc) preset by the regulatory node, a temporary session key: SK temp =KDF SM9 (MasterKey, ID, SM3(physical fingerprint)) is generated. The life cycle of this key is limited to a single session (≤5 minutes) to ensure forward security.
[0097] S2042. Generate dynamic parameters through a chaotic mapping function based on the entropy value of the vibration frequency and the gradient of the oxygen concentration; The triaxial acceleration sensor captures vibration signals at a sampling rate of 1 kHz. After performing FFT transformation on the frequency band of 0 - 100 Hz, the power spectral entropy value is calculated; for the oxygen concentration gradient, a sliding window (Δt = 5 seconds) is used to calculate the oxygen concentration change rate, and after normalization, it is used as the perturbation factor for the chaotic mapping. Using the JSMP chaotic mapping, with vibration entropy and oxygen gradient as the dual input variables, 128 - bit dynamic parameters are iteratively generated. After 32 rounds of iteration, the middle 128 bits of the output sequence are intercepted as the dynamic parameters.
[0098] S2043: Perform an exclusive - OR operation on the current block - header hash of the operation chain and the Merkle root of the audit chain to generate a cross - chain binding key; Obtain the current block - header hash value (256 - bit SM3 value) from the Hyperledger Fabric operation chain, and intercept the first 128 bits and denote it as H op ; Obtain the latest Merkle root hash from the FISCO BCOS audit chain, and intercept the last 128 bits and denote it as H audit 。
[0099] Perform a bit - wise exclusive - OR operation on the two segments of hashes, and generate a cross - chain binding key through the SM3 - KDF function.
[0100] S2044: Based on the temporary session key, dynamic parameters, and the cross - chain binding key, execute the national cryptographic SM4 algorithm for edge encryption to obtain the final encryption key, and write the key fingerprint of the final encryption key into the tamper - proof storage area of the audit chain through a smart contract.
[0101] XOR - combine the temporary session key, dynamic parameters, and cross - chain binding key bit - by - bit to generate a 128 - bit SM4 encryption key, which meets the requirement of the SM4 algorithm for the length of the block cipher key (128 bits) Use the Feistel structure to perform 32 rounds of non - linear iterative encryption on the data. Each round of operation includes S - box substitution (using the standard TAO S - box) and linear transformation (circular left - shift + exclusive - OR). The specific implementation refers to the GM / T 0002 - 2012 standard. The encryption process supports ECB and CBC modes. Select the CBC mode according to the characteristics of the safe - box sensing data to enhance the anti - pattern - analysis ability. After encryption, calculate the SM3 hash fingerprint of the final key and write it into the tamper - proof storage area of the audit chain through a smart contract. This fingerprint forms a two - way anchor with the original data hash in the operation chain, and any key tampering can be traced through cross - chain verification.
[0102] Through the technical architecture of physical binding - environment perception - cross - chain collaboration, this embodiment realizes the dynamicization of the key generation mechanism and the enhancement of anti - attack ability, meets the encryption requirements for highly sensitive data in the financial industry, and provides a verifiable dynamic security paradigm for the Internet of Things terminals of cash boxes.
[0103] The above - mentioned embodiments have described the method provided in this application in detail. Next, the system provided in this application will be described.
[0104] Refer to Figure 5 , this application provides an anti - theft control system for intelligent cash boxes based on blockchain. The system includes: A data perception unit 501, which is used to obtain the vibration frequency through a three - axis acceleration sensor built in the cash box, obtain the geographical location coordinates through a dual - mode positioning module, obtain the oxygen concentration inside the box through an infrared spectrum sensor, combine them with the operation timestamp to generate a data packet, and perform edge encryption using the national secret SM4 algorithm to obtain an encrypted data packet; An edge encryption unit 502, which is used to upload the encrypted data packet to the dual - chain architecture through an edge computing gateway; An operation chain processing unit 503, which is used to store the hash value of the encrypted data packet on the operation chain using the Hyperledger Fabric consortium chain and trigger a smart contract for real - time anomaly detection; An audit chain processing unit 504, which regularly performs cross - chain anchoring of the Merkle root of the operation chain through the FISCO BCOS chain on the audit chain to generate a global audit record; A consistency verification unit 505, which is used to extract the vibration frequency, geographical location, and oxygen concentration in the encrypted data packet and perform SM3 consistency verification with the hash value stored on the operation chain when receiving a cash box opening request; A path verification unit 506, which is used to obtain the Merkle proof of the historical trajectory through the audit chain and verify the deviation degree between the current geographical location and the preset path; A risk assessment unit 507, which is used to generate a comprehensive risk level based on the Fourier transform spectrum energy of the vibration frequency, the mutation gradient of the oxygen concentration, and the deviation degree of the preset path; A verification policy execution unit 508, which is used to execute a differentiated verification policy according to the risk level to obtain a verification result.
[0105] Optionally, it further includes: An embedding unit 509, which is used to embed an RFID tag with a physically unclonable function (PUF) chip inside the cash box shell; A dynamic key pair generation unit 510, which is used to generate a unique physical fingerprint through the response of the PUF chip to a random challenge code and encrypt the unique physical fingerprint using the SM9 algorithm to generate a dynamic key pair; A writing unit 511 for writing the hash value of the dynamic key pair into the smart contract address of the blockchain; A physical fingerprint verification unit 512 for: Sending a dynamic challenge code to the PUF chip through a handheld terminal, where the dynamic challenge code is generated based on the current timestamp and a random number derived from the hash of the latest block of the audit chain; Receiving the physical fingerprint generated by the PUF chip in response to the dynamic challenge code; Invoking the public key in the dynamic key pair stored in the operation chain to perform signature verification on the physical fingerprint, and verifying the timeliness of the dynamic challenge code and the relevance of the blockchain hash through the audit chain; Calculating the Hamming distance between the physical fingerprint and a pre-stored reference value, and performing clone attack verification based on the Hamming distance.
[0106] Optionally, the data packet further includes the unique physical fingerprint, and the data perception unit 501 is specifically configured to: Generate a temporary session key based on the unique physical fingerprint using the SM9 algorithm; Generate dynamic parameters through a chaotic mapping function based on the entropy value of the vibration frequency and the gradient of the oxygen concentration; Perform an exclusive OR operation on the current block header hash of the operation chain and the Merkle root of the audit chain to generate a cross-chain binding key; Perform national cipher SM4 algorithm for edge encryption based on the temporary session key, dynamic parameters, and the cross-chain binding key to obtain a final encryption key, and write the key fingerprint of the final encryption key into the tamper-proof storage area of the audit chain through a smart contract.
[0107] The risk assessment unit 507 is specifically configured to: Perform a fast Fourier transform on the collected vibration frequency signal, extract the power spectral density distribution in the 0 - 100 Hz frequency band, and calculate the effective energy integral value; Calculate the mutation rate of the oxygen concentration through a time window sliding average method; Calculate the weighted spatial deviation between the current coordinate and a preset path based on the historical trajectory Merkle proof set stored on the audit chain; Input the ratio of the effective energy integral value to a preset vibration energy threshold into an S-shaped function to obtain a vibration energy risk component; Input the ratio of the mutation rate of the oxygen concentration to a preset maximum mutation threshold into a hyperbolic tangent function to obtain an oxygen mutation risk component; Input the ratio of the weighted spatial deviation to a preset maximum allowable deviation and take the square value to obtain a path deviation risk component; The risk levels are weighted and then summed up to obtain the risk grade.
[0108] Optionally, the verification strategy execution unit 508 is specifically configured to: When the risk grade reaches the preset risk grade threshold, extract the iris feature hash value stored during user registration from the tamper-proof storage area of the audit chain, and generate a dynamic challenge vector based on the zero-knowledge proof protocol. The challenge vector includes randomly generated parameters encrypted with a timestamp; Collect real-time iris images through a handheld terminal, extract Gabor wavelet texture features, and calculate the cosine similarity with the challenge vector; If the similarity ≥ 0.95, the authorization is passed; If the similarity is in the range of 0.92 - 0.95, convert the current GPS coordinates into a tone parameter sequence after SM3 hashing; Based on the tone parameter sequence, collect user voiceprint data, extract the MFCC coefficient matrix, and perform dynamic time warping matching with a preset voiceprint template. If the warping distance ≤ 0.15 and the timestamp deviation is within ±5 seconds, the authorization is passed; Or; If the similarity is in the range of 0.92 - 0.95, capture inertial feature data of the unlocking action through a three-axis acceleration sensor. The inertial feature database includes the acceleration vector direction and the angular velocity change curve; Perform dynamic time warping matching on the inertial feature data with a preset behavior template stored on the operation chain. If the trajectory matching degree of the combined vector ≥ 85%, the authorization is passed.
[0109] Optionally, the operation chain processing unit 503 is specifically configured to: Receive the encrypted data packet sent by the edge computing gateway, extract the SM3 hash value in the encrypted data packet, bind it with the sensor type and timestamp, and write it into the blockchain state database; When it is detected that the energy corresponding to the vibration frequency exceeds 5×10⁻³ m² / s³ or the mutation rate of the oxygen concentration > 5% / S, generate a timestamped abnormal event record on the operation chain. The abnormal event record includes the IPFS storage address of the encrypted data packet; Call the cross-chain relay service and push the hash of the customized Merkle root of the current block to the audit chain.
[0110] Optionally, the audit chain processing unit 504 is specifically configured to: Obtain the latest Merkle root hash of the operation chain through the relay router every 5 minutes. After verifying the integrity of the abnormal event record included in the latest Merkle root hash, anchor the latest Merkle root hash, the block height, and the timestamp of the operation chain to the tamper-proof storage area of the audit chain; When the nodes in the audit chain detect that the Merkle root in the anchored record has not been updated for three consecutive times, the double-chain consistency verification process is automatically started, and the operation chain is requested to provide the status proofs of the last 10 blocks.
[0111] Please refer to Figure 6 , this application also provides an anti-theft control system for intelligent cash boxes based on blockchain, including: A processor 601, a memory 602, an input / output unit 603, and a bus 604; The processor 601 is connected to the memory 602, the input / output unit 603, and the bus 604; The memory 602 stores a program, and the processor 601 calls the program to execute any of the above methods.
[0112] This application also relates to a computer-readable storage medium, on which a program is stored. When the program runs on a computer, it causes the computer to execute any of the above methods.
[0113] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0114] In several embodiments provided by this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0115] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, the functional units in each embodiment of this application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, read-only memory), random access memories (RAM, random access memory), magnetic disks, or optical discs.
Claims
1. A blockchain-based intelligent cash box anti-theft control method, characterized in that: The method comprises: The vibration frequency is obtained through the three-axis acceleration sensor built into the box, the geographic location coordinates are obtained through the dual-mode positioning module, and the oxygen concentration in the box is obtained through the infrared spectrum sensor. The data packet is combined with the operation timestamp and edge encryption is performed using the national encryption SM4 algorithm to obtain an encrypted data packet. Uploading the encrypted data packet to the dual-chain architecture through the edge computing gateway; On the operation chain, a Hyperledger Fabric consortium chain is used to store the hash value of the encrypted data packet, and a smart contract is triggered to perform real-time anomaly detection; On the audit chain, the Merkle root of the operation chain is regularly anchored across chains through the FISCO BCOS chain to generate global audit records; When a cash box opening request is received, the vibration frequency, geographic location and oxygen concentration in the encrypted data packet are extracted and an SM3 consistency check is performed with the hash value stored in the operation chain; Obtain Merkle proof of historical trajectory through the audit chain to verify the deviation between the current geographical location and the preset path; Generate a comprehensive risk level based on the Fourier transform spectrum energy of the vibration frequency, the sudden change gradient of the oxygen concentration and the deviation degree of the preset path; Differentiated verification strategies are implemented according to risk levels to obtain verification results.
2. According to the blockchain-based smart cash box anti-theft control method described in claim 1, it is characterized in that: The method further comprises: An RFID tag with a physically unclonable function PUF chip is embedded inside the cash box shell; The chip PUF chip responds to the random challenge code to generate a unique physical fingerprint, and the unique physical fingerprint is encrypted using the SM9 algorithm to generate a dynamic key pair; Writing the hash value of the dynamic key pair into the smart contract address of the blockchain; When receiving a cash box opening request, the method further includes: Sending a dynamic challenge code to the PUF chip through a handheld terminal, where the dynamic challenge code is generated based on a current timestamp and a random number derived from the latest block hash of the audit chain; Receiving a physical fingerprint generated by the PUF chip in response to the dynamic challenge code; Calling the public key in the dynamic key pair stored in the operation chain to perform signature verification on the physical fingerprint, and verifying the timeliness of the dynamic challenge code and the correlation with the blockchain hash through the audit chain; The Hamming distance between the physical fingerprint and a pre-stored reference value is calculated, and clone attack verification is performed based on the Hamming distance.
3. According to the blockchain-based intelligent cash box anti-theft control method described in claim 2, it is characterized in that: The data packet also includes the unique physical fingerprint, and the edge encryption is performed using the national encryption SM4 algorithm to obtain an encrypted data packet including: Based on the unique physical fingerprint, a temporary session key is generated using the SM9 algorithm; Based on the entropy value of the vibration frequency and the gradient of oxygen concentration, dynamic parameters are generated through the chaotic mapping function; XOR the current block header hash of the operation chain with the Merkle root of the audit chain to generate a cross-chain binding key; Based on the temporary session key, dynamic parameters and the cross-chain binding key, the national secret SM4 algorithm is executed for edge encryption to obtain the final encryption key, and the key fingerprint of the final encryption key is written into the tamper-proof storage area of the audit chain through the smart contract.
4. According to the blockchain-based intelligent cash box anti-theft control method described in claim 1, it is characterized in that: The comprehensive risk level generated based on the Fourier transform spectrum energy of the vibration frequency, the sudden change gradient of the oxygen concentration and the deviation degree of the preset path includes: Perform fast Fourier transform on the collected vibration frequency signal, extract the power spectrum density distribution in the 0-100 Hz frequency band, and calculate the effective energy integral value; The mutation rate of oxygen concentration was calculated by the time window sliding average method; Based on the Merkle proof set of historical trajectories stored on the audit chain, the weighted spatial deviation between the current coordinates and the preset path is calculated; The effective energy integral value is calculated by ratio with a preset vibration energy threshold value and then input into an S-type function to obtain a vibration energy risk component; The oxygen concentration mutation rate is calculated by ratio with the preset maximum mutation threshold and then input into the hyperbolic tangent function to obtain the oxygen mutation risk component; The weighted spatial deviation is calculated to be proportional to the preset maximum allowable deviation, and then the square value is taken to obtain the path deviation risk component; Each risk component is weighted and then added together to obtain the risk level.
5. According to the blockchain-based smart cash box anti-theft control method described in claim 1, it is characterized in that: The differentiated verification strategy is executed according to the risk level, and the verification results obtained include: When the risk level reaches a preset risk level threshold, the iris feature hash value stored during user registration is extracted from the tamper-proof storage area of the audit chain, and a dynamic challenge vector is generated based on a zero-knowledge proof protocol, wherein the challenge vector includes a random parameter encrypted by a timestamp; Collecting real-time iris images through a handheld terminal, extracting Gabor wavelet texture features and calculating cosine similarity with the challenge vector; If the similarity is ≥ 0.95, the authorization is passed; If the similarity is in the range of 0.92-0.95, the current GPS coordinates are converted into a tone parameter sequence after SM3 hash operation; Based on the tone parameter sequence, the user's voiceprint data is collected, the MFCC coefficient matrix is extracted, and dynamic time warping matching is performed with the preset voiceprint template. If the warping distance is ≤0.15 and the timestamp deviation is within ±5 seconds, the authorization is passed; or; If the similarity is in the range of 0.92-0.95, the inertial characteristic data of the unlocking action is captured by a three-axis acceleration sensor, and the inertial characteristic database includes the acceleration vector direction and the angular velocity change curve; The inertial feature data is dynamically time-warped and matched with the preset behavior template stored on the operation chain. If the trajectory matching degree of the synthetic vector is ≥85%, the authorization is passed.
6. According to the blockchain-based smart cash box anti-theft control method described in claim 1, it is characterized in that: The method of using the Hyperledger Fabric consortium chain to store the hash value of the encrypted data packet on the operation chain and triggering the smart contract to perform real-time anomaly detection includes: Receive the encrypted data packet sent by the edge computing gateway, extract the SM3 hash value in the encrypted data packet, bind it to the sensor type and timestamp, and write it into the blockchain state database; When the energy corresponding to the vibration frequency is detected to exceed 5×10⁻³ m² / s³ or the mutation rate of oxygen concentration is greater than 5% / S, an abnormal event record with a timestamp is generated in the operation chain, and the abnormal event record contains the IPFS storage address of the encrypted data packet; Call the cross-chain relay service to push the hash of the customized Merkle root of the current block to the audit chain.
7. According to the blockchain-based smart cash box anti-theft control method described in claim 5, it is characterized in that: On the audit chain, the Merkle root of the operation chain is regularly anchored across chains through the FISCO BCOS chain to generate global audit records including: Obtain the latest Merkle root hash of the operation chain through the relay router every 5 minutes, verify the integrity of the abnormal event record contained in the latest Merkle root hash, and then anchor the latest Merkle root hash together with the block height and timestamp of the operation chain to the tamper-proof storage area of the audit chain; When the audit chain node detects that the Merkle root in the anchor record has not been updated for three consecutive times, it automatically starts the double-chain consistency verification process and requests the operation chain to provide status proofs of the most recent 10 blocks.
8. A blockchain-based intelligent anti-theft control system for cash boxes, characterized in that: The system comprises: The data sensing unit is used to obtain the vibration frequency through the three-axis acceleration sensor built into the box, obtain the geographic location coordinates through the dual-mode positioning module, and obtain the oxygen concentration in the box through the infrared spectrum sensor, and combine it with the operation timestamp to generate a data packet, and use the national encryption SM4 algorithm for edge encryption to obtain an encrypted data packet; An edge encryption unit, used to upload the encrypted data packet to the dual-chain architecture through an edge computing gateway; An operation chain processing unit, used to store the hash value of the encrypted data packet on the operation chain using the Hyperledger Fabric consortium chain, and trigger a smart contract to perform real-time anomaly detection; The audit chain processing unit regularly cross-chain anchors the Merkle root of the operation chain through the FISCO BCOS chain on the audit chain to generate global audit records; A consistency check unit, for extracting the vibration frequency, geographic location and oxygen concentration in the encrypted data packet when receiving a cash box opening request, and performing an SM3 consistency check with the hash value stored in the operation chain; The path verification unit is used to obtain the Merkle proof of the historical trajectory through the audit chain and verify the deviation between the current geographical location and the preset path; A risk assessment unit, for generating a comprehensive risk level based on the Fourier transform spectrum energy of the vibration frequency, the sudden change gradient of the oxygen concentration and the deviation degree of the preset path; The verification strategy execution unit is used to execute differentiated verification strategies according to risk levels to obtain verification results.
9. A blockchain-based intelligent anti-theft control system for cash boxes, characterized in that: The system comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Electronic document signing method based on block chain and intelligent contract
CN107171794A
Electronic contract associative analysis and verification method based on block chain and biological characteristics
CN110941860A
Network data information security protection method based on block chain technology
CN118013560A
Adhesive for light absorption and optical prism composite film structure
KR1020230072010A
Cited By
Relay ad hoc network communication method and system based on mobile terminal
CN120390267A
Management method for whole-process Internet of Things informatization management and control of intelligent money box
CN121365927A
Data security processing method and system adopting block chain, and storage medium
CN121441490A