Method and system for determining excrement spots and urine spots in yak pasture
Through the method of fusion of resistivity, spectral and image data, a yak ranch feces and urine spot recognition model was constructed, which solved the problem of insufficient measurement accuracy in traditional methods, and achieved accurate measurement of feces and urine spots and environmental protection.
Patent Information
- Application Number
- CN202510447108.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-11
AI Technical Summary
Traditional methods are difficult to accurately determine the area and quantity of manure spots and urine spots in yak pastures, and the lack of multi-source data fusion and feature fusion mechanisms lead to insufficient detection accuracy and robustness.
Resistivity measurement combined with spectral and image data is used to construct a sample line plaque recognition model, and the resistivity stereoscopic distribution is reconstructed through a finite element inversion algorithm, and multi-spectral features are extracted in combination with a deep learning algorithm, and feature weights are dynamically adjusted to achieve accurate determination of plaque parameters.
It improves the accuracy and robustness of plaque identification, can promptly detect changes in fecal spots and urine spots, optimize grazing strategies, reduce environmental pollution, and promote sustainable development of the ranch.
Smart Images

Figure CN120294073A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent breeding, and particularly relates to a method and system for measuring fecal spots and urine spots in yak pastures. Background Art
[0002] In yak pastures, the distribution of fecal spots and urine spots has an important impact on soil fertility, vegetation growth, and the ecological environment. Although the traditional transect method is simple, its efficiency is low and it is difficult to accurately measure the area and quantity of the patches. Using a single data source, it is impossible to accurately determine the area and quantity of fecal spots and urine spots, lacking the ability of multi-source data fusion and unable to make full use of the advantages of different data sources. The lack of an effective feature fusion and weight adjustment mechanism results in insufficient detection accuracy and robustness. Therefore, the current existing technologies lack a patch recognition model that comprehensively considers multiple features and it is difficult to provide comprehensive patch parameters. Summary of the Invention
[0003] The present invention provides a method and system for measuring fecal spots and urine spots in yak pastures, which can comprehensively and accurately measure fecal spots and urine spots in yak pastures.
[0004] A method for measuring fecal spots and urine spots in yak pastures, comprising:
[0005] Setting transects at a preset interval within the yak pasture, and burying a pair of electrodes at both ends of each transect; wherein, a pair of electrodes includes a current electrode and a potential electrode;
[0006] Based on the principle of resistivity measurement, applying a safe current to the electrodes and measuring the change curve of the soil resistivity of the transect;
[0007] Based on the change curve of the soil resistivity of the transect, combining the spectral data and image data of the transect area to construct a transect patch recognition model;
[0008] Based on the transect patch recognition model, obtaining the patch parameters of the transect area to complete the measurement of fecal spots and urine spots in the yak pasture based on the transect method; wherein, the patch parameters include the type, area, and quantity of the patches; the types of patches include fecal spots and urine spots.
[0009] Preferably, the method for measuring the change curve of the soil resistivity of the transect includes:
[0010] At a preset time, using a reference electrode group to measure the background resistivity of the soil in the yak pasture;
[0011] Applying a gradient safe current within a preset range to the transect electrodes and measuring the soil resistivity through the linkage of adjacent transect electrode groups;
[0012] Based on the background resistivity and the soil resistivity measured in a linked manner, a finite element inversion algorithm is used to reconstruct the three-dimensional resistivity distribution at a preset underground depth, and three-dimensional resistivity tomography is obtained.
[0013] Based on the three-dimensional resistivity tomography, a change curve of the soil resistivity of the sample line is obtained.
[0014] Preferably, the method for constructing the sample line patch recognition model includes:
[0015] Analyze the change curve of the soil resistivity of the sample line to obtain the resistivity characteristics of the sample line patch;
[0016] Use a spectral analyzer to regularly scan the spectral data of the sample line area to obtain the spectral characteristics of the sample line patch;
[0017] Use a camera to capture the image data of the sample line area, and based on a deep learning algorithm, identify the image data to obtain the image characteristics of the sample line patch;
[0018] Based on the resistivity characteristics of the sample line patch, the spectral characteristics of the sample line patch, and the image characteristics of the sample line patch, a sample line patch recognition model is obtained.
[0019] Preferably, the method for obtaining the resistivity characteristics of the sample line patch includes:
[0020] Perform Hilbert-Huang transform on the change curve of the soil resistivity of the sample line to obtain the intrinsic mode function energy entropy and the instantaneous frequency fluctuation index of the resistivity;
[0021] Based on the intrinsic mode function energy entropy and the instantaneous frequency fluctuation index, establish a sample resistivity gradient field;
[0022] Perform adaptive gradient modulus segmentation on the sample resistivity gradient field to obtain the resistivity characteristics of the sample line patch.
[0023] Preferably, the method for obtaining the spectral characteristics of the sample line patch includes:
[0024] Perform standard normal transformation on the collected spectral data to obtain standard spectral data;
[0025] Calculate the correlation coefficient between each band of the standard spectral data and the preset patch reference value, and use the band with the largest absolute value of the correlation coefficient as the initial wavelength to obtain a k-1 wavelength sequence;
[0026] Based on the matrix formed by the spectral vectors corresponding to the k-1 wavelength sequence, calculate the projection operator and construct the orthogonal complement space;
[0027] Calculate the projection of the unselected wavelengths other than the k-1 wavelength sequence in the orthogonal complement space, and use the wavelength with the largest two-norm of the projection vector as the kth characteristic wavelength;
[0028] Based on the k - 1 wavelength sequence and the kth characteristic wavelength, a complete set of characteristic wavelengths is obtained.
[0029] Based on the complete set of characteristic wavelengths, a double - exponential fusion parameter is constructed to obtain the spectral characteristics of the sample line patches.
[0030] Preferably, the method for obtaining the image characteristics of the sample line patches includes:
[0031] Replace the convolutions in the third / fourth stage of the ResNet - 50 backbone network with deformable convolutions, and dynamically generate the convolution kernel weights of the deformable convolutions based on the illumination conditions of the collected image data to obtain an improved ResNet - 50 backbone network.
[0032] Based on the improved ResNet - 50 backbone network, extract the features of visible - light image data and infrared - light image data respectively to obtain visible - light image features and infrared - light image features.
[0033] Based on the multi - spectral feature cross - attention module, fuse the visible - light image features and the infrared - light image features to obtain the image characteristics of the sample line patches.
[0034] The present invention also provides a system for measuring fecal patches and urine patches in a yak pasture to implement the above - mentioned method, including:
[0035] A sample line setting module, which is used to set sample lines at a preset interval in the yak pasture and bury a pair of electrodes at both ends of each sample line; wherein, a pair of electrodes includes a current electrode and a potential electrode.
[0036] A resistivity monitoring module, which is used to apply a safe current to the electrodes based on the resistivity measurement principle and measure the change curve of the soil resistivity of the sample line.
[0037] An identification model construction module, which is used to construct a sample line patch identification model based on the change curve of the soil resistivity of the sample line, in combination with the spectral data and image data of the sample line area.
[0038] A patch measurement module, which is used to obtain the patch parameters of the sample line area based on the sample line patch identification model and complete the measurement of fecal patches and urine patches in the yak pasture based on the sample line method; wherein, the patch parameters include the type, area, and quantity of the patches; the types of patches include fecal patches and urine patches.
[0039] Preferably, the resistivity monitoring module includes:
[0040] A background resistivity acquisition unit, which is used to measure the background resistivity of the soil in the yak pasture using a reference electrode group at a preset time.
[0041] The sample line resistivity acquisition unit is used to apply a gradient safety current within a preset range to the sample line electrodes, and measure the soil resistivity through the linkage measurement of adjacent sample line electrode groups;
[0042] The resistivity imaging unit is used to reconstruct the three-dimensional resistivity distribution of a preset depth underground and obtain three-dimensional resistivity tomography based on the background resistivity and the soil resistivity measured by linkage, using the finite element inversion algorithm;
[0043] The change curve acquisition unit is used to obtain the change curve of the sample line soil resistivity based on the three-dimensional resistivity tomography.
[0044] Compared with the prior art, the beneficial effects of the present invention are as follows: By combining resistivity characteristics, spectral characteristics, and image characteristics, the advantages of multi-source data are fully utilized to improve the accuracy and robustness of patch recognition. The weights of the fecal spot double index (FDl) and the urine spot double index (UDI) are dynamically adjusted according to the sample humidity to enhance the adaptability of the model to different environmental conditions. The weights of different modality features are dynamically adjusted through the attention mechanism to further improve the robustness of the model. Comprehensive patch parameters (type, area, quantity) are provided, providing strong technical support for the scientific management of yak pastures and ecological environment protection. Through real-time monitoring and dynamic adjustment, changes in fecal spots and urine spots can be detected in a timely manner, grazing strategies can be optimized, environmental pollution can be reduced, and the sustainable development of pastures can be promoted. Description of the Drawings
[0045] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0046] Figure 1 It is a flowchart of the method for measuring fecal spots and urine spots in a yak pasture according to an embodiment of the present invention;
[0047] Figure 2 It is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
[0048] Description of the Reference Numerals:
[0049] 1010, processor; 1020, memory; 1030, input / output interface; 1040, communication interface; 1050, bus. Detailed Embodiments
[0050] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0051] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present invention should be the ordinary meanings understood by those with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar terms used in the embodiments of the present invention do not represent any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or objects appearing before this term cover the elements or objects listed after this term and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left", "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0052] To make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0053] Embodiment 1
[0054] As Figure 1 shown, a method for measuring dung spots and urine spots in yak pastures includes:
[0055] S1: Set sample lines at a preset interval in the yak pasture, and bury a pair of electrodes at both ends of each sample line; wherein, a pair of electrodes includes a current electrode and a potential electrode. In this embodiment, unmanned aerial vehicle (UAV) aerial survey terrain data is used to generate a non-uniform sample line network based on slope, vegetation coverage and historical grazing paths:
[0056] The sample line spacing in high-activity areas (such as near watering points) is encrypted to 5 - 10 meters, and the sample line spacing in low-activity areas is widened to 20 - 30 meters.
[0057] A four-electrode array (Wenner alpha arrangement) is buried at both ends of each sample line, and the electrodes are made of corrosion-resistant titanium alloy plated with platinum and buried 30 cm deep to penetrate the surface dry layer.
[0058] S2: Based on the resistivity measurement principle, apply a safe current to the electrodes and measure the change curve of the soil resistivity of the sample line.
[0059] A further embodiment lies in that the method for measuring the variation curve of the soil resistivity of the sample line includes:
[0060] At a preset time, use a reference electrode group to measure the background resistivity of the yak pasture soil; specifically, measure the background resistivity through the reference electrode group (buried in the non-interference area) every morning to eliminate the interference of daily variations in soil humidity and temperature on the data.
[0061] Apply a gradient safety current within a preset range to the sample line electrodes, and measure the soil resistivity through the linkage of adjacent sample line electrode groups; specifically, use an alternating current gradient of 0.1 Hz - 100 Hz. The low frequency (0.1 - 1 Hz) penetrates deep soil (>1 m), and the high frequency (10 - 100 Hz) detects shallow soil (<0.5 m). The current intensity is controlled at 1 - 10 mA to avoid the electrolysis effect. Adjust the current according to the real-time soil humidity (fed back by the TDR sensor). When the humidity > 30%, the current is reduced to 50% to avoid the risk of short circuit. When the soil is dry (humidity < 15%), it is increased to 120% to enhance the signal-to-noise ratio. Regarding the linkage measurement of the electrode groups, a Wenner-Schlumberger hybrid array is used. Four groups of electrodes (A / B are current electrodes, M / N are potential electrodes) are deployed on each sample line. Use a GPS timestamp (accuracy ±1 us) to synchronize the multi-channel data collector to achieve synchronous measurement of the potential difference across the sample lines and eliminate environmental noise.
[0062] Based on the background resistivity and the soil resistivity measured through linkage, use the finite element inversion algorithm to reconstruct the three-dimensional resistivity distribution at a preset underground depth and obtain three-dimensional resistivity tomography. In this embodiment, a reference electrode group is set in the non-interference area to measure the daily background resistivity p_bg(z), establish a reference curve of depth z, construct a background resistivity correction model based on the reference curve, and perform dynamic compensation on the actually measured soil resistivity of the sample line. Use an unstructured tetrahedral mesh, which is encrypted to a resolution of 10 cm near the surface and gradually thinned to 50 cm in the deep layer. Introduce terrain data to constrain the mesh generation. Use the weighted least squares method combined with a smoothing constraint to optimize the objective function. Based on CUDA, parallel calculation of the Jacobian matrix is realized, and the inversion time is shortened from 8 hours (CPU) to 20 minutes (NVIDIA A100) to complete the adaptive finite element inversion.
[0063] Based on the three-dimensional resistivity tomography, obtain the variation curve of the soil resistivity of the sample line. Based on the three-dimensional resistivity tomography, take a section every 10 cm along the sample line direction, calculate the variation of the average resistivity with depth, and for the repeated measurement data, calculate the daily variation rate.
[0064] S3: Based on the variation curve of the soil resistivity of the sample line, combine the spectral data and image data of the sample line area to construct a sample line patch recognition model.
[0065] A further embodiment lies in that the method for constructing the sample line patch recognition model includes:
[0066] S31: Analyze the change curve of the sample line soil resistivity to obtain the resistivity characteristics of the sample line patches. A further embodiment lies in that the method for obtaining the resistivity characteristics of the sample line patches includes:
[0067] Perform Hilbert-Huang transform on the change curve of the sample line soil resistivity to obtain the energy entropy of the intrinsic mode function and the instantaneous frequency fluctuation index of the resistivity. In this embodiment, the energy entropy of the intrinsic mode function (IMF) represents the fecal patch: (IMF3 energy proportion > 40%); the instantaneous frequency fluctuation index represents the urine patch: (fluctuation variance in the 0.5 - 2 Hz frequency band > 1.5).
[0068] Based on the energy entropy of the intrinsic mode function and the instantaneous frequency fluctuation index, establish a sample resistivity gradient field;
[0069] Perform adaptive gradient modulus segmentation on the sample resistivity gradient field to obtain the resistivity characteristics of the sample line patches. Among them, the gradient modulus in the fecal patch area > 3.2 Ω·m / m, and in the urine patch area < 1.8 Ω·m / m.
[0070] S32: Install a micro-spectrometer near each sample line for regularly scanning the spectral reflectance of the sample line area. The spectrometer can be installed on a movable bracket to scan the sample line at different times. Regularly scan the spectral data of the sample line area using the spectrometer to obtain the spectral characteristics of the sample line patches.
[0071] A further embodiment lies in that the method for obtaining the spectral characteristics of the sample line patches includes:
[0072] Perform standard normal transformation on the collected spectral data to obtain standard spectral data;
[0073] Calculate the correlation coefficient between each band of the standard spectral data and the preset patch reference value (laboratory test value of fecal / urine patch), and take the band with the largest absolute value of the correlation coefficient as the initial wavelength to obtain a k - 1 wavelength sequence;
[0074] Based on the matrix composed of the spectral vectors corresponding to the k - 1 wavelength sequence, calculate the projection operator and construct the orthogonal complement space;
[0075] Calculate the projection of the unselected wavelengths outside the k - 1 wavelength sequence in the orthogonal complement space, and take the wavelength with the largest two-norm of the projection vector as the kth characteristic wavelength;
[0076] Based on the k - 1 wavelength sequence and the kth characteristic wavelength, obtain the complete characteristic wavelength. In this embodiment, the leave-one-out cross-validation (LOO - CV) is used, and the wavelength screening stops when the predicted residual sum of squares (PRESS) no longer decreases significantly (usually select 5 - 10 wavelengths).
[0077] Based on the complete characteristic wavelengths, construct double-exponential fusion parameters to obtain the spectral characteristics of the sample line patches. In this embodiment, the double-exponential fusion parameters include the fecal spot double-exponential and the urine spot double-exponential. Among them, the fecal spot double-exponential is obtained through visible light and short-wave infrared characteristics. This is because feces contain rich organic matter and pigments, and these components exhibit unique reflection characteristics in the visible light band (such as the red light and near-infrared bands). At the same time, the short-wave infrared band can reflect the absorption characteristics of water and other organic components in feces. Specifically, select the characteristic wavelengths of the visible light band (such as 600 - 700 nm) and the short-wave infrared band (such as 1500 - 1700 nm), and calculate the average reflectance values respectively. Define the fecal spot double-exponential as:
[0078] FDI = α × VIS mean + β × SWIR mean ,
[0079] where VIS mean and SWIR mean are the average reflectance values of the visible light and short-wave infrared bands respectively, and α and β are weight coefficients.
[0080] The urine spot double-exponential is obtained through nitrogen-related characteristic bands. Urine contains relatively high concentrations of urea and other nitrogen-containing compounds, and these components exhibit obvious absorption characteristics in specific bands (such as 1450 nm and 1950 nm). Specifically, select the reflectances of the nitrogen-related characteristic bands (such as 1450 nm and 1950 nm), and calculate the absorption depth or specific spectral index respectively. Define the urine spot double-exponential as:
[0081] UDI = γ × N1450 abs + δ × N1950 abs ,
[0082] where N1450 abs and N1950 abs are the absorption depths of the 1450 nm and 1950 nm bands respectively, and γ and δ are weight coefficients.
[0083] According to the sample humidity (through the depth D 1800 ) of the 1800 nm water absorption peak, adaptively adjust the dynamic weights of the fecal spot double-exponential and the urine spot double-exponential to form the double-exponential fusion parameters. The depth of the water absorption peak is closely related to the water content in the sample and can reflect the humidity state of the sample. The sample humidity has a significant impact on the spectral characteristics of fecal spots and urine spots. Under high humidity conditions, the visible light and short-wave infrared characteristics of fecal spots may be masked by water absorption, while the nitrogen-related characteristics of urine spots are relatively stable; under low humidity conditions, the spectral characteristics of fecal spots are more obvious.
[0084] According to the sample humidity (D1800 ) Adaptively adjust the weights of the fecal spot double index (FDI) and the urine spot double index (UDI). When D 1800 is high (higher humidity), increase the weight of UDI and decrease the weight of FDI to enhance the recognition ability of urine spot features. When D1800 is low (lower humidity), increase the weight of FDI and decrease the weight of UDI to enhance the recognition ability of fecal spot features.
[0085] S33: Install high-definition cameras near each transect line to capture images of the transect line area. The cameras can be set to take pictures at regular intervals (e.g., once an hour) or triggered by a triggering device (e.g., when the electrical system detects a change in resistivity). Use the image data captured by the cameras to identify the transect patch image features based on deep learning algorithms.
[0086] A further implementation manner is that the method for obtaining the transect patch image features includes:
[0087] Replace the convolution in the 3 / 4 stage of the ResNet-50 backbone network with deformable convolution, and dynamically generate the convolution kernel weights of the deformable convolution based on the illumination conditions of the collected image data to obtain an improved ResNet-50 backbone network; in this embodiment, design a lightweight illumination estimation subnet LightNet (3-layer CNN), with the input being a low-resolution copy of the image (256×256), and the output being an illumination feature vector In Stage3 / 4 of ResNet-50, replace the standard 3×3 convolution with light-aware deformable convolution (LADC). Add a light feature-guided skip connection between Stage3 and Stage4, map the illumination vector 1 output by LightNet to a high-dimensional space through a 1×1 convolution and then add it to the Stage4 features,
[0088] Extract the features of visible light image data and infrared light image data respectively based on the improved ResNet-50 backbone network to obtain visible light image features and infrared light image features; specifically, adopt multi-spectral branch parallel processing. In the visible light branch, input the RGB image and extract features through the improved ResNet-50. In the infrared branch, input the NIR single-channel image and extract features through the same structure (removing the first convolutional layer to adapt to the single-channel input).
[0089] Fuse the visible light image features and infrared light image features based on the multi-spectral feature cross-attention module to obtain the sample line patch image features. Specifically, based on the visible light features and infrared light features, calculate the bidirectional attention. Similarly, calculate the attention from infrared to visible light to obtain the final fused features, that is, the sample line patch image features. Particularly, before the attention fusion, use deformable convolution to align the spatial offsets of the two-modal features, generate channel weights through the SE-block idea, and combine spatial attention to generate spatial weights to complete the construction of the multi-spectral cross-attention feature fusion module.
[0090] S34: Obtain a sample line patch recognition model based on the sample line patch resistivity features, sample line patch spectral features, and sample line patch image features.
[0091] S4: Based on the sample line patch recognition model, obtain the patch parameters of the sample line area to complete the determination of yak pasture fecal patches and urine patches based on the sample line method; wherein, the patch parameters include the type, area, and quantity of the patches; the types of patches include fecal patches and urine patches. In this embodiment, the resistivity features, spectral features, and image features are concatenated, the fully connected layer uses Dense + Batch Normalization + ReLU, the attention mechanism is used to dynamically adjust the weights of different modal features, and finally the classification layer outputs the classification result.
[0092] Specifically, the determination results of the fecal patch and urine patch types are the weighted results of multi-modal features. Introduce the evidence theory (D-S theory) to handle uncertainty, determine the resistivity credibility, spectral credibility, and image credibility, calculate the joint credibility through the Dempster combination rule, and use the spatio-temporal alignment compensation mechanism to align the spatio-temporal of each feature. After determining the patch type, the determination results of the area and quantity of fecal patches and urine patches are the weights of each feature. Among them, use the resistivity feature: combine the length of the sample line and the electrode spacing to calculate the length of the resistivity change region. Assume that the electrode spacing is 1 meter and the sample line length is 10 meters. If a decrease in resistivity is detected at a certain position and the length of this region is 2 meters, it can be preliminarily judged that there is a fecal patch or urine patch of 2 square meters at this position. By counting the number of regions with resistivity changes, the number of fecal patches and urine patches on the sample line can be obtained. For example, if 3 regions with decreasing resistivity are detected on a sample line, it is judged that there are 3 fecal patches or urine patches on this sample line.
[0093] Use the spectral feature: For each identified patch, calculate the area of its connected domain. The area can be obtained by multiplying the number of pixels by the actual area of each pixel. Count the number of identified patches and separately count the number of fecal patches and urine patches.
[0094] Use the image feature: Through object detection, complete the statistics of the patch area and quantity.
[0095] It should be noted that the method of the embodiment of the present invention can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In such a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiment of the present invention, and these multiple devices will interact with each other to complete the described method.
[0096] It should be noted that some embodiments of the present invention have been described above. Other embodiments are within the scope of the appended claims. In some cases, it should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The actions or steps recorded in the claims can be executed in a different order from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0097] Embodiment 2
[0098] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present invention further provides a system for measuring fecal spots and urine spots in a yak pasture for implementing the method, including:
[0099] A sample line setting module, configured to set sample lines in a yak pasture at a preset interval and bury a pair of electrodes at both ends of each sample line; wherein, a pair of electrodes includes a current electrode and a potential electrode;
[0100] A resistivity monitoring module, configured to apply a safe current to the electrodes based on the resistivity measurement principle and measure the change curve of the soil resistivity of the sample line;
[0101] An identification model construction module, configured to construct a sample line patch identification model based on the change curve of the soil resistivity of the sample line, in combination with the spectral data and image data of the sample line area;
[0102] A patch measurement module, configured to obtain the patch parameters of the sample line area based on the sample line patch identification model and complete the measurement of fecal spots and urine spots in the yak pasture based on the sample line method; wherein, the patch parameters include the type, area, and quantity of the patches; the types of patches include fecal spots and urine spots.
[0103] Further, the resistivity monitoring module includes:
[0104] A background resistivity acquisition unit for measuring the background resistivity of the soil in a yak pasture using a reference electrode group at a preset time;
[0105] A sample line resistivity acquisition unit for applying a gradient safety current within a preset range to the sample line electrodes and measuring the soil resistivity through the linkage of adjacent sample line electrode groups;
[0106] A resistivity imaging unit for reconstructing the three-dimensional resistivity distribution at a preset underground depth and obtaining a three-dimensional resistivity tomography based on the background resistivity and the soil resistivity measured through linkage, using a finite element inversion algorithm;
[0107] A change curve acquisition unit for obtaining the change curve of the sample line soil resistivity based on the three-dimensional resistivity tomography;
[0108] The system of the above embodiment is used to implement the corresponding method in any of the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0109] It should be noted that the above system is embodied in the form of functional units. The term "module" here can be implemented in software and / or hardware forms, and no specific limitation is made in this regard.
[0110] For example, a "module" can be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processors, etc.) for executing one or more software or firmware programs, a memory, a combined logic circuit, and / or other suitable components that support the described functions.
[0111] Embodiment III
[0112] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the method in any of the above embodiments when executing the program.
[0113] Figure 2 Figure 28 shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.
[0114] The processor 1010 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0115] The memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0116] The input / output interface 1030 is used to connect to the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Among them, the input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.
[0117] The communication interface 1040 is used to connect to the communication module (not shown in the figure) to realize the communication interaction between this device and other devices. Among them, the communication module can realize communication in a wired manner (such as USB (Universal Serial Bus), network cable, etc.) or can also realize communication in a wireless manner (such as a mobile network, WIFI (Wireless Fidelity), Bluetooth, etc.).
[0118] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0119] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, this device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solutions of the embodiments of this specification and do not necessarily include all the components shown in the figure.
[0120] The system of the above embodiment is used to implement the corresponding method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be elaborated herein.
[0121] Embodiment 4
[0122] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present invention further provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method as described in any of the foregoing embodiments.
[0123] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media and can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0124] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the method as described in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiment, which will not be elaborated herein.
[0125] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present invention (including the claims) is limited to these examples; under the concept of the present invention, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present invention as described above, which are not provided in detail for the sake of brevity.
[0126] In addition, for simplicity of explanation and discussion, and so as not to make the embodiments of the present invention difficult to understand, well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Further, the devices may be shown in block diagram form in order to avoid making the embodiments of the present invention difficult to understand, and this also takes into account the fact that details regarding the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present invention are to be implemented (i.e., these details should be completely within the understanding of those skilled in the art). In cases where specific details (such as circuits) are set forth to describe exemplary embodiments of the present invention, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details or with variations of these specific details. Accordingly, these descriptions should be regarded as illustrative rather than restrictive.
[0127] Although the present invention has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0128] Thus, the units of the examples described in the embodiments of this application can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0129] The embodiments of the present invention are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for measuring fecal spots and urine spots in yak pastures, characterized in that, Including: Set sample lines at preset intervals within the yak pasture, and bury a pair of electrodes at both ends of each sample line; among them, a pair of electrodes includes a current electrode and a potential electrode; Based on the resistivity measurement principle, apply a safe current to the electrodes and measure the change curve of the soil resistivity of the sample line; Based on the change curve of the soil resistivity of the sample line, combined with the spectral data and image data of the sample line area, construct a sample line patch recognition model; Based on the sample line patch recognition model, obtain the patch parameters of the sample line area, and complete the determination of fecal patches and urine patches in the yak pasture based on the sample line method; among them, the patch parameters include the type, area and quantity of the patches; the types of patches include fecal patches and urine patches.
2. The method according to claim 1, characterized in that, The method for measuring the change curve of the soil resistivity of the sample line includes: At a preset time, use a reference electrode group to measure the background resistivity of the soil in the yak pasture; Apply a gradient safe current within a preset range to the sample line electrodes, and measure the soil resistivity through the linkage of adjacent sample line electrode groups; Based on the background resistivity and the soil resistivity measured by linkage, use the finite element inversion algorithm to reconstruct the three-dimensional resistivity distribution at a preset underground depth and obtain three-dimensional resistivity tomography; Based on the three-dimensional resistivity tomography, obtain the change curve of the soil resistivity of the sample line.
3. The method according to claim 1, wherein The method for constructing a sample line patch recognition model includes: Analyze the change curve of the soil resistivity of the sample line to obtain the resistivity characteristics of the sample line patches; Regularly scan the spectral data of the sample line area with a spectral analyzer to obtain the spectral characteristics of the sample line patches; Use a camera to take the image data of the sample line area, and identify the image data based on the deep learning algorithm to obtain the image characteristics of the sample line patches; Based on the resistivity characteristics, spectral characteristics and image characteristics of the sample line patches, obtain the sample line patch recognition model.
4. The method according to claim 3, wherein The method for obtaining the resistivity characteristics of the sample line patches includes: Perform Hilbert-Huang transform on the change curve of the soil resistivity of the sample line to obtain the intrinsic mode function energy entropy and instantaneous frequency fluctuation index of the resistivity; Based on the intrinsic mode function energy entropy and the instantaneous frequency fluctuation index, establish a sample resistivity gradient field; Perform adaptive gradient modulus segmentation on the sample resistivity gradient field to obtain the resistivity characteristics of the sample line patches.
5. The method according to claim 3, wherein The method for obtaining the spectral characteristics of the sample line patches includes: Perform standard normal transformation on the collected spectral data to obtain standard spectral data; Calculate the correlation coefficient between each band of the standard spectral data and the preset patch reference value, and take the band with the largest absolute value of the correlation coefficient as the initial wavelength to obtain a k-1 wavelength sequence; Based on the spectral vectors corresponding to the k-1 wavelength sequence to form a matrix, calculate the projection operator and construct an orthogonal complement space; Calculate the projection of the unselected wavelengths outside the k-1 wavelength sequence in the orthogonal complement space, and take the wavelength with the largest two-norm of the projection vector as the kth characteristic wavelength; Based on the k-1 wavelength sequence and the kth characteristic wavelength, obtain the complete characteristic wavelength; Based on the complete characteristic wavelength, construct a double-exponential fusion parameter to obtain the spectral characteristics of the sample line patches.
6. The method according to claim 3, characterized in that, The method for obtaining the image characteristics of the sample line patches includes: Replace the convolution in the third / fourth stage of the ResNet-50 backbone network with deformable convolution, and dynamically generate the convolution kernel weights of the deformable convolution based on the illumination conditions of the collected image data to obtain an improved ResNet-50 backbone network; Extract the features of visible light image data and infrared light image data respectively based on the improved ResNet-50 backbone network to obtain visible light image features and infrared light image features; Fuse the visible light image features and infrared light image features based on the multi-spectral feature cross-attention module to obtain the sample line patch image features.
7. A system for measuring yak pasture manure spots and urine spots, which is used to implement the method described in any one of claims 1-6, and is characterized in that, Comprising: A sample line setting module for setting sample lines at a preset interval in the yak pasture and burying a pair of electrodes at both ends of each sample line; wherein, a pair of electrodes includes a current electrode and a potential electrode; A resistivity monitoring module for applying a safe current to the electrodes based on the resistivity measurement principle and measuring the change curve of the soil resistivity of the sample line; An identification model construction module for constructing a sample line patch identification model based on the change curve of the soil resistivity of the sample line in combination with the spectral data and image data of the sample line area; A patch determination module for obtaining the patch parameters of the sample line area based on the sample line patch identification model to complete the determination of the manure patches and urine patches in the yak pasture based on the sample line method; wherein, the patch parameters include the type, area and quantity of the patches; the types of the patches include manure patches and urine patches.
8. The system according to claim 7, wherein The resistivity monitoring module includes: A background resistivity acquisition unit for measuring the background resistivity of the soil in the yak pasture using a reference electrode group at a preset time; A sample line resistivity acquisition unit for applying a gradient safe current within a preset range to the sample line electrodes and measuring the soil resistivity through the linkage of adjacent sample line electrode groups; A resistivity imaging unit for reconstructing the three-dimensional resistivity distribution of the preset underground depth using the finite element inversion algorithm based on the background resistivity and the soil resistivity measured by linkage to obtain three-dimensional resistivity tomography; A change curve acquisition unit for obtaining the change curve of the soil resistivity of the sample line based on the three-dimensional resistivity tomography.