Soil environment detection method and system

By collecting soil environmental data in real time and optimizing using convolutional neural network model, the image correlation and similarity of soil images are calculated, and environmental detection reports are generated in combination with soil moisture content, the problems of large errors, low timeliness and large workload in the existing technology are solved, and efficient and accurate soil environmental detection is achieved.

CN119887663APending Publication Date: 2025-04-25JIANGXI ENVIRONMENTAL PROTECTION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411935097.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing soil environmental detection methods have problems such as large errors, low timeliness and large workloads, and real-time data collection and rapid detection cannot be achieved, resulting in further deterioration of environmental pollution.

Method used

By collecting soil environmental data in real time, performing image filtering and grayscale processing, using convolutional neural network model optimization, the image correlation and similarity of soil images are calculated, and an environmental detection report is generated based on soil moisture content.

Benefits of technology

It improves the accuracy and efficiency of soil environment detection, realizes real-time data acquisition and rapid detection, and enhances the monitoring capabilities of soil environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887663A_ABST
    Figure CN119887663A_ABST
Patent Text Reader

Abstract

The invention provides a soil environment detection method and system, and the method comprises the steps: converting the filtered soil image data into a gray image, and obtaining a similar image in a preset image library based on the gray image; calculating soil conductivity data according to the soil measurement data, and inputting the soil conductivity data into a soil analysis model to calculate the soil moisture content; calculating a feature vector of a co-occurrence matrix of the gray level image according to the gray level image and the corresponding similar image, and calculating the similarity of the gray level image and the corresponding similar image according to the feature vector; constructing a convolutional neural network model, and optimizing a trunk feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model; and performing image processing on the soil image data according to the convolutional neural network optimization model to calculate the image correlation degree of the soil image data, and generating an environment detection report of the current soil according to the image correlation degree, the similarity and the soil moisture content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a soil environment detection method and system thereof. Background Art

[0002] With the rapid development of science and technology and the improvement of people's living standards, the discharge of industrial wastewater generated by industrialization is gradually increasing, leading to soil environmental pollution problems.

[0003] At present, the detection method for soil environment is to collect field data of the soil to be tested regularly by staff, and use corresponding instruments to determine whether the soil to be tested meets the requirements. However, with the increasing discharge of industrial waste, manual field collection has large errors, low timeliness and heavy workload. In addition, real-time data collection cannot be achieved for the soil to be tested, which leads to the failure to take timely measures and further deterioration of environmental pollution. Summary of the invention

[0004] The embodiments of the present application provide a soil environment detection method and system thereof to at least address the deficiencies in the above-mentioned related technologies.

[0005] In a first aspect, an embodiment of the present application provides a soil environment detection method, comprising the following steps:

[0006] Step 1: Collecting the current soil environmental data in real time, wherein the environmental data includes soil image data and soil measurement data;

[0007] Step 2: filtering the soil image data, converting the filtered soil image data into a grayscale image, and acquiring a corresponding similar image in a preset image library based on the grayscale image;

[0008] Step 3: Calculate corresponding soil conductivity data according to the soil measurement data, and input the soil conductivity data into a preset soil analysis model to calculate corresponding soil moisture content;

[0009] Step 4: calculating the eigenvector of the co-occurrence matrix of the grayscale image according to the grayscale image and its corresponding similar image, and calculating the similarity of the grayscale image and its corresponding similar image according to the eigenvector;

[0010] Step 5: construct a convolutional neural network model, and optimize the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model;

[0011] Step six: performing image processing on the soil image data according to the convolutional neural network optimization model to calculate the image correlation of the soil image data, and generating an environmental detection report of the current soil according to the image correlation, the similarity and the soil moisture content.

[0012] Furthermore, the step 2 includes:

[0013] Performing median filtering and mean filtering on the soil image data respectively to obtain two median filtering images and a mean filtering image;

[0014] The median filtered image and the mean filtered image are combined, and the combined image is gray-scaled to obtain a corresponding gray-scale image.

[0015] Furthermore, the step three includes:

[0016] Parsing the soil capacitance measurement value and its corresponding dielectric data in the soil measurement data, and calculating the relative dielectric constant of the current soil according to the dielectric data;

[0017] The relative dielectric constant and the soil capacitance measurement value are input into a preset soil analysis model to calculate the soil moisture content corresponding to the current soil.

[0018] Furthermore, the step 4 includes:

[0019] Traversing all pixels of the grayscale image and its corresponding similar image in a preset direction and distance to calculate a co-occurrence matrix between the grayscale image and its corresponding similar image;

[0020] The eigenvectors between the grayscale image and its corresponding similar image are calculated according to the co-occurrence matrix, and the eigenvalues ​​of the eigenvectors are calculated in the horizontal and vertical directions. The calculated eigenvalues ​​are further calculated. Step five includes:

[0021] Constructing a convolutional neural network model, adjusting the input image features of the convolutional neural network model, and adjusting the convolution rules of each convolution module of the convolutional neural network model in turn;

[0022] An attention mechanism is introduced into the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model.

[0023] The present invention also provides a soil environment detection system, comprising:

[0024] A data acquisition module, used for collecting current soil environmental data in real time, wherein the environmental data includes soil image data and soil measurement data;

[0025] An image processing module, used for filtering the soil image data, converting the filtered soil image data into a grayscale image, and acquiring a corresponding similar image in a preset image library based on the grayscale image;

[0026] A data calculation module, used to calculate corresponding soil conductivity data according to the soil measurement data, and input the soil conductivity data into a preset soil analysis model to calculate corresponding soil moisture content;

[0027] A similarity calculation module, used to calculate the eigenvector of the co-occurrence matrix of the grayscale image according to the grayscale image and its corresponding similar image, and calculate the similarity of the grayscale image and its corresponding similar image according to the eigenvector;

[0028] A model optimization module, used to construct a convolutional neural network model and optimize the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model;

[0029] The environmental detection module is used to perform image processing on the soil image data according to the convolutional neural network optimization model to calculate the image correlation of the soil image data, and generate an environmental detection report of the current soil according to the image correlation, the similarity and the soil moisture content.

[0030] Furthermore, the image processing module includes:

[0031] A filtering processing unit, used for performing median filtering and mean filtering on the soil image data to obtain two median filtering images and a mean filtering image;

[0032] The grayscale processing unit is used to combine the median filtered image and the mean filtered image, and perform grayscale processing on the combined image to obtain a corresponding grayscale image.

[0033] Furthermore, the data calculation module includes:

[0034] A data calculation unit, used to parse out the soil capacitance measurement value and its corresponding dielectric data in the soil measurement data, and calculate the relative dielectric constant of the current soil according to the dielectric data;

[0035] The moisture content calculation unit is used to input the relative dielectric constant and the soil capacitance measurement value into a preset soil analysis model to calculate the soil moisture content corresponding to the current soil.

[0036] Furthermore, the similarity calculation module includes:

[0037] A co-occurrence matrix calculation unit, used to traverse all pixels of the grayscale image and its corresponding similar image in a preset direction and distance to calculate a co-occurrence matrix between the grayscale image and its corresponding similar image;

[0038] The similarity calculation unit is used to calculate the eigenvectors between the grayscale image and its corresponding similar image according to the co-occurrence matrix, and perform eigenvalue calculation on the eigenvalues ​​in the horizontal and vertical directions, and perform similarity calculation on the calculated eigenvalues ​​to obtain the similarity between the grayscale image and its corresponding similar image.

[0039] Furthermore, the model optimization module includes:

[0040] A model building unit, used to build a convolutional neural network model, adjust the input image features of the convolutional neural network model, and sequentially adjust the convolution rules of each convolution module of the convolutional neural network model;

[0041] The model optimization unit is used to introduce an attention mechanism into the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model.

[0042] Compared with the related art, the soil environment detection method and system provided in the embodiment of the present application perform filtering and grayscale processing on the environmental data of the current soil, thereby using the grayscale image to obtain similar images in the image library, and quickly describe and classify the texture features in the image by calculating the co-occurrence matrix of the grayscale image, thereby improving the accuracy of image processing; optimize the convolutional neural network model so that the model can adjust itself to adapt to the characteristics of different data, use the obtained convolutional neural network optimization model to calculate the image correlation of the soil data, and quickly generate the current soil environment detection report according to the image correlation, similarity and soil moisture content, which has stronger generalization ability, improves the image similarity detection performance, and thus speeds up the soil detection efficiency.

[0043] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0045] Figure 1 is a flow chart of a soil environment detection method in a first embodiment of the present invention;

[0046] Figure 2 for Figure 1 Detailed flow chart of step S102;

[0047] Figure 3 for Figure 1 Detailed flow chart of step S103;

[0048] Figure 4 for Figure 1 Detailed flow chart of step S104;

[0049] Figure 5 for Figure 1 Detailed flow chart of step S105;

[0050] Figure 6 4 is a structural block diagram of a soil environment detection system in the second embodiment of the present invention.

[0051] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0053] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.

[0054] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0055] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a kind of", "the" and the like involved in this application do not indicate a quantitative limitation and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0056] Embodiment 1

[0057] See also Figure 1 , which shows a soil environment detection method in the first embodiment of the present invention, and the method specifically includes steps S101 to S106:

[0058] S101, collecting current soil environmental data in real time, wherein the environmental data includes soil image data and soil measurement data;

[0059] In the specific implementation, real-time data collection is performed through image acquisition equipment and data acquisition equipment pre-installed in the soil, wherein the data acquisition equipment includes but is not limited to capacitive sensors and temperature and humidity sensors, etc., which are used to collect the conductivity, temperature, humidity, etc. in the current soil in real time, and there is a corresponding compensation algorithm in the sensor, which can effectively and real-time collect relevant soil data.

[0060] S102, filtering the soil image data, converting the filtered soil image data into a grayscale image, and acquiring a corresponding similar image in a preset image library based on the grayscale image;

[0061] For further information, see Figure 2 , the step S102 specifically includes steps S1021 to S1022:

[0062] S1021, performing median filtering and mean filtering on the soil image data respectively to obtain two median filtering images and a mean filtering image;

[0063] S1022, combining the median filtered image and the mean filtered image, and grayscale processing the combined image to obtain a corresponding grayscale image.

[0064] In specific implementation, since the image data collected by the image acquisition device may contain interference such as noise and distortion, in this embodiment, median filtering and mean filtering are performed on the soil image data respectively to enhance the clarity of the soil image data. Specifically, for the median filtering, the pixel values ​​of the soil image data are sorted and the middle value is selected as the new value of the pixel value, thereby effectively removing outliers to make the image smoother; for the mean filtering, the current pixel point coordinates of the soil image data are set, and K in the mean filtering algorithm is used to represent half of the field size, and the corresponding mean filtered image is obtained according to the current pixel point coordinates and the mean filtering algorithm.

[0065] Specifically, the obtained median filtered image and mean filtered image are combined, the local features and global feature information of the image are used to improve the accuracy and robustness of image matching, and the obtained combined image is gray-processed to obtain a corresponding gray-scale image.

[0066] S103, calculating corresponding soil conductivity data according to the soil measurement data, and inputting the soil conductivity data into a preset soil analysis model to calculate corresponding soil moisture content;

[0067] For further information, see Figure 3 , the step S103 specifically includes steps S1031 to S1032:

[0068] S1031, parsing the soil capacitance measurement value and its corresponding dielectric data in the soil measurement data, and calculating the relative dielectric constant of the current soil according to the dielectric data;

[0069] S1032: Input the relative dielectric constant and the soil capacitance measurement value into a preset soil analysis model to calculate the soil moisture content corresponding to the current soil.

[0070] In the specific implementation, the soil capacitance measurement value and its corresponding dielectric data in the soil measurement data are parsed, and the relative dielectric constant of the current soil is calculated according to the dielectric data, wherein the dielectric data includes the imaginary part and the real part of the soil dielectric constant, and the relative dielectric constant of the soil is calculated by the imaginary part and the real part of the soil dielectric constant, and the soil capacitance measurement value and the relative dielectric constant are input into the preset soil analysis model to calculate the soil moisture content corresponding to the current soil:

[0071] γ=δ′-E*δ″;

[0072]

[0073] In the formula, γ represents the relative dielectric constant, δ′ represents the real part of the soil dielectric constant, and E 2 =-1, δ″ represents the imaginary part of the soil dielectric constant, represents soil moisture content, μ(·) represents the relationship function between soil capacitance and moisture preset in the soil analysis model, and f represents the empirical coefficient, which is a constant set by the user.

[0074] S104, calculating an eigenvector of a co-occurrence matrix of the grayscale image according to the grayscale image and its corresponding similar image, and calculating a similarity between the grayscale image and its corresponding similar image according to the eigenvector;

[0075] For further information, see Figure 4 , the step S104 specifically includes steps S1041 to S1042:

[0076] S1041, traversing all pixels of the grayscale image and its corresponding similar image in a preset direction and distance to calculate a co-occurrence matrix between the grayscale image and its corresponding similar image;

[0077] S1042, calculating the eigenvectors between the grayscale image and its corresponding similar image respectively according to the co-occurrence matrix, and performing eigenvalue calculation on the eigenvalues ​​in the horizontal and vertical directions, and performing similarity calculation on the calculated eigenvalues ​​to obtain the similarity between the grayscale image and its corresponding similar image.

[0078] In a specific implementation, all pixels of the grayscale image and its corresponding similar image are traversed in a preset direction and distance to calculate the co-occurrence matrix between the grayscale image and its corresponding similar image, wherein the preset direction is the direction of pixel scanning when calculating the co-occurrence matrix, and the preset distance is the maximum distance between pixels when calculating the co-occurrence matrix. The obtained co-occurrence matrix is ​​used to calculate the feature vector between the grayscale image and its corresponding similar image:

[0079]

[0080] Wherein, θ1 represents the first eigenvector, i represents the number of gray levels, U(x, y) represents the element value of the xth row and yth column in the gray-level co-occurrence matrix, I represents the number of gray levels, θ2 represents the second eigenvector, and θ3 represents the third eigenvector.

[0081] Specifically, the feature vectors obtained above are calculated in the horizontal and vertical directions to obtain four 4-dimensional feature vectors, and the calculated 4-dimensional feature vectors are combined to obtain two combination vectors with a dimension of 16. The similarity of the grayscale image and its corresponding similar image is calculated by the two combination vectors according to the following formula:

[0082]

[0083] In the formula, σ 1n , σ 2n Represents the elements of two combination vectors with dimension 16 respectively.

[0084] S105, constructing a convolutional neural network model, and optimizing the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model;

[0085] For further information, see Figure 5 , the step S105 specifically includes steps S1051 to S1052:

[0086] S1051, constructing a convolutional neural network model, adjusting the input image features of the convolutional neural network model, and adjusting the convolution rules of each convolution module of the convolutional neural network model in turn;

[0087] S1052, introducing an attention mechanism into the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model.

[0088] In the specific implementation, a convolutional neural network model is constructed, and the input image features of the convolutional neural network model are adjusted, the size of the input image features is adjusted to (224, 224, 3), and the convolution rules of each convolution module of the convolutional neural network model are adjusted in turn:

[0089] Among them, the first layer convolution module performs two 3x3 convolutions and ReLU activation functions, the output feature layer is 64, the output spatial feature vector is (224, 224, 64), and then performs 2x2 maximum pooling processing, the output spatial feature vector is (112, 112, 64);

[0090] The second convolution module also performs two 3x3 convolutions and ReLU activation functions. The output feature layer is 128, and the output spatial feature vector is (112, 112, 128). Then, a 2x2 maximum pooling process is performed, and the output spatial feature vector is (56, 56, 128).

[0091] The third convolution module performs three 3x3 convolutions and ReLU activation functions. The output feature layer is 256, and the output spatial feature vector is (56, 56, 256). Then, a 2x2 maximum pooling process is performed, and the output spatial feature vector is (28, 28, 256).

[0092] The spatial feature vector obtained above is processed through a fully connected layer to output a spatial feature vector of (1, 1, 1000).

[0093] Furthermore, the attention mechanism is introduced into the backbone feature extraction algorithm of the convolutional neural network model, and the convolutional neural network model is optimized using the optimized backbone feature extraction algorithm to obtain the convolutional neural network optimized model.

[0094] S106, performing image processing on the soil image data according to the convolutional neural network optimization model to calculate the image correlation of the soil image data, and generating an environmental detection report of the current soil according to the image correlation, the similarity and the soil moisture content.

[0095] In the specific implementation, the soil image data is processed according to the convolutional neural network optimization model, so that the convolutional neural network optimization model processes the soil image data to obtain two one-dimensional feature vectors, and calculates the Euclidean distance of the two one-dimensional feature vectors. The image correlation of the soil image data is obtained according to the Euclidean distance, and the similarity, image correlation and soil moisture content obtained above are input into the preset environmental detection model to generate an environmental detection report of the current soil.

[0096] In summary, the soil environment detection method in the above embodiment of the present invention performs filtering and grayscale processing on the environmental data of the current soil, thereby using the grayscale image to obtain similar images in the image library, and quickly describes and classifies the texture features in the image by calculating the co-occurrence matrix of the grayscale image, thereby improving the accuracy of image processing; the convolutional neural network model is optimized so that the model can adjust itself to adapt to the characteristics of different data, and the image correlation of the soil data is calculated using the obtained convolutional neural network optimization model, and the current soil environment detection report is quickly generated according to the image correlation, similarity and soil moisture content, which has stronger generalization ability, improves the image similarity detection performance, and thus speeds up the soil detection efficiency.

[0097] Embodiment 2

[0098] Another aspect of the present invention is to provide a soil environment detection system. Figure 6 , shown is a soil environment detection system in a second embodiment of the present invention, comprising:

[0099] The data acquisition module 11 is used to collect the current soil environmental data in real time, wherein the environmental data includes soil image data and soil measurement data;

[0100] An image processing module 12 is used to filter the soil image data, convert the filtered soil image data into a grayscale image, and obtain a corresponding similar image in a preset image library based on the grayscale image;

[0101] Furthermore, the image processing module 12 includes:

[0102] A filtering processing unit, used for performing median filtering and mean filtering on the soil image data to obtain two median filtering images and a mean filtering image;

[0103] The grayscale processing unit is used to combine the median filtered image and the mean filtered image, and perform grayscale processing on the combined image to obtain a corresponding grayscale image.

[0104] A data calculation module 13 is used to calculate corresponding soil conductivity data according to the soil measurement data, and input the soil conductivity data into a preset soil analysis model to calculate corresponding soil moisture content;

[0105] Furthermore, the data calculation module 13 includes:

[0106] A data calculation unit, used to parse out the soil capacitance measurement value and its corresponding dielectric data in the soil measurement data, and calculate the relative dielectric constant of the current soil according to the dielectric data;

[0107] The moisture content calculation unit is used to input the relative dielectric constant and the soil capacitance measurement value into a preset soil analysis model to calculate the soil moisture content corresponding to the current soil.

[0108] A similarity calculation module 14 is used to calculate the eigenvector of the co-occurrence matrix of the grayscale image based on the grayscale image and its corresponding similar image, and calculate the similarity of the grayscale image and its corresponding similar image based on the eigenvector;

[0109] Furthermore, the similarity calculation module 14 includes:

[0110] A co-occurrence matrix calculation unit, used to traverse all pixels of the grayscale image and its corresponding similar image in a preset direction and distance to calculate a co-occurrence matrix between the grayscale image and its corresponding similar image;

[0111] The similarity calculation unit is used to calculate the eigenvectors between the grayscale image and its corresponding similar image according to the co-occurrence matrix, and perform eigenvalue calculation on the eigenvalues ​​in the horizontal and vertical directions, and perform similarity calculation on the calculated eigenvalues ​​to obtain the similarity between the grayscale image and its corresponding similar image.

[0112] A model optimization module 15, used to construct a convolutional neural network model and optimize the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model;

[0113] Furthermore, the model optimization module 15 includes:

[0114] A model building unit, used to build a convolutional neural network model, adjust the input image features of the convolutional neural network model, and sequentially adjust the convolution rules of each convolution module of the convolutional neural network model;

[0115] The model optimization unit is used to introduce an attention mechanism into the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model.

[0116] The environmental detection module 16 is used to perform image processing on the soil image data according to the convolutional neural network optimization model to calculate the image correlation of the soil image data, and generate an environmental detection report of the current soil according to the image correlation, the similarity and the soil moisture content.

[0117] The functions or operation steps implemented when the above modules are executed are substantially the same as those in the above method embodiments, and will not be repeated here.

[0118] The soil environment detection system provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0119] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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.

[0120] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A soil environment detection method, characterized in that: The following steps are involved: Step 1: Collecting the current soil environmental data in real time, wherein the environmental data includes soil image data and soil measurement data; Step 2: filtering the soil image data, converting the filtered soil image data into a grayscale image, and acquiring a corresponding similar image in a preset image library based on the grayscale image; Step 3: Calculate corresponding soil conductivity data according to the soil measurement data, and input the soil conductivity data into a preset soil analysis model to calculate corresponding soil moisture content; Step 4: calculating the eigenvector of the co-occurrence matrix of the grayscale image according to the grayscale image and its corresponding similar image, and calculating the similarity of the grayscale image and its corresponding similar image according to the eigenvector; Step 5: construct a convolutional neural network model, and optimize the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model; Step six: performing image processing on the soil image data according to the convolutional neural network optimization model to calculate the image correlation of the soil image data, and generating an environmental detection report of the current soil according to the image correlation, the similarity and the soil moisture content.

2. The soil environment detection method according to claim 1, characterized in that: The second step comprises: Performing median filtering and mean filtering on the soil image data respectively to obtain two median filtering images and a mean filtering image; The median filtered image and the mean filtered image are combined, and the combined image is gray-scaled to obtain a corresponding gray-scale image.

3. The soil environment detection method according to claim 1, characterized in that: The step three comprises: Parsing the soil capacitance measurement value and its corresponding dielectric data in the soil measurement data, and calculating the relative dielectric constant of the current soil according to the dielectric data; The relative dielectric constant and the soil capacitance measurement value are input into a preset soil analysis model to calculate the soil moisture content corresponding to the current soil.

4. The soil environment detection method according to claim 1, characterized in that: The fourth step comprises: Traversing all pixels of the grayscale image and its corresponding similar image in a preset direction and distance to calculate a co-occurrence matrix between the grayscale image and its corresponding similar image; The eigenvectors between the grayscale image and its corresponding similar image are calculated according to the co-occurrence matrix, and the eigenvalues ​​of the eigenvectors are calculated in the horizontal and vertical directions, and the calculated eigenvalues ​​are calculated for similarity to obtain the similarity between the grayscale image and its corresponding similar image.

5. The soil environment detection method according to claim 1, characterized in that: The step five comprises: Constructing a convolutional neural network model, adjusting the input image features of the convolutional neural network model, and adjusting the convolution rules of each convolution module of the convolutional neural network model in turn; An attention mechanism is introduced into the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model.

6. A soil environment detection system, characterized in that: include: A data acquisition module, used for collecting current soil environmental data in real time, wherein the environmental data includes soil image data and soil measurement data; An image processing module, used for filtering the soil image data, converting the filtered soil image data into a grayscale image, and acquiring a corresponding similar image in a preset image library based on the grayscale image; A data calculation module, used to calculate corresponding soil conductivity data according to the soil measurement data, and input the soil conductivity data into a preset soil analysis model to calculate corresponding soil moisture content; A similarity calculation module, used to calculate the eigenvector of the co-occurrence matrix of the grayscale image according to the grayscale image and its corresponding similar image, and calculate the similarity of the grayscale image and its corresponding similar image according to the eigenvector; A model optimization module, used to construct a convolutional neural network model and optimize the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model; The environmental detection module is used to perform image processing on the soil image data according to the convolutional neural network optimization model to calculate the image correlation of the soil image data, and generate an environmental detection report of the current soil according to the image correlation, the similarity and the soil moisture content.

7. The soil environment detection system according to claim 6, characterized in that: The image processing module comprises: A filtering processing unit, used for performing median filtering and mean filtering on the soil image data to obtain two median filtering images and a mean filtering image; The grayscale processing unit is used to combine the median filtered image and the mean filtered image, and perform grayscale processing on the combined image to obtain a corresponding grayscale image.

8. The soil environment detection system according to claim 6, characterized in that: The data calculation module includes: A data calculation unit, used to parse out the soil capacitance measurement value and its corresponding dielectric data in the soil measurement data, and calculate the relative dielectric constant of the current soil according to the dielectric data; The moisture content calculation unit is used to input the relative dielectric constant and the soil capacitance measurement value into a preset soil analysis model to calculate the soil moisture content corresponding to the current soil.

9. The soil environment detection system according to claim 6, characterized in that: The similarity calculation module comprises: A co-occurrence matrix calculation unit, used to traverse all pixels of the grayscale image and its corresponding similar image in a preset direction and distance to calculate a co-occurrence matrix between the grayscale image and its corresponding similar image; The similarity calculation unit is used to calculate the eigenvectors between the grayscale image and its corresponding similar image according to the co-occurrence matrix, and perform eigenvalue calculation on the eigenvalues ​​in the horizontal and vertical directions, and perform similarity calculation on the calculated eigenvalues ​​to obtain the similarity between the grayscale image and its corresponding similar image.

10. The soil environment detection system according to claim 6, characterized in that: The model optimization module includes: A model building unit, used to build a convolutional neural network model, adjust the input image features of the convolutional neural network model, and sequentially adjust the convolution rules of each convolution module of the convolutional neural network model; The model optimization unit is used to introduce an attention mechanism into the backbone feature extraction algorithm of the convolutional neural network model to obtain a convolutional neural network optimization model.