Artificial Intelligence-Based Soil Detection and Restoration System, Method, and Equipment
Through a soil detection system combining sensor clusters and remote sensing equipment with multiple sets of four-class models and large language models, the problems of time-consuming and laborious soil detection and limited data in the existing technology are solved, real-time and accurate soil monitoring and recovery are achieved, and the efficiency and accuracy of soil management are improved.
Patent Information
- Application Number
- CN202410803275.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2044-06-18
Smart Images

Figure CN118818001B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and particularly to a soil detection and restoration system, method, and device based on artificial intelligence. Background Art
[0002] Soil is the basic resource for agricultural production, and its quality directly affects the yield and quality of crops. However, with the increase in the global population and the advancement of industrialization, the problems of soil pollution and degradation are becoming increasingly serious. This not only threatens agricultural production but also poses potential risks to the ecological environment and human health. Therefore, soil detection and restoration have become a crucial task. By scientifically monitoring and improving the soil, the soil quality can be effectively enhanced, ensuring food security and ecological health. Existing soil detection technologies mainly rely on manual sampling and laboratory analysis. These methods usually include the analysis of the physical, chemical, and biological properties of the soil, such as measuring the pH value, nutrient content, organic matter content, and heavy metal pollutants of the soil. These detection results can provide a scientific basis for soil management. However, traditional soil detection technologies have some obvious problems. First, manual sampling is time-consuming and laborious, and it is difficult to ensure the representativeness and uniformity of the sampling. Second, laboratory analysis requires a long time and high costs, making it difficult to achieve large-scale and real-time soil monitoring. In addition, these methods are usually local and difficult to comprehensively reflect the overall situation of large-area soil.
[0003] To address the limitations of traditional soil detection technologies, some new methods and technologies have emerged in recent years. For example, remote sensing technology can obtain soil surface information over a large area and non-contact by analyzing the electromagnetic waves reflected from the ground. Sensor technology, on the other hand, can monitor parameters such as soil temperature, humidity, and conductivity in real time by deploying various types of sensors in the soil. These technologies have improved the efficiency and accuracy of soil detection to a certain extent but also have some deficiencies. Although remote sensing technology has a wide coverage area, its resolution is low, making it difficult to capture subtle soil changes. Although sensor technology has strong real-time performance, its deployment and maintenance costs are high, and it is easily affected by the environment. With the development of artificial intelligence technology, methods based on machine learning and deep learning have gradually been applied to the field of soil detection and restoration. These methods can quickly and accurately evaluate the soil condition, identify polluted areas, and predict pollution trends by analyzing massive soil data, such as satellite remote sensing images, drone aerial images, and various sensor data. Compared with traditional methods, artificial intelligence technology has the advantages of non-invasiveness, high efficiency, and intelligence, and can significantly improve the efficiency and accuracy of soil detection and restoration. However, existing artificial intelligence-based soil detection and restoration systems still have some deficiencies, such as limited data sources, weak model generalization ability, and lack of expert knowledge guidance, resulting in less-than-ideal performance in practical applications.
[0004] Therefore, there is an urgent need for a technical solution that can integrate various data to achieve real-time and accurate soil monitoring and restoration. Summary of the Invention
[0005] To address the deficiencies of the prior art, embodiments of the present application provide a soil detection and restoration system, method, and device based on artificial intelligence. The present application solves the technical problems such as the difficulty of the prior art in comprehensively reflecting the overall conditions of large areas of soil.
[0006] Embodiments of the present application provide a soil detection and restoration system based on artificial intelligence, including: a soil data acquisition unit, an artificial intelligence analysis unit, a soil restoration decision-making unit, and an execution feedback unit; wherein, the soil data acquisition unit is used to collect real-time soil data of a target area through a sensor cluster and remote sensing equipment to construct a target soil feature set; the artificial intelligence analysis unit is used to classify the target soil feature set using multiple sets of four-classification models and integrate the classification results based on the weight coefficients that maximize the total prediction probability to obtain a detection and evaluation result; the soil restoration decision-making unit is used to input the target soil feature set and the detection and evaluation result into a large language model to generate multiple soil restoration plans with a preset quantity; the execution feedback unit is used to perform semantic extraction on the generated multiple soil restoration plans and use an inference engine to select a target plan to call one or more target devices to restore the soil of the target area.
[0007] In a possible implementation, collecting real-time soil data of a target area through a sensor cluster and remote sensing equipment to construct a target soil feature set includes: the sensor cluster collects index data including the temperature, humidity, conductivity, pH value, and chemical nutrients of the soil in the target area based on a target time interval to construct a first sensing data sequence; the remote sensing equipment collects soil hyperspectral images of the target area based on a target time interval to construct a remote sensing data sequence; respectively perform standardization processing on the first sensing data sequence and the remote sensing data sequence, and respectively perform singular value decomposition on the standardized data sequences to extract the corresponding main feature vectors; construct an orthogonal transformation matrix based on the main feature vectors, and the orthogonal transformation matrix is used to perform fusion calculation on the standardized data sequences to obtain a fusion data sequence; based on multiple target lag orders, calculate multiple auto-average correlation coefficients corresponding to each index in the overall time series of the first sensing data sequence to obtain a second sensing data sequence; perform data splicing operations on the first sensing data sequence, the second sensing data sequence, the remote sensing data sequence, and the fusion data sequence in the order of collection time to obtain a target soil feature set.
[0008] In one possible implementation, an orthogonal transformation matrix is constructed based on the main eigenvector, and the orthogonal transformation matrix is used to perform fusion calculation on the standardized data sequence to obtain a fused data sequence, including: Where F kl represents the fused data sequence of the k-th band and the l-th time slice, α represents the first coefficient with a value of 1.21, U represents the left singular vector matrix of the first sensing data sequence, represents the standardized first sensing data sequence, V T represents the transpose of the right singular vector matrix of the first sensing data sequence, β represents the second coefficient with a value of 0.77, W kl represents the left singular vector matrix of the k-th band of the remote sensing data sequence at the l-th time slice, represents the standardized remote sensing data sequence, represents the right singular vector matrix of the k-th band of the remote sensing data sequence at the l-th time slice.
[0009] In one possible implementation, based on multiple target lag orders, multiple auto-average correlation coefficients corresponding to each index in the first sensing data sequence in the overall time series are calculated, including: Where AVG(k) represents the auto-average correlation coefficient when the target lag order is k, N represents the total number of time series, H t represents the value of the index at time t, H t+k represents the value of the index at time t + k, H1 represents the average value of the overall time series where the current index is located, H2 represents the median of the overall time series where the current index is located, and H3 represents the mode of the overall time series where the current index is located.
[0010] In one possible implementation, the target soil feature set is classified using multiple sets of four-class models, and the classification results are integrated based on the weight coefficients that maximize the total prediction probability to obtain a detection and evaluation result, including: Based on the Bayesian optimization method, the weight coefficients corresponding to each set of four-class models are iteratively updated to maximize the total prediction probability of the multiple sets of four-class models and obtain the target weight coefficients; the target soil feature set is respectively input into the multiple sets of four-class models to obtain multiple sets of corresponding four-class probability value matrices; the data on each model coordinate axis in the four-class probability value matrix is respectively multiplied by the corresponding target weight coefficients, and the data on each category coordinate axis in the calculated matrix is summed and compressed to obtain the target four-class probability value; the category label corresponding to the maximum value in the target four-class probability value is obtained as the detection and evaluation result.
[0011] In one possible implementation, based on the Bayesian optimization method, the weight coefficients corresponding to each group of four-class models are iteratively updated to maximize the total prediction probability of multiple groups of four-class models, including: where N represents the total number of iterative training samples, M represents the total number of four-class models, y i represents the true label of the i-th sample, x i represents the feature vector of the i-th sample, α m represents the weight of the m-th four-class model, P(y i lx i , h m ) represents the probability that the m-th four-class model predicts that the sample x i belongs to the category y i , and P(y i |x i ) represents the weighted sum of the probabilities that all four-class models predict that the sample x i belongs to the category y i .
[0012] In one possible implementation, the target soil feature set and the detection and evaluation results are input into the large language model to generate multiple soil restoration plans of a preset quantity, including: extracting multiple hidden layers in the large language model, and constructing corresponding three-layer fully connected neural networks according to the dimension sizes output by each hidden layer; inserting the constructed multiple groups of three-layer fully connected neural networks into the next layer of the corresponding hidden layer in the large language model to obtain the target large language model; training the target large language model using historical data, and only updating the parameters of the constructed multiple groups of three-layer fully connected neural networks during the training process; inputting the target soil feature set and the detection and evaluation results into the trained target large language model to generate multiple soil restoration plans of a preset quantity.
[0013] In one possible implementation, semantic extraction is performed on the generated multiple soil restoration plans, and an inference engine is used to select the target plan to call one or more target devices to restore the soil in the target area, including: performing semantic extraction on the generated multiple soil restoration plans respectively to obtain multiple groups of sets including execution actions and corresponding values; constructing an inference engine based on the target rules, and performing decision value calculations on the multiple groups of sets respectively in combination with the first knowledge base to select the corresponding target plan according to the maximum decision value; traversing the set corresponding to the target plan, if the execution action exists in the second knowledge base, then call one or more target devices and restore the soil in the target area according to the corresponding value, otherwise send the execution action and the corresponding value to the target communication terminal.
[0014] The embodiment of the present application also provides an artificial intelligence-based soil detection and restoration method, including: collecting soil data of a target area in real time through a sensor cluster and remote sensing equipment to construct a target soil feature set; classifying the target soil feature set using multiple groups of four-classification models, and integrating the classification results based on the weight coefficients that maximize the total prediction probability to obtain a detection and evaluation result; inputting the target soil feature set and the detection and evaluation result into a large language model to generate multiple soil restoration plans with a preset quantity; performing semantic extraction on the generated multiple soil restoration plans, and using an inference engine to select a target plan to call one or more target devices to restore the soil of the target area.
[0015] The embodiment of the present application also provides an artificial intelligence-based soil detection and restoration device, including: a processor, a memory, and a system bus; wherein, the processor and the memory are connected through the system bus; the memory is used to store one or more programs, and the one or more programs include instructions that, when executed by the processor, cause the processor to execute the method described in the above embodiment.
[0016] In the artificial intelligence-based soil detection and restoration system, method, and device provided above, the embodiment of the present application collects soil data in real time through a sensor cluster and remote sensing equipment, and uses multiple groups of four-classification models and large language models to perform intelligent analysis and processing on the data, which can effectively solve the limitations of traditional soil detection methods and achieve real-time and accurate soil monitoring and restoration. Further, in some embodiments, by means of standardized processing and singular value decomposition, the main feature vectors are extracted, and an orthogonal transformation matrix is constructed for data fusion to form a fused data sequence, which can significantly improve the efficiency and accuracy of soil data collection and comprehensively reflect the overall condition of a large area of soil. Further, in some embodiments, multiple groups of four-classification models are used to classify the data, and based on the Bayesian optimization method, the weight coefficients of the models are iteratively updated to maximize the total prediction probability, generating accurate detection and evaluation results and restoration plans, which can greatly improve the effect and benefit of soil management. Description of the Drawings
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0018] Figure 1 It is a schematic block diagram of an artificial intelligence-based soil detection and restoration system provided by the embodiment of the present application;
[0019] Figure 2 Schematic flowchart of an artificial intelligence analysis method provided by an embodiment of the present application;
[0020] Figure 3 Schematic flowchart of a soil restoration decision-making method provided by an embodiment of the present application;
[0021] Figure 4 Schematic flowchart of an execution feedback method provided by an embodiment of the present application. Detailed implementation manners
[0022] Now, various exemplary embodiments of the present application will be described in detail with reference to the accompanying drawings. It should be noted that: Unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application.
[0023] Those skilled in the art can understand that terms such as "first" and "second" in the embodiments of the present application are only used to distinguish different steps, devices, or modules, etc., and neither represent any specific technical meaning nor indicate an inevitable logical order between them. It should also be understood that in the embodiments of the present application, "a plurality of" may refer to two or more, and "at least one" may refer to one, two, or more. It should also be understood that for any component, data, or structure mentioned in the embodiments of the present application, without clear definition or contrary indication in the context, it is generally understood to be one or more. In addition, the term "and / or" in the present application is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present application generally represents an "or" relationship between the associated objects before and after. It should also be understood that the present application emphasizes the differences between various embodiments, and the same or similar parts can be referred to each other. For the sake of brevity, they will not be described one by one.
[0024] At the same time, it should be understood that for the sake of description, the sizes of the various parts shown in the drawings are not drawn in actual proportional relationships. The following description of at least one exemplary embodiment is actually merely illustrative and in no way restricts the present application and its application or use. Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and devices should be regarded as part of the specification. It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.
[0026] Figure 1 The following is a schematic block diagram of a soil detection and restoration system based on artificial intelligence provided by an embodiment of this application. It should be understood that the system shown in the figure is exemplary rather than restrictive. This means that the system architecture involved is not limited to a specific form or design, but is presented as an example. In other words, the architecture shown in the figure can be regarded as a means of expression to clearly describe relevant concepts and relationships, and does not exclude other forms of architecture. Therefore, when interpreting the architecture in the described figure, it should be understood that the model has flexibility and diversity, and its purpose is to provide an exemplary description rather than a restrictive regulation of a specific form. As Figure 1 shown, the soil detection and restoration system based on artificial intelligence in the embodiments of this application includes a soil data acquisition unit 101, an artificial intelligence analysis unit 102, a soil restoration decision-making unit 103, and an execution feedback unit 104.
[0027] The soil data acquisition unit 101 collects the soil data of the target area in real time through a sensor cluster and remote sensing equipment to construct a target soil feature set. Specifically, the sensor cluster 1011 collects index data including the temperature, humidity, conductivity, pH value, and chemical nutrients of the soil in the target area 100 based on a target time interval to construct a first sensing data sequence. The remote sensing equipment 1012 collects the hyperspectral image of the soil in the target area based on a target time interval to construct a remote sensing data sequence.
[0028] It should be understood that the combined use of the sensor cluster 1011 and the remote sensing equipment 1012 can provide more comprehensive soil information. Among them, the main function of the sensor cluster 1011 is to monitor the physical and chemical properties of the soil in real time. Through the collaborative work of multiple sensors, key indicators such as soil temperature, humidity, conductivity, pH value, and chemical nutrients are obtained. These data can provide an important basis for the evaluation of the soil health status. The sensor cluster 1011 usually includes, but is not limited to, the following types of sensors:
[0029] Temperature sensors, which are used to measure the temperature of the soil, can include thermocouples, thermistors, and infrared temperature sensors, etc. Temperature is an important factor affecting soil microbial activity, nutrient transformation, and plant root growth. Humidity sensors, which are used to measure the humidity of the soil, can include capacitive humidity sensors and resistive humidity sensors, etc. Soil humidity directly affects the water supply of plants and is a key indicator for crop growth. Conductivity sensors, which are used to measure the conductivity of the soil, reflect the amount of ion concentration in the soil solution and are important indicators for evaluating soil salinity. pH sensors, which are used to measure the pH value of the soil, affect the availability of soil nutrients and the growth status of plants. Chemical nutrient sensors, in the embodiments of the present application, are used to measure the chemical nutrient contents of nitrogen, phosphorus, and potassium in the soil, and these elements are macronutrients necessary for plant growth.
[0030] The data collection of the above sensors is carried out at certain time intervals, and it can be set to collect data once per minute, per hour, daily, or weekly, including but not limited to these. Through long-term monitoring, a dynamic change model of the soil can be established, thereby providing a scientific basis for farmland management and crop planting.
[0031] In addition, the remote sensing device 1012 can obtain the reflection spectral information of the soil at different bands through hyperspectral imaging technology. Hyperspectral imaging can capture soil details that are invisible to the naked eye and provide more soil characteristic information. The acquisition of hyperspectral images is carried out by a hyperspectral camera that can be installed on an unmanned aerial vehicle, a satellite, or a fixed platform, and has the advantages of large-area coverage and high resolution. The reflection spectral data of the soil are simultaneously obtained by the hyperspectral camera at multiple bands. Each band corresponds to a specific wavelength range and reflects the reflection characteristics of the soil within that wavelength range.
[0032] In the embodiments of the present application, the data collected by the sensor cluster form a two-dimensional matrix S, in the form of [s ij , where i represents the time dimension and j represents the acquisition parameters of different sensors (such as temperature, humidity, conductivity, pH value, etc.):
[0033] The data collected by the remote sensing device form a four-dimensional matrix R, in the form of [r ijkl , where i and j represent spatial coordinates, k represents the spectral band, and l represents the time dimension: R = {r ijkl}, i ∈ [1, p], j ∈ [1, q], k ∈ [1, b], l ∈ [1, t].
[0034] Therefore, the sensor data has a high temporal resolution, while the remote sensing data has a high spatial resolution. To effectively fuse these two types of data, they need to be projected onto the same temporal and spatial scales. Specifically, after obtaining the first sensor data sequence and the remote sensing data sequence, the first sensor data sequence and the remote sensing data sequence are respectively normalized, and the normalized data sequences are respectively subjected to singular value decomposition to extract the corresponding principal eigenvectors. Specifically, for sensor data normalization, the two-dimensional matrix S is normalized so that the data of each parameter has the same dimension: where μ j and σ j represent the mean and standard deviation of the jth parameter respectively. For remote sensing data normalization, the four-dimensional matrix R is normalized so that the data of each band has the same dimension: where μ kl and σ kl represent the mean and standard deviation of the kth band at time l respectively. Then, spatio-temporal alignment is performed. The sensor data and the remote sensing data are aligned using timestamps and geographical coordinates to ensure that they are fused within the same temporal and spatial ranges.
[0035] Next, an orthogonal transformation matrix is constructed based on the principal eigenvectors. The orthogonal transformation matrix is used to perform fusion calculations on the normalized data sequences to obtain a fused data sequence. First, the normalized sensor data and the remote sensing data are subjected to singular value decomposition (SVD) to extract the principal eigenvectors.
[0036] SVD of sensor data: where U S is the left singular vector matrix, ∑ S is the singular value diagonal matrix, and V S is the right singular vector matrix.
[0037] SVD of remote sensing data. Since the remote sensing data is a four-dimensional matrix, SVD needs to be performed on each band and time slice separately, and then the results are combined: where, is the two-dimensional matrix of the kth band at time 1, U Rkl is the left singular vector matrix, ∑ Rkl is the singular value diagonal matrix, and V Rkl is the right singular vector matrix.
[0038] Then, an orthogonal transformation matrix is constructed. The principal features are selected according to the magnitudes of the singular values, and the orthogonal transformation matrices U, V, W, and X are constructed. For sensor data, the first r singular values and the corresponding singular vectors are selected to construct the matrices U and V: U = U S[:, 1:r], V = V S [:, 1:r]. For remote sensing data, select the first r singular values and the corresponding singular vectors to construct matrices W and x: W kl = U Rkl [:, 1:r], X kl = V Rkl [:, 1:r].
[0039] Then, using the orthogonal transformation formula, fuse the standardized sensor data and remote sensing data together to generate a fused data sequence where F kl represents the fused data sequence of the k-th band and the l-th time slice, α represents the first coefficient, with a value of 1.21, U represents the left singular vector matrix of the first sensing data sequence, represents the standardized first sensing data sequence, V T represents the transpose of the right singular vector matrix of the first sensing data sequence, β represents the second coefficient, with a value of 0.77, W kl represents the left singular vector matrix of the k-th band of the remote sensing data sequence at the l-th time slice, represents the standardized remote sensing data sequence, represents the right singular vector matrix of the k-th band of the remote sensing data sequence at the 1st time slice. Through the above method, the fusion results of all bands and time slices can be combined to obtain the final four-dimensional fused data sequence F kl . It should be noted that the applicant found based on a large number of experiments that when α takes a value of 1.21 and β takes a value of 0.77, the data advantages of the sensor network and remote sensing equipment can be effectively combined, and fused data with high-quality spatio-temporal resolution can be generated.
[0040] Since the first sensing data sequence described above is only the original time series data and does not fully utilize the time correlation and periodic characteristics between these data. Although these data provide basic soil state information, they cannot reveal deeper time series relationships and laws, which is far from enough for accurately evaluating soil health status and formulating restoration decisions. Therefore, after obtaining the fused data sequence, based on multiple target lag orders, calculate the multiple auto-average correlation coefficients corresponding to each index in the overall time series of the first sensing data sequence to obtain the second sensing data sequence: where AVG(k) represents the auto-average correlation coefficient when the target lag order is k, N represents the total number of time series, H t represents the value of the index at time t, H t+kIt represents the value of the indicator at time t + k. H1 represents the average value of the overall time series where the current indicator is located. H2 represents the median of the overall time series where the current indicator is located. H3 represents the mode of the overall time series where the current indicator is located.
[0041] In the embodiments of the present application, in order to reveal the autocorrelation characteristics and periodic changes of the data as much as possible, k takes all integers from 1 to N - 1. That is, the second sensing data sequence can be expressed as:
[0042]
[0043] Among them, each row corresponds to the autocorrelation coefficient of a specific soil indicator (such as temperature). Through the autocorrelation coefficient, the autocorrelation of the soil indicator at different time intervals (lag orders) can be found. For example, if the autocorrelation coefficient at a certain lag order is relatively high, it indicates that there are significant periodic changes in the soil indicator at this time interval, which helps to understand and predict the change trend of the soil state. At the same time, the advantages of using H1 (mean), H2 (median), and H3 (mode) are that these statistics can provide information at different levels:
[0044] Among them, the mean value H1 reflects the central tendency of the data, can smooth the fluctuations of the data, and provide information on the overall trend; the median value H2, for skewed distribution data, the median can better reflect the intermediate level of the data and avoid the influence of extreme values; the mode value H3 reflects the most common value in the data, which helps to understand the concentration of the data. By comprehensively using these three statistics, the characteristics of time series data can be described more comprehensively, and the essential changes of the data can be more accurately reflected when calculating the autocorrelation coefficient. The system can not only improve the processing accuracy of soil data, but also provide more valuable information in the decision-making process, and ultimately improve the effect of soil detection and restoration.
[0045] Finally, based on the acquisition time sequence, data splicing operations are performed on the first sensing data sequence, the second sensing data sequence, the remote sensing data sequence, and the fusion data sequence to obtain the target soil feature set. Data splicing can be achieved by arranging different feature vectors at each time point in order to construct a comprehensive time feature matrix. It should be noted that in practical applications, the acquisition frequencies and time points of different devices will be different, which will lead to inconsistencies in the time dimension and information dimension of the acquired data sequences. In order to enable these data to be compared and analyzed on the same scale, a filling strategy can be adopted to make their sizes consistent. The embodiments of the present application use the method of filling with 0, that is, adding 0 values to the end of the shorter data sequence to make the lengths of all data sequences the same, and then performing the splicing operation to obtain the target soil feature set.
[0046] The artificial intelligence analysis unit 102 classifies the target soil feature set using multiple sets of four-class models, and integrates the classification results based on the weight coefficients that maximize the total prediction probability to obtain the detection and evaluation results. It should be understood that since the soil feature set usually includes parameters in multiple aspects such as physics, chemistry, and biology, the complexity and multidimensionality of soil data are relatively high, and it is difficult for traditional analysis methods to accurately and comprehensively evaluate the soil state. Therefore, using artificial intelligence methods to analyze and classify soil data has become an effective means. In order to reduce the difficulty of artificial intelligence in analyzing soil data, the embodiments of this application adopt a multi-granularity method, splitting the analysis process into relatively simple four-class problems. This method can not only reduce the complexity of a single model but also improve the overall analysis efficiency. That is, the target soil state is divided into four categories, namely good soil state, physical recovery, chemical recovery, and biological recovery. For each category, an independent positive-negative binary classification model can be constructed, or multiple four-class models can be constructed. The four-class models here can adopt various machine learning algorithms, such as decision trees, support vector machines (SVMs), random forests, and convolutional neural networks (CNNs) in deep learning, etc.
[0047] Specifically, in one embodiment (as Figure 2 shown, the specific method will be elaborated Figure 2 at), first, based on the Bayesian optimization method, the weight coefficients corresponding to each set of four-class models are iteratively updated to maximize the total prediction probability of the multiple sets of four-class models and obtain the target weight coefficients. Then, the target soil feature set is input into multiple sets of four-class models respectively to obtain multiple corresponding four-class probability value matrices. Next, the data on each model coordinate axis in the four-class probability value matrix are multiplied by the corresponding target weight coefficients respectively, and the data on each category coordinate axis in the calculated matrix are summed and compressed to obtain the target four-class probability value. Finally, the category label corresponding to the maximum value in the target four-class probability value is obtained as the detection and evaluation result.
[0048] The embodiments of this application classify the soil feature set using multiple sets of four-class models and integrate the classification results based on the weight coefficients that maximize the total prediction probability, thereby obtaining accurate detection and evaluation results, which can significantly improve the accuracy and reliability of soil detection and evaluation. Through the integration of multiple sets of models, the classification accuracy is improved, and the actual state of the soil can be more comprehensively reflected. By adopting the multi-granularity method, the complexity of a single model is reduced, and the robustness and stability of the system are improved. The model and weight coefficients can be flexibly adjusted according to different soil types and characteristics, with strong adaptability. By optimizing the classifier and integration method, the efficiency of soil data analysis is significantly improved, and the detection and evaluation results can be provided quickly.
[0049] The soil restoration decision-making unit 103 inputs the target soil feature set and the detection and evaluation results (good soil condition, physical restoration, chemical restoration, or biological restoration) described in the previous embodiments into a large language model to generate multiple soil restoration plans with a preset quantity. It should be understood that a large language model (LLM) is a natural language processing model based on deep learning technology that can understand, generate, and analyze natural language texts. In the embodiments of the present application, the main role of the large language model is to generate multiple soil restoration plans with a preset quantity based on the input soil features and evaluation results.
[0050] Meanwhile, in order to generate accurate and effective soil restoration plans, it is necessary to train, fine-tune, and optimize the large language model (such as LLaMA). A large amount of historical soil restoration cases and related soil feature data are collected to construct a comprehensive training data set. The training data set is used to train the large language model so that it can learn the generation rules and knowledge of soil restoration plans. By adjusting the parameters, structure, and training methods of the model, the performance of the model is optimized, and the accuracy and reliability of generating soil restoration plans are improved.
[0051] After completing data preprocessing and model training, the target soil feature set and the detection and evaluation results (good soil condition, physical restoration, chemical restoration, or biological restoration) described in the previous embodiments can be input into the large language model to generate multiple soil restoration plans with a preset quantity.
[0052] Specifically, the target soil feature set and the detection and evaluation results are converted into an encoding format that the large language model can understand, such as vector representation or a specific text format. The large language model generates multiple soil restoration plans based on the input data. These plans can include specific measures and steps in aspects such as soil improvement, vegetation restoration, soil and water conservation, and pollution control.
[0053] In one embodiment (as shown in Figure 3 and the specific method will be elaborated at Figure 3 ), first, multiple hidden layers in the large language model are extracted, and corresponding three-layer fully connected neural networks are constructed according to the dimension sizes output by each hidden layer. Then, the constructed multiple groups of three-layer fully connected neural networks are respectively inserted into the next layer of the corresponding hidden layer in the large language model to obtain the target large language model. Secondly, the target large language model is trained with historical data, and only the parameters of the constructed multiple groups of three-layer fully connected neural networks are updated during the training process. Finally, the target soil feature set and the detection and evaluation results are input into the trained target large language model to generate multiple soil restoration plans with a preset quantity.
[0054] The execution feedback unit 104 performs semantic extraction on the generated multiple soil restoration plans, and uses an inference engine to select a target plan, so as to call one or more target devices to restore the soil in the target area. It should be understood that after obtaining multiple soil restoration plans generated by the large language model, it is necessary to evaluate and select the generated multiple plans to determine the best restoration plan. The evaluation and selection criteria may include the feasibility of the plan, cost-effectiveness, ecological benefits, and social benefits, etc.
[0055] Specifically, semantic extraction is performed on the generated multiple soil restoration plans. The purpose of semantic extraction is to extract key information and features from the generated text for subsequent evaluation and selection. This process involves natural language processing technologies, including named entity recognition (NER), dependency parsing, topic modeling, etc. The inference engine is used to analyze and reason about the extracted semantic information, and select the optimal plan from multiple plans. The inference engine can evaluate the plans based on multiple criteria, including the feasibility of the plan, cost-effectiveness, ecological benefits, and social benefits, etc. Through the multi-criteria decision analysis (MCDA) method, various criteria are comprehensively weighed to select the best soil restoration plan. Once the optimal plan is determined, the corresponding devices and technologies can be called to restore the soil in the target area. This may include various means such as mechanical equipment, plant planting, and microbial agent application.
[0056] In one embodiment (as Figure 4 shown, the specific method will be elaborated Figure 4 at), semantic extraction is respectively performed on the generated multiple soil restoration plans to obtain multiple sets including execution actions and corresponding values; an inference engine is constructed based on the target rules, and decision value calculations are respectively performed on the multiple sets in combination with the first knowledge base to select the corresponding target plan according to the maximum decision value; traverse the set corresponding to the target plan, if the execution action exists in the second knowledge base, then call one or more target devices, and restore the soil in the target area according to the corresponding value, otherwise send the execution action and the corresponding value to the target communication terminal.
[0057] Figure 2Schematic diagram of a process of an artificial intelligence analysis method provided by an embodiment of the present application. In the embodiment of the present application, multiple Support Vector Machines (SVMs), a supervised learning model for classification and regression analysis, are constructed. Its core idea is to find the optimal hyperplane to distinguish data points of different categories. For a four-class classification problem, the purpose of the SVM is to find multiple hyperplanes that divide the data into four classes. Specifically, in the four-class classification problem, the One-vs-Rest (OvR) strategy is adopted, that is, the four-class problem is transformed into four binary classification problems. Each binary classifier is trained separately, with one class as the positive class and the remaining three classes as the negative class. The specific formula is as follows: f i (x) = sign(w i ·x + b i ), where i ∈ {1, 2, 3, 4} represents the category.
[0058] At step S201, based on the Bayesian optimization method, the weight coefficients corresponding to each group of four-class classification models are iteratively updated to maximize the total prediction probability of multiple groups of four-class classification models and obtain the target weight coefficients.
[0059] Specifically, a probability algorithm is used to perform weighted integration on the results of multiple SVMs, and the best classification result is determined by maximizing the prediction probability and Bayesian optimization. Suppose there are N samples, and each sample has M SVM prediction results. The prediction result h m (x) of each SVM is a probability distribution P(y|x, h m ), representing the probability that the sample x belongs to each category.
[0060] Define the total prediction probability as the weighted sum of all SVM prediction probabilities: where α m is the weight of the m-th SVM, and P(y|x, h m ) is the prediction probability of the m-th SVM.
[0061] Define the Bayesian optimization objective function J, and optimize the weights by maximizing the total prediction probability: where N represents the total number of iterative training samples, M represents the total number of four-class classification models, y i represents the true label of the i-th sample, x i represents the feature vector of the i-th sample, α m represents the weight of the m-th four-class classification model, P(y i |x i , h m ) represents the probability that the m-th four-class classification model predicts that the sample x i belongs to the category y i , P(yi |x i ) represents the weighted sum of the probabilities that all four-class models predict the sample x i belongs to the class y i . To ensure the rationality of the weights, constraint conditions can be added:
[0062] By solving the above objective function through the Bayesian optimization method and satisfying the constraint conditions, the optimal weights can be obtained. Next, this application will illustrate how to obtain the optimal weights through Bayesian optimization with specific examples. Suppose there are three groups of 12 SVM models in total, and the prediction probabilities for five training samples are as follows in the table:
[0063]
[0064] Determine the weights through Bayesian optimization to maximize the objective function. Specifically, initially select several weight combinations for evaluation and calculate the objective function values under each combination. Based on the current evaluation results, update the Bayesian optimization model. According to the updated model, select the next weight combination for evaluation. Repeat the above steps until the stopping condition is met (such as reaching the maximum number of iterations or the objective function converges). Through Bayesian optimization, the optimal weight combination can be finally obtained. Here, for the convenience of subsequent description, assume that the weights obtained through optimization are: α1 = 0.4, α2 = 0.3, α3 = 0.3.
[0065] At step S202, input the target soil feature set into multiple groups of four-class models respectively to obtain multiple corresponding four-class probability value matrices. Based on the example described above, input the target soil feature set into three groups of four-class SVM models respectively, and the predicted probabilities are as follows:
[0066] SVMl: (P(y = 1|x) = 0.6), (P(y = 2|x) = 0.2), (P(y = 3|x) = 0.1), (P(y = 4|x) = 0.1);
[0067] SVM2: (P(y = 1|x) = 0.5), (P(y = 2|x) = 0.3), (P(y = 3|x) = 0.15), (P(y = 4|x) = 0.05);
[0068] SVM3: (P(y = 1|x) = 0.7), (P(y = 2|x) = 0.1), (P(y = 3|x) = 0.1), (P(y = 4|x) = 0.1).
[0069] At step S203, the data on each model coordinate axis in the four-class probability value matrix is multiplied by the corresponding target weight coefficient respectively, and the data on each class coordinate axis in the matrix after the operation is summed and compressed to obtain the target four-class probability value. Specifically, in combination with the content described above, in one embodiment, the weights obtained by Bayesian optimization are: α1 = 0.4, α2 = 0.3, α3 = 0.3, and the integrated total prediction probability is:
[0070] P(y = 1|x) = 0.4×0.6 + 0.3×0.5 + 0.3×0.7 = 0.6;
[0071] P(y = 2|x) = 0.4×0.2 + 0.3×0.3 + 0.3×0.1 = 0.2;
[0072] P(y = 3|x) = 0.4×0.1 + 0.3×0.15 + 0.3×0.1 = 0.115;
[0073] P(y = 4|x) = 0.4×0.1 + 0.3×0.05 + 0.3×0.1 = 0.085,
[0074] It can be obtained that the final classification result is:
[0075] At step S204, the class label corresponding to the maximum value in the target four-class probability value is obtained as the detection and evaluation result. That is, the class label corresponding to the good soil state, physical recovery, chemical recovery, or biological recovery is determined according to the classification number.
[0076] This process is continuously iterated through Bayesian optimization to adjust the weight combination to maximize the total objective function value. The finally obtained weights are the optimal weight combination. Through the above process, the optimal weights can be obtained through Bayesian optimization, and the results of multiple SVMs are weighted and integrated using these weights to finally obtain an accurate classification result. This method is very effective in dealing with complex classification tasks.
[0077] Figure 3 This is a schematic flow chart of a soil recovery decision method provided by an embodiment of the present application. At step S301, multiple hidden layers in the large language model are extracted, and a corresponding three-layer fully connected neural network is constructed according to the dimension size of the output of each hidden layer.
[0078] Specifically, the outputs of multiple hidden layers of the large language model (such as BERT, GPT, etc.) are extracted. Assume that the large language model has L hidden layers, and the output dimension of each hidden layer is d i , where i ∈ {1, 2,..., L}. The specific steps are as follows:
[0079] First, extract the output of the hidden layer: H i = HiddenLayer i (x), where H i represents the output of the i-th hidden layer, and x is the input of the model.
[0080] Then, construct a three-layer fully connected neural network. For the output H i of each hidden layer, construct a corresponding three-layer fully connected neural network. The network structure includes an input layer, two hidden layers, and an output layer. Assume the number of nodes in each fully connected layer is h1, h2, h3 respectively. Then the structure of this neural network can be expressed as:
[0081] The first fully connected layer: z1 = W1·H i + b1, a1 = ReLU(z1), where a1 is the activation output of the first layer.
[0082] The second fully connected layer: z2 = W2·a1 + b2, a2 = ReLU(z2), where a2 is the activation output of the second layer.
[0083] The third fully connected layer: z3 = W3·a2 + b3, a3 = ReLU(z3), where a3 is the activation output of the third layer.
[0084] At step S302, insert the constructed multiple groups of three-layer fully connected neural networks into the next layer of the corresponding hidden layer in the large language model to obtain the target large language model. This step forms a new target large language model by taking the output of the fully connected network as the input of the new hidden layer.
[0085] At step S303, use historical data to train the target large language model, and only update the parameters of the constructed multiple groups of three-layer fully connected neural networks during the training process. The training steps are as follows: Forward propagation, calculate the predicted output of the model. Loss calculation, use an appropriate loss function (such as mean square error, cross entropy, etc.) to calculate the error between the predicted output and the true label, L = Loss(y pred , y true ). Backward propagation, calculate the gradient of the loss function with respect to the model parameters, and only update the parameters of the fully connected neural network.
[0086] At step S304, the target soil feature set and the detection and evaluation results are input into the trained target large language model to generate multiple soil restoration plans with a preset quantity. First, input the features: InputFeatures = {SoilFeatures, EvaluationResults}. Then, the model infers. The input features are processed by the target large language model to generate a set of soil restoration plans: GeneratedPlans = TargetLanguageModel(InputFeatures).
[0087] Through the above method, the deep feature extraction ability and multi-level representation ability of the large language model can be effectively utilized to generate diverse and efficient soil restoration plans.
[0088] In one embodiment, the 3rd, 6th, and 9th hidden layers in the LLM are extracted, which output feature vectors of 512 dimensions, 768 dimensions, and 1024 dimensions respectively. A three-layer FCNN can be constructed for each hidden layer, where the input dimension of the first layer is the same as the output dimension of the hidden layer, and the dimensions of the second and third layers can be set according to actual needs. For example, for the 3rd hidden layer, an FCNN with a structure of "512-256-128-512" can be constructed; for the 6th hidden layer, an FCNN with a structure of "768-384-192-768" can be constructed; for the 9th hidden layer, an FCNN with a structure of "1024-512-256-1024" can be constructed.
[0089] After construction, these FCNNs are respectively inserted into the next layer of the corresponding hidden layer in the LLM to obtain the target large language model (Target LLM). The insertion operation can be achieved by, during the forward propagation process, passing the output of the hidden layer to the corresponding FCNN and using the output of the FCNN as the input of the next hidden layer. The mathematical expressions are as follows:
[0090] h i =f(W i ·h i-1 +b i );
[0091] h′ i =FCNN i (h i );
[0092] h i+1 =f(W i+1 ·h′ i +b i+1 ),
[0093] where, h irepresents the output of the i-th hidden layer, f represents the activation function (such as ReLU), W i and b i represent the weight matrix and bias vector of the i-th hidden layer respectively, FCNN i represents a three-layer fully connected neural network inserted after the i-th hidden layer, h′ i represents the output of FCNN i and h i+1 represents the output of the (i + 1)-th hidden layer.
[0094] After obtaining the target large language model, it is trained using historical data. During the training process, only the parameters of the inserted FCNN are updated, while the other parts of the LLM are kept fixed. The purpose of doing this is to optimize the model's performance in soil restoration specifically without destroying the existing knowledge of the LLM. During training, the Mean Squared Error (MSE) can be used as the loss function: where N represents the number of training samples, yi represents the true value of the i-th sample, represents the predicted value of the model for the i-th sample. An optimization algorithm (such as Adam) can be used to minimize the loss function and update the parameters of the FCNN.
[0095] After training is completed, a target large language model optimized for the soil restoration task is obtained. To generate a soil restoration plan, the target soil feature set and the detection and evaluation results are input into the model, and the number of plans to be generated is set. The model will generate multiple practical soil restoration plans based on the input information and its professional knowledge in soil restoration. These plans can include detailed contents such as specific operation steps, required materials and equipment, and precautions, providing strong guidance for actual soil restoration work.
[0096] Figure 4 is a schematic flowchart of an execution feedback method provided by an embodiment of the present application. At step S401, semantic extraction is performed on the multiple generated soil restoration plans respectively to obtain multiple sets of collections including execution actions and corresponding values. Specifically, the trained large language model outputs multiple soil restoration plans. It should be understood that the multiple soil restoration plans will be output based on the detection and evaluation results. For example, when the detection and evaluation result is physical restoration, only multiple physical restoration plans will be output. Here, in order to comprehensively and detailedly illustrate the semantic extraction method of the present application, the plans with multiple detection and evaluation results are used as examples and elaborated uniformly, for example:
[0097] Plan 1 (chemical restoration): Add 500 kg / ha of lime to adjust the soil pH value and improve the buffering capacity and heavy metal fixation capacity.
[0098] Solution 2 (Bioremediation): Plant 2,000 sunflowers per hectare that are tolerant to heavy metals. Through the absorption and enrichment of plants, reduce the heavy metal content in the soil.
[0099] Solution 3 (Bioremediation): Build an oak shelter forest of 500 square meters per hectare to reduce soil erosion and prevent the migration and diffusion of heavy metals.
[0100] Solution 4 (Bioremediation): Use 1,000 g / ha of Microcystis aeruginosa preparation to adsorb and deposit copper and cadmium, and accelerate the degradation and transformation of heavy metals.
[0101] Solution 5 (Physical Remediation): Use a drip head flow rate of 2.5 liters per hour and continuously drip irrigate for 4 hours.
[0102] For the generated text, the next step is to extract the key semantic information. First, named entity recognition (NER) is used to identify the key entities in the solutions. For example, in Solution 1, key entities such as "lime", "500 kg / ha", and "pH value" are identified. These entities play a core role in the semantic extraction process and can accurately describe the specific operations of the restoration solutions.
[0103] Then, the association between actions and numerical values is established. The first step is action recognition. For example, in Solution 2, "planting sunflowers" is identified as the main action. Through natural language processing techniques, the verbs and related actions in the text can be automatically extracted. The second step is numerical extraction. For example, in Solution 4, "1,000 g / ha" is extracted as the specific numerical value. Through pattern matching and regular expressions, the relevant numerical values can be accurately extracted from the text.
[0104] Next, multiple sets are combined, that is, the identified actions and numerical values are combined to form multiple sets. For example, in Solution 3, the action is "build an oak shelter forest" and the numerical value is "500 square meters per hectare". The formed set is {action: build an oak shelter forest, numerical value: 500 square meters per hectare}.
[0105] At step S402, an inference engine is built based on the target rules, and the decision numerical calculations are respectively performed on multiple sets in combination with the first knowledge base to select the corresponding target solution according to the maximum decision numerical value.
[0106] In the embodiments of the present application, the process of optimizing the decision can be achieved by calculating the cost and carbon emissions. Specifically, first, the construction of the inference engine is based on the preset target rules, and these rules define the key factors and constraints to be considered in the decision-making process. For example, for the selection of soil restoration solutions, the target rules can include the following aspects: economic cost, the implementation cost of each solution, including material costs, labor costs, etc. Carbon emissions, the carbon emissions generated during the implementation of each solution.
[0107] The inference engine combines the first knowledge base to perform decision-making numerical calculations on multiple sets. The first knowledge base stores the detailed parameters and historical data of each solution. For example, for the chemical restoration solution, the knowledge base records the usage effects and costs of different types of lime, and for the biological restoration solution, it records the absorption efficiencies and planting costs of different plants.
[0108] For each soil restoration solution, when calculating its economic cost, material and labor costs are considered. Let the material cost of a certain solution be Cm, the labor cost be Cl, and the land area be A (unit: hectare). Then the total cost C is calculated as follows: C = (Cm + Cl) * A. For example, in Solution 1, lime is used for chemical restoration. Suppose the cost of each kilogram of lime is 5 yuan, the labor cost is 100 yuan / hectare, and the land area is 10 hectares. Then the total cost is: C = (500 * 5 + 100) * 10 = 25500 yuan.
[0109] Each solution will generate a certain amount of carbon emissions during implementation. Let the unit carbon emission of each material be Em, and the carbon emission of manual operation be El. Then the total carbon emission E is calculated as follows: E = (Em * Cm + El * Cl) * A. For example, in Solution 2, heavy metal-tolerant sunflowers are planted. Suppose the planting carbon emission of each sunflower is 0.2 kg CO2, the carbon emission of manual operation is 50 kg CO2 / hectare, the planting density is 2000 plants / hectare, and the land area is 10 hectares. Then the total carbon emission is: E = (0.2 * 2000 + 50) * 10 = 5000 kg CO2.
[0110] Based on the economic cost and carbon emissions calculated above, the inference engine will score each solution. Let the economic cost weight be Wc and the carbon emission weight be We. Then the score S of each solution is calculated as follows: S = Wc * (1 / C) + We * (1 / E). The setting of the weights can be adjusted according to actual needs. For example, if the economic cost weight is 0.6 and the carbon emission weight is 0.4, then the scores for Solution 1 and Solution 2 are respectively: S1 = 0.6 * (1 / 25500) + 0.4 * (1 / 6000) ≈ 0.0000902, S2 = 0.6 * (1 / 100000) + 0.4 * (1 / 5000) ≈ 0.000086. From the scoring results, the score of Solution 1 is slightly higher than that of Solution 2. Therefore, the inference engine will select Solution 1 as the target solution.
[0111] To better understand the application of the above method, the following is an analysis through a specific case.
[0112] Case 1: Restoration of heavy metal-polluted soil. The soil in a certain place is polluted by heavy metals and needs to be repaired. The optional solutions include biological restoration (Solutions 2 and 3). The calculation results according to the inference engine are as follows:
[0113] Scenario 2 (bioremediation), economic cost: 20,000 yuan, carbon emissions: 6,000 kg CO2, score: 0.000086.
[0114] Scenario 3 (bioremediation), economic cost: 30,000 yuan, carbon emissions: 4,000 kg CO2, score: 0.000076.
[0115] Based on the scores, the inference engine selects Scenario 2 as the optimal scenario. Although Scenario 2 has higher carbon emissions, its economic cost is relatively low, so the comprehensive score is the highest.
[0116] Through the above construction of the inference engine and the decision-making numerical calculation process, the optimal selection of multiple soil restoration scenarios can be effectively realized, ensuring the best balance between economic cost and environmental impact.
[0117] At step S403, traverse the set corresponding to the target scenario. If the execution action exists in the second knowledge base, call one or more target devices and restore the soil in the target area according to the corresponding values. Otherwise, send the execution action and the corresponding values to the target communication terminal. Specifically, all agricultural mechanization devices that can be called by the system and their operation parameters are stored in the second knowledge base. For example, the control instructions for automatic irrigation machines and automatic fertilization devices include device type, parameter range, and operation steps. An example of the knowledge base structure is as follows:
[0118] {"device type": "automatic irrigation machine",
[0119] "control parameters": {"dripper flow rate": "2 liters per hour", "maximum drip irrigation time": "48 hours"},
[0120] "operation steps": "Set the dripper flow rate and drip irrigation time, and start the device"}
[0121] {"device type": "automatic fertilization device",
[0122] "control parameters": {"fertilizer application rate": "150 kg per hectare", "fertilization speed": "20 kg per minute"},
[0123] "operation steps": "Set the fertilizer application rate and start the device"}
[0124] When the system traverses the target scenario, it matches each execution action with the devices in the second knowledge base. If there is a match, the system will call the corresponding device to perform the corresponding action. For example, when the system detects that a chemical restoration scenario requires the application of a specific amount of fertilizer, it will match the automatic fertilization device and perform the fertilization operation according to the numerical parameters in the scenario.
[0125] When the system calls a device, calculations are performed based on the numerical parameters in the target plan. For example, in drip irrigation operations, the drip irrigation time is calculated using the following formula: t = V / (Q * A), where V is the total required water volume, Q is the dripper flow rate, and A is the land area. By calculating t, the system can reasonably set the drip irrigation time to ensure that the water supply meets the requirements of the plan.
[0126] In an actual soil restoration project, the system needs to control an automatic irrigation machine to provide an appropriate amount of water. The plan stipulates that 500 liters of water are to be drip-irrigated per hectare, and the drip irrigation time is 4 hours. Based on the device parameters and the requirements of the plan, the system automatically adjusts the settings of the drip irrigation machine to provide the accurate amount of water within the specified time.
[0127] In another case, the soil restoration plan requires 200 kg of phosphate fertilizer to be applied per hectare. The system matches an automatic fertilization device through the knowledge base, calculates the total fertilization amount to be 6000 kg (assuming the restoration area is 30 hectares), and automatically sets the output parameters of the fertilization device to ensure that the fertilization operation is completed as planned.
[0128] In addition, for operations that the system cannot perform automatically, such as planting plants or building a shelter forest, the system will send relevant information to the communication terminal to notify relevant personnel for manual intervention.
[0129] Furthermore, the embodiment of the present application also provides a soil detection and restoration device based on artificial intelligence, including: a processor, a memory, and a system bus; the processor and the memory are connected through the system bus; the memory is used to store one or more programs, and the one or more programs include instructions that, when executed by the processor, cause the processor to execute any of the above methods.
[0130] Furthermore, the embodiment of the present application also provides a computer program product that, when running on a terminal device, causes the terminal device to execute any of the above methods.
[0131] From the description of the above embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present application.
[0132] It should be noted that the embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.
[0133] It should also be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0134] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. An artificial intelligence-based soil detection and restoration system, characterized in that, Including: A soil data acquisition unit, an artificial intelligence analysis unit, a soil restoration decision-making unit, and an execution feedback unit; among them, The soil data acquisition unit is used to collect soil data of the target area in real time through a sensor cluster and remote sensing equipment to construct a target soil feature set; The artificial intelligence analysis unit is used to classify the target soil feature set by using multiple groups of four-classification models, and integrate the classification results based on the weight coefficients that maximize the total prediction probability to obtain a detection and evaluation result, including: Based on the Bayesian optimization method, iteratively update the weight coefficients corresponding to each group of four-classification models to maximize the total prediction probability of multiple groups of four-classification models and obtain the target weight coefficients; Input the target soil feature set into multiple groups of four-classification models respectively to obtain multiple groups of corresponding four-classification probability value matrices; Multiply the data on each model coordinate axis in the four-classification probability value matrix by the corresponding target weight coefficients respectively, and sum and compress the data on each category coordinate axis in the calculated matrix to obtain the target four-classification probability value; Obtain the category label corresponding to the maximum value in the target four-classification probability value as the detection and evaluation result; The soil restoration decision-making unit is used to input the target soil feature set and the detection and evaluation result into a large language model to generate multiple soil restoration plans with a preset quantity; The execution feedback unit is used to perform semantic extraction on the multiple generated soil restoration plans, and use an inference engine to select the target plan to call one or more target devices to restore the soil in the target area.
2. The soil detection and restoration system according to claim 1, characterized in that, Among them, Collecting soil data of the target area in real time through a sensor cluster and remote sensing equipment to construct a target soil feature set, including: The sensor cluster collects index data including the temperature, humidity, conductivity, pH value, and chemical nutrients of the soil in the target area based on a target time interval to construct a first sensing data sequence; The remote sensing equipment collects soil hyperspectral images of the target area based on a target time interval to construct a remote sensing data sequence; Perform standardization processing on the first sensing data sequence and the remote sensing data sequence respectively, and perform singular value decomposition on the standardized data sequences respectively to extract the corresponding main feature vectors; Construct an orthogonal transformation matrix based on the main feature vectors, and the orthogonal transformation matrix is used to perform fusion calculation on the standardized data sequence to obtain a fusion data sequence; Based on multiple target lag orders, calculate multiple auto-average correlation coefficients corresponding to each index in the overall time series of the first sensing data sequence to obtain a second sensing data sequence; Perform data splicing operations on the first sensing data sequence, the second sensing data sequence, the remote sensing data sequence, and the fusion data sequence based on the acquisition time order to obtain the target soil feature set.
3. The soil detection and restoration system according to claim 2, characterized in that, Among them, Construct an orthogonal transformation matrix based on the main feature vectors, and the orthogonal transformation matrix is used to perform fusion calculation on the standardized data sequence to obtain a fusion data sequence, including: Among them, F kl represents the fusion data sequence of the k-th band and the l-th time slice, α represents the first coefficient, with a value of 1.21, U represents the left singular vector matrix of the first sensing data sequence, represents the first sensing data sequence after normalization, V T represents the transpose of the right singular vector matrix of the first sensing data sequence, β represents the second coefficient, with a value of 0.77, W kl represents the left singular vector matrix of the k-th band of the remote sensing data sequence at the l-th time slice, represents the remote sensing data sequence after normalization, represents the right singular vector matrix of the k-th band of the remote sensing data sequence at the l-th time slice.
4. The soil detection and restoration system according to claim 2, characterized in that, Among them, Based on multiple target lag orders, calculate multiple auto-average correlation coefficients corresponding to each index in the overall time series of the first sensing data sequence, including: Among them, AVG(k) represents the self-average correlation coefficient when the target lag order is k, N represents the total number of time series, H t represents the value of the indicator at time t, H t+k represents the value of the indicator at time t + k, H1 represents the average value of the overall time series where the current indicator is located, H2 represents the median of the overall time series where the current indicator is located, and H3 represents the mode of the overall time series where the current indicator is located.
5. The soil detection and restoration system according to claim 1, characterized in that, Among them, Based on the Bayesian optimization method, iteratively update the weight coefficients corresponding to each group of four-classification models to maximize the total prediction probability of multiple groups of four-classification models, including: Among them, N represents the total number of iterative training samples, M represents the total number of four-classification models, y i represents the true label of the i-th sample, x i represents the feature vector of the i-th sample, α m represents the weight of the m-th four-classification model, P(y i |x i , h m ) represents the probability that the m-th four-classification model predicts that the sample x i belongs to the category y i , and P(y i |x i ) represents the weighted sum of the probabilities that all four-classification models predict that the sample x i belongs to the category y i .
6. The soil detection and restoration system according to claim 1, characterized in that, Among them, Input the target soil feature set and the detection and evaluation results into the large language model to generate multiple soil restoration plans with a preset quantity, including: Extract multiple hidden layers in the large language model, and construct corresponding three-layer fully connected neural networks according to the dimension sizes output by each hidden layer; Insert the constructed multiple groups of three-layer fully connected neural networks into the next layer of the corresponding hidden layer in the large language model respectively to obtain the target large language model; Train the target large language model using historical data, and only update the parameters of the constructed multiple groups of three-layer fully connected neural networks during the training process; Input the target soil feature set and the detection and evaluation results into the trained target large language model to generate multiple soil restoration plans with a preset quantity.
7. The soil detection and restoration system according to claim 1, characterized in that, Among them, Perform semantic extraction on the generated multiple soil restoration plans, and use the inference engine to select the target plan to call one or more target devices to restore the soil in the target area, including: Perform semantic extraction on the generated multiple soil restoration plans respectively to obtain multiple groups of sets including execution actions and corresponding values; Construct an inference engine based on the target rules, and perform decision-making numerical calculations on multiple groups of sets in combination with the first knowledge base respectively to select the corresponding target plan according to the maximum decision-making numerical value; Traverse the set corresponding to the target plan. If the execution action exists in the second knowledge base, call one or more target devices and restore the soil in the target area according to the corresponding value. Otherwise, send the execution action and the corresponding value to the target communication terminal.
8. An artificial intelligence-based soil detection and restoration method, characterized in that, Including: Real-time collect the soil data of the target area through the sensor cluster and remote sensing equipment to construct the target soil feature set; Classify the target soil feature set using multiple groups of four-classification models, and integrate the classification results based on the weight coefficients that maximize the total prediction probability to obtain the detection and evaluation results, including: Based on the Bayesian optimization method, iteratively update the weight coefficients corresponding to each group of four-classification models to maximize the total prediction probability of multiple groups of four-classification models and obtain the target weight coefficients; Input the target soil feature set into multiple groups of four-classification models respectively to obtain multiple groups of corresponding four-classification probability value matrices; Multiply the data on each model coordinate axis in the four-classification probability value matrix by the corresponding target weight coefficients respectively, and sum and compress the data on each category coordinate axis in the calculated matrix to obtain the target four-classification probability value; Obtain the category label corresponding to the maximum value in the target four-classification probability value as the detection and evaluation result; Input the target soil feature set and the detection and evaluation results into the large language model to generate multiple soil restoration plans with a preset quantity; Perform semantic extraction on the generated multiple soil restoration plans, and use the inference engine to select the target plan to call one or more target devices to restore the soil in the target area.
9. An artificial intelligence-based soil detection and restoration device, characterized in that, Including: A processor, a memory, and a system bus; among them, the processor and the memory are connected through the system bus; The memory is used to store one or more programs, the one or more programs including instructions which, when executed by the processor, cause the processor to execute the method according to claim 8.
Citation Information
Patent Citations
Soil nutrient inversion method, device and equipment for crop coverage area and medium
CN116580318A
Soil pollution remediation model training method and system, electronic equipment and medium
CN117035454A