A method, system, terminal and medium for monitoring and early warning of heavy metal pollution in farmland soil
By combining remote sensing, sensing and deep learning technologies, we can identify heavy metal pollution areas in farmland soil and use blockchain technology to ensure data security, which solves the shortcomings of monitoring heavy metal pollution in farmland soil in the existing technology, and achieves efficient and accurate pollution identification and early warning.
Patent Information
- Application Number
- CN202410684888.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-05-30
AI Technical Summary
The existing technology is difficult to achieve efficient monitoring of heavy metal pollution in farmland soil, and it is impossible to accurately identify potential polluted areas and timely warnings. In addition, traditional soil sampling and analysis methods have problems such as high time cost and complex operation, which is difficult to meet the monitoring needs of large-scale land.
Using remote sensing, sensing and deep learning technology, the data of farmland soil surface images, spectral data and ground sensor data are collected, and the data is inputted to the identification network after preprocessing, and potential heavy metal contaminated areas are identified and data security is ensured through blockchain technology. and immutability.
Automatic identification of heavy metal-contaminated areas in farmland soil has been achieved, artificial intervention and misjudgment have been reduced, early warning notices can be sent in a timely manner, helping farmland managers take countermeasures and reduce environmental risks.
Smart Images

Figure CN118521897B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of agricultural environmental monitoring, and in particular to a method, system, terminal and medium for monitoring and early warning of heavy metal pollution in farmland soil. Background Art
[0002] With the continuous advancement of industrialization and urbanization, agricultural production is facing more and more challenges. Heavy metal pollution comes from industrial emissions, pesticide use, waste disposal, etc., causing serious harm to the soil and crops, and even posing a threat to human health.
[0003] At present, the technologies for monitoring heavy metal pollution in farmland soil mainly include traditional soil sampling and analysis methods, remote sensing technology combined with ground survey methods, etc. The shortcomings of existing technologies are mainly reflected in the following aspects: First, there is a lack of efficient monitoring methods for heavy metal pollution in farmland soil, and it is impossible to accurately identify and timely warn of potential pollution areas; second, the existing technology cannot achieve comprehensive coverage monitoring of farmland soil, and the temporal and spatial resolution of monitoring data is not high, which is difficult to meet the needs of real-time monitoring; third, the traditional soil sampling and analysis method has problems such as high time cost and complex operation, and cannot meet the monitoring needs of large-scale land. Summary of the invention
[0004] In order to overcome the defects in the above-mentioned prior art, the present invention provides a method for monitoring and early warning of heavy metal pollution in farmland soil, including: collecting farmland soil surface images, soil spectral data and ground sensor data; preprocessing the farmland soil surface images, soil spectral data and ground sensor data; inputting the preprocessed data into a trained recognition network to identify potential heavy metal pollution areas in the farmland soil; when there are heavy metal pollution areas in the farmland soil, sending an early warning notification to the farmland manager.
[0005] As a preferred solution of the farmland soil heavy metal pollution monitoring and early warning method described in the present invention, it includes: the farmland soil surface image includes image data of different soil types, vegetation conditions and heavy metal pollution areas; the ground sensor data includes soil temperature, humidity and pH data.
[0006] As a preferred solution of the farmland soil heavy metal pollution monitoring and early warning method described in the present invention, the preprocessing includes: data cleaning of farmland soil surface images, soil spectral data and ground sensor data; standardizing the cleaned data, and merging the standardized data according to timestamps to form a unified data set containing information from multiple data sources.
[0007] As a preferred solution of the farmland soil heavy metal pollution monitoring and early warning method described in the present invention, it includes: building a recognition network based on the YOLO neural network, the recognition network includes an input layer, multiple depth-separable convolutional layers, a routing layer, an upsampling layer and an output layer, and each depth-separable convolutional layer is connected with a Swish activation function and a BN layer, a bottleneck residual block is arranged between the routing layer and the upsampling layer, and a bottleneck residual block is arranged between the upsampling layer and the output layer; the bottleneck residual block includes a first convolutional layer, a second convolutional layer and a third convolutional layer, the convolution kernel size of the first convolutional layer and the third convolutional layer is 1x1, the convolution kernel size of the second convolutional layer is 3x3, and inside the bottleneck residual block, the output of the third convolutional layer is added to the input of the bottleneck residual block to form a jump connection.
[0008] As a preferred solution of the farmland soil heavy metal pollution monitoring and early warning method described in the present invention, it also includes: encrypting the farmland soil surface image, soil spectral data, ground sensor data and identification results; establishing one or more blockchain networks, and creating corresponding smart contracts to define the structure and transaction rules of the encrypted data, that is, storing the encrypted data as transactions and adding them to the blockchain network, each transaction contains the hash value of the previous transaction, so that the data forms an unalterable chain; the nodes in the blockchain network verify the validity of the transaction through a consensus algorithm and add it to the blockchain.
[0009] As a preferred solution of the farmland soil heavy metal pollution monitoring and early warning method described in the present invention, it also includes: compressing the recognition network before training, including the following steps: Step 1: sorting the weight values of the recognition network and setting the weight threshold; Step 2: deleting neurons below the weight threshold to obtain the pruned recognition network; Step 3: fine-tuning the pruned recognition network; that is, freezing the routing layer and the upsampling layer, setting the learning rate to 0.0001, and adjusting the parameters of the fine-tuned recognition network for training.
[0010] As a preferred solution of the farmland soil heavy metal pollution monitoring and early warning method described in the present invention, the parameter adjustment training includes: establishing a loss function L, adjusting the parameters of the recognition model through the loss function, and stopping the training when the loss function converges. The loss function L is:
[0011]
[0012] In the formula, y is the actual output value of the recognition network, y' is the expected output value of the recognition network, To identify the weight parameters of the network, is the regularization coefficient, is the regularity coefficient The first-order norm of .
[0013] As a preferred solution of the farmland soil heavy metal pollution monitoring and early warning system described in the present invention, the data acquisition module is configured to collect farmland soil surface images, soil spectral data and ground sensor data; the data processing module is configured to preprocess the farmland soil surface images, soil spectral data and ground sensor data; the training module is configured to input the preprocessed data into the recognition network to train the recognition network; the recognition monitoring module is configured to input the collected farmland soil surface images, soil spectral data and ground sensor data into the trained recognition network to identify whether there is a heavy metal pollution area in the farmland soil; wherein the recognition network is constructed based on the YOLO neural network The recognition network includes an input layer, multiple depth-separable convolutional layers, a routing layer, an upsampling layer and an output layer, and each depth-separable convolutional layer is followed by a Swish activation function and a BN layer. A bottleneck residual block is arranged between the routing layer and the upsampling layer, and a bottleneck residual block is arranged between the upsampling layer and the output layer; the bottleneck residual block includes a first convolutional layer, a second convolutional layer and a third convolutional layer, the convolution kernel size of the first convolutional layer and the third convolutional layer is 1x1, the convolution kernel size of the second convolutional layer is 3x3, and inside the bottleneck residual block, the output of the third convolutional layer is added to the input of the bottleneck residual block to form a jump connection; the early warning module is configured to execute when there is a heavy metal pollution area in the farmland soil, send an early warning notification to the farmland manager.
[0014] The present invention also provides a terminal, comprising: one or more processors; a storage device for storing one or more programs; a camera for capturing images; when the one or more programs are executed by the one or more processors, the one or more processors implement the farmland soil heavy metal pollution monitoring and early warning method as described in any of the above items.
[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the farmland soil heavy metal pollution monitoring and early warning method as described in any one of the above items.
[0016] Beneficial effects of the invention: The invention combines remote sensing, sensing and deep learning technologies, which can automatically identify heavy metal contaminated areas and reduce the possibility of human intervention and misjudgment. Once heavy metal pollution is detected, the system will immediately send an early warning notification to help farmland managers take timely countermeasures and reduce environmental risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0018] Figure 1 This is a schematic diagram of the process of the farmland soil heavy metal pollution monitoring and early warning method according to the first embodiment of the present invention;
[0019] Figure 2 A schematic diagram of the process of the compression recognition network according to the first embodiment of the present invention;
[0020] Figure 3 This is a schematic diagram of the structure of a terminal for monitoring and early warning of heavy metal pollution in farmland soil according to a third embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0022] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0023] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0024] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0025] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0026] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0027] Example 1
[0028] Reference Figure 1-2 , which is the first embodiment of the present invention, provides a method for monitoring and early warning of heavy metal pollution in farmland soil, comprising:
[0029] S1: Collect farmland soil surface images, soil spectral data and ground sensor data.
[0030] High-resolution remote sensing images are obtained by satellite or drone to cover the target farmland area. The farmland soil surface images obtained include image data of different soil types, vegetation conditions and heavy metal pollution areas. Different soil types usually refer to different types of soil classified according to soil composition, structure, texture, color, drainage and other characteristics, such as black soil, yellow soil, red soil, saline-alkali soil, etc.; vegetation conditions are classified according to vegetation growth, vegetation coverage, vegetation type and other characteristics, and common ones include dense vegetation, loose vegetation, grassland, etc.; heavy metal pollution areas usually present specific landscape features or vegetation anomalies, such as sparse vegetation, color abnormalities, etc., which will not be repeated here.
[0031] At the same time, with the help of multi-spectral sensors carried by drones, the spectral characteristics of the soil can be monitored in real time. In addition, spectrometers and other equipment can be used to obtain spectral data of the soil. By analyzing the spectral characteristics of the soil, the content of heavy metal elements in the soil can be indirectly inferred, because different heavy metal elements will affect the spectral characteristics of the soil.
[0032] Since heavy metal pollution may cause abnormal changes in soil environmental parameters, such as abnormal increase or decrease in pH, sensors, including temperature sensors, humidity sensors, and pH sensors, need to be deployed in farmland to monitor soil temperature, humidity, pH, and other environmental parameters in real time.
[0033] S2: Preprocess farmland soil surface images, soil spectral data and ground sensor data.
[0034] Data cleaning is performed on farmland soil surface images, soil spectral data and ground sensor data, including checking whether the data has missing values, outliers or error values. The data can be cleaned by filling missing values, deleting outliers or performing interpolation, which will not be described here.
[0035] The cleaned data is standardized and merged according to timestamps to form a unified data set containing information from multiple data sources for subsequent model training and analysis.
[0036] S3: Input the preprocessed data into the recognition network to train the recognition network.
[0037] It should be noted that YOLO uses a convolutional neural network (CNN) as its infrastructure, which is usually composed of multiple convolutional layers and fully connected layers to extract image features and perform target classification and bounding box regression; YOLO's advantages are fast speed, good real-time performance, and the ability to detect small targets in images. In addition, YOLO may have poor detection effects on dense targets and overlapping targets.
[0038] Therefore, the present application constructs a recognition network by optimizing the YOLO neural network. The recognition network includes an input layer, multiple depth-separable convolutional layers, a routing layer, an upsampling layer, and an output layer. Each depth-separable convolutional layer is followed by a Swish activation function and a BN layer. A bottleneck residual block is provided between the routing layer and the upsampling layer, and a bottleneck residual block is provided between the upsampling layer and the output layer. The bottleneck residual block includes the first convolutional layer, the second convolutional layer, and the third convolutional layer. The convolution kernel size of the first convolutional layer and the third convolutional layer is 1x 1. The convolution kernel size of the second convolution layer is 3x3. Specifically, the first convolution layer uses a 1x1 convolution kernel for dimensionality reduction, reducing the number of channels of the input feature map to C_mid (the number of middle channels). The second convolution layer uses a 3x3 convolution kernel for feature extraction, and the processed feature map maintains the dimension of C_mid. The third convolution layer uses a 1x1 convolution kernel for dimensionality increase, increasing the number of channels of the feature map back to C_out (the number of output channels). Usually C_out>C_in (the number of input channels). In addition, inside the bottleneck residual block, the output of the third convolution layer is added to the input of the bottleneck residual block to form a jump connection. The jump connection allows the input feature to directly bypass a certain number of convolution layers and be added to the output, thereby retaining the original input information, helping to alleviate the gradient disappearance and promoting network training.
[0039] Preferably, the bottleneck residual block reduces the number of parameters while maintaining the network depth by introducing a sequence of 1x1, 3x3, and 1x1 convolutional layers, improves computational efficiency, helps solve the gradient problem in deep neural network training, and makes training more stable and efficient.
[0040] Deep learning has brought the performance of computer vision tasks to an unprecedented level, but it also brings high storage space and computing resource consumption, making it difficult to implement on various hardware platforms. In order to solve these problems, before training, this embodiment compresses the recognition network to minimize the consumption of computing space and time for the recognition network, thereby further improving the recognition speed of potential heavy metal contaminated areas in farmland soil. Figure 2 , the specific steps are as follows:
[0041] Step 1: Sort the weight values of the recognition network and set the weight threshold;
[0042] Step 2: Delete neurons below the weight threshold to obtain the pruned recognition network;
[0043] Step 3: Fine-tune the pruned recognition network; that is, freeze the routing layer and upsampling layer, set the learning rate to 0.0001, and adjust the parameters of the fine-tuned recognition network.
[0044] Parameter adjustment training includes the following steps:
[0045] Establish a loss function L, use the loss function to adjust the parameters of the recognition model for training, and stop training when the loss function converges. The loss function L is:
[0046]
[0047] In the formula, y is the actual output value of the recognition network, y' is the expected output value of the recognition network, To identify the weight parameters of the network, is the regularization coefficient, is the regularity coefficient The first-order norm of .
[0048] S4: The collected farmland soil surface images, soil spectral data and ground sensor data are input into the trained recognition network to identify potential heavy metal contaminated areas in farmland soil.
[0049] After receiving the collected data, the recognition network can quickly and accurately identify areas where heavy metal pollution may exist, and send early warning notifications to relevant managers to help them take timely measures to prevent further pollution.
[0050] S5: When there are heavy metal contaminated areas in farmland soil, send early warning notifications to farmland managers.
[0051] The early warning notification can be sent to farm managers through mobile phone apps, text messages, emails, etc., to remind them to take corresponding measures. The early warning notification can also include suggested measures, such as stopping planting crops, performing soil remediation, adjusting crop planting structures, etc., to reduce the impact of heavy metals on crops and the environment. The present invention is not limited to this.
[0052] S6: Record the monitoring data and identification results in the blockchain.
[0053] Encrypt the farmland soil surface images, soil spectral data, ground sensor data and identification results. In this step, you can select an appropriate encryption algorithm (such as AES, RSA) to encrypt the data to ensure data privacy and security;
[0054] Establish one or more blockchain networks and create corresponding smart contracts to define the structure and transaction rules of encrypted data, that is, store encrypted data as transactions and add them to the blockchain network. Each transaction contains the hash value of the previous transaction, so that the data forms an unalterable chain;
[0055] The nodes in the blockchain network verify the validity of the transaction through a consensus algorithm and add it to the blockchain. Once a transaction is verified and added to the blockchain, it cannot be modified or deleted, ensuring the integrity and traceability of the data.
[0056] Blockchain technology can realize decentralized storage and encrypted transmission of data, prevent data tampering and leakage, and ensure the credibility and integrity of monitoring and identification results.
[0057] Example 2
[0058] This embodiment is different from the first embodiment in that it provides a farmland soil heavy metal pollution monitoring and early warning system, including:
[0059] The data acquisition module is configured to collect farmland soil surface images, soil spectral data and ground sensor data; obtain high-resolution remote sensing images through satellites or drones, etc., covering the target farmland area. The acquired farmland soil surface images include image data of different soil types, vegetation conditions and heavy metal pollution areas. Among them, heavy metal pollution areas usually present specific landscape features or vegetation anomalies, such as sparse vegetation, color abnormalities, etc.
[0060] At the same time, with the help of multi-spectral sensors carried by drones, the spectral characteristics of the soil can be monitored in real time. In addition, spectrometers and other equipment can be used to obtain spectral data of the soil. By analyzing the spectral characteristics of the soil, the content of heavy metal elements in the soil can be indirectly inferred, because different heavy metal elements will affect the spectral characteristics of the soil.
[0061] Since heavy metal pollution may cause abnormal changes in soil environmental parameters, such as abnormal increase or decrease in pH, sensors, including temperature sensors, humidity sensors, and pH sensors, need to be deployed in farmland to monitor soil temperature, humidity, pH, and other environmental parameters in real time.
[0062] The data processing module is configured to perform preprocessing of farmland soil surface images, soil spectral data and ground sensor data; and perform data cleaning on farmland soil surface images, soil spectral data and ground sensor data, including checking whether the data has missing values, outliers or erroneous values. The data can be cleaned by filling missing values, deleting outliers or performing interpolation, which will not be described in detail here.
[0063] The cleaned data is standardized and merged according to timestamps to form a unified data set containing information from multiple data sources for subsequent model training and analysis.
[0064] A training module is configured to input the preprocessed data into the recognition network to train the recognition network;
[0065] The recognition monitoring module is configured to execute the input of the collected farmland soil surface images, soil spectral data and ground sensor data into the trained recognition network to identify whether there is a heavy metal pollution area in the farmland soil; wherein the recognition network is constructed based on the YOLO neural network, and the recognition network includes an input layer, multiple depth-separable convolutional layers, a routing layer, an upsampling layer and an output layer, and each depth-separable convolutional layer is followed by a Swish activation function and a BN layer, a bottleneck residual block is arranged between the routing layer and the upsampling layer, and a bottleneck residual block is arranged between the upsampling layer and the output layer; the bottleneck residual block includes a first convolutional layer, a second convolutional layer and a third convolutional layer, the convolution kernel size of the first convolutional layer and the third convolutional layer is 1x1, the convolution kernel size of the second convolutional layer is 3x3, and inside the bottleneck residual block, the output of the third convolutional layer is added to the input of the bottleneck residual block to form a jump connection;
[0066] The early warning module is configured to send an early warning notification to the farmland manager when there is a heavy metal contaminated area in the farmland soil. When there is a heavy metal contaminated area in the farmland soil, the system will automatically trigger the early warning mechanism. The early warning notification can be sent to the farmland manager through a mobile phone app, text message, email, etc., to remind him to take corresponding measures. The early warning notification can also be accompanied by suggested measures, such as stopping planting crops, performing soil remediation, adjusting crop planting structure, etc., to reduce the impact of heavy metals on crops and the environment. The present invention is not limited to this.
[0067] Example 3
[0068] This embodiment provides a farmland soil heavy metal pollution monitoring and early warning terminal. Figure 3 A block diagram of an exemplary terminal system suitable for implementing embodiments of the present invention is shown. Figure 3 The terminal system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0069] like Figure 3 As shown, the terminal 12 is in the form of a general-purpose computing device. The components of the terminal 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0070] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0071] Terminal 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by terminal 12, including volatile and non-volatile media, removable and non-removable media.
[0072] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Terminal 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 3 not shown, usually called a "hard drive"). Although Figure 3 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0073] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0074] The terminal 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the terminal 12, and / or may communicate with any device that enables the terminal 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the terminal 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the terminal 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0075] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing the farmland soil heavy metal pollution monitoring and early warning method provided in the embodiment of the present invention.
[0076] Example 4
[0077] Embodiment 4 of the present invention also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute the farmland soil heavy metal pollution monitoring and early warning method as described in any of the above embodiments.
[0078] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.
[0079] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0080] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0081] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0082] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for monitoring and early warning of heavy metal pollution in farmland soil, characterized in that: include: Collect farmland soil surface images, soil spectral data and ground sensor data; Preprocessing the farmland soil surface image, soil spectral data and ground sensor data; The preprocessed data is input into the recognition network to train the recognition network; wherein the recognition network is compressed before training, including the following steps: Step 1: sorting the weight values of the recognition network and setting the weight threshold; Step 2: deleting neurons below the weight threshold to obtain a pruned recognition network; Step 3: fine-tuning the pruned recognition network; that is, freezing the routing layer and the upsampling layer, setting the learning rate to 0.0001, and training the fine-tuned recognition network; The collected farmland soil surface images, soil spectral data and ground sensor data are input into the trained recognition network to identify whether there are heavy metal contaminated areas in the farmland soil; When there are heavy metal contaminated areas in farmland soil, early warning notifications are sent to farmland managers; Among them, a recognition network is constructed based on the YOLO neural network. The recognition network includes an input layer, multiple depth-separable convolutional layers, a routing layer, an upsampling layer, and an output layer. Each depth-separable convolutional layer is followed by a Swish activation function and a BN layer. A bottleneck residual block is set between the routing layer and the upsampling layer, and a bottleneck residual block is set between the upsampling layer and the output layer. The bottleneck residual block includes a first convolutional layer, a second convolutional layer and a third convolutional layer, the convolution kernel size of the first convolutional layer and the third convolutional layer is 1x1, the convolution kernel size of the second convolutional layer is 3x3, and inside the bottleneck residual block, the output of the third convolutional layer is added to the input of the bottleneck residual block to form a jump connection; Among them, farmland soil surface images, soil spectral data, ground sensor data and identification results are encrypted; Establish one or more blockchain networks and create corresponding smart contracts to define the structure and transaction rules of encrypted data, that is, store encrypted data as transactions and add them to the blockchain network. Each transaction contains the hash value of the previous transaction, so that the data forms an unalterable chain; Nodes in the blockchain network verify the validity of transactions through a consensus algorithm and add them to the blockchain.
2. The method for monitoring and early warning of heavy metal pollution in farmland soil according to claim 1, characterized in that: include: The farmland soil surface images include image data of different soil types, vegetation conditions and heavy metal pollution areas; The ground sensor data includes soil temperature, humidity and pH data.
3. The method for monitoring and early warning of heavy metal pollution in farmland soil according to claim 2, characterized in that: The pre-processing comprises: Data cleaning of farmland soil surface images, soil spectral data and ground sensor data; The cleaned data is standardized and merged according to the timestamp to form a unified data set containing information from multiple data sources.
4. The method for monitoring and early warning of heavy metal pollution in farmland soil according to claim 3, characterized in that: The training includes: Establish a loss function L, use the loss function to adjust the parameters of the recognition model for training, and stop training when the loss function converges. The loss function L is: In the formula, y is the actual output value of the recognition network, y' is the expected output value of the recognition network, To identify the weight parameters of the network, is the regularization coefficient, is the regularity coefficient The first-order norm of .
5. A farmland soil heavy metal pollution monitoring and early warning system, used to implement the farmland soil heavy metal pollution monitoring and early warning method according to any one of claims 1 to 4, characterized in that: include: The data acquisition module is configured to acquire farmland soil surface images, soil spectral data and ground sensor data; A data processing module is configured to perform preprocessing on the farmland soil surface image, soil spectral data and ground sensor data; A training module is configured to input the preprocessed data into the recognition network to train the recognition network; The recognition monitoring module is configured to execute the input of the collected farmland soil surface images, soil spectral data and ground sensor data into the trained recognition network to identify whether there is a heavy metal pollution area in the farmland soil; wherein the recognition network is constructed based on the YOLO neural network, and the recognition network includes an input layer, multiple depth-separable convolutional layers, a routing layer, an upsampling layer and an output layer, and each depth-separable convolutional layer is followed by a Swish activation function and a BN layer, a bottleneck residual block is arranged between the routing layer and the upsampling layer, and a bottleneck residual block is arranged between the upsampling layer and the output layer; the bottleneck residual block includes a first convolutional layer, a second convolutional layer and a third convolutional layer, the convolution kernel size of the first convolutional layer and the third convolutional layer is 1x1, the convolution kernel size of the second convolutional layer is 3x3, and inside the bottleneck residual block, the output of the third convolutional layer is added to the input of the bottleneck residual block to form a jump connection; The early warning module is configured to send an early warning notification to the farmland manager when there is a heavy metal pollution area in the farmland soil.
6. A terminal, characterized in that: include: one or more processors; A storage device for storing one or more programs; A camera, used to collect images; When the one or more programs are executed by the one or more processors, the one or more processors implement the farmland soil heavy metal pollution monitoring and early warning method as described in any one of claims 1-4.
7. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions, when executed by a computer processor, are used to execute the farmland soil heavy metal pollution monitoring and early warning method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Farmland soil heavy metal pollution analysis and early warning system
CN113792963A
Automatic pollution source identification method and system
CN114993965A
Method, device, equipment and medium for determining target river pollution event
CN116863387A
Cited By
Farmland heavy metal pollution monitoring system
CN121146512A