A blockchain-based engineering geological data sharing method and system
By using a blockchain-based method for sharing engineering geological data, the problems of lack of accuracy and security in the sharing and transmission of engineering geological data are solved, enabling rapid access to data and high security, and ensuring the accuracy and integrity of the data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- POWER CHINA KUNMING ENG CORP LTD
- Filing Date
- 2025-11-12
- Publication Date
- 2026-07-14
AI Technical Summary
In existing technologies, engineering geological data lacks accuracy and security guarantees during sharing and transmission, resulting in inaccurate and insecure data sharing.
A blockchain-based engineering geological data sharing method is adopted. Standardized data is formed through data cleaning and feature extraction. A blockchain IPFS hybrid architecture is established to distinguish between hot and cold data for storage. The rPBFT consensus mechanism and zk-SNARKs protocol are used for encryption. Smart contracts and Python scripts are combined to realize data on-chain and visualization display.
It enables rapid access and high security of engineering geological data, ensuring data accuracy and integrity. Through the decentralization, immutability, and transparency of blockchain, it provides secure data sharing and accuracy assurance.
Smart Images

Figure CN121387841B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic digital data processing technology, and in particular to a blockchain-based method and system for sharing engineering geological data. Background Technology
[0002] Engineering geological data plays a crucial role in surveying and construction. It provides fundamental geological information for engineering planning, design, and construction, helping technicians analyze the impact of geological conditions on projects, identify potential geological problems, and guide exploration and prevention measures. Through field investigations, mapping, and comprehensive analysis, engineering geological maps reflect regional topography, landforms, strata, structures, soil and rock properties, groundwater, and other geological elements. This provides a basis for project site selection, design, and construction, assesses foundation stability, selects appropriate foundation types and construction methods, and ensures structural safety. In disaster prevention and mitigation, basic geological data is used for site suitability analysis and underground space analysis; dynamic monitoring data provides monitoring results of the impact of natural changes and human-made projects on the geological environment; simulation analysis data objectively simulates disaster scenarios; and early warning case data provides data support for disaster prevention, mitigation, and early warning work.
[0003] Currently, there are no technical means to ensure the authenticity and security of engineering geological data while sharing it, or they are still in the experimental stage. There are no programs or systems for secure sharing of engineering geological data, which means that there is no guarantee of accuracy and security in the sharing and transmission of engineering geological data. Summary of the Invention
[0004] The main purpose of this application is to provide a blockchain-based method and system for sharing engineering geological data, in order to solve the problems of lack of accuracy and security guarantees in the sharing and transmission of engineering geological data in the prior art.
[0005] To achieve the above objectives, this application provides the following technical solution:
[0006] A blockchain-based method for sharing engineering geological data, wherein the method is applied to several engineering geological data to be shared, and the method includes:
[0007] Step S1: Perform data cleaning and feature extraction on all engineering geological data to form a number of standardized data with a unified format;
[0008] Step S2: Establish a blockchain-IPFS hybrid architecture, which includes consortium blockchain nodes and an IPFS network connected by signals.
[0009] Step S3: Obtain the historical access frequency of each engineering geological data, and define the engineering geological data whose historical access frequency exceeds the preset frequency threshold as hot data, and define the engineering geological data whose historical access frequency does not exceed the preset frequency threshold as cold data.
[0010] Step S4: Store the standardized data corresponding to all hot data in the consortium blockchain node, and store the standardized data corresponding to all cold data in the IPFS network;
[0011] Step S5: Based on the rPBFT consensus mechanism, the access network of the consortium blockchain is constructed by periodically replacing consensus nodes. The access network is connected to the consortium blockchain nodes and the IPFS network signals respectively.
[0012] Step S6: Create smart contract code using Solidity to manage the access network;
[0013] Step S7: Deploy the zk-SNARKs protocol and encrypt the smart contract code based on zero-knowledge proof privacy protection so that the smart contract code is only open to the consortium identity of the consortium blockchain;
[0014] Step S8: The standardized data is uploaded to the blockchain by calling the smart contract code through a preset Python script;
[0015] Step S9: In response to the alliance identity's operation on the access network, retrieve at least one standardized data and visualize it.
[0016] As a further improvement to this application, step S9, in response to the alliance identity's operation on the access network, retrieves at least one standardized data and visualizes it, and then includes:
[0017] Step S10: Weighted scores are assigned to the data quality, data quantity, and timeliness of each standardized data set.
[0018] Step S20: Obtain the contributing nodes whose weighted scores exceed a preset score threshold;
[0019] Step S30: Issue tokens based on the PoS mechanism and assign a preset annualized rate of return to all contributing nodes.
[0020] As a further improvement to this application, step S9, in response to the alliance identity's operation on the access network, retrieves at least one standardized data and visualizes it, and then includes:
[0021] Step S100: Record the operation traces of all standardized data, including data query, data addition, data modification, data copying, and data deletion;
[0022] Step S200: Record the operation node address for each operation trace;
[0023] Step S300: Encrypt and save all operation traces to the IPFS network.
[0024] As a further improvement to this application, step S300 involves encrypting and saving all operation traces to the IPFS network, followed by:
[0025] Step S1000: Generate a query record with a query timestamp and query content for each data query.
[0026] Step S2000: Generate a new record with a new timestamp and new content for each new data entry;
[0027] Step S3000: Generate a modification record with a modification timestamp and modification content for each data modification;
[0028] Step S4000: Generate a copy record with a copy timestamp and copy content for each data copy.
[0029] Step S5000: Generate a deletion record with a deletion timestamp and deleted content for each data deletion;
[0030] Step S6000: Send all queried records, all newly added records, all modified records, all copied records, and all deleted records to the external monitoring terminal.
[0031] As a further improvement to this application, step S9, in response to the alliance identity's operation on the access network, retrieves at least one standardized data and visualizes it, and then includes:
[0032] Step S10000: Obtain the on-chain hash of each standardized data using the SHA256 algorithm for evidence storage;
[0033] Step S20000: Copy all on-chain hash certificates and save them locally on each node. Based on one on-chain hash certificate, obtain a local hash certificate.
[0034] Step S30000: Upload all on-chain hash certificates to the blockchain by calling the smart contract code through the preset Python script;
[0035] Step S40000: Based on the current local hash certificate, retrieve the on-chain hash certificate that matches the local hash certificate from the blockchain.
[0036] Step S50000: Determine whether the on-chain hash certificate has been successfully retrieved. If the on-chain hash certificate has not been successfully retrieved, then proceed to step S60000.
[0037] Step S60000: Determine that either the on-chain hash certificate or the local hash certificate has been tampered with;
[0038] Step S70000: Generate a data tampering signal and send it to the external monitoring terminal.
[0039] As a further improvement to this application, step S1 involves data cleaning and feature extraction of all engineering geological data to form several standardized data sets with a unified format, including:
[0040] Step S11: Based on the geological data in the engineering geological data, wavelet transform is used to denoise the instrument noise and environmental noise, and denoised geological data is generated based on a preset time series format.
[0041] Step S12: Based on the continuous monitoring data in the engineering geological data, the interpolation method of the preset time series format is used to complete the data and generate interpolated monitoring data.
[0042] Step S13: Unify the sampling frequency of the denoised geological data and the sampling frequency of the interpolated monitoring data to a preset sampling frequency.
[0043] As a further improvement to this application, step S6, creating smart contract code through Solidity to manage the access network, includes:
[0044] Step S61: Define administrator, auditor, and regular user based on the AccessControl contract of OpenZeppelin;
[0045] Step S62: Grant operation permissions in descending order based on the administrator, the auditor, and the ordinary user;
[0046] Step S63: Record all operations performed by the administrator, the auditor, and the ordinary user on accessing the network through the event log.
[0047] To achieve the above objectives, this application also provides the following technical solutions:
[0048] A blockchain-based engineering geological data sharing system, wherein the engineering geological data sharing system is applied to the engineering geological data sharing method described above, and the engineering geological data sharing system includes:
[0049] The engineering geological data standardization module is used to clean and extract features from all engineering geological data, forming a number of standardized data with a unified format.
[0050] A blockchain architecture establishment module is used to establish a blockchain-IPFS hybrid architecture, which includes consortium blockchain nodes and an IPFS network connected by signals.
[0051] The engineering geological data definition module is used to obtain the historical access frequency of each engineering geological data, and define engineering geological data whose historical access frequency exceeds a preset frequency threshold as hot data and engineering geological data whose historical access frequency does not exceed the preset frequency threshold as cold data.
[0052] The engineering geological data storage module is used to store the standardized data corresponding to all hot data in the consortium blockchain node and the standardized data corresponding to all cold data in the IPFS network.
[0053] The access network construction module is used to construct the access network of the consortium blockchain by periodically replacing consensus nodes based on the rPBFT consensus mechanism. The access network is connected to the consortium blockchain nodes and the IPFS network signals respectively.
[0054] The access network monitoring module is used to monitor the access network through smart contract code created by Solidity;
[0055] Access network encryption module, used to deploy zk-SNARKs protocol, encrypts smart contract code based on zero-knowledge proof privacy protection, so that the smart contract code is only open to the consortium identity of the consortium chain;
[0056] The engineering geological data on-chain module is used to call the smart contract code through a preset Python script to upload standardized data onto the blockchain.
[0057] An engineering geological data retrieval module is used to retrieve at least one standardized data and visualize it in response to the alliance identity's operation on the access network.
[0058] To achieve the above objectives, this application also provides the following technical solutions:
[0059] A blockchain node is characterized by comprising a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the blockchain gateway is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the engineering geological data sharing method described above.
[0060] To achieve the above objectives, this application also provides the following technical solutions:
[0061] A blockchain that stores program instructions, which, when executed, enable the engineering geological data sharing method described above.
[0062] This application cleans and extracts features from all engineering geological data to form several standardized data sets with a unified format; Step S2: Establish a blockchain-IPFS hybrid architecture, which includes consortium blockchain nodes with signal connections and an IPFS network; Step S3: Obtain the historical access frequency of each engineering geological data set, and define engineering geological data with a historical access frequency exceeding a preset frequency threshold as hot data and engineering geological data with a historical access frequency not exceeding the preset frequency threshold as cold data; Step S4: Store the standardized data corresponding to all hot data in the consortium blockchain nodes and store the standardized data corresponding to all cold data in the IPFS network. Step S5: Based on the rPBFT consensus mechanism, a consortium blockchain access network is built by periodically replacing consensus nodes. The access network is connected to the consortium blockchain nodes and the IPFS network signal respectively. Step S6: A smart contract code supervisory access network is created using Solidity. Step S7: The zk-SNARKs protocol is deployed to encrypt the smart contract code based on zero-knowledge proof privacy protection, so that the smart contract code is only open to the consortium identity of the consortium blockchain. Step S8: The smart contract code is called through a preset Python script to upload standardized data to the blockchain. Step S9: In response to the consortium identity's operation on the access network, at least one standardized data is retrieved and visualized. This application leverages the decentralized (no third-party intermediary, maintained jointly by nodes), immutable (data is permanently traceable through hash encryption and consensus mechanisms), transparent (all transactions are publicly verifiable but identities remain anonymous), secure (cryptographic protection prevents data forgery), and smart contract (code that automatically executes preset rules) characteristics of blockchain to standardize engineering geological data before storing it on the blockchain. Furthermore, by differentiating between hot and cold data and storing them in different locations, the application ensures rapid data access. Additionally, smart encryption further guarantees the accuracy and security of the data, addressing the lack of protection measures for engineering geological data in existing technologies. Attached Figure Description
[0063] Figure 1 This is a schematic flowchart illustrating the steps of an embodiment of a blockchain-based engineering geological data sharing method according to this application.
[0064] Figure 2 This is a schematic diagram of the functional modules of an embodiment of a blockchain-based engineering geological data sharing system according to this application;
[0065] Figure 3 This is a schematic diagram of the structure of a blockchain node according to one embodiment of this application. Detailed Implementation
[0066] 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 a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0067] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0068] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0069] like Figure 1 As shown, this embodiment provides a blockchain-based method for sharing engineering geological data, which is applied to several engineering geological data to be shared.
[0070] Preferably, the engineering geological data are mainly as follows:
[0071] (1) Geological structure data: rock mass location, occurrence and interrelationships, such as folds, faults, etc.; geological structure scale analysis and basic structural morphology combination.
[0072] (2) Natural geological phenomena data: records of disaster phenomena such as rock weathering, gully erosion, collapse, and debris flow; geological phenomena survey data that have a direct impact on engineering safety.
[0073] (3) Topographic and geomorphological data: topographic features such as landform, elevation, and terrain; analytical data such as geomorphic causes, types and development levels.
[0074] (4) Geotechnical parameters: physical indicators such as water content, density, porosity, etc.; mechanical indicators such as shear strength, compression coefficient, consolidation parameters, etc.; hydrogeological parameters such as permeability coefficient, groundwater level, etc.
[0075] (5) Exploration-specific data: site stability evaluation data; soil and rock utilization and remediation plan data; soil and rock problem prediction data during the construction period.
[0076] (6) Information metadata: geological information identification, quality, spatial reference and other metadata.
[0077] It is worth noting that the categories of the above-mentioned engineering geological data are commonly used data, not limited to specific categories.
[0078] Specifically, the engineering geological data sharing method includes the following steps:
[0079] Step S1 involves cleaning and extracting features from all engineering geological data to form a number of standardized data sets with a unified format.
[0080] Preferably, a convolutional neural network (CNN) can be used to clean, convert formats, and extract features from multi-source heterogeneous geological data, establishing a unified data standard system. Specifically, data normalization is performed to normalize the time series of each data set to a mean of 0 and a variance of 1; then, feature extraction is performed through 1D convolution operations. The structure of the convolutional neural network (CNN) can adopt a multi-layer CNN structure to implement stacked convolutional layers, ReLU activation layers, and pooling layers.
[0081] Step S2: Establish a blockchain-IPFS hybrid architecture, which includes consortium blockchain nodes connected by signals and the IPFS network.
[0082] Preferably, the blockchain IPFS hybrid architecture adopts a layered design, including a network layer, a routing layer, an exchange layer, an object layer, and a file layer, and uses CID (Content Identifier) instead of location addressing.
[0083] Step S3: Obtain the historical access frequency of each engineering geological data, and define the engineering geological data whose historical access frequency exceeds the preset frequency threshold as hot data and the engineering geological data whose historical access frequency does not exceed the preset frequency threshold as cold data.
[0084] Preferably, hot data is stored on consortium blockchain nodes, while cold data is sharded, encrypted, and stored on the IPFS network. This significantly reduces storage costs compared to centralized cloud storage, provides high data persistence, and has a global average access latency of less than 800ms. It also features quantum computer-resistant algorithms.
[0085] Preferably, a fixed time window setting can be used for the preset frequency threshold. For example, data within 3 months is considered hot data, and data older than 3 months is considered cold data. Dynamic timestamp archiving can also be used (for example, Lindorm uses the write time as the basis for hot and cold data separation by default). The preset frequency threshold can also be set through a dynamic adjustment mechanism. If the daily average access volume exceeds the business setting value (for example, data with the top 20% of access volume), it is considered cold data: the access frequency is lower than the system baseline (for example, monthly access volume < 1 time).
[0086] Step S4: Store the standardized data corresponding to all hot data in the consortium blockchain node, and store the standardized data corresponding to all cold data in the IPFS network.
[0087] Step S5: Based on the rPBFT consensus mechanism, an access network for the consortium blockchain is constructed by periodically replacing consensus nodes. The access network is connected to the consortium blockchain nodes and the IPFS network signals respectively.
[0088] Preferably, the rPBFT algorithm is adopted, in which only a portion of the nodes are selected to produce blocks in each round of consensus, and the consensus nodes are periodically replaced. The key parameters of the rPBFT algorithm are epoch_sealer_num (number of nodes participating in consensus) and epoch_block_num (replacement period), which enables the network throughput to reach 56000 CTPS and the success rate of 100% in high-concurrency scenarios.
[0089] Step S6: Create a smart contract code oversight access network using Solidity.
[0090] For example, Solidity can create smart contract code based on role-based access control (RBAC), using OpenZeppelin's AccessControl contract as a foundation. It defines multi-level roles such as administrators, auditors, and ordinary users, with each role corresponding to different operation permissions, such as custom permissions like DATA_READER and DATA_WRITER. All key operations are recorded through event logs, including metadata such as access time, caller address, and operation type. Modifiers are used to implement pre-operation condition checks, such as the onlyAuditor modifier restricting access to the auditing function.
[0091] Preferably, the key code is as follows:
[0092] pragma solidity ^0.8.25;
[0093] import "@openzeppelin / contracts / access / AccessControl.sol";
[0094] contract NetworkGovernance is AccessControl {
[0095] bytes32 public constant AUDITOR_ROLE = keccak256("AUDITOR_ROLE");
[0096] bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");
[0097] event AccessLog(
[0098] address indexed caller,
[0099] bytes32 indexed action,
[0100] uint256 timestamp,
[0101] string metadata );
[0103] modifier onlyWithRole(bytes32 role) {
[0104] require(hasRole(role, msg.sender), "Missing required role");
[0105] _;
[0106] }
[0107] constructor(address admin) {
[0108] _setupRole(DEFAULT_ADMIN_ROLE, admin);
[0109] _setRoleAdmin(AUDITOR_ROLE, DEFAULT_ADMIN_ROLE);
[0110] _setRoleAdmin(OPERATOR_ROLE, DEFAULT_ADMIN_ROLE);
[0111] }
[0112] function grantAccess(bytes32 role, address account)
[0113] external
[0114] onlyRole(DEFAULT_ADMIN_ROLE)
[0115] {
[0116] grantRole(role, account);
[0117] emit AccessLog(
[0118] msg.sender,
[0119] keccak256("GRANT_ACCESS"),
[0120] block.timestamp,
[0121] string(abi.encodePacked("Role:", role)) );
[0123] }
[0124] function revokeAccess(bytes32 role, address account)
[0125] external
[0126] onlyRole(DEFAULT_ADMIN_ROLE)
[0127] {
[0128] revokeRole(role, account);
[0129] emit AccessLog(
[0130] msg.sender,
[0131] keccak256("REVOKE_ACCESS"),
[0132] block.timestamp,
[0133] string(abi.encodePacked("Role:", role)) );
[0135] }
[0136] }
[0137] Step S7: Deploy the zk-SNARKs protocol to protect the privacy of encrypted smart contract code based on zero-knowledge proofs, so that the smart contract code is only open to the consortium identity of the consortium blockchain.
[0138] Preferably, zkSNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge) is a cryptographic zero-knowledge proof protocol that allows one party (the prover) to prove to another party (the verifier) that they possess certain information (e.g., the solution to a mathematical problem) without revealing any additional information beyond that information.
[0139] Step S8: Use a pre-set Python script to call the smart contract code to upload standardized data to the blockchain.
[0140] Preferably, step S8 can be achieved in one step through the following steps:
[0141] (1) Install Python dependency libraries: pip install web3 eth-account python-dotenv, and configure Web3.py (v6.0+) to interact with Ethereum nodes.
[0142] (2) Configure node connections via Infura or Alchemy node service: from web3 import Web3
[0143] w3 = Web3(Web3.HTTPProvider) (Links will not be displayed.)
[0144] (3) Smart contract design: Solidity contract, which must include structure definition (such as DataRecord), data writing function (such as storeData), and event log (such as DataStored).
[0145] (4) Key Contract Approach:
[0146] function storeData(bytes32 dataHash, uint256 timestamp) public {
[0147] records[msg.sender].push(DataRecord(dataHash, timestamp));
[0148] emit DataStored(msg.sender, dataHash, block.timestamp).
[0149] Step S9: In response to the alliance identity's operation to access the network, retrieve at least one standardized data and visualize it.
[0150] Specifically, the key code is as follows:
[0151] # Initialize connection
[0152] w3 = Web3(Web3.HTTPProvider(os.getenv('INFURA_URL')))
[0153] private_key = os.getenv('PRIVATE_KEY')
[0154] sender_address = os.getenv('SENDER_ADDRESS')
[0155] # Load Contract
[0156] with open('DataStorage.json') as f:
[0157] contract_data = json.load(f)
[0158] contract = w3.eth.contract(
[0159] address=contract_data['address'],
[0160] abi = contract_data['abi'] )
[0162] def upload_data(data):
[0163] # Data Standardization and Hash
[0164] data_hash = Web3.keccak(text=json.dumps(data))
[0165] # Sign and send
[0166] signed_tx = w3.eth.account.sign_transaction(tx, private_key)
[0167] return w3.eth.send_raw_transaction(signed_tx.rawTransaction)
[0168] It is worth noting that accessing the network requires configuring the node URL and private key in the .env file.
[0169] Further, in step S9, in response to the federation identity's operation to access the network, at least one standardized data is retrieved and visualized, followed by the following steps:
[0170] Step S10: Weighted scores are calculated for the data quality, data quantity, and timeliness of each standardized data point.
[0171] Preferably, the weighted scoring can be divided into the following parts:
[0172] (1) Data quality score (weight 40%):
[0173] Completeness verification: Full marks are awarded if the missing rate of required fields is ≤5%, and 2 points are deducted for each 1% exceeding the limit. The schema verification tool is used to automatically detect the compliance of the data structure.
[0174] Accuracy verification: 10% of the data samples are randomly checked through off-chain oracles. A score of less than 3% is obtained, and 5 points are deducted for each 1% error rate. A cross-validation mechanism (such as comparison with third-party data sources) is also introduced.
[0175] Uniqueness detection: Full marks are awarded for duplicate data percentages ≤2%, and 3 points are deducted for each percentage exceeding 1%. Bloom filters are also used to identify near-duplicate records.
[0176] (2) Data quantity score (weight 30%):
[0177] Tiered incentives:
[0178] For example, see Table 1 below:
[0179]
[0180] Table 1: Comparison Table of Step-by-Step Incentive Score Coefficients
[0181] Diversity bonus: +15 points for covering more than 3 data categories, and +10 points for new field types accounting for ≥20%.
[0182] (3) Data timeliness score (weight 30%):
[0183] Real-time reward: Submitting data within the same day after acquisition will earn an additional 20% bonus. High-frequency updated data streams (such as IoT devices) can be set with a 5-minute time window.
[0184] Step S20: Obtain the contributing nodes whose weighted scores exceed the preset score threshold.
[0185] For example, the preset score threshold is 80 points.
[0186] Step S30: Issue tokens based on the PoS mechanism and assign a preset annualized rate of return to all contributing nodes.
[0187] Preferably, the design intent of steps S10 to S30 is to incentivize the continuous uploading and updating of high-quality data, so the preset ratio can be set to 5% to 10%.
[0188] Further, in step S9, in response to the federation identity's operation to access the network, at least one standardized data is retrieved and visualized, followed by the following steps:
[0189] Step S100: Record all operation traces of standardized data, including data query, data addition, data modification, data copying, and data deletion.
[0190] Step S200: Record the operation node address for each operation trace.
[0191] Step S300: Encrypt and save all operation traces to the IPFS network.
[0192] Further, in step S300, all operation traces are encrypted and saved to the IPFS network. This is followed by the following steps:
[0193] Step S1000: Generate a query record with a query timestamp and query content for each data query.
[0194] Step S2000: Generate a new record with a new timestamp and new content for each new data entry.
[0195] Step S3000: Generate a modification record with a modification timestamp and modified content for each data modification.
[0196] Step S4000: Generate a copy record with a copy timestamp and copy content for each data copy.
[0197] Step S5000: Generate a deletion record with a deletion timestamp and deleted content for each data deletion.
[0198] Step S6000: Send all queried records, all newly added records, all modified records, all copied records, and all deleted records to the external monitoring terminal.
[0199] Further, in step S9, in response to the federation identity's operation to access the network, at least one standardized data is retrieved and visualized, followed by the following steps:
[0200] Step S10000: Obtain the on-chain hash of each standardized data using the SHA256 algorithm.
[0201] Preferably, the SHA256 algorithm is a sub-algorithm of SHA-2. SHA-2, short for Secure Hash Algorithm 2, is a cryptographic hash function algorithm standard developed by the U.S. National Security Agency. It belongs to the SHA algorithm family and is the successor to SHA-1. SHA-2 can be further divided into six different algorithm standards: SHA224, SHA256, SHA384, SHA512, SHA512 / 224, and SHA512 / 256. These variants share a consistent basic structure, with only minor differences in the length of the generated digest and the number of iterations. SHA-256 is a hash function, also known as a hash algorithm, which is a method for creating a small digital "fingerprint" from any type of data. A hash function compresses a message or data into a digest, reducing the data size and fixing the data format. The function scrambles and mixes the data to recreate a fingerprint called a hash value. A hash value is typically represented by a short string of random letters and numbers. For any message of any length, SHA256 will generate a 256-bit hash value called a message digest. This message digest is equivalent to an array of 32 bytes, usually represented by a 64-bit hexadecimal string.
[0202] Step S20000: Copy all on-chain hash certificates and save them locally on each node. Based on one on-chain hash certificate, obtain a local hash certificate.
[0203] Step S30000: All on-chain hash certificates are uploaded to the blockchain by calling the smart contract code through a preset Python script.
[0204] Step S40000: Based on the current local hash certificate, retrieve the on-chain hash certificate that matches the local hash certificate from the blockchain.
[0205] Step S50000: Determine whether the on-chain hash certificate was successfully retrieved. If the on-chain hash certificate was not successfully retrieved, proceed to step S60000.
[0206] Step S60000: Determine whether either the on-chain hash certificate or the local hash certificate has been tampered with.
[0207] Step S70000: Generate a data tampering signal and send it to the external monitoring terminal.
[0208] Preferably, hash-based evidence storage involves saving the hash value of the file content onto the blockchain. This hash value, often referred to as the file's "digital fingerprint," is obtained by performing a hash operation on the file content. Since hash values are relatively finite in length—for example, the SHA256 hash of a document containing tens of thousands of words is only 256 characters—storing such a long content on the blockchain is effortless. Hash-based evidence storage can be used to verify whether file content has been tampered with. For instance, the hash value of the original text is stored on the blockchain. When the file is retrieved again, its content is hashed. If it matches the content stored on the chain, the content is considered trustworthy and has not been tampered with. If the hash value is different, the content is considered tampered with and no longer trustworthy. To prevent malicious virus injection, companies can store the "digital fingerprints" of their acquired public opinion data on the blockchain. Users can verify the digital fingerprints of software downloaded from different channels; if changes are found, the software may have been infected with viruses or Trojans and is no longer safe.
[0209] Further, step S1 involves data cleaning and feature extraction of all engineering geological data to form a number of standardized data sets with a unified format, specifically including the following steps:
[0210] Step S11: Based on the geological data in the engineering geological data, wavelet transform is used to denoise the instrument noise and environmental noise, and the denoised geological data is generated based on the preset time series format.
[0211] Preferably, the instrument noise is characterized by high-frequency periodic pulses (such as sensor circuit interference), with the frequency band concentrated in the >100Hz range, and there is a clear frequency domain separation from the effective signal; the environmental noise is characterized by low-frequency random disturbances (such as mechanical vibration and electromagnetic interference), and the time-frequency characteristics partially overlap with the geological signal (0.1-10Hz).
[0212] It is worth noting that wavelet transform is a mature existing technology, and the denoising process and denoising principle of wavelet transform will not be described in detail in this embodiment.
[0213] Step S12: Based on the continuous monitoring data in the engineering geological data, interpolation is performed using a preset time series format to complete the data and generate interpolated monitoring data.
[0214] Preferably, a sliding window detection method (window size recommended to be 7-15 days) is used to identify consecutive missing segments. Single missing segments and consecutive missing segments are marked separately (e.g., <5 minutes is a single missing segment, >1 hour is a consecutive missing segment), and then the interpolation method is selected according to the following table:
[0215]
[0216] Table 2: Interpolation method comparison table.
[0217] It is worth noting that the interpolation methods in Table 2 are also mature existing technologies, and the specific interpolation process of each interpolation method will not be described in detail in this embodiment.
[0218] Step S13: Unify the sampling frequency of the denoised geological data and the sampling frequency of the interpolated monitoring data to the preset sampling frequency.
[0219] Preferably, the sampling frequency can be set to 1Hz.
[0220] Further, step S6, creating a smart contract code oversight access network through Solidity, specifically includes the following steps:
[0221] Step S61: Define the administrator, auditor, and regular user based on the AccessControl contract of OpenZeppelin.
[0222] Step S62: Grant operation permissions in descending order based on the level of administrator, auditor, and ordinary user.
[0223] Step S63: Record all network access operations performed by the administrator, auditor, and ordinary users through the event log.
[0224] This embodiment cleanses and extracts features from all engineering geological data to form several standardized data sets with a unified format; Step S2: Establish a blockchain-IPFS hybrid architecture, which includes consortium blockchain nodes and an IPFS network connected by signals; Step S3: Obtain the historical access frequency of each engineering geological data set, and define engineering geological data with a historical access frequency exceeding a preset frequency threshold as hot data and engineering geological data with a historical access frequency not exceeding the preset frequency threshold as cold data; Step S4: Store the standardized data corresponding to all hot data in the consortium blockchain nodes and store the standardized data corresponding to all cold data in the IPFS network; Step S5: Based on the rPBFT consensus mechanism, a consortium blockchain access network is built by periodically replacing consensus nodes. The access network is connected to the consortium blockchain nodes and the IPFS network signal respectively. Step S6: A smart contract code supervisory access network is created using Solidity. Step S7: The zk-SNARKs protocol is deployed to encrypt the smart contract code based on zero-knowledge proof privacy protection, so that the smart contract code is only open to the consortium identity of the consortium blockchain. Step S8: The smart contract code is called through a preset Python script to upload standardized data to the blockchain. Step S9: In response to the consortium identity's operation on the access network, at least one standardized data is retrieved and visualized. This embodiment leverages the decentralized (no third-party intermediary, maintained jointly by nodes), immutable (data is permanently traceable through hash encryption and consensus mechanisms), transparent (all transactions are publicly verifiable but identities remain anonymous), secure (cryptographic protection prevents data forgery), and smart contract (code that automatically executes preset rules) characteristics of blockchain to standardize engineering geological data before storing it on the chain. Furthermore, by differentiating between hot and cold data and storing them in different locations, the embodiment ensures rapid data access. Additionally, intelligent encryption further guarantees the accuracy and security of the data, addressing the lack of protection measures for engineering geological data in existing technologies.
[0225] like Figure 2 As shown, this embodiment provides an example of a blockchain-based engineering geological data sharing system. In this embodiment, the engineering geological data sharing system is applied to the engineering geological data sharing method described above.
[0226] Specifically, the engineering geological data sharing system includes, in sequence, an engineering geological data standardization module 1, a blockchain architecture establishment module 2, an engineering geological data definition module 3, an engineering geological data storage module 4, an access network construction module 5, an access network supervision module 6, an access network encryption module 7, an engineering geological data on-chain module 8, and an engineering geological data retrieval module 9.
[0227] The system comprises the following modules: Engineering Geological Data Standardization Module 1, which cleans and extracts features from all engineering geological data to form standardized data in a unified format; Blockchain Architecture Establishment Module 2, which establishes a hybrid blockchain-IPFS architecture, including consortium blockchain nodes with signal connections and the IPFS network; Engineering Geological Data Definition Module 3, which obtains the historical access frequency of each engineering geological data and defines engineering geological data with a historical access frequency exceeding a preset frequency threshold as hot data and engineering geological data with a historical access frequency not exceeding the preset frequency threshold as cold data; and Engineering Geological Data Storage Module 4, which stores the standardized data corresponding to all hot data in the consortium blockchain node and the standardized data corresponding to all cold data in the IPFS network. Access network construction module 5 is used to build the access network of the consortium blockchain by periodically replacing consensus nodes based on the rPBFT consensus mechanism. The access network is connected to the consortium blockchain nodes and the IPFS network signal respectively. Access network supervision module 6 is used to supervise the access network by creating smart contract code through Solidity. Access network encryption module 7 is used to deploy the zk-SNARKs protocol and encrypt the smart contract code based on zero-knowledge proof privacy protection so that the smart contract code is only open to the consortium identity of the consortium blockchain. Engineering geological data on-chain module 8 is used to call the smart contract code through a preset Python script to upload standardized data to the blockchain. Engineering geological data retrieval module 9 is used to retrieve at least one standardized data and visualize it in response to the consortium identity's operation on the access network.
[0228] Furthermore, the engineering geological data sharing system also includes a standardized data scoring module, a contribution node acquisition module, and an annualized rate of return assignment module, which are electrically connected in sequence; the standardized data scoring module is electrically connected to the engineering geological data retrieval module 9.
[0229] The standardized data scoring module is used to weight and score each standardized data point based on its data quality, data quantity, and timeliness; the contribution node acquisition module is used to acquire contribution nodes whose weighted scores exceed a preset score threshold; and the annualized yield assignment module is used to assign a preset percentage of annualized yield to all contribution nodes based on the PoS mechanism when issuing tokens.
[0230] Furthermore, the engineering geological data sharing system also includes a standardized data operation trace recording module, an operation node address recording module, and an operation trace encryption and storage module that are electrically connected in sequence; the standardized data operation trace recording module is electrically connected to the engineering geological data retrieval module 9.
[0231] The standardized data operation trace recording module is used to record the operation traces of all standardized data, including data query, data addition, data modification, data copying, and data deletion; the operation node address recording module is used to record the operation node address of each operation trace; and the operation trace encryption and storage module is used to encrypt and save all operation traces to the IPFS network.
[0232] Furthermore, the engineering geological data sharing system also includes a query record generation module, a new record generation module, a modified record generation module, a copy record generation module, a delete record generation module, and a record sending module, which are electrically connected in sequence; the query record generation module is electrically connected to the operation trace encryption and storage module.
[0233] The system includes the following modules: a query record generation module to generate a query record with a query timestamp and query content for each data query; an add record generation module to generate an add record with an add timestamp and add content for each data addition; a modify record generation module to generate a modify record with a modify timestamp and modify content for each data modification; a copy record generation module to generate a copy record with a copy timestamp and copy content for each data copy; a delete record generation module to generate a delete record with a delete timestamp and delete content for each data deletion; and a record sending module to send all query records, all add records, all modify records, all copy records, and all delete records to an external monitoring terminal.
[0234] Furthermore, the engineering geological data sharing system also includes, in sequence, an on-chain hash evidence acquisition module, a local hash evidence acquisition module, an on-chain hash evidence uploading module, a local hash evidence matching module, an on-chain hash evidence retrieval judgment module, a hash evidence tampering judgment module, and a data tampering signal generation and sending module; the on-chain hash evidence acquisition module is electrically connected to the engineering geological data retrieval module 9.
[0235] The system comprises the following modules: On-chain hash certificate acquisition module, which acquires the on-chain hash certificate for each standardized data using the SHA256 algorithm; Local hash certificate acquisition module, which replicates all on-chain hash certificates and stores them locally on each node, generating a local hash certificate based on each on-chain hash certificate; On-chain hash certificate uploading module, which uploads all on-chain hash certificates to the blockchain by calling smart contract code using a pre-defined Python script; Local hash certificate matching module, which retrieves the on-chain hash certificate that matches the local hash certificate from the blockchain; On-chain hash certificate retrieval judgment module, which determines whether the on-chain hash certificate retrieval was successful; Hash certificate tampering judgment module, which determines that either the on-chain hash certificate or the local hash certificate has been tampered with if the on-chain hash certificate retrieval was unsuccessful; and Data tampering signal generation and sending module, which generates a data tampering signal and sends it to an external monitoring terminal.
[0236] Furthermore, the engineering geological data standardization module 1 specifically includes a first engineering geological data standardization unit, a second engineering geological data standardization unit, and a third engineering geological data standardization unit that are electrically connected in sequence; the third engineering geological data standardization unit is electrically connected to the blockchain architecture establishment module 2.
[0237] The first engineering geological data standardization unit is used to denoise the instrument noise and environmental noise based on the geological data in the engineering geological data using wavelet transform, and generate denoised geological data based on a preset time series format; the second engineering geological data standardization unit is used to complete the continuous monitoring data in the engineering geological data using an interpolation method based on a preset time series format, and generate interpolated monitoring data; the third engineering geological data standardization unit is used to unify the sampling frequency of the denoised geological data and the sampling frequency of the interpolated monitoring data to a preset sampling frequency.
[0238] Furthermore, the access network monitoring module 6 specifically includes a first access network monitoring unit, a second access network monitoring unit, and a third access network monitoring unit that are electrically connected in sequence; the first access network monitoring unit is electrically connected to the access network construction module 5, and the third access network monitoring unit is electrically connected to the access network encryption module 7.
[0239] The first access network monitoring unit is used to define administrators, auditors, and ordinary users based on the OpenZeppelin AccessControl contract; the second access network monitoring unit is used to grant operation permissions from high to low based on the administrator, auditor, and ordinary user; and the third access network monitoring unit is used to record all operation records of the administrator, auditor, and ordinary user for accessing the network through event logs.
[0240] It should be noted that this embodiment is a functional module embodiment based on the above method embodiment. For the preferred, extended, limited, exemplified and principle explanation parts of this embodiment, please refer to the above embodiment. This embodiment will not repeat them.
[0241] This embodiment cleanses and extracts features from all engineering geological data to form several standardized data sets with a unified format; Step S2: Establish a blockchain-IPFS hybrid architecture, which includes consortium blockchain nodes and an IPFS network connected by signals; Step S3: Obtain the historical access frequency of each engineering geological data set, and define engineering geological data with a historical access frequency exceeding a preset frequency threshold as hot data and engineering geological data with a historical access frequency not exceeding the preset frequency threshold as cold data; Step S4: Store the standardized data corresponding to all hot data in the consortium blockchain nodes and store the standardized data corresponding to all cold data in the IPFS network; Step S5: Based on the rPBFT consensus mechanism, a consortium blockchain access network is built by periodically replacing consensus nodes. The access network is connected to the consortium blockchain nodes and the IPFS network signal respectively. Step S6: A smart contract code supervisory access network is created using Solidity. Step S7: The zk-SNARKs protocol is deployed to encrypt the smart contract code based on zero-knowledge proof privacy protection, so that the smart contract code is only open to the consortium identity of the consortium blockchain. Step S8: The smart contract code is called through a preset Python script to upload standardized data to the blockchain. Step S9: In response to the consortium identity's operation on the access network, at least one standardized data is retrieved and visualized. This embodiment leverages the decentralized (no third-party intermediary, maintained jointly by nodes), immutable (data is permanently traceable through hash encryption and consensus mechanisms), transparent (all transactions are publicly verifiable but identities remain anonymous), secure (cryptographic protection prevents data forgery), and smart contract (code that automatically executes preset rules) characteristics of blockchain to standardize engineering geological data before storing it on the chain. Furthermore, by differentiating between hot and cold data and storing them in different locations, the embodiment ensures rapid data access. Additionally, intelligent encryption further guarantees the accuracy and security of the data, addressing the lack of protection measures for engineering geological data in existing technologies.
[0242] Figure 3 This is a schematic diagram of the structure of a blockchain node according to an embodiment of this application. The blockchain node includes a processor 101, a storage medium 102, and a bus 103. The storage medium 102 stores program instructions 102 that can be executed by the processor 101. When the blockchain gateway is running, the processor 101 and the storage medium 102 communicate through the bus 103. The processor 101 executes the program instructions to perform the engineering geological data sharing method as described in the above embodiment.
[0243] The processor 101 can also be referred to as a CPU (Central Processing Unit). The processor 101 may be an integrated circuit chip with signal processing capabilities. The processor 101 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.
[0244] This embodiment also provides a blockchain that stores program instructions, which, when executed, can realize the engineering geological data sharing method as described in the above embodiments.
[0245] In the several embodiments provided in this application, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0246] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A blockchain-based method for sharing engineering geological data, wherein the method is applied to several engineering geological data to be shared, characterized in that, The engineering geological data sharing method includes: Step S1: Perform data cleaning and feature extraction on all engineering geological data to form a number of standardized data with a unified format; Step S2: Establish a blockchain-IPFS hybrid architecture, which includes consortium blockchain nodes and an IPFS network connected by signals. Step S3: Obtain the historical access frequency of each engineering geological data, and define the engineering geological data whose historical access frequency exceeds the preset frequency threshold as hot data, and define the engineering geological data whose historical access frequency does not exceed the preset frequency threshold as cold data. Step S4: Store the standardized data corresponding to all hot data in the consortium blockchain node, and store the standardized data corresponding to all cold data in the IPFS network; Step S5: Based on the rPBFT consensus mechanism, the access network of the consortium blockchain is constructed by periodically replacing consensus nodes. The access network is connected to the consortium blockchain nodes and the IPFS network signals respectively. Step S6: Create smart contract code using Solidity to manage the access network; Step S7: Deploy the zk-SNARKs protocol and encrypt the smart contract code based on zero-knowledge proof privacy protection so that the smart contract code is only open to the consortium identity of the consortium blockchain; Step S8: The standardized data is uploaded to the blockchain by calling the smart contract code through a preset Python script; Step S9: In response to the alliance identity's operation on the access network, retrieve at least one standardized data and visualize it.
2. The engineering geological data sharing method according to claim 1, characterized in that, Step S9, in response to the alliance identity's operation on the access network, retrieve at least one standardized data and visualize it, then includes: Step S10: Weighted scores are assigned to the data quality, data quantity, and timeliness of each standardized data set. Step S20: Obtain the contributing nodes whose weighted scores exceed a preset score threshold; Step S30: Issue tokens based on the PoS mechanism and assign a preset annualized rate of return to all contributing nodes.
3. The engineering geological data sharing method according to claim 1, characterized in that, Step S9, in response to the alliance identity's operation on the access network, retrieve at least one standardized data and visualize it, then includes: Step S100: Record the operation traces of all standardized data, including data query, data addition, data modification, data copying, and data deletion; Step S200: Record the operation node address for each operation trace; Step S300: Encrypt and save all operation traces to the IPFS network.
4. The engineering geological data sharing method according to claim 3, characterized in that, Step S300: Encrypt and save all operation traces to the IPFS network, followed by: Step S1000: Generate a query record with a query timestamp and query content for each data query. Step S2000: Generate a new record with a new timestamp and new content for each new data entry; Step S3000: Generate a modification record with a modification timestamp and modification content for each data modification; Step S4000: Generate a copy record with a copy timestamp and copy content for each data copy. Step S5000: Generate a deletion record with a deletion timestamp and deleted content for each data deletion; Step S6000: Send all queried records, all newly added records, all modified records, all copied records, and all deleted records to the external monitoring terminal.
5. The engineering geological data sharing method according to claim 1, characterized in that, Step S9, in response to the alliance identity's operation on the access network, retrieve at least one standardized data and visualize it, then includes: Step S10000: Obtain the on-chain hash of each standardized data using the SHA256 algorithm for evidence storage; Step S20000: Copy all on-chain hash certificates and save them locally on each node. Based on one on-chain hash certificate, obtain a local hash certificate. Step S30000: Upload all on-chain hash certificates to the blockchain by calling the smart contract code through the preset Python script; Step S40000: Based on the current local hash certificate, retrieve the on-chain hash certificate that matches the local hash certificate from the blockchain. Step S50000: Determine whether the on-chain hash certificate has been successfully retrieved. If the on-chain hash certificate has not been successfully retrieved, then proceed to step S60000. Step S60000: Determine that either the on-chain hash certificate or the local hash certificate has been tampered with; Step S70000: Generate a data tampering signal and send it to the external monitoring terminal.
6. The engineering geological data sharing method according to claim 1, characterized in that, Step S1 involves cleaning and feature extraction of all engineering geological data to generate standardized data in a unified format, including: Step S11: Based on the geological data in the engineering geological data, wavelet transform is used to denoise the instrument noise and environmental noise, and denoised geological data is generated based on a preset time series format. Step S12: Based on the continuous monitoring data in the engineering geological data, the interpolation method of the preset time series format is used to complete the data and generate interpolated monitoring data. Step S13: Unify the sampling frequency of the denoised geological data and the sampling frequency of the interpolated monitoring data to a preset sampling frequency.
7. The engineering geological data sharing method according to claim 1, characterized in that, Step S6, creating smart contract code in Solidity to manage the access network, including: Step S61: Define administrator, auditor, and regular user based on the AccessControl contract of OpenZeppelin; Step S62: Grant operation permissions in descending order based on the administrator, the auditor, and the ordinary user; Step S63: Record all operations performed by the administrator, the auditor, and the ordinary user on accessing the network through the event log.
8. A blockchain-based engineering geological data sharing system, wherein the engineering geological data sharing system is applied to the engineering geological data sharing method as described in any one of claims 1 to 7, characterized in that, The engineering geological data sharing system includes: The engineering geological data standardization module is used to clean and extract features from all engineering geological data, forming a number of standardized data with a unified format. A blockchain architecture establishment module is used to establish a blockchain-IPFS hybrid architecture, which includes consortium blockchain nodes and an IPFS network connected by signals. The engineering geological data definition module is used to obtain the historical access frequency of each engineering geological data, and define engineering geological data whose historical access frequency exceeds a preset frequency threshold as hot data and engineering geological data whose historical access frequency does not exceed the preset frequency threshold as cold data. The engineering geological data storage module is used to store the standardized data corresponding to all hot data in the consortium blockchain node and the standardized data corresponding to all cold data in the IPFS network. The access network construction module is used to construct the access network of the consortium blockchain by periodically replacing consensus nodes based on the rPBFT consensus mechanism. The access network is connected to the consortium blockchain nodes and the IPFS network signals respectively. The access network monitoring module is used to monitor the access network through smart contract code created by Solidity; Access network encryption module, used to deploy zk-SNARKs protocol, encrypts smart contract code based on zero-knowledge proof privacy protection, so that the smart contract code is only open to the consortium identity of the consortium chain; The engineering geological data on-chain module is used to call the smart contract code through a preset Python script to upload standardized data onto the blockchain. An engineering geological data retrieval module is used to retrieve at least one standardized data and visualize it in response to the alliance identity's operation on the access network.
9. A blockchain node, characterized in that, The system includes a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the blockchain gateway is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the engineering geological data sharing method as described in any one of claims 1 to 7.
10. A blockchain, characterized in that, The blockchain stores program instructions, which, when executed, enable the engineering geological data sharing method as described in any one of claims 1 to 7.