Automatic water quality monitoring method and equipment based on block chain technology, medium and product

By using blockchain technology for data encryption and storage in automatic water quality monitoring equipment, the problem of easily tampered data in automatic water quality monitoring equipment has been solved, achieving secure and reliable data sharing and improving the supervision effectiveness of regulatory authorities.

CN121456903APending Publication Date: 2026-02-03ECO ENVIRONMENT MONITORING & SCI RESEARCH CENTER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511623953.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

The instrument parameters and test data of existing automatic water quality monitoring equipment are easily tampered with, and there are network security risks in data transmission, which affects the supervision effectiveness of regulatory authorities.

Method used

Blockchain technology is used for data encryption and storage. Water samples are collected at regular intervals and in quantitative quantities, and the water sampling time period parameters and the concentration values ​​of the test indicators are traded to the blockchain. The dual-chain storage mechanism of the blockchain ensures the security and immutability of the data.

Benefits of technology

It has enabled tamper-proof and secure sharing of water quality testing data, improved the security and reliability of data transmission, and ensured the effectiveness of supervision by regulatory authorities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456903A_ABST
    Figure CN121456903A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain technology-based water quality automatic monitoring method and device, a medium and a product, and relates to the field of water quality monitoring, the method comprises the following steps: regularly and quantitatively collecting a to-be-detected water body, and transacting a water collection time period parameter to a block chain; performing water quality analysis on the to-be-detected water body to obtain a concentration value of each detection index; the concentration value of each detection index is encrypted; and storing the encrypted data to a block chain by adopting a block chain double-chain storage mechanism. The risk that the instrument parameters and the detection data are tampered can be prevented, and the safety and reliability of detection data sharing are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of water quality monitoring, in particular to a water quality automatic monitoring method, device, medium and product based on blockchain technology. BACKGROUND

[0002] With the implementation of the concept of ecological civilization, the importance of ecological environment protection work is increasingly valued by all places. Ecological environment automatic monitoring is the sentinel of environmental protection and is widely used in environmental monitoring. At present, important rivers, lakes and key enterprise sewage outlets are equipped with water quality automatic monitoring equipment to detect water quality in real time. For example, a sewage treatment enterprise water inlet water quality online automatic monitoring system, a water quality automatic monitoring system and a wastewater discharge port water quality online automatic monitoring system can all detect water quality. However, the water quality automatic monitoring equipment parameters, analyzer test data and detection data of the above-mentioned technologies are easy to be tampered with, and are vulnerable to network attacks. Network security risks exist in data transmission, which seriously interferes with the supervision of regulatory departments. In particular, some polluting enterprises modify the equipment data privately to avoid supervision and achieve the purpose of illegal discharge.

[0003] Therefore, in order to avoid the data in the field of water quality automatic monitoring being easily tampered with and to realize reliable sharing of data, it is urgent to provide a new water quality automatic monitoring method and system. SUMMARY

[0004] The purpose of the present application is to provide a water quality automatic monitoring method, device, medium and product based on blockchain technology, which can prevent the risk of tampering with instrument parameters and detection data and improve the security and reliability of detection data sharing.

[0005] To achieve the above-mentioned purpose, the present application provides the following solutions: In a first aspect, the present application provides a water quality automatic monitoring method based on blockchain technology, characterized in that the water quality automatic monitoring method based on blockchain technology comprises: Collecting the water to be detected in a timely and quantitative manner and trading the water sampling time period parameter to the blockchain; Analyzing the water quality of the water to be detected to obtain the concentration values of each detection index; Encrypting the concentration values of each detection index; Storing the encrypted data to the blockchain using a blockchain double-chain storage mechanism.

[0006] Optionally, the step of analyzing the water quality of the water to be detected to obtain the concentration values of each detection index specifically comprises: Letting the water to be detected stand and settle for a set time; Digesting the water after standing and settling for multiple times; Determine the spectrum and spectral physical parameters corresponding to the digested water body; According to the spectrum and spectral physical parameters corresponding to the digested water body, the concentration values of each detection index are determined by using the set standard curve and the calibration method; the set standard curve is determined by using zero point calibration liquid, low concentration calibration liquid and high concentration calibration liquid.

[0007] Optionally, the concentration values of each detection index are determined by using the set standard curve and the calibration method according to the spectrum and spectral physical parameters corresponding to the digested water body, specifically including: The concentration values of each detection index are determined by using the formula C_sample = (S_sample - B) / K; Wherein, C_sample is the concentration value of the detection index, S_sample is the signal value of the spectrum, B is the intercept of the set standard curve, and K is the slope of the set standard curve.

[0008] Optionally, the concentration values of each detection index are determined by using the set standard curve and the calibration method according to the spectrum and spectral physical parameters corresponding to the digested water body, specifically including: The concentration values of each detection index are encrypted by using the public key encryption mechanism based on Curve25519 elliptic curve.

[0009] Optionally, the encrypted data is stored in the blockchain by using the blockchain double chain storage mechanism, specifically including: The encrypted data is submitted to the side chain node of the blockchain; The encrypted data is packaged by the side chain node and stored by using the improved sparse Merkle tree.

[0010] Optionally, the encrypted data is stored in the blockchain by using the blockchain double chain storage mechanism, and then includes: Receive the query request of the authorized user; the query request includes: spatio-temporal constraint condition; The main chain locates the target block by using the Bloom filter, and calls the side chain ciphertext and Merkle path proof; According to the side chain ciphertext and Merkle path proof, the smart contract verifies the hash consistency and triggers hierarchical decryption.

[0011] In the second aspect, the application provides a water quality automatic monitoring equipment based on blockchain technology, which comprises: A water sample collection module is used for collecting water samples in a water body to be detected in a timed and quantitative manner, and the water sampling time period parameter is traded to the blockchain; the water sample collection module comprises a water sampling unit and a controller. The water sample automatic analysis detection module is used for water quality analysis on a water body to be detected to obtain concentration values of each detection index; the water sample automatic analysis detection module comprises a digestion unit, a colorimetric unit and a metering unit; The data acquisition and processing module is used for encrypting the concentration values of each detection index. The blockchain storage module is used for storing the encrypted data into a blockchain by using a blockchain double-chain storage mechanism.

[0012] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the water quality automatic monitoring method based on the blockchain technology.

[0013] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program executable by a processor to implement the water quality automatic monitoring method based on the blockchain technology.

[0014] In a fifth aspect, the present application provides a computer program product, comprising a computer program executable by a processor to implement the water quality automatic monitoring method based on the blockchain technology.

[0015] According to the embodiments provided in the present application, the present application has the following technical effects: The present application provides a water quality automatic monitoring method, device, medium and product based on the blockchain technology, which trades a water sampling time period parameter to a blockchain and encrypts concentration values of each detection index, and stores the encrypted data into the blockchain by using a blockchain double-chain storage mechanism, that is, uses the blockchain technology to trade each instrument parameter (water sampling time period parameter) and water quality detection data (encrypted data) to a blockchain node for encryption protection, so that the water quality automatic monitoring method based on the blockchain technology can solve the problems of easy data tampering and network security in the transmission process, and further prevent the risk of instrument parameters and detection data being tampered with, thereby having higher security and implementability in actual application.

[0016] The instrument parameters and water quality detection data in the present application are all encrypted and protected, and are safer when shared with supervisors. Furthermore, the present application has the characteristics of data tamper-proofing and safe sharing, has higher security in the water quality automatic monitoring scene, and can solve the problems of easy data tampering and unsafe data sharing to a certain extent. BRIEF DESCRIPTION OF DRAWINGS

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic flowchart of an automatic water quality monitoring method based on blockchain technology in one embodiment of this application; Figure 2 This is a schematic diagram of the blockchain storage process; Figure 3 This is a schematic diagram of the blockchain data structure. Figure 4 This is a diagram illustrating data sharing. Figure 5 This is a schematic diagram of the structure of an automatic water quality monitoring device based on blockchain technology in one embodiment of this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] In one exemplary embodiment, such as Figure 1 As shown, an automatic water quality monitoring method based on blockchain technology is provided, which includes the following steps S101 to S104. Wherein: S101 collects water samples from the water body to be tested at regular intervals and in quantitative quantities, and trades the water sampling time cycle parameters to the blockchain; After collecting the water sample, the sample is transported to a storage tank via pipeline.

[0022] S102, perform water quality analysis on the water body to be tested to obtain the concentration values ​​of each test index; S102 specifically includes: S21, Set the set time for the water body to be tested to settle; S22 is used to digest water after it has been left to settle. S23, determine the spectrum and spectral physical parameters of the water body after digestion; S24. Based on the spectrum and spectral physical parameters of the digested water, the concentration values ​​of each detection index are determined using a set standard curve and calibration method. The set standard curve is determined using zero-point calibration solution, low-concentration calibration solution, and high-concentration calibration solution.

[0023] The process for establishing and calibrating the standard curve is as follows: 1. Preparation of standard solutions. Standard curves are obtained by using zero-point calibration solutions, low-concentration calibration solutions, and high-concentration calibration solutions. Zero-point calibration solutions are usually ultrapure water or specific blank matrix solutions, used to establish the "zero point" of the signal.

[0024] 2. Zero-point measurement. The instrument pumps zero-point calibration solution into the reaction cell for measurement. At this time, the instrument records the signal value S_zero corresponding to the zero-point standard solution. Theoretically, this signal value should correspond to a concentration of 0.

[0025] 3. Measurement of standard samples. The instrument sequentially pumps in low-concentration standard solution and high-concentration standard solution, and records their corresponding stable signal values ​​S_low and S_high, respectively.

[0026] 4. Calculate curve parameters. The mathematical expression for the standard curve is: Signal value = Slope × Concentration + Intercept. The instrument's built-in program will perform linear regression calculations on the two points (0, S_zero) and (C_high, S_high), where the slope K = (S_high - S_zero) / C_high; and the intercept B = S_zero. This yields the standard curve formula for the current instrument. +B; 5. Calibration Method Setting. Calibration involves pumping a standard solution of known concentration into the instrument, obtaining a measurement value, and then using the instrument's built-in program to verify the standard curve formula and establish a more accurate curve.

[0027] Once calibration is complete, the standard curve... Once +B is established and verified to be effective, the instrument enters the normal measurement mode. Depending on the detection data, the instrument automatically adds the necessary reagents for digestion, color development, and reaction (for example, COD measurement requires the addition of sulfuric acid-potassium dichromate digestion solution, while ammonia nitrogen measurement requires the addition of sodium hypochlorite and salicylate for color development). After the reaction is complete, the corresponding sensors (such as a photometer and electrodes) measure the reacted sample to obtain a stable raw signal value S_sample. Based on the measured S_sample, the concentration value of each detection index is determined using the formula C_sample=(S_sample-B) / K. S103, the concentration values ​​of each detection indicator are encrypted; Specifically, a public-key encryption mechanism based on the Curve25519 elliptic curve is used to encrypt the concentration values ​​of each detection indicator. The encryption process is as follows: S1, Key generation; Private key: A randomly generated integer d = 0x3F7A2D...C9B1 (256 bits), represented in hexadecimal. Hexadecimal is a base-16 counting system. It uses the following 16 symbols to represent values: 0-9: representing the values ​​from zero to nine. AF (or af): representing the values ​​from ten to fifteen. A=10; B=11; C=12; D=13; E=14; F=15; Public key: computation (Elliptic curve scalar multiplication); The Curve25519 curve is used, with the coordinates of the base point G being a fixed value. The Curve25519 curve is an elliptic curve based on the Montgomery curve, mainly used for key negotiation, and is characterized by high efficiency and security.

[0028] Output ; S2, data encryption; Let the plaintext be the water quality parameter M (e.g., pH value = 7.2); data normalization maps floating-point numbers to integer fields for encryption: ; Use Koblitz coding to convert M=720 to a point P_m on the curve; ; Koblitz coding is a method that uses a specific algorithm to convert plaintext into points on an elliptic curve. It is mainly used in encryption systems to map plaintext into elliptic curve elements.

[0029] Find the curve equation y 2 =x 3 +486662x 2 Given the value of x + x, we get P_m = (x_m, y_m); Randomly select k=0x5E8F...D3 (256 bits) to generate a temporary key; The ciphertext pair can be calculated using the following formula: ; ; Additional authentication is achieved by generating a message verification code using HMAC-SHA256. ; Among them, K mac Derived from the Key Derivation Function (KDF(k\timesQ)), key derivation solves the problems of mismatched ciphertext formats and imperfect key randomness.

[0030] Compute shared ciphertext S: S = k × Q; Where k×Q is calculated based on the sender's condition, and according to the properties of elliptic curves, k×Q=d×C1, as proven below: k×Q=k×(d×G)=d×(k×G)=d×C1; Here, S is a point, and its x-coordinate (x_S) is usually taken as the "shared ciphertext material" required for derivation.

[0031] KDFs are typically built on cryptographic hash functions like SHA-256: derived_key=KDF(x_S, length, other_info); Here, length is the length of the generated key; other_info is an optional important field that contains some common information related to this session (such as the identity IDs of both parties, protocol number, etc.).

[0032] The ciphertext C=(C1, C2, HMAC) is output; the BLAKE3 cryptographic hash function generation process includes the following steps: Input: Concatenation of all ciphertext within the current block ; Iterative hashing: ; Initial value H_0 = 0^{256}; Output a 256-bit hash value (e.g., 0x892f...c3a4); When decrypting, the receiver uses the private key d: ; Then, the plaintext M is restored through decoding and mapping.

[0033] S104 stores the encrypted data on the blockchain using a dual-chain storage mechanism. The main chain's global consensus layer stores core summary information, while the side chain's data storage layer carries high-frequency raw data.

[0034] S104 specifically includes: S41, submit the encrypted data to the blockchain sidechain node; S42 uses sidechain nodes to package the encrypted data and stores it using an improved sparse Merkle tree.

[0035] The storage encryption process is as follows: Using formula Determine the leaf node Each leaf corresponds to an encrypted data packet for a monitoring point. The complete ciphertext of the i-th data block; This is the precise timestamp of the i-th data block; Specifically, the tree depth is fixed at 32 levels (supporting a maximum of 232 data points); Patricia trees are used to compress and store empty nodes, reducing storage space by 40%; the anchoring process performs a cross-chain commit every 10 minutes. Using formula Perform sidechain calculations; Here, `leaves` is a list or array containing the hash values ​​of the leaf nodes corresponding to all data blocks within the current time period (e.g., 10 minutes), i.e., [leaf1, leaf2, ..., leaf...]. n ] Using formula Generate commitments; in, The root hash of the sidechain Merkle tree is used, timestamp is the batch timestamp, and nonce is a random number (to prevent replay attacks). When sidechain data is questioned, the challenge-response mechanism is activated: 1. The challenger submits a challenge to block number i; 2. The sidechain must provide within 100 blocks: the original ciphertext of data block Di and the data from leaf. i To Root side Merkle path; 3. Using formulas Perform main chain verification; if verification fails, roll back the side chain and penalize the node. in, For the raw data to be verified, `merkleProof` is the Merkle path proof, including the hashes of the sibling nodes required on the path from the leaf node to the root node; Root sideThis refers to the Merkle tree root hash for the sidechain. For example, in sparse Merkle tree encryption, a block is connected to its parent and child blocks, and each block contains a block header and a block body. The block header contains all the data of the current block, as well as key information used to ensure its integrity and verify consensus. The block header consists of five fields: "previous block hash," "random number," "target hash," "block timestamp," and "Merkle root." The block header can be divided into three parts according to its function: the first part is the hash value of the previous block, used to link this block to the previous block in the blockchain; the second part is the block timestamp and random number, related to the node's accounting rights; and the third part is the Merkle root data, related to the transaction data in the block body. The hash value of the block itself (block master identifier) ​​is a 32-bit hash value obtained by performing a secondary hash calculation on the block header using the SHA256 algorithm. The block body stores the transaction information included in the block, which can be a single transaction or multiple transactions. To record transaction data from the block body in the block header and to prevent tampering, the blockchain uses a Merkle tree to organize the data. Figure 3 In the Merkle tree construction example, four parameters—decomposition time (time), decomposition temperature (temp), light intensity (cd), and total phosphorus (TP)—are used as transactions to form a block. First, the hash values ​​of the four transactions are calculated, and then these hash values ​​are placed in the corresponding leaf nodes. These leaf nodes are hash_time, hash_temp, hash_cd, and hash_TP. Then, the hash values ​​of adjacent leaf nodes are concatenated and hashed again to form parent nodes Hash0(hash_time, hash_temp) and Hash1(hash_cd, hash_TP). Finally, the root hash value of the Merkle tree is obtained and stored in the block header as the fingerprint of the transaction data.

[0036] As a specific example, such as Figure 2 As shown, the data storage process on the blockchain is as follows: 1. Monitoring terminal → sidechain node: Submit encrypted data packets (including BLAKE3 hash); 2. Sidechain node → Sidechain consensus layer: Packed into a block (block generation in 1 minute); 3. Sidechain node → Plasma gateway: MerkleRoot is summarized every 10 minutes; 4. Plasma Gateway → Main Chain Contract: Submit Commit_main; 5. Main chain contract → Side chain node: Returns anchor receipt.

[0037] Following S104 are: S51, Receive a query request from an authorized user; the query request includes: spatiotemporal constraints; S52, the main chain locates the target block through a Bloom filter and retrieves the sidechain ciphertext and Merkle path proof; S53, based on the sidechain ciphertext and Merkle path proof, triggers layered decryption after verifying hash consistency using a smart contract; that is, ordinary users obtain the AES session key through permission approval to decrypt basic parameters, while regulatory agencies use the threshold ECC private key to decrypt sensitive data. ; and utilize Differential privacy processing is applied to the results (Laplace is noise injection, ε=0.5); M is the original data (such as pH value, temperature, etc.), Laplace(Δf / ε) is the Laplace noise that satisfies ε differential privacy, Δf is the sensitivity, which is determined according to the data release type and scope, and ε is the privacy budget, which controls the level of privacy protection, and is 0.5 here.

[0038] like Figure 4 As shown, the shared data is encapsulated using JSON-LD semantic markup, along with blockchain transaction hashes and zero-knowledge proofs, supporting both machine readability and manual verification; the data sharing process is as follows: S1, User terminal → Main chain node: Submit query request (including spatiotemporal filtering conditions); S2, Main chain node → User terminal: Returns a list of matching Plasma anchors; S3, User terminal → Sidechain node: Request encrypted data + Merkle proof; S4, Sidechain Node → User End: Returns data and verification path; S5, User side → Local verification: Verify Merkle root consistency; S6, User side → Smart contract: Request decryption key (if needed); S7, Smart Contract → Regulatory Node: Trigger Manual Approval (Core Parameters); S8, Supervisory Node → User End: Returns the decrypted original data; S9, User-side → Log Contract: Recording data using tokens; The core characteristics of blockchain technology include decentralization, transparency, security, and immutability. The decentralized nature of blockchain means that data is maintained collaboratively by multiple participants, avoiding the risks of data tampering and single points of failure. The transparency and immutability of blockchain ensure data authenticity, and because data is stored in a distributed manner, blockchain offers high security, effectively resisting data tampering and malicious attacks, making it highly suitable for the field of automatic monitoring. Therefore, to prevent data tampering in the field of automatic water quality monitoring and to achieve reliable data sharing; In blockchain technology, each block contains the hash value of the previous block. A hash function can compress any type of data into a hash value of equal length, reducing the data size. As a component of cryptography, hash functions possess two key characteristics: irreversibility and uniqueness. The hash value changes as the data changes. A Merkle Tree is a binary tree composed of hash values, obtained by processing each node from bottom to top using a hash function. This immutability gives blockchain systems a robust tamper-proof characteristic, which is crucial for trusted data storage.

[0039] Based on the same inventive concept, this application also provides a blockchain-based automatic water quality monitoring device for implementing the aforementioned blockchain-based automatic water quality monitoring method. The solution provided by this device is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more blockchain-based automatic water quality monitoring device embodiments provided below can be found in the limitations of the blockchain-based automatic water quality monitoring method described above, and will not be repeated here.

[0040] In one exemplary embodiment, such as Figure 5 As shown, an automatic water quality monitoring device based on blockchain technology is provided, comprising: The water sampling module is used to collect water samples from the water body to be tested at regular intervals and in quantitative quantities, and to trade the water sampling time cycle parameters to the blockchain; the water sampling module includes: a water sampling and distribution unit and a controller; The automatic water sample analysis and detection module is used to analyze the water quality of the water body to be tested and obtain the concentration values ​​of various detection indicators; the automatic water sample analysis and detection module includes: a digestion unit, a colorimetric unit, and a measurement unit; The data acquisition and processing module is used to encrypt the concentration values ​​of each detection indicator; The blockchain storage module stores encrypted data on the blockchain using a dual-chain storage mechanism.

[0041] As a specific implementation, in the water sampling module, the operation of the water sampling and distribution unit is controlled by a controller. The controller sends a water sampling signal to the water sampling and distribution unit according to the set water sampling time cycle, and the water sampling and distribution unit starts to take water from the water body to be tested. The controller's water sampling time cycle parameter is traded to the blockchain. As a specific embodiment, water samples collected by the water collection and distribution unit are stored in the storage tank of the automatic detection module for settling. Then, each digestion unit extracts water samples from the tank for digestion. The water samples undergo at least two digestions, with each digestion achieving a digestion rate greater than 98% for the target pollutant. After digestion, the samples enter the colorimetric module, where the spectrum corresponding to each water sample is measured to obtain the original spectrum and acquire the spectral physical parameters. The corresponding spectrum is measured after each digestion, obtaining each digestion spectrum, and simultaneously acquiring the digestion parameters for each digestion and the physical parameters of the sample after each digestion. The corresponding spectra are ultraviolet-visible absorption spectra and near-infrared absorption spectra. In the metrology module, according to a pre-set standard curve or calibration method, the measurement signal is converted into the concentration value of the corresponding detection index.

[0042] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal. The computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The I / O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for automatic water quality monitoring based on blockchain technology.

[0043] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0044] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0045] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0046] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0047] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0048] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0049] In this application, all actions to acquire signals, information, or data are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with the authorization granted by the owner of the relevant device.

[0050] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0051] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for automatic water quality monitoring based on blockchain technology, characterized in that, The automatic water quality monitoring method based on blockchain technology includes: The water samples to be tested are collected at regular intervals and in quantitative quantities, and the water sampling time cycle parameters are traded to the blockchain. Water quality analysis is performed on the water body to be tested to obtain the concentration values ​​of each test indicator; The concentration values ​​of each detection indicator are encrypted; The encrypted data is stored on the blockchain using a dual-chain storage mechanism.

2. The automatic water quality monitoring method based on blockchain technology according to claim 1, characterized in that, The water quality analysis of the water body to be tested, to obtain the concentration values ​​of each detection indicator, specifically includes: Set a set time for the water body to be tested to settle. The water body after settling is subjected to multiple digestions. Determine the spectrum and spectral physical parameters of the water body after digestion; Based on the spectrum and spectral physical parameters of the digested water, the concentration values ​​of each detection index are determined using a set standard curve and calibration method; the set standard curve is determined using zero-point calibration solution, low-concentration calibration solution, and high-concentration calibration solution.

3. The automatic water quality monitoring method based on blockchain technology according to claim 2, characterized in that, The concentration values ​​of each detection index are determined based on the spectrum and spectral physical parameters of the digested water, using a set standard curve and calibration method. Specifically, this includes: The concentration values ​​of each detection index are determined using the formula C_sample = (S_sample - B) / K; Where C_sample is the concentration value of the detected index, S_sample is the signal value of the spectrum, B is the intercept of the standard curve, and K is the slope of the standard curve.

4. The automatic water quality monitoring method based on blockchain technology according to claim 1, characterized in that, The encryption of the concentration values ​​of each detection indicator specifically includes: The concentration values ​​of each detection index are encrypted using a public-key encryption mechanism based on the Curve25519 elliptic curve.

5. The automatic water quality monitoring method based on blockchain technology according to claim 1, characterized in that, The process of storing the encrypted data on the blockchain using a dual-chain storage mechanism specifically includes: Submit the encrypted data to the blockchain sidechain node; The encrypted data is packaged using sidechain nodes and stored using an improved sparse Merkle tree.

6. The automatic water quality monitoring method based on blockchain technology according to claim 1, characterized in that, The encrypted data is stored on the blockchain using a dual-chain storage mechanism, and the process includes: Receive query requests from authorized users; the query requests include: spatiotemporal constraints; The main chain locates the target block using a Bloom filter and retrieves the sidechain ciphertext and Merkle path proof. Based on the sidechain ciphertext and Merkle path proof, layered decryption is triggered after verifying hash consistency using a smart contract.

7. An automatic water quality monitoring device based on blockchain technology, characterized in that, The automatic water quality monitoring equipment based on blockchain technology includes: The water sampling module is used to collect water samples from the water body to be tested at regular intervals and in quantitative quantities, and to trade the water sampling time cycle parameters to the blockchain; the water sampling module includes: a water sampling and distribution unit and a controller; The automatic water sample analysis and detection module is used to analyze the water quality of the water body to be tested and obtain the concentration values ​​of various detection indicators; the automatic water sample analysis and detection module includes: a digestion unit, a colorimetric unit, and a measurement unit; The data acquisition and processing module is used to encrypt the concentration values ​​of each detection indicator; The blockchain storage module stores encrypted data on the blockchain using a dual-chain storage mechanism.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the automatic water quality monitoring method based on blockchain technology as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the automatic water quality monitoring method based on blockchain technology as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the automatic water quality monitoring method based on blockchain technology as described in any one of claims 1-6.