# Research on Monitoring and Early Warning of the Mine Backfill System Based on Blockchain Technology
## 3 Model Design
### Data Management Model  
This paper builds a data management model of a mine filling system based on blockchain, realizes the storage and retrieval of data in the operation of the mine filling system, and ensures the safety and reliability of data transmission. The model mainly includes three stages of data upload, storage, and retrieval. The specific steps are shown in Figure 3.  
The first part is the data upload and pre-preparation stage, and the main steps are as follows:  
Figure 1: Data link and federation link basic structures. Figure 2: Flow chart of the overlimit prediction method. Step 1: The trust center determines the candidate for the administrator (including the dispatcher and the inspector) and stores the name, position, area of responsibility, and other relevant information of the candidate. The dispatcher is appointed to encrypt, store, and retrieve data. The inspector can detect the loyalty of the dispatcher;  
Step 2: The mine filling system uploads all data during operation to the overlimit warning model for detection;  
Step 3: The overlimit warning model predicts the future operation data of the mine filling system equipment, detects the overlimit data, and uploads the operation data and warning data to the dispatcher for storage. The second part is the data storage phase, where the main steps are as follows:  
Step 4: After receiving the monitoring data, the dispatcher encrypts the data with a public key and uploads it to the IPFS for storage;  
Step 5: The IPFS receives the monitoring data for storage, generates the corresponding file identifier CID, and returns it to the dispatcher;  
Step 6: The dispatcher stores the received CID on the blockchain;  
Step 7: The inspector makes an inspection request to the dispatcher;  
Step 8: The original data and encrypted hash values are sent by the dispatcher to the inspector;  
Step 9: The inspector generates the hash value stored on the IPFS using the public key and the original data and compares it with the received encrypted hash value to test the credibility of the dispatcher: if the two values are consistent, the dispatcher is internally loyal; if the two values are inconsistent, it indicates that there has been a defection within the dispatcher, and the trust center needs to reappoint the dispatcher. The data from this stage are stored using a combination of the blockchain and the IPFS. The specific process is shown in Figure 4. The monitoring data generated in the overlimit warning model are stored in the IPFS, and the file identifier CID returned by the IPFS is stored in the blockchain. The administrator node initiates a data storage request and calls the smart contract to query whether the administrator node has storage rights. If so, the encrypted monitoring data of the administrator node are stored in the IPFS, and the returned CID is stored on the blockchain; if not, the data storage fails. Figure 3: Data management model architecture based on blockchain. The third part is the data retrieval stage, which includes administrator query data and user query data.