Coal mine enterprise environmental protection data storage and tracing method based on block chain
By registering decentralized identity identifiers (DIDs) for coal mining enterprise regulatory entities and dynamically calculating priority weights based on on-chain historical behavior and external environmental risks, the problem of response lag caused by traditional static permission allocation is solved, enabling efficient and flexible data authorization decisions for multiple regulatory entities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA COAL INFORMATION TECH (BEIJING) CO LTD
- Filing Date
- 2026-02-04
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies are unable to effectively adapt to the dynamic behavior of regulatory bodies and sudden environmental events in the collaborative management of environmental data of coal mining enterprises, resulting in delayed response and insufficient authority. The traditional static permission allocation model leads to rigid authorization logic and slow response.
By registering decentralized identity identifiers (DIDs) for regulatory entities on the consortium blockchain, and combining on-chain historical behavior data and external environmental risks, the activity and urgency of regulatory entities are dynamically calculated to generate a dynamic priority weight vector. Smart contracts are used to arbitrate multiple regulatory authorization conflicts, thereby achieving automated decision-making and asynchronous feedback mechanisms.
It enhances the flexibility and scientific nature of data access control, improves the efficiency and responsiveness of regulatory collaboration, reduces storage overhead and consensus latency, ensures the interpretability and fairness of the regulatory process, and is suitable for highly dynamic ecological and environmental regulatory scenarios.
Smart Images

Figure CN121903641A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of blockchain data security and smart contract multi-party management technology, and in particular to a blockchain-based method for storing and tracing environmental protection data in coal mining enterprises. Background Technology
[0002] In recent years, the compliance management of environmental protection data in coal mining enterprises has gradually transformed towards digitalization and intelligence. Blockchain and other multi-party security collaboration technologies have been gradually applied to improve the credibility of environmental monitoring data recording, traceability, and multi-party supervision capabilities.
[0003] In the field of collaborative management of ecological and environmental protection data by multiple regulatory bodies, existing technologies generally adopt static hierarchical authorization models. These models adjudicate data access conflicts based on the administrative level and authority labels of regulatory departments, using preset fixed priorities; or they employ a hierarchical approval workflow, with reports and reviews proceeding level by level. However, in actual operation, these statically configured role labels and fixed priority strategies have the following significant limitations:
[0004] First, fixed-priority models cannot effectively adapt to the dynamic behavior of regulatory bodies and sudden environmental events. For example, in high-risk situations such as major environmental pollution incidents or extreme weather and geological disasters, the various levels of regulatory agencies currently involved may have more flexible and timely intervention needs for the same data. Prioritizing based solely on administrative level will lead to response delays and affect the efficiency of incident response.
[0005] Second, static labels cannot reflect dynamic indicators such as the regulatory body's historical compliance performance, real-time response efficiency, and ability to correct abnormal data, resulting in insufficient comprehensive regulatory authority and adaptability. Summary of the Invention
[0006] This application provides a blockchain-based method for storing and tracing environmental data in coal mining enterprises, aiming to solve one of the problems or issues of the existing technology mentioned in the background section.
[0007] This application provides a blockchain-based method for environmental data storage and traceability in coal mining enterprises, specifically including:
[0008] S1: During the initialization phase of the consortium blockchain, decentralized identity identifiers (DIDs) are registered for each regulatory entity, and their legal jurisdiction, functional type, and initial reputation score are declared in their DID documents to generate standardized identity metadata.
[0009] S2: When environmental monitoring data needs to be stored on the blockchain, the data collection node submits the data hash to the data blockchain authorization contract, triggering a multi-regulatory authorization process and starting a preset time window timer to record the submission sequence of authorization requests from each regulatory body.
[0010] S3: Based on on-chain historical behavior ledger data, calculate the regulatory activity score of each regulatory entity. The calculation includes weighted normalization of response timeliness coefficient, abnormal data rejection rate and superior correction frequency.
[0011] S4: Connect to the API interface of the external environmental risk early warning system to obtain real-time pollution index and geological disaster probability data of the coal mining area, generate regional urgency index and perform exponential decay function normalization to obtain regional urgency normalization value.
[0012] S5: Assign basic weight coefficients based on the functional type of the regulatory body, and perform three-dimensional matrix multiplication operation by combining the regulatory activity score and the normalized value of regional urgency to generate a dynamic priority comprehensive weight vector.
[0013] S6: When there are multiple regulatory authorization conflicts, execute the comprehensive weight ranking algorithm. If the highest weight values are the same, the timestamp priority principle is adopted to generate the optimal authorization decision scheme and conflict resolution proof data.
[0014] S7: Write the optimal authorized signature, decision-based metadata, and composite signature structure into the transaction attachment and block header of the new block, complete the block packaging operation, and broadcast it to the consensus node network.
[0015] S8: For regulatory authorization requests that are not adopted, execute an asynchronous feedback mechanism to generate a response message containing a weight comparison matrix and a description of the decision logic, and push it to the smart contract callback interface of the corresponding regulatory body.
[0016] This application provides a blockchain-based method for storing and tracing environmental protection data in coal mining enterprises, which has the following beneficial effects:
[0017] (1) By introducing a smart authorization mechanism based on the DID identity and dynamic priority assessment of regulatory entities, the flexibility and scientific nature of data access control in a multi-regulatory entity environment are significantly improved. Traditional blockchain systems typically adopt a static role-based permission model in multi-party participation scenarios, resulting in rigid authorization logic, slow response, and difficulty in adapting to complex and ever-changing regulatory needs. This solution registers decentralized identities (DIDs) for regulatory entities at all levels during the initialization phase of the consortium blockchain and declares the functional type, jurisdiction, and initial reputation value in their DID documents, thus constructing a verifiable identity foundation. When environmental monitoring data needs to be uploaded to the blockchain, the system triggers a multi-node authorization process, and the priority arbitration smart contract comprehensively considers the historical behavior data of the regulatory entities to generate a regulatory activity score. At the same time, it integrates the real-time parameters of the external environmental risk early warning system to form a regional urgency index, and combines the preset functional weights for normalization calculation to obtain a dynamic comprehensive weight reflecting the authority and urgency in the current situation. This mechanism breaks through the fixed authority allocation model, enabling highly active, highly professional, and high-risk regulatory entities to have a greater say in key decisions, thereby effectively avoiding regulatory vacuums or conflicts caused by equal authority or delayed response, and significantly improving the efficiency of regulatory collaboration and the rationality of decision-making.
[0018] (2) By designing a conflict resolution and optimal authorization selection mechanism, automated and transparent decision-making and execution are achieved in the case of multiple authorization requests coexisting, which significantly improves the problems of redundant storage, consensus delay and control chaos in the traditional multi-signature mechanism. In the existing technology, when multiple regulators submit different access policies for the same data, they often rely on manual coordination or simple majority voting, which can easily cause process interruption or permission overlap. However, this solution does not directly merge all signatures before block packaging. Instead, the arbitration contract automatically identifies the optimal authorization scheme based on dynamic weights and only writes the digital signature of the one with the highest weight and its decision-making basis metadata into the new block, which greatly reduces the on-chain storage overhead and consensus verification complexity. For authorization requests that are not adopted, the system provides feedback on the reasons for rejection through an asynchronous notification mechanism (such as low weight, delayed submission, etc.), which allows regulators to optimize subsequent authorization strategies based on feedback information and form a closed-loop adaptive adjustment capability. This design not only ensures the consistency and immutability of on-chain data, but also enhances the interpretability and fairness of the regulatory process, making the entire authorization system both efficient and fault-tolerant, and suitable for cross-level, cross-departmental, and highly dynamic ecological environment regulatory scenarios.
[0019] (3) By integrating on-chain historical ledgers and off-chain real-time environmental data into a dual-source driven architecture, an intelligent regulatory collaboration framework with spatiotemporal awareness is constructed, effectively enhancing the system's response sensitivity and overall robustness to sudden environmental events. Unlike traditional methods that rely solely on on-chain states, this solution proactively connects to external environmental risk warning APIs, incorporating spatiotemporally sensitive factors such as pollution indices and geological disaster probabilities into the priority calculation system. This allows regulatory decisions to not only reflect the institution's own performance but also dynamically adapt to the actual risk level on-site, achieving a collaborative judgment involving humans, machines, and the environment. Especially in high-risk operation scenarios such as coal mines, when the regional urgency level suddenly increases, even low-level but frontline monitoring units can gain temporary decision-making dominance due to their high activity and high-risk correlation, ensuring that emergency response instructions take effect quickly. In addition, the lightweight composite signature structure and asynchronous feedback mechanism balance security and communication efficiency, allowing for strategy iteration without frequent contract upgrades or manual intervention, significantly reducing operation and maintenance costs and system coupling. Overall, the solution not only improves the accuracy and timeliness of environmental data governance, but also provides a scalable technological paradigm for building a trustworthy, intelligent, and sustainable cross-domain regulatory ecosystem. Attached Figure Description
[0020] Figure 1 This is the main flowchart of a blockchain-based method for storing and tracing environmental data in coal mining enterprises.
[0021] Figure 2 This is a sub-flowchart of a blockchain-based method for storing and tracing environmental data in coal mining enterprises.
[0022] Figure 3 This is another sub-flowchart of a blockchain-based method for storing and tracing environmental data in coal mining enterprises. Detailed Implementation
[0023] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0024] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0025] like Figure 1 As shown, this application provides a blockchain-based method for environmental data storage and traceability in coal mining enterprises, specifically including:
[0026] S1: During the initialization phase of the consortium blockchain, decentralized identity identifiers (DIDs) are registered for each regulatory entity, and their legal jurisdiction, functional type, and initial reputation score are declared in their DID documents to generate standardized identity metadata.
[0027] S2: When environmental monitoring data needs to be stored on the blockchain, the data collection node submits the data hash to the data blockchain authorization contract, triggering a multi-regulatory authorization process and starting a preset time window timer to record the submission sequence of authorization requests from each regulatory body.
[0028] S3: Based on on-chain historical behavior ledger data, calculate the regulatory activity score of each regulatory entity. The calculation includes weighted normalization of response timeliness coefficient, abnormal data rejection rate and superior correction frequency.
[0029] S4: Connect to the API interface of the external environmental risk early warning system to obtain real-time pollution index and geological disaster probability data of the coal mining area, generate regional urgency index and perform exponential decay function normalization to obtain regional urgency normalization value.
[0030] S5: Assign basic weight coefficients based on the functional type of the regulatory body, and perform three-dimensional matrix multiplication operation by combining the regulatory activity score and the normalized value of regional urgency to generate a dynamic priority comprehensive weight vector.
[0031] S6: When there are multiple regulatory authorization conflicts, execute the comprehensive weight ranking algorithm. If the highest weight values are the same, the timestamp priority principle is adopted to generate the optimal authorization decision scheme and conflict resolution proof data.
[0032] S7: Write the optimal authorized signature, decision-based metadata, and composite signature structure into the transaction attachment and block header of the new block, complete the block packaging operation, and broadcast it to the consensus node network.
[0033] S8: For regulatory authorization requests that are not adopted, execute an asynchronous feedback mechanism to generate a response message containing a weight comparison matrix and a description of the decision logic, and push it to the smart contract callback interface of the corresponding regulatory body.
[0034] Step S1: During the initialization phase of the consortium blockchain, decentralized identity identifiers (DIDs) are registered for each regulatory entity, and their legal jurisdiction, functional type, and initial reputation score are declared in their DID documents, generating standardized identity metadata. Specifically, this includes:
[0035] S1.1: Based on the initialization event of the consortium blockchain network, the regulatory entity's DID registration process is triggered. The decentralized identity identifier and its corresponding encryption key pair are generated using HyperledgerIndy or the W3C DID standard framework to construct the unique digital identity credential of the regulatory entity.
[0036] Under the condition of the consortium blockchain network initialization event, the registration request data of the regulatory entity is used as the execution object, which includes the basic identity information of the entity, the certificate of the authorizing institution and the security policy parameters.
[0037] An event listening method is used to capture the initialization signal of the consortium blockchain in real time, and the captured event is passed to the identity registration process scheduling module.
[0038] Furthermore, through the identity key generation algorithm, the public and private key pairs corresponding to the decentralized identity identifier are generated, and the initial draft data of the identifier conforming to the W3C DID standard structure is obtained.
[0039] Furthermore, the DID generation function of the Hyperledger Indy framework (parameters: automatically configure the network node pool size to 5, and the verification node type to trustAnchor) is used to register unique digital identity credentials and generate non-repeatable DID identifiers on the blockchain.
[0040] Furthermore, through an identity credential binding algorithm (parameters: two-factor binding methods include institutional certificate signature verification and key hash matching), the public and private key pairs are bound to the legal identity documents of the registered institution, and a complete digital identity credential object is generated.
[0041] By using a decentralized identity standardization process, the DID identifier and encryption key pair from the previous step are transformed into verifiable identity metadata, thereby enabling the trusted establishment of a unique identity for the on-chain regulatory entity.
[0042] S1.2: Based on the registration application materials submitted by the regulatory body, the scope of its legal jurisdiction is structured and coded. The GeoHash algorithm is used to convert the geographical area into a unified format of spatial coordinate code, which is then stored as the location field value in the DID document.
[0043] Based on the decentralized identity identifier and encryption key pair generated by the regulatory entity in step S1.1, obtain the legal jurisdiction description data contained in its registration application materials. The data may include the administrative division name, latitude and longitude coordinate range, boundary vector data, and geographic reference system information.
[0044] The field parsing method (parameters: administrative division name string, coordinate point set, boundary vector data format) is used to perform unified semantic parsing on the input geographic description data, map the administrative division name in natural language to standardized geographic codes, and convert the boundary vector data into latitude and longitude coordinate arrays to form a computable spatial region set.
[0045] Furthermore, by using a coordinate normalization algorithm (parameters: input coordinate system type, target coordinate system type, reference ellipsoid parameters), the conversion between different coordinate reference systems is realized, all coordinates are unified to the WGS-84 reference system, and a set of latitude and longitude coordinate points in a unified format is obtained.
[0046] Furthermore, the GeoHash encoding algorithm (parameters: latitude and longitude coordinate point set, encoding precision level n) is used to realize the raster index of the spatial region, divide the continuous geographical range into hash grids, perform latitude and longitude encoding on each grid, and output a unique set of GeoHash strings.
[0047] Furthermore, by using a regional boundary coverage calculation method (parameters: GeoHash string set, regional boundary coordinate array), spatial coverage optimization of the legally governed area is achieved, eliminating the coded grid outside the region and retaining the grid codes inside the fully covered region to form the final list of spatial coordinate codes.
[0048] By assigning values to fields, the list of spatial coordinate codes is written into the location field of the DID document of the regulatory entity, thereby establishing a binding relationship between the DID document and the standardized spatial index.
[0049] By using the GeoHash encoding algorithm described above, the geographical range resolution results from the previous step are transformed into spatial coordinate codes that can be efficiently compared and matched within blockchain smart contracts, achieving the expected technical effects of cross-system consistent storage and rapid jurisdictional retrieval.
[0050] For example, within the area of a coal mining enterprise, the legal jurisdiction submitted by the regulatory body is "Mining Area of XX City, Shanxi Province". This area, after geographic analysis, yields a boundary coordinate array, where the southwest corner coordinates are (37.026N, 111.913E) and the northeast corner coordinates are (37.084N, 111.985E). This coordinate set is input into a coordinate normalization algorithm to ensure its reference frame is WGS-84. In the GeoHash encoding algorithm, the encoding precision level n is set to 7, resulting in an initial encoding set [wx4g2sv, wx4g2sw, wx4g2sx, wx4g2sy]. The encoding wx4g2sy (located outside the boundary) is removed using a regional boundary coverage calculation method, and the encodings [wx4g2sv, wx4g2sw, wx4g2sx] are retained as the final spatial coordinate encoding list. After assigning the list to the location field of the DID document, a matching query was performed in the test space of the consortium blockchain. The retrieval response time was significantly improved, proving that this encoding method is efficient and accurate in comparing the jurisdiction of multiple regulatory entities.
[0051] S1.3: Based on the functional type classification table of regulatory agencies, perform functional type mapping operation on the regulatory body, convert the regulatory level information such as national, provincial, and local levels into standardized functional codes, and write them as the roleType field value in the DID document.
[0052] For the original description information of functional types contained in the registration application dataset submitted by regulatory entities, a matching and parsing method based on a predefined functional type classification table (parameter: the classification table consists of national, provincial, local, and third-party audit levels) is used to map the text descriptions in the data source to standardized functional codes.
[0053] Furthermore, by using a hash index retrieval algorithm (parameters: key is the original functional type string, value is the standardized functional code), the functional type code can be extracted quickly and unambiguously, and the association mapping result with the unique DID identifier of the regulatory entity can be obtained.
[0054] Furthermore, a validation rule engine (parameters: rule set includes mandatory field validation, code validity validation, hierarchical conflict detection, etc.) is used to perform validity validation on the matched function type code and generate corresponding validation status identifiers to ensure the accuracy and consistency of the roleType field data.
[0055] Furthermore, by utilizing the JSON-LD embedding algorithm (parameter: the roleType field embedding position follows the W3C DID document structure specification), the verified function type code is written into the roleType field of the DID document, and a document structure that conforms to the requirements of the verifiable credential specification is generated.
[0056] By using standardized code mapping and verification methods, the geolocation encoding results from the previous step are combined with a unique DID identifier to generate complete identity metadata containing location range and functional type, thereby enabling the construction of the authority and scalability of the regulatory entity's identity on the consortium blockchain.
[0057] For example, when performing function type mapping on registration application data from a provincial environmental protection department, the original description is "Provincial Mine Environmental Comprehensive Management Department." The standardized function code STR_02 is matched in the function type classification table. A hash index retrieval algorithm is used to obtain the mapping relationship between code STR_02 and DID identifier did:example:123456. The validity of this code is verified using a validation rule engine, returning a validation status identifier VALID, indicating that the function type code conforms to the preset specifications. Finally, the "roleType":"STR_02" field is written into the DID document using the JSON-LD embedding algorithm, so that the identity metadata of this regulatory entity includes the location field value "GeoHash:wx4g09" and the roleType field value "STR_02". In subsequent dynamic priority weight calculations, this function type will correspond to the basic weight coefficient. It also participates in three-dimensional matrix multiplication operations, thereby providing effective support for the assessment of regulatory authority.
[0058] S1.4: Based on the historical credit assessment data of the regulatory body, generate an initial credit score, use the Z-score normalization method to standardize the original score, output a credit weight value between 0 and 1, and record it as the initialCreditScore field value in the DID document.
[0059] S1.5: Encapsulate the DID identifier, key pair, location field, roleType field, and initialCreditScore field of the regulatory entity in JSON-LD format to generate a standardized DID document that conforms to the W3C verifiable credential specification, and deploy it to the distributed identity registration contract on the consortium blockchain.
[0060] During the initialization phase of the consortium blockchain, the DID identifier, encryption key pair, location field, roleType field, and initialCreditScore field of the regulatory entity have been generated as the input data carrier for this sub-step.
[0061] The JSON-LD serialization method (parameters: context mapping file, semantic annotation rules between fields, and extended namespace URI set) is used to perform semantic structured encapsulation of DID identifiers, key pairs, location fields, roleType fields, and initialCreditScore fields, ensuring that the semantic relationships between fields can be parsed across platforms.
[0062] Furthermore, by using the W3C Verifiable Credential (VC) generation specification (parameters: @context field, type field, issuer field, issuanceDate field, credentialSubject structure definition), the serialized data is processed into credentials, and an intermediate data structure containing field signature metadata and credential hash digest is obtained.
[0063] Furthermore, a multi-signature algorithm (parameters: private key of the regulatory entity, private key of the consortium blockchain identity registration contract, and threshold of the multi-party signature strategy) is adopted to achieve joint signature of the intermediate data structure and generate a final standardized DID document that conforms to the verifiable credential specification.
[0064] Furthermore, the distributed identity registration contract deployment API of the consortium blockchain is called (parameters: contract address, transaction gas limit value, submitter DID, public key signature) to write the standardized DID document to on-chain storage and obtain the transaction hash and block index number.
[0065] Through the chain-processing method described above, the identity data from the previous step is transformed into a verifiable, traceable, and tamper-proof on-chain DID document, achieving the expected technical effects of unique authentication and structured access across regulatory entities.
[0066] For example, in a coal mining enterprise consortium blockchain environment, the identity registration process of the Ministry of Ecology and Environment at the national level includes the following input parameters: DID identifier "did:example:envministry001", public key generated using the secp256k1 curve, location field encoded with GeoHash "wx4g0ec1", roleType field "ROLE_NATIONAL", and initialCreditScore field value of 0.92. When using JSON-LD serialization, the @context mapping file link is "https: / / www.w3.org / ns / did / v1", and field semantics are bound to the corresponding URI. When generating verifiable credentials, the issuer field is "did:example:envchainadmin", the issuanceDate field is "2024-06-01T11:00:00Z", and the credentialSubject embeds the aforementioned location, roleType, and initialCreditScore. When executing the multi-signature algorithm, the regulatory body uses its private key to sign the credentialSubject, and the on-chain identity registration contract's private key participates in the joint signature. The signature threshold is set to 2 to ensure that the data is written to the chain only after multi-party verification. When deploying the API call, the contract address is "0xabc123...789", the transaction gas limit is set to 300000, the returned transaction hash is "0xde45f...a9c", and the block index number is 52345. The execution result is that the DID document stored on-chain can be directly parsed and the signature source verified during subsequent authorization arbitration smart contract calls, significantly improving the identity credibility and access control accuracy during cross-institutional dynamic authorization.
[0067] S1.6: Call the identity metadata generation service to perform metadata extraction operations on all registered regulatory entity DID documents, and generate a standardized identity metadata set containing identity identifier, jurisdiction code, functional type code and initial reputation score for subsequent smart contract calls.
[0068] Step S2: When environmental monitoring data needs to be stored on the blockchain for evidence, the data collection node submits the data hash to the data blockchain authorization contract, triggering a multi-regulatory authorization process and starting a preset time window timer to record the submission sequence of authorization requests from each regulatory body. Specifically, this includes:
[0069] S2.1: Based on the raw environmental monitoring data collected by the environmental data collection nodes of coal mining enterprises, perform hash digest algorithm processing on the data to generate a unique data fingerprint, which serves as an index identifier for on-chain evidence storage.
[0070] For the raw environmental monitoring data collected by the environmental data collection nodes of coal mining enterprises, the SHA-256 hash digest algorithm (parameters: output length 256 bits, initial vector is the system default value, padding mode is PKCS#7) is used to map the raw data content into a fixed-length irreversible hash value to ensure that the subsequent on-chain index has uniqueness and tamper-proof properties.
[0071] Furthermore, a hash digest algorithm is used to perform byte-level sequential reading and block processing (parameters: single block size is 512 bits, the number of loop iterations is equal to the total number of original data bytes divided by the single block size) to realize the segmented calculation of large-capacity monitoring data and obtain the intermediate hash value results of each block.
[0072] Furthermore, a Merkle tree construction method is adopted (parameters: leaf nodes are the hash values of each block, and the hash of the middle node is generated by performing SHA-256 operation again on the concatenated byte streams of the left and right child nodes) to realize the hierarchical aggregation of block hashes and generate a tree index structure containing the root hash, so as to improve the efficiency of batch verification of hash values.
[0073] S2.2: Submit the data fingerprint to the data on-chain authorization contract deployed on the consortium blockchain, trigger a multi-regulatory entity authorization request event, generate an authorization request event log, and broadcast it to the authorization regulatory node set.
[0074] S2.3: Based on the preset time window parameter configuration information, start the countdown timer based on the smart contract, set the authorization request submission window period, and write the start timestamp of the time window into the authorization contract state variable.
[0075] After receiving the authorized time window parameter configuration information, the blockchain smart contract internal time management method (parameters: current block height of the system, on-chain timestamp accuracy) is adopted to realize the function of automatic recording of the start point of the time window within the smart contract.
[0076] Furthermore, the on-chain countdown timer is initialized through a smart contract event scheduling algorithm (parameters: time window length, countdown step size Δt), and the time window length is mapped to integer time steps in the contract state variables to ensure the immutability and network-wide verifiability of the timing process.
[0077] Furthermore, a high-precision timestamp acquisition method (parameters: consortium blockchain consensus timestamp, nanosecond-level local node clock calibration difference) is adopted to accurately capture the start time of the authorization window and generate a timestamp mark in a unified format, ensuring that different regulatory nodes have a consistent understanding of the time start.
[0078] Furthermore, by using a persistent storage method for contract state, the authorization window start timestamp is stored in the authorization contract state variable in key-value pairs, with the key being windowStart and the value being a standardized timestamp text format, to support the time validity judgment when subsequent authorization submissions are made.
[0079] By using smart contract countdown timers and state variable storage, the time window parameters of the previous step are converted into standardized on-chain start timestamp data, achieving a network-wide consistent measurement effect for the submission sequence of authorizations from multiple regulatory entities.
[0080] For example, in a scenario where environmental data from a coal mining enterprise is uploaded to the blockchain, the time window parameter is configured as 900 seconds. The smart contract uses an event scheduling algorithm with a step size Δt = 1 second to map 900 seconds into 900 countdown steps. The node uses a consortium blockchain consensus timestamp (accuracy ±50 milliseconds) and its local node clock for dual-source time synchronization. The actual start timestamp is 2024-06-01T10:15:30.050Z, with the nanosecond portion calibrated to 050000000. The contract state variable windowStart stores the value "2024-06-01T10:15:30.050Z", conforming to the ISO8601 standard. During the authorization request submission process, the smart contract calculates the difference between the submission timestamp of each request and windowStart. If the difference meets the specified conditions... If the request is deemed valid, it is rejected. The verification results show that the contract accurately controls the validity period of the authorization submission within 900 countdown steps across the entire network, significantly improving the accuracy and reliability of regulatory authorization timing control.
[0081] S2.4: Receive authorization request messages from multiple regulatory entities, the messages containing the regulatory entity's DID identifier, the scope of authorization fields, the access validity period, and additional explanatory information, and perform digital signature verification processing on the messages to confirm the legitimacy of the request source.
[0082] S2.5: Perform a submission timestamp annotation operation on the authorization requests that have passed signature verification, associate and store each authorization request with the corresponding timestamp information, generate an authorization request time sequence record table, and submit it to the temporary authorization pool cache area.
[0083] like Figure 2 As shown, step S3 involves calculating the regulatory activity score of each regulatory entity based on on-chain historical behavior ledger data. This calculation includes weighted normalization of response timeliness coefficients, abnormal data rejection rates, and the frequency of corrections by higher authorities. Specifically, it includes:
[0084] S3.1: Based on on-chain historical behavior ledger data, extract the approval response time series of various regulatory entities for similar environmental protection data in the past 30 days, and use the exponential decay function to weight the time series to obtain the response timeliness coefficient.
[0085] S3.2: Classify and statistically analyze the environmental data access authorization requests submitted by regulatory entities, calculate the ratio of the number of rejected requests for abnormal data to the total number of requests, obtain the abnormal data rejection rate, and map it to the [0,1] interval using the minimum-maximum normalization method.
[0086] For environmental data access authorization requests submitted on-chain by regulatory entities, a classification and statistical method (parameters: authorization request type label, data integrity identifier) is used to achieve quantitative analysis of abnormal data authorization behavior.
[0087] Furthermore, through an anomaly data identification algorithm (parameters: data value range threshold, monitoring equipment verification results, historical anomaly pattern characteristics), the anomaly determination of the data involved in the authorization request is realized, and an anomaly request identifier set is generated.
[0088] Furthermore, based on the set of abnormal request identifiers and the complete set of authorization requests, a proportional calculation method is adopted (parameter: number of abnormal requests N). abn Total number of authorization requests N total To achieve a low rejection rate for abnormal data. The mathematical solution is as follows:
[0089]
[0090] in, The rejection rate for abnormal data. This refers to the number of abnormal requests counted within the statistical period. This represents the total number of valid authorization requests within the same period.
[0091] Furthermore, the minimum-maximum normalization method is adopted (parameters: original rejection rate R, minimum rejection rate R within the statistical period). min Maximum rejection rate R max The rejection rate is mapped to an interval using the following formula:
[0092]
[0093] in, This is the normalized rejection rate, used as input for the subsequent activity scoring model.
[0094] By using the minimum-maximum normalization algorithm, the original abnormal data rejection rate is transformed into a normalized indicator, thereby achieving comparability and quantitative consistency of the indicator among different regulatory bodies.
[0095] For example, regarding the provincial environmental protection regulatory department where a certain coal mining enterprise is located, a total of 150 authorization requests were submitted in the past 30 days. Among them, 45 requests were rejected due to detected abnormal data (such as sulfur dioxide concentration exceeding the legal threshold, sensor status indicating failure, and abnormal data collection timestamps). Using an abnormal data identification algorithm, the number of abnormal requests N... abn =45, request the total number N total =150, calculate the outlier rejection rate: The result was 0.3. Among other regulatory bodies during the same period, the minimum rejection rate R was... min =0.1, maximum rejection rate R max =0.5, substituting into the normalization formula: The normalized result is 0.5. This indicator is directly used as the second dimension input for the regulatory activity score. By participating in the weighted calculation together with the response timeliness coefficient and the superior correction frequency indicator, it realizes the quantitative assessment of the comprehensive law enforcement accuracy and risk response capability of the regulatory body, and significantly improves its weight performance in abnormal data scenarios in the dynamic priority weight model.
[0096] S3.3: Based on the authorization decision records submitted by the regulatory body on the chain, count the number of times it was rejected or corrected by the superior regulatory authority, and use the time decay factor to weight the number of corrections to generate the superior correction frequency index.
[0097] An index retrieval operation is performed on the authorization decision record database to filter the set of all authorization decision instances of the target regulatory body within a fixed time window in the past. The set of records rejected or corrected by the superior regulatory unit is extracted to form the time series data of correction events. An event frequency statistical method (parameters: time window length T, event type identifier set E) is used to achieve basic statistics on the number of corrections to obtain the raw correction frequency value. Furthermore, a time decay weighting method (parameters: decay coefficient λ, base time) is used. This allows for dynamic weighting of the time series of correction events and yields the time-weighted correction count, calculated using the following formula:
[0098]
[0099] in, Time-weighted correction count The time decay coefficient, To correct the timestamp of the event, This is the current base time for calculation. Further, it is calculated using a mean normalization method (parameter: maximum correction value F). max Minimum correction value F minThe time-weighted correction count is mapped to the [0,1] interval to obtain the upper-level correction frequency index. Through this normalization process, the weighted result of the previous step is transformed into unified scale data that can be directly superimposed with the response timeliness coefficient and the abnormal data rejection rate, thus achieving consistent integration in the multi-dimensional behavioral scoring system.
[0100] For example, in a coal mining company's energy and environmental protection supervision system, selecting the past 30 days as the time window T, and retrieving all authorization records of a provincial environmental protection department from the on-chain historical authorization ledger, five records were found to have been rejected by the higher-level Ministry of Ecology and Environment, occurring on days 3, 8, 15, 20, and 28 respectively. The time decay coefficient λ is set to 0.05, and the base time... At the current time of day 30, substituting each event into the time decay weighted formula: the weight of the event on day 3 is... The remaining events are calculated sequentially, yielding a weighted sum F of 3.21. Let F be... max For 10, F min If the value is 0, perform normalization calculation. The normalized superior correction frequency index was obtained as 0.321. This index has the same dimension as the response timeliness coefficient of 0.62 and the abnormal data rejection rate of 0.45 for the same subject, and can be directly entered into the weighted calculation module of the regulatory activity score, so as to realize the quantitative assessment of the law enforcement accuracy dimension of the authorized arbitration process.
[0101] S3.4: Using the response timeliness coefficient, abnormal data rejection rate, and superior correction frequency index as input parameters, a linear weighted normalization operation is performed using a weighted coefficient vector configured based on the type of regulatory responsibility to generate a regulatory activity score.
[0102] S3.5: Output the regulatory activity score to the priority arbitration smart contract as a behavioral dimension input parameter in the dynamic priority weight calculation model, which is then used for subsequent three-dimensional matrix multiplication operations.
[0103] like Figure 3 As shown, step S4 involves: accessing the API interface of the external environmental risk early warning system to obtain real-time pollution index and geological disaster probability data for the coal mining area, generating a regional urgency index, and performing index decay function normalization to normalize the regional urgency value. Specifically, this includes:
[0104] S4.1: Based on the geographical coordinates of coal mining enterprises, the system calls the standard API interface of the external environmental risk early warning system to obtain the real-time pollution index of the current area, including PM2.5. NOx pollutant concentration values are used to form the initial environmental risk data input.
[0105] Based on the geographic coordinate data of coal mining enterprises output by the geolocation module deployed at the acquisition nodes, the GPS coordinate analysis method (parameters: longitude, latitude, elevation) is used to achieve a precise numerical description of the spatial location of the coal mine and generate coordinate triplet data results that conform to the WGS-84 standard.
[0106] Furthermore, a coordinate mapping transformation algorithm (parameters: WGS-84 coordinate triples, GeoHash precision level) is used to achieve the mapping transformation from geographic coordinates to high-precision GeoHash codes, and a unique regional positioning code is obtained for spatial index matching in environmental risk data retrieval.
[0107] Furthermore, the system calls the standardized API interface of the external environmental risk early warning system (parameters: authentication token, GeoHash spatial index code) to establish a secure communication connection with the third-party risk database and request the original pollution index data packet for the current coordinate area.
[0108] Furthermore, a real-time data parsing method (parameters: JSON format data packet, pollutant field list) is employed to achieve field-level parsing of the pollution index data packet and generate a dataset containing PM2.5, The original pollutant concentration vector, which represents the mass concentration values of pollutants such as NOx.
[0109] Furthermore, through a unit standardization algorithm (parameters: original pollutant concentration vector, target unit standard), a unified conversion of different pollutant data units is achieved, and a standardized pollutant concentration dataset that can be directly used for risk calculation is generated.
[0110] Through the above method chain, the API data of the external environmental risk early warning system is transformed into raw environmental risk input data containing the concentrations of various pollutants, thereby realizing a quantitative representation of the environmental pollution status of the coal mining area.
[0111] For example, a coal mining company deploys a high-precision GPS module at its data collection node, outputting coordinates of longitude 106.5500°E, latitude 29.5647°N, and elevation 420m. Using the GeoHash encoding algorithm with a precision level of 8, these coordinates are converted into the code "wx4g09z3", which serves as the spatial index for API requests. When calling the external environmental risk early warning system API interface, the authentication token "authToken_987654321" is used to retrieve the returned pollution data JSON packet, which includes PM2.5 concentration of 92 μg / m³. The concentration was 18 μg / m³, and the NOx concentration was 40 μg / m³. Using a unit-consistency algorithm, all concentration values were converted to mg / m³, resulting in PM2.5 of 0.092 mg / m³. The concentration of particulate matter (PM2.5) is 0.018 mg / m³, and the concentration of nitrogen (NOx) is 0.040 mg / m³. This dataset was used as the original environmental risk input for the subsequent calculation of the comprehensive pollution index, providing a high-precision and traceable numerical basis for the environmental urgency dimension of the dynamic priority comprehensive weighting.
[0112] S4.2: Based on the geological information and historical disaster records of coal mining enterprises, call the API interface of the environmental risk early warning system to obtain the probability parameters of geological disasters in the current area, including risk level values of landslides, collapses, and surface cracks, to supplement the regional environmental risk dimension.
[0113] Based on the geological information and historical disaster records of coal mining enterprises, a geological information aggregation method (parameters: geological coordinates, mining area range, drilling data) is adopted to realize the unified retrieval and structured formatting of basic geological data of the target mining area by blockchain nodes.
[0114] Furthermore, by using a historical disaster record analysis algorithm (parameters: disaster type, occurrence time, and impact range), the algorithm classifies and statistically analyzes past events such as landslides, collapses, and surface cracks, and obtains disaster type frequency distribution matrix data results.
[0115] Furthermore, a disaster probability prediction model (parameters: geological structure stability coefficient, disaster frequency matrix, and climate condition variables) is adopted to realize probability estimation based on time series data and generate a set of original risk probability values for each disaster, denoted as P_set.
[0116] Furthermore, by calling the environmental risk early warning system API interface (parameters: coal mine geographical coordinates, disaster category code, time range), the system can obtain the latest risk level values of landslides, collapses, and surface cracks in the current area in real time, and generate the corresponding risk level vector R. vec .
[0117] Furthermore, based on the probabilistic fusion algorithm (parameter: P) set R vec (Model fusion weights), and calculate the geological hazard probability parameter P using the following formula:
[0118]
[0119] in, Let be the weighting coefficient for the i-th type of disaster. Let be the historical probability value of the i-th type of disaster. This is the normalized value of the current risk level of the i-th type of disaster.
[0120] By using a probabilistic fusion processing method, the results of the previous step are transformed into structured data containing multi-dimensional geological disaster risk probability parameters such as landslides, collapses, and surface cracks, thereby supplementing and accurately quantifying the regional environmental risk dimensions.
[0121] For example, for a certain coal mining area, the geological information aggregation method reads the geological coordinates as North Latitude. degrees, east longitude Degree, mining area Square kilometers, rock drilling data show the thickness of the Quaternary loose layer Meters, bedrock is Mesozoic sandstone; historical disaster frequency matrix shows landslide events occurred. Second, collapse event occurred Second, surface fissure events occurred. Next, a disaster probability prediction model is used to calculate the historical probability value set P. set landslide collapse Surface cracks ; Call the environmental risk early warning system API interface to obtain the current risk level vector for landslides collapse Surface cracks Let the weight coefficient vector w be the landslide collapse Surface cracks Substitute into the formula The calculated comprehensive geological hazard probability parameters are as follows: The application results show that the regional urgency assessment results significantly improve the responsiveness to changes in geological risks, and can support the authorization of arbitration contracts to improve the accuracy of priority weight determination of relevant regulatory entities under high-risk conditions.
[0122] S4.3: The obtained pollution index data is processed by weighted averaging, and the comprehensive pollution index is calculated using the environmental impact weight coefficient of each pollutant to generate a unified basic indicator for environmental risk quantification.
[0123] S4.4: The probability parameters of geological hazards are linearly normalized and mapped to the [0,1] interval to eliminate the dimensional differences between different hazard types and generate standardized geological risk factors.
[0124] S4.5: Based on the comprehensive pollution index and standardized geological risk factors, a linear combination method is used to generate the original regional urgency index, so as to integrate multi-dimensional environmental risk factors and provide input for subsequent normalization processing.
[0125] S4.6: Construct an exponential decay function model, whose decay coefficient is set based on the environmental response threshold of the coal mining area, and perform nonlinear mapping processing on the original regional urgency index to enhance the sensitivity differentiation ability under high-risk conditions.
[0126] Based on the original regional urgency index data generated by the S4.5 sub-step, an exponential decay function model construction method (parameter: environmental response threshold λ) is adopted to achieve enhanced sensitivity to high-risk states and nonlinear mapping processing.
[0127] S4.7: Substitute the original regional urgency index into the exponential decay function model, perform normalization calculation, and generate a normalized regional urgency index to adapt to the input range requirements of the subsequent dynamic priority weight calculation module.
[0128] Step S5: Assign basic weight coefficients based on the functional type of the regulatory body, and perform a three-dimensional matrix multiplication operation combining the regulatory activity score and the normalized value of regional urgency to generate a dynamic priority comprehensive weight vector. Specifically, this includes:
[0129] S5.1: Based on the functional type field in the regulatory entity's DID document, execute the functional classification mapping function to map national, provincial, local, and third-party audit institutions to initial basic weight coefficients of [1.0, 0.8, 0.6, 0.5], generating a basic weight vector W. base This is to quantify the legal authority level of regulatory bodies.
[0130] Based on the functional type field in the DID document of the regulatory entity, a functional classification mapping algorithm (parameter: predefined functional type code table) is used to realize the structured parsing function of the functional category of the regulatory entity.
[0131] Furthermore, through a mapping function (parameters: national, provincial, local, and third-party audit corresponding authority level coefficients), the parsed functional types are transformed into numerical initial basic weight coefficients, and a quantitative representation of the regulatory body's functional authority level is obtained.
[0132] Furthermore, a key-value matching method is adopted (parameter: a table showing the correspondence between functional type codes and weight coefficients) to batch match the functional type tags of all regulatory entities on the chain with their weight coefficients, and generate a basic weight vector W containing the legal authority levels of all regulatory entities. base Data structures.
[0133] Furthermore, based on the data consistency verification algorithm (parameters: DID document storage area, functional type field verification rules), the legality and consistency of the above mapping results are verified, and regulatory entity records with abnormal fields or missing data are removed.
[0134] By using vectorization encapsulation, the compliant set of weight coefficients is transformed into a basic weight vector W that can participate in three-dimensional matrix operations. base This enables structured and quantitative input of the legal authority levels of multiple regulatory bodies.
[0135] For example, in a certain consortium blockchain network, the functional type field of the national-level ecological and environmental department is "ROLE_NAT", with a corresponding weight value of 1.0 in the mapping coefficient table; the field of the provincial environmental protection department is "ROLE_PROV", with a weight value of 0.8; the field of the local inspection team is "ROLE_LOC", with a weight value of 0.6; and the field of the third-party auditing agency is "ROLE_TPA", with a weight value of 0.5. A functional classification mapping algorithm is used to convert the above fields into weight vectors in batches. A data consistency verification algorithm is used to format and validate the "ROLE_NAT" field in the DID document, ensuring that the field completely matches the predefined code and contains no extra characters. After successful validation, this field is written into a vector. This vector serves as the input for the legal authority level in the dynamic priority weight calculation model. In subsequent matrix multiplication operations with regulatory activity scores and regional urgency indicators, it significantly improves the distinguishability of functional authority factors in the overall weight. Performance testing shows that this mapping mechanism significantly reduces the processing latency of weight calculation in scenarios involving 100 different functional entities, and improves the accuracy and stability of the output vector.
[0136] S5.2: The regulatory activity score (RAS) is normalized. The Min-Max standardization algorithm is used to perform a linear transformation on three indicators: response timeliness coefficient, abnormal data rejection rate, and number of corrections by superiors, to obtain the normalized activity component r. i This is to eliminate the influence of different dimensions on the weight calculation.
[0137] S5.3: Based on the Regional Emergency Index (REI), an exponential decay function is adopted. Time-sensitive weighting is applied to real-time pollution index and geological hazard probability data in coal mining areas to generate a normalized regional urgency component e. j To enhance the priority of regulatory response in the event of a sudden environmental incident.
[0138] Based on the normalized regional urgency index REI output by S4.7, an exponential decay function model (parameters: λ is the environmental response decay coefficient, t is the time difference) is used to perform time-sensitive weighting on the real-time pollution index and geological disaster probability data of the coal mining area, so as to quantify the response priority enhancement effect under high-risk conditions.
[0139] Furthermore, by constructing a time-weighted function, the pollution index and the probability of geological disasters are used as weight inputs, and the exponential decay function formula is applied: This allows for the calculation of risk data attenuation over different time periods, resulting in corresponding risk response weighting factors.
[0140] Furthermore, by performing a term-by-term product operation between the weighting factor and REI, short-term high-risk data are assigned a higher priority score, and low-timeliness data is smoothed out, thereby forming the initial value of the normalized regional urgency component.
[0141] Furthermore, a normalization function is used to perform interval mapping on the initial values, and the results are mapped to the [0,1] interval using the Min-Max normalization method to eliminate differences in different units and data ranges, generating the final normalized regional urgency component. .
[0142] By using exponential decay weighting and normalization, the original regional urgency index from the previous step is transformed into a key environmental risk component that is adapted to dynamic priority weight calculation, thereby significantly improving the priority ranking of authorizations by multiple regulatory bodies in the event of a sudden environmental incident.
[0143] For example, in a coal mining area, the weighted result of the real-time pollution index is 0.85, the weighted result of the geological disaster probability is 0.65, the time difference t is set to 30 minutes, and the environmental response attenuation coefficient λ is configured to 0.02. Using the formula... The calculated risk response weighting factor is approximately 0.5488. Multiplying the pollution index by the weighting factor yields 0.46648, and multiplying the geological hazard probability by the weighting factor yields 0.35672. Taking a weighted average of these two results (with a weighting ratio of pollution index:geological hazard probability = 3:2) gives an initial value of approximately 0.43198. Using Min-Max normalization, setting the minimum value to 0 and the maximum value to 1, the normalized result is... =0.43198. This component significantly improves the regulatory authorization priority of this region within the current time window in the weight matrix calculation, effectively ensuring the real-time nature and authority of data access decisions under high-risk conditions.
[0144] S5.4: Construct a three-dimensional weight matrix M, where the row dimension represents the set of regulatory entities and the column dimension corresponds to the basic weight coefficients W. base Normalized activity component r i With normalized regional urgency component e j It performs a three-dimensional matrix multiplication operation to integrate three key factors: functional authority, regulatory effectiveness, and environmental urgency.
[0145] Based on the fundamental weight vector W generated in the preceding steps base Normalized activity component r i and the normalized regional urgency component e jThe matrix construction method (parameters: set of regulatory subjects, values of three types of key factors) is adopted to align the three types of input factors by column dimension and form a unified data structure M.
[0146] Furthermore, through a dimension mapping algorithm (parameters: row number corresponds to the unique identifier of the regulatory entity, column number corresponds to the weight type), a two-way index binding between the matrix row dimension and the set of regulatory entities is achieved, and matrix row labeled data that can be retrieved by arbitration smart contracts is obtained.
[0147] Furthermore, through a numerical realignment algorithm (parameter: weight type encoding), the data type of each column of the matrix is explicitly defined, and the first column is bound to the basic weight coefficient W. base The second column is bound to the normalized activity component r. i The third column is bound to the urgency component e of the normalized region. j .
[0148] Furthermore, a three-dimensional matrix dot product operation method is adopted (parameter: P demand vector = functional authority weight × regulatory effectiveness weight × environmental urgency weight) to perform element-wise multiplication of the three weight components in each row and generate an intermediate product matrix for the weight synthesis algorithm to call.
[0149] Furthermore, the intermediate fusion weights of each regulatory body are calculated using the following three-dimensional matrix dot product formula:
[0150]
[0151] in, The column vector of basic weight coefficients, This is the normalized activity component column vector. This is a normalized column vector of regional urgency components.
[0152] By performing a three-dimensional matrix multiplication operation, the weight coefficients, activity components, and urgency components from the previous step are integrated into a weight matrix containing multi-dimensional information, thereby achieving unified quantification of three key factors: functional authority, regulatory effectiveness, and environmental urgency.
[0153] For example, in a coal mine supervision scenario, the national, provincial, and local regulatory bodies and third-party auditing institutions have basic weight coefficients of 1.0, 0.8, 0.6, and 0.5, respectively; normalized activity components are 0.92, 0.85, 0.78, and 0.74, respectively; and normalized regional urgency components are 0.88, 0.85, 0.80, and 0.75, respectively. The first column of the constructed matrix M is... The second column is The third column is Performing a three-dimensional matrix dot product, the fusion weight of national-level regulatory entities is... = The provincial integration weight is = The weight of local-level integration is = The third-party integration weight is = The fusion result serves as the input for subsequent S5.5 weighted product operations, effectively improving the accuracy and adaptability of multi-factor comprehensive evaluation during authorized arbitration.
[0154] S5.5: Perform a weighted product operation on each row of the three-dimensional matrix M to calculate the dynamic priority comprehensive weight value P_k for each regulatory entity, and output the comprehensive weight vector P = [P1, P2, ..., P...]. n ], which serves as the input parameter for the multi-regulatory authorization conflict resolution algorithm to support the generation of subsequent optimal authorization decisions.
[0155] The input is a row vector structure based on a three-dimensional weight matrix M, including the basic weight coefficients. Normalized activity component and normalized regional urgency components The matrix row-wise weighted product algorithm (parameter: weight fusion coefficient is set to multiplication coupling model) is used to fuse the three types of factors into a single priority score.
[0156] Furthermore, through the row-by-row vector dot product operation method (parameter: corresponding sequentially) , , (Three dimensions) to achieve consistent interactive calculation of all parameters of a single regulatory entity, and obtain the weighted product result P within the row vector. k .
[0157] Furthermore, a normalized multiplication-integration method is adopted (parameter: the result interval is mapped to [0,1]) to achieve intra-domain comparison of priority scores of different regulatory entities and generate a normalized weight vector.
[0158] Through the above algorithm, each row vector of the three-dimensional matrix M is transformed into a single comprehensive weight value, forming a dynamic priority comprehensive weight vector P = [P1, P2, ..., P...]. n This provides clear quantitative input metrics for the multi-regulatory authorization conflict resolution algorithm.
[0159] For example, in a consortium blockchain monitoring scenario for a coal mining area, a three-dimensional matrix M is constructed, where row 1 (representing the national-level regulatory body) corresponds to... = , = (Activity Normalized Value) = (Urgency level normalized value); Row 2 (Provincial regulator) corresponds to = , = , = The weighted product formula is used: Calculate national-level regulatory parties = = Provincial regulatory authorities = = All After the values are normalized to [0,1], the result is formed The comprehensive weight vector is used in the subsequent conflict resolution algorithm, giving national regulators absolute priority in this round of authorization decisions and significantly improving the timeliness and authority of authorization arbitration.
[0160] Step S6: When multiple regulatory authorization conflicts exist, a comprehensive weighted sorting algorithm is executed. If the highest weight values are the same, the timestamp priority principle is adopted to generate the optimal authorization decision scheme and conflict resolution proof data. Specifically, this includes:
[0161] S6.1: Based on the DID identity identifier of the regulatory entity, obtain its standardized identity metadata stored on the chain, including legal jurisdiction, functional type and initial reputation score, as the basic input parameters for dynamic priority weight calculation, so as to ensure that the authorized arbitration process has clear identity authentication basis.
[0162] S6.2: Extract the approval response time data of regulatory entities for similar data in the past 30 days from the on-chain historical behavior ledger, normalize the response time using the response time coefficient calculation model, and generate the first dimension input of the regulatory activity score to quantify the response efficiency of regulatory entities.
[0163] In the on-chain historical behavior ledger of the consortium blockchain, the approval response time records of regulatory entities for similar environmental data in the past 30 days are used as the input data source to construct a response timeliness dataset that meets the requirements of time series analysis.
[0164] A time series extraction method (parameters: time span = 30 days, data type = similar environmental protection data approval records) is used to extract the time intervals of approval response events for each regulatory body, generating an original timeliness sequence containing the response duration of each event. Furthermore, an exponential decay weighted algorithm (parameters: decay coefficient λ is set according to data freshness) is used to weight and update the original response duration sequence, enhancing the influence of recent approval response data on the final timeliness indicator, and obtaining a weighted timeliness sequence. Further, a mean normalization method (parameters: mean μ is the arithmetic mean of the weighted timeliness sequences of all regulatory bodies, standard deviation σ is the standard deviation of the weighted timeliness sequences of all regulatory bodies) is used to unify the scale of response timeliness data among different regulatory bodies, eliminating dimensional differences between samples and generating a normalized response timeliness vector. A response timeliness coefficient calculation model is used to calculate the response efficiency coefficient of each regulatory body using the following formula:
[0165]
[0166] in, For response efficiency coefficient, The average weighted response time of all regulatory bodies. This represents the weighted response time of the target regulatory body. Further, a linear mapping method (parameter: mapping interval [0,1]) is used to scale the response efficiency coefficient across intervals, generating the first dimension index of regulatory activity to quantify the approval response efficiency of the regulatory body. After normalizing the response efficiency coefficient, it is used as the first dimension input to the regulatory activity score and submitted to the authorization conflict resolution calculation module.
[0167] Through the aforementioned algorithm chain, the approval response time data in the ledger is transformed into a structured and normalized response efficiency indicator, thereby achieving precise quantification of the first dimension input during the dynamic priority weight calculation process.
[0168] For example, in a coal mining enterprise consortium blockchain, approval response time data for the most recent 30 days is obtained for three types of regulatory bodies (national, provincial, and local). The time span is fixed at 30 days. National-level data is recorded as [120, 90, 110] minutes, provincial-level data as [150, 130, 140] minutes, and local-level data as [180, 200, 170] minutes. An exponential weighting method with a decay coefficient λ=0.05 is used to weight each sequence, resulting in a weighted average time of 105 minutes for national-level, 140 minutes for provincial-level, and 183 minutes for local-level. The overall weighted average is calculated as μ=142.67 minutes, which is then substituted into the formula. The response efficiency coefficients were obtained as follows: national level 0.2653, provincial level 0.0187, and local level -0.2820. A linear mapping was used to map the coefficients to [0,1], resulting in normalized efficiency values of 0.63 for the national level, 0.51 for the provincial level, and 0.39 for the local level. These normalized efficiency values, used as the behavioral dimension input of the dynamic priority weight calculation model, significantly improve the ability to distinguish response timeliness during the arbitration of multi-regulatory authorization conflicts.
[0169] S6.3: Statistical analysis of the historical data rejection behavior of regulatory entities is conducted. Based on the abnormal data rejection rate and the number of corrections by higher-level units, a weighted normalization operation is performed to generate the second and third dimension inputs of the regulatory activity score, so as to comprehensively evaluate the enforcement accuracy and compliance of regulatory entities.
[0170] S6.4: Connect to the API interface of the external environmental risk early warning system to obtain real-time pollution index and geological disaster probability data of the coal mine area. Use the exponential decay function to normalize the raw data and generate a regional urgency index to reflect the environmental risk urgency of the current data authorization request.
[0171] Based on the geographical coordinate data of coal mining enterprises, an environmental data acquisition interface call method (parameters: location code GeoHash, API authentication key, pollution index data field set) is adopted to achieve secure connection and data request with the API of the external environmental risk early warning system.
[0172] Furthermore, through multi-source environmental data fusion algorithms (parameters: PM2.5 concentration, ... (Concentration, NOx concentration, data timestamp) to achieve batch acquisition of real-time pollution indices and obtain raw concentration datasets of multiple pollutants.
[0173] Furthermore, a geological hazard probability query method (parameters: regional geological type code, historical hazard record index number) is adopted to realize the synchronous retrieval of hazard risk level data such as landslides, collapses, and surface cracks, and generate the original geological risk dataset.
[0174] S6.5: Assign basic weight coefficients based on the functional type of the regulatory body, combine the regulatory activity score and the regional urgency index, perform three-dimensional matrix multiplication to generate a dynamic priority comprehensive weight vector, so as to achieve a unified quantitative assessment of the three elements of regulatory authority, response efficiency and environmental risk.
[0175] S6.6: Perform field-level comparison of all authorization requests submitted by regulatory entities, identify conflicting authorization items, and perform sorting calculations based on dynamic priority comprehensive weight vector. If the highest weights are the same, the time priority principle is applied according to the timestamp of the authorization request to generate the optimal authorization decision scheme.
[0176] S6.7: Generate conflict resolution proof data, including the weight calculation process of each regulatory body, the list of authorized conflict fields, the sorting results and the final decision basis. Encapsulate this proof data into verifiable structured metadata for subsequent block packaging and the execution of regulatory feedback mechanisms.
[0177] Step S7: Write the optimal authorization signature, decision-based metadata, and composite signature structure into the transaction attachments and block header of the new block, complete the block packaging operation, and broadcast it to the consensus node network. Specifically, this includes:
[0178] S7.1: Based on the optimal authorization decision scheme and conflict resolution proof data generated by S6, the authorization signature of the regulatory entity is formatted and encapsulated to generate a standardized authorization signature data structure to support the structured writing of subsequent block transaction attachments.
[0179] S7.2: Based on the authorized signature data structure, regulatory entity DID identifier, dynamic priority weight value, regional urgency index, and regulatory activity score, generate a set of decision-making basis metadata in the block transaction attachment for subsequent authorization traceability and audit verification.
[0180] Based on the formatted and encapsulated authorized signature data structure, regulatory entity DID identifier, dynamic priority weight value, regional urgency index, and regulatory activity score, a field mapping loading algorithm (parameters: DID index table, field correspondence mapping table) is adopted to realize the structured parsing and memory mapping processing of input parameters, and establish a one-to-one correspondence between various numerical parameters and metadata fields.
[0181] A hierarchical metadata construction method (parameters: metadata hierarchy definition file, field grouping strategy) is adopted to organize the unpacked input data into layers according to the regulatory subject identification layer, weight assessment layer, environmental risk layer and behavior assessment layer, and obtain serializable intermediate metadata objects.
[0182] Furthermore, through a normalization verification algorithm (parameters: numerical range configuration file, normalization factor calculation rules), the range adaptation processing of dynamic priority weight values, regional urgency indicators, and regulatory activity scores is realized, and standard value range data that meets the input constraints of blockchain smart contracts is generated.
[0183] By using metadata serialization processing (parameters: JSON-LD encoding rules, on-chain storage structure definition), the fused matrix structure, normalized indicators, and DID identity information are transformed into a set of decision-making basis metadata in the block transaction attachments, thereby achieving on-chain solidification of multi-dimensional regulatory factors and the verifiability of subsequent audits.
[0184] For example, during a coal mine environmental data uploading process, the system receives an authorized signature data structure from regulatory entity A. Its DID identifier is did:example:001, its dynamic priority weight value is 0.92, its regional urgency index is 0.87, and its regulatory activity score is 0.78. A field mapping loading algorithm is used to map the DID identifier to the identity layer field, the weight value to the weight layer field, and the regional urgency index and activity score to the risk layer and behavior assessment layer fields, respectively. After processing with a normalization verification algorithm, the weight value, urgency index, and activity score all remain within the standard range of [0,1]. A weighted association matrix transformation algorithm is used to obtain the fusion matrix row vectors. The calculation result is The data is stored in the matrix index structure as the basis for weight calculation. Finally, the above data set is written into the decision basis metadata set in the block transaction attachment through JSON-LD serialization, realizing the standardized and verifiable storage of the authorization decision basis of the regulatory body on the chain. During the audit verification stage, this metadata set can significantly improve the efficiency and accuracy of conflict decision tracing.
[0185] S7.3: Perform a composite signature operation on the decision-making basis metadata set and the optimal authorized signature data, and use the asymmetric key corresponding to the regulatory entity's DID to jointly sign the data and generate a composite signature structure to enhance data integrity and the credibility of the authorization source.
[0186] S7.4: Write the composite signature structure, authorized signature data, and decision-based metadata into the transaction attachment field of the new block, and embed the hash value of the composite signature structure in the block header to enable the block header to perform integrity verification and fast verification of the transaction attachment content.
[0187] After receiving the composite signature structure, authorized signature data, and decision basis metadata output by the composite signature generation module, the transaction attachment writing method (parameters: structured data set, transaction attachment field format specification) is used to implant structured data into the transaction attachment fields of the new block.
[0188] Furthermore, by using a transaction attachment serialization algorithm (parameters: JSON-LD encoding rules, field mapping table), the authorized signature data, regulatory entity identifier, and decision-making basis metadata set are sequentially arranged in the transaction attachment fields, and the complete binary representation data of the attachment is obtained.
[0189] S7.5: Based on the consensus mechanism of the blockchain network, the newly packaged block is broadcast to the consensus node network in the consortium chain to trigger the verification and consensus confirmation process of the new block, ensuring the distributed synchronization and immutability of the multi-party supervision and authorization results.
[0190] The input conditions include the generated new block data structure, which encapsulates the optimal authorization signature, decision basis metadata, and composite signature structure. The block header also embeds the transaction attachment integrity hash value, and the new block is in a state of pending consensus.
[0191] A consortium blockchain broadcast algorithm based on Byzantine fault tolerance mechanism (parameters: node identity list, message hash verification field) is adopted to realize the synchronous distribution of new blocks to consensus nodes across the network.
[0192] Furthermore, by using a message queue-based propagation control method (parameters: broadcast topology configuration, maximum concurrent connections), new blocks are sent in batches in an orderly manner, and preliminary receipt data confirming node reception is obtained.
[0193] Furthermore, through a block verification algorithm (parameters: transaction attachment hash value, composite signature public key set, block timestamp range), the receiving node can quickly verify the structure of the new block, the legality of the signature, and the integrity of the data, and generate a verification result identifier.
[0194] Furthermore, a consensus voting counting algorithm (parameters: node verification result identifier set, statutory confirmation threshold) is used to determine whether a new block has passed distributed confirmation and generate a consensus confirmation message.
[0195] By adopting a block state update processing method, the consensus confirmation message is transformed into on-chain block height and index metadata, thereby achieving distributed synchronization and immutability of the new block across all consensus nodes.
[0196] Step S8: For unaccepted regulatory authorization requests, an asynchronous feedback mechanism is executed to generate a response message containing a weight comparison matrix and a description of the decision logic, which is then pushed to the smart contract callback interface of the corresponding regulatory body. Specifically, this includes:
[0197] S8.1: Based on the conflict resolution proof data, extract the original authorization requests submitted by each regulatory body and their corresponding dynamic priority comprehensive weight values, and use them as input parameters for the asynchronous feedback mechanism to generate a basis for authorization decision comparison.
[0198] S8.2: Perform weight difference analysis on unaccepted authorization requests, calculate the priority weight difference between them and the best authorization request, and generate a weight comparison matrix to quantitatively reflect the relative authority of the regulatory body in this authorization process.
[0199] S8.3: Based on the decision-making basis metadata stored in the smart contract, construct a decision logic description document. The decision logic description includes regulatory activity score, regional urgency index, basic weight coefficient and comprehensive weight calculation path to form a traceable authorization conflict resolution process.
[0200] S8.4: The weight comparison matrix and decision logic description document are encapsulated in a structured manner to generate a standardized response message. The response message is encoded in JSON-LD format to support automatic parsing and visualization by the regulatory body system.
[0201] S8.5: Call the smart contract callback interface address declared in the regulatory entity's DID document, and push the response message to the corresponding regulatory entity's regulatory feedback contract through an asynchronous communication channel to trigger the regulator's dynamic adjustment of the authorization strategy and the optimization generation of subsequent authorization requests.
[0202] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
[0203] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.
[0204] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A blockchain-based method for environmental data storage and traceability in coal mining enterprises, characterized in that... Specifically, it includes: S1: During the initialization phase of the consortium blockchain, decentralized identity identifiers (DIDs) are registered for each regulatory entity, and their legal jurisdiction, functional type, and initial reputation score are declared in their DID documents to generate standardized identity metadata; S2: When environmental monitoring data needs to be stored on the blockchain, the data collection node submits the data hash to the data on-chain authorization contract, triggering a multi-regulatory authorization process and starting a preset time window timer to record the submission sequence of authorization requests from each regulatory body; S3: Calculate the regulatory activity score of each regulatory body based on on-chain historical behavior ledger data; S4: Connect to the API interface of the external environmental risk early warning system to obtain real-time pollution index and geological disaster probability data of the coal mining area, generate regional urgency index and perform index decay function normalization processing. S5: Assign basic weight coefficients based on the functional type of the regulatory body, and perform three-dimensional matrix multiplication operation by combining the regulatory activity score and the normalized value of regional urgency to generate a dynamic priority comprehensive weight vector. S6: When there are multiple regulatory authorization conflicts, execute the comprehensive weight ranking algorithm. If the highest weight values are the same, the timestamp priority principle is adopted to generate the optimal authorization decision scheme and conflict resolution proof data. S7: Write the optimal authorized signature, decision-based metadata, and composite signature structure into the transaction attachment and block header of the new block, complete the block packaging operation, and broadcast it to the consensus node network.
2. The method for storing and tracing environmental protection data of coal mining enterprises based on blockchain according to claim 1, characterized in that, Step S7 is followed by: S8: For regulatory authorization requests that are not adopted, execute an asynchronous feedback mechanism to generate a response message containing a weight comparison matrix and a description of the decision logic, and push it to the smart contract callback interface of the corresponding regulatory body.
3. The method for storing and tracing environmental protection data of coal mining enterprises based on blockchain according to claim 1, characterized in that, Step S1 involves registering decentralized identity identifiers (DIDs) for each regulatory entity, which includes: triggering the regulatory entity DID registration process based on the consortium blockchain network initialization event, generating decentralized identity identifiers and their corresponding encryption key pairs using the W3C DID standard framework, and constructing a unique digital identity credential for the regulatory entity.
4. The method for storing and tracing environmental protection data of coal mining enterprises based on blockchain according to claim 1, characterized in that, In step S1, an initial credit score is generated based on the regulatory body's historical credit assessment data.
5. A method for storing and tracing environmental protection data of coal mining enterprises based on blockchain according to claim 1, characterized in that, Step S2 specifically includes: Based on the raw environmental monitoring data collected by the environmental data collection nodes of coal mining enterprises, a hash digest algorithm is performed on the data to generate a unique data fingerprint; The data fingerprint is submitted to the data on-chain authorization contract deployed on the consortium blockchain, triggering a multi-regulatory entity authorization request event, generating an authorization request event log, and broadcasting it to the authorization regulatory node set; Based on the preset time window parameter configuration information, start the countdown timer based on the smart contract, set the authorization request submission window period, and write the start timestamp of the time window into the authorization contract state variable; The system receives authorization request messages from multiple regulatory bodies and performs digital signature verification on the authorization request messages. For authorization requests that have passed digital signature verification, the system performs a submission timestamp marking operation, associates and stores each authorization request with the corresponding timestamp information, generates an authorization request time sequence record table, and submits it to the temporary authorization pool cache area.
6. A method for storing and tracing environmental protection data in coal mining enterprises based on blockchain, as described in claim 5, is characterized in that... The authorization request message includes the regulatory entity's DID identifier, the scope of authorized fields, the access validity period, and additional explanatory information.
7. A method for storing and tracing environmental protection data of coal mining enterprises based on blockchain according to claim 1, characterized in that, In step S3, the response timeliness coefficient, abnormal data rejection rate, and superior correction frequency are calculated and linear weighted normalization is performed on the response timeliness coefficient, abnormal data rejection rate, and superior correction frequency to generate a regulatory activity score.
8. A method for storing and tracing environmental protection data of coal mining enterprises based on blockchain according to claim 1, characterized in that, Step S4, obtaining the real-time pollution index of the coal mining area, includes: based on the geographical coordinates of the coal mining enterprise, calling the standard API interface of the external environmental risk early warning system to obtain the real-time pollution index of the current area, including PM2.5, etc. NOx pollutant concentration values are used to form the initial environmental risk data input.
9. A method for storing and tracing environmental protection data in coal mining enterprises based on blockchain, as described in claim 8, is characterized in that... Step S4 involves obtaining geological hazard probability data for the coal mining area, including geological information and historical hazard records of coal mining enterprises, and calling the environmental risk early warning system API interface to obtain the geological hazard probability parameters of the current area, including the risk level values of landslides, collapses, and surface cracks.
10. A method for storing and tracing environmental protection data of coal mining enterprises based on blockchain according to claim 1, characterized in that, Step S6 specifically includes: Based on the DID identity identifier of the regulatory entity, obtain its standardized identity metadata stored on the chain; Extract the approval response time data of regulatory entities for similar data in the past 30 days from the on-chain historical behavior ledger, normalize the response time, and generate the first dimension input of the regulatory activity score; perform statistical analysis on the historical data rejection behavior of regulatory entities, and perform weighted normalization calculation based on the abnormal data rejection rate and the correction frequency of superior units to generate the second and third dimension inputs of the regulatory activity score. Real-time pollution index and geological disaster probability data of the coal mine area are obtained, and the raw data are normalized using the exponential decay function to generate a regional urgency index. Based on the functional type of the regulatory body, a basic weight coefficient is assigned. Combined with the regulatory activity score and the regional urgency index, a three-dimensional matrix multiplication operation is performed to generate a dynamic priority comprehensive weight vector. All authorization requests submitted by regulatory bodies are compared at the field level to identify conflicting authorization items. A sorting calculation is performed based on a dynamic priority comprehensive weight vector. If the highest weights are the same, the time priority principle is applied according to the timestamp of the authorization request to generate the optimal authorization decision scheme.
Citation Information
Patent Citations
Block chain-based trusted data stream evidence storage management system
CN119602934A
Intelligent mine supervision system based on 5G communication and supervision method thereof
CN120181506A
Supply chain management method based on digital block chain
CN120611924A
Carbon emission checking system and method based on block chain
CN121119352A
Engineering detection data tracing method based on block chain
CN121258326A