AI-based agricultural service interaction data processing method and server
By encoding the semantic and joint feature of user interaction instructions, and using pre-trained models to generate agricultural operation guidance, the limitations of parameter adjustment in traditional agricultural decision-making are solved, and the precision and efficiency of agricultural production are achieved.
Patent Information
- Application Number
- CN202511016770.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-08-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing agricultural service interactive data processing methods cannot adjust agricultural parameters in time to achieve the best growth effect, and cannot generate flexible operation guidance information based on real-time data and user personalized needs, resulting in disconnection between the operation guidance information and actual production.
By obtaining the interactive instructions of the target user, semantic feature coding and joint feature coding, the pre-trained agricultural parameter adjustment model generates adjustment parameter sequences, iterative optimization of crop growth parameters, and generating diversified agricultural operation guidance information.
It realizes intelligent decision-making from user instruction analysis to agricultural operation guidance, improves the accuracy and efficiency of agricultural production, enhances the ability to adapt to changes in complex environments, and reduces production costs.
Smart Images

Figure CN120524210A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an AI-based agricultural service interactive data processing method and server. Background Art
[0002] In the development of modern agriculture, the integration of information technology and agriculture has become a key direction for improving agricultural production efficiency and quality. However, existing agricultural service interaction data processing methods have many limitations and cannot meet the increasingly complex and sophisticated agricultural production needs.
[0003] Traditional agricultural service models, facing ever-changing crop growth conditions and environmental conditions, cannot timely adjust agricultural parameters to achieve optimal growth results. Furthermore, when generating agricultural operation guidance information, it is often based on preset fixed templates and cannot be flexibly generated based on real-time data and user-specific needs, resulting in a disconnect between operation guidance information and actual production. Summary of the Invention
[0004] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides an AI-based agricultural service interaction data processing method, the method comprising: Obtaining an interaction instruction input by a target user in an agricultural service interaction scenario, the interaction instruction including a target crop growth dataset, an environmental indicator parameter set, and user instruction information; wherein the user instruction information is used to describe a requirement for adjusting at least one parameter of the target crop growth dataset; Performing semantic feature encoding on the user instruction information to generate an instruction feature encoding result, and performing joint feature encoding on the target crop growth dataset and the environmental indicator parameter set to generate a joint growth feature encoding result; Inputting the instruction feature encoding result and the joint growth feature encoding result into a pre-trained agricultural parameter adjustment model, and generating an adjustment parameter sequence matching the parameter adjustment requirement through a dynamic association module in the agricultural parameter adjustment model; The target crop growth data set is iteratively optimized based on the adjustment parameter sequence to generate an optimized crop growth parameter set, and corresponding agricultural operation guidance information is generated based on the optimized crop growth parameter set; wherein the agricultural operation guidance information includes at least one execution instruction of irrigation parameters, fertilization cycle and pest and disease prevention strategy.
[0005] On the other hand, an embodiment of the present invention also provides a server, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium is connected to the processor, the machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.
[0006] Based on the above aspects, the embodiment of the present application realizes the full-link intelligent decision-making from user instruction parsing to agricultural operation guidance, significantly improving the accuracy and efficiency of agricultural production. Specifically, by integrating the target crop growth data set, environmental indicator parameter set and user instruction information, a multi-dimensional agricultural data fusion system is formed. By using semantic feature coding and joint feature coding technology, unstructured user instructions and structured agricultural data are converted into computable representations in a high-dimensional feature space, effectively capturing the intrinsic relationship between crop growth status and user needs. On this basis, the pre-trained agricultural parameter adjustment model can adaptively parse complex instructions and generate adjustment parameter sequences through a dynamic association module. The adjustment parameter sequence not only takes into account the coupling effect of the current growth status of crops and environmental factors, but also incorporates user-specific parameter adjustment requirements, thereby realizing iterative optimization of crop growth parameters, breaking through the limitations of experience dependence and static parameter setting in traditional agricultural decision-making, and generating diversified agricultural operation guidance information including irrigation parameters, fertilization cycles and pest and disease prevention strategies through a data-driven dynamic optimization mechanism. It not only improves the efficiency of agricultural resource utilization and reduces production costs, but also enhances the adaptability of agricultural production to complex environmental changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 It is a schematic diagram of the execution flow of the AI-based agricultural service interactive data processing method provided in an embodiment of the present invention.
[0008] Figure 2 is a schematic diagram of exemplary hardware and software components of a server provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0009] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 This is a flow chart of an AI-based agricultural service interaction data processing method provided by an embodiment of the present invention. The AI-based agricultural service interaction data processing method is introduced in detail below.
[0010] Step S110: Obtaining an interaction instruction input by a target user in an agricultural service interaction scenario, wherein the interaction instruction includes a target crop growth dataset, an environmental indicator parameter set, and user instruction information, wherein the user instruction information is used to describe at least one parameter adjustment requirement for the target crop growth dataset.
[0011] For example, in a large wheat farm, farmers are the target users. The target crop growth dataset contains various data on wheat from sowing to the current growth stage. For example, if the wheat variety is winter wheat, the sowing date was October 15th of last year, and the plant is currently in the jointing stage, the recorded plant height has increased from 10 cm to 20 cm in the past month, and the number of tillers has increased from 3 to 5. The dataset also includes the initial nutrient content of the soil, such as 15 mg of nitrogen per kilogram of soil and 8 mg of phosphorus per kilogram of soil.
[0012] The environmental indicator parameter set is data collected by various sensors installed on the farm. The temperature change sequence shows that the average daytime temperature has gradually increased from 10 degrees Celsius to 15 degrees Celsius in the past week, and the average nighttime temperature has increased from 2 degrees Celsius to 5 degrees Celsius; the humidity change sequence shows that the humidity has dropped from 60% to 40% in the past three days; the light intensity sequence shows that the average daily light duration is 10 hours, and the light intensity can reach 1000 lux on sunny days.
[0013] Regarding user instructions, a farmer discovers that wheat growth is slightly slower than expected and wishes to adjust the parameters of the wheat growth dataset. This instruction can contain multiple sub-instructions, including a text-based sub-instruction such as "Due to slow wheat growth, I wish to adjust my fertilization strategy and increase the amount of nitrogen fertilizer applied," and a voice-based sub-instruction such as "Given the recent low temperatures, I need to adjust my irrigation strategy and reduce the frequency of irrigation." These instructions clearly express the need to adjust the parameters of the target crop growth dataset, such as fertilizer application and irrigation frequency. These requirements are based on a comprehensive consideration of the current wheat growth status and environmental indicators.
[0014] Step S120 , performing semantic feature encoding on the user instruction information to generate an instruction feature encoding result, and performing joint feature encoding on the target crop growth dataset and the environmental indicator parameter set to generate a joint growth feature encoding result.
[0015] Specifically, to encode the semantic features of user instructions, for a farmer's instruction, we can first process the sub-instruction of the text instruction type, "Due to the slow growth of wheat, we wish to adjust the fertilization strategy and increase the amount of nitrogen fertilizer applied." The text encoder is then called to perform word vector conversion on this sub-instruction, converting each word into a corresponding vector. For example, the word "wheat" might be converted into a specific vector, and "slow growth" into a vector representing its semantic meaning. These vectors are then combined to form the corresponding text feature vector.
[0016] For the sub-command of the voice command type, "Taking into account the recent low temperatures, it is necessary to adjust the irrigation strategy and reduce the frequency of irrigation," the speech recognition module is called to convert the speech into text content "Taking into account the recent low temperatures, it is necessary to adjust the irrigation strategy and reduce the frequency of irrigation." This text content is then converted into a word vector to generate the corresponding speech-derived feature vector. Finally, the text feature vectors and speech-derived feature vectors corresponding to these two sub-commands are time-aligned and feature-concatenated to generate the command feature encoding result. For example, in chronological order, the text command comes first, followed by the voice command. When concatenating, they are combined in this order so that each sub-command information is associated with an execution command in the parameter adjustment requirement, in this case, the execution command for fertilization and irrigation.
[0017] For the joint feature coding of the target crop growth dataset and the environmental indicator parameter set, wheat growth stage characteristics were extracted from the target crop growth dataset. For example, wheat has a greater demand for nutrients and water during the jointing stage; soil nutrient distribution characteristics show relatively low nitrogen content in the upper soil layer and a set accumulation of phosphorus content in the lower soil layer; historical yield data shows that the average yield over the past three years was 300 kilograms per mu. Temperature change series, humidity change series, and light intensity series were extracted from the environmental indicator parameter set.
[0018] The wheat growth stage characteristics are aligned with the temperature change sequence using a time window. For example, a one-week time window is used to analyze the temperature changes during the wheat jointing stage within this time window to generate the first correlation feature. The soil nutrient distribution characteristics are spatially mapped with the moisture change sequence. For example, the soil is divided into three layers according to depth, and the relationship between soil moisture and nutrient content in each layer is analyzed to generate the second correlation feature. A trend matching analysis is performed on the historical yield data and the light intensity sequence. For example, in the past three years with high yields, the light intensity was relatively sufficient during the critical growth period of wheat, generating the third correlation feature. Finally, these three correlation features are fused to generate the joint growth feature encoding result.
[0019] Step S130: input the instruction feature coding result and the joint growth feature coding result into a pre-trained agricultural parameter adjustment model, and generate an adjustment parameter sequence matching the parameter adjustment requirement through a dynamic association module in the agricultural parameter adjustment model.
[0020] In detail, the previously generated instruction feature coding results and the joint growth feature coding results can be input into a pre-trained agricultural parameter adjustment model, which is trained by constructing a training sample set through a large number of historical crop growth data sets, historical environmental indicator parameter sets and corresponding historical adjustment parameter sequences.
[0021] The dynamic association module in the agricultural parameter adjustment model includes a multi-level attention submodule and a parameter generation submodule. Within the dynamic association module, the multi-level attention submodule comes into play first. The joint growth feature encoding results are divided into multiple joint feature blocks based on a preset time window length. For example, a three-day window is used as a time window. Each joint feature block contains the fusion features of wheat growth data and environmental indicator parameters within these three days. The instruction feature encoding results are divided into multiple instruction feature segments based on semantic segment boundaries. Each instruction feature segment corresponds to an independent sub-instruction semantic unit.
[0022] A bidirectional similarity calculation is performed on each joint feature block and all instruction feature segments. For example, for a joint feature block containing wheat growth data and temperature and humidity data during the jointing period, a forward cosine similarity calculation is performed with the instruction feature segment for fertilization adjustment. At the same time, a reverse weight matching calculation is performed from the instruction feature segment to the joint feature block to generate a correlation matrix between each joint feature block and each instruction feature segment. The correlation matrices of all instruction feature segments corresponding to the same joint feature block are horizontally spliced to form a block-level correlation tensor. The block-level correlation tensor is then subjected to a maximum pooling operation to extract the maximum response intensity value of each joint feature block relative to different instruction feature segments.
[0023] The joint feature blocks are dynamically sorted based on their maximum response strength values, retaining those with maximum response strength values above a preset activation threshold as valid feature blocks. For example, joint feature blocks with a high correlation with fertilization and irrigation adjustment instructions are selected, and the position coordinates of all valid feature blocks are mapped to a feature space grid. Spatial density clustering analysis is performed on the valid feature blocks in the feature space grid to identify feature block clusters in high-density areas, such as those related to fertilization adjustment and irrigation adjustment. Regional attention weight coefficients are assigned to each feature block cluster, with the fertilization-related cluster being assigned a higher weight coefficient due to its high correlation with fertilization adjustment instructions.
[0024] The regional attention weight coefficients are weighted and fused with the maximum response intensity values of each joint feature block within the corresponding feature block cluster to generate an initial weight distribution map. This initial weight distribution map is then normalized so that the weight values of each region are mapped to the interval [0, 1]. The resolution level of the feature space grid is adjusted based on the normalized weight values. For example, for areas with large variance in the weight value distribution, a fine-grained grid is used to more accurately process features related to fertilization and irrigation adjustments.
[0025] Based on the standardized feature weight distribution map, the environmental indicator parameters in the joint growth feature encoding results are subjected to time-domain smoothing filtering. For example, temperature and humidity data are smoothed to make data fluctuations more consistent with actual patterns. The final weight values of each grid point in the feature weight distribution map are updated. The updated feature weight distribution map is cross-validated with the original instruction feature encoding results through cross-modal cross-validation to generate an optimized feature weight distribution map as the output of the multi-level attention submodule.
[0026] The joint feature subset processed by the multi-level attention submodule is then input into the parameter generation submodule, where it is used by a multi-layer neural network to generate a sequence of predicted adjustment parameters. This sequence includes specific adjustment parameters for wheat fertilization and irrigation, such as increasing nitrogen fertilizer application by 10 kilograms per hectare or adjusting irrigation frequency from three times a week to twice a week.
[0027] Step S140: Iteratively optimize the target crop growth dataset based on the adjustment parameter sequence to generate an optimized crop growth parameter set, and generate corresponding agricultural operation guidance information based on the optimized crop growth parameter set. The agricultural operation guidance information includes at least one execution instruction of irrigation parameters, fertilization cycles, and pest and disease prevention strategies.
[0028] Specifically, the target crop growth dataset can be iteratively optimized based on the adjustment parameter sequence. The fertilization parameters in the adjustment parameter sequence can be used to adjust the nutrient replenishment timing and fertilizer application rate in the target crop growth dataset. For example, if fertilization was originally planned to be applied once during the jointing stage, an additional fertilization can be added, and the nitrogen fertilizer application rate during the first fertilization can be increased from 100 kg per hectare to 110 kg. Furthermore, the soil moisture threshold in the target crop growth dataset can be adjusted based on the irrigation parameters in the adjustment parameter sequence, raising the original soil moisture lower limit from 30% to 35% to reduce irrigation frequency.
[0029] The adjusted soil moisture threshold, nutrient replenishment time node, fertilizer application amount and other parameters are combined to generate an optimized crop growth parameter set.
[0030] Generate corresponding agricultural operation guidance information based on the optimized crop growth parameter set. This optimized crop growth parameter set is input into a pre-trained strategy generation model, which then generates an initial agricultural operation strategy through the decision tree branching module within the strategy generation model. For example, the decision tree branching module generates preliminary irrigation and fertilization operation strategies based on parameters such as soil moisture and fertilizer application amount, including specific irrigation timing, fertilization timing, and fertilizer application amount.
[0031] The feasibility of the initial agricultural operation strategy is verified to see if the maximum water supply capacity of the farm's irrigation equipment can meet the new irrigation strategy, whether fertilizer inventory is sufficient to support the increased fertilizer application rate, and whether pesticide use complies with relevant regulations. If the farm's irrigation equipment has a maximum water supply capacity of 10 cubic meters per hour, and the new irrigation strategy requires 8 cubic meters per hour, fertilizer inventory is sufficient, and pesticide use complies with regulations, then the feasibility verification results meet the execution conditions of the initial agricultural operation strategy. The initial agricultural operation strategy is then confirmed as the final agricultural operation guidance information, such as determining that irrigation will occur every Tuesday and Friday, with a set irrigation amount each time, and fertilizing on specific days.
[0032] If the maximum water supply capacity of the irrigation equipment can only reach 6 cubic meters per hour, which cannot meet the 8 cubic meters per hour requirement of the new irrigation strategy, then the parameters in the initial agricultural operation strategy are constrained and adjusted, such as reducing the amount of irrigation each time, and the adjusted agricultural operation guidance information is generated to ensure the feasibility of the operation.
[0033] Based on the above steps, the embodiment of the present application realizes the full-link intelligent decision-making from user instruction parsing to agricultural operation guidance, significantly improving the accuracy and efficiency of agricultural production. Specifically, by integrating the target crop growth data set, environmental indicator parameter set and user instruction information, a multi-dimensional agricultural data fusion system is formed. By using semantic feature coding and joint feature coding technology, unstructured user instructions and structured agricultural data are converted into computable representations in a high-dimensional feature space, effectively capturing the intrinsic relationship between crop growth status and user needs. On this basis, the pre-trained agricultural parameter adjustment model can adaptively parse complex instructions and generate adjustment parameter sequences through a dynamic association module. The adjustment parameter sequence not only takes into account the coupling effect of the current growth status of crops and environmental factors, but also incorporates user-specific parameter adjustment requirements, thereby realizing iterative optimization of crop growth parameters, breaking through the limitations of experience dependence and static parameter setting in traditional agricultural decision-making, and generating diversified agricultural operation guidance information including irrigation parameters, fertilization cycles and pest and disease prevention strategies through a data-driven dynamic optimization mechanism. It not only improves the efficiency of agricultural resource utilization and reduces production costs, but also enhances the adaptability of agricultural production to complex environmental changes.
[0034] In a possible implementation, the user instruction information includes a plurality of sub-instruction information, and the information types of the sub-instruction information include a text instruction type and a voice instruction type.
[0035] Step S120 includes: Step S121: For each sub-instruction information, if its information type is a text instruction type, call a text encoder to convert the sub-instruction information into a word vector to generate a corresponding text feature vector.
[0036] Continuing with the wheat farm example, for a text-based sub-instruction, such as "Due to the slow growth of wheat during the jointing phase, additional nitrogen fertilizer is required, increasing the fertilizer application rate by 20%," a text encoder is called to convert this sub-instruction into a word vector. The text encoder maps each word to a specific vector space. The word "wheat" is converted into a vector representing its semantic meaning, and words such as "jointing phase," "slow growth," "supplemental nitrogen fertilizer," "fertilizer application rate," and "increase by 20%" are all converted into corresponding vectors. The dimensions and values of these vectors are determined by the text encoder based on pre-set rules and training data. Assuming the text encoder converts each word into a 100-dimensional vector, the resulting sub-instruction is a text feature vector composed of multiple 100-dimensional vectors. This text feature vector represents the semantic information of the sub-instruction to a certain degree.
[0037] Step S122: If the information type is a voice command type, call the voice recognition module to convert the sub-command information into text content, and perform word vector conversion on the text content to generate a corresponding voice-derived feature vector.
[0038] For sub-commands of the voice command type, for example, a farmer enters, "Considering the recent short daylight hours, we need to adjust our irrigation strategy and reduce the irrigation volume by 10% each time." The speech recognition module first converts this voice command into text: "Considering the recent short daylight hours, we need to adjust our irrigation strategy and reduce the irrigation volume by 10% each time." This text is then converted to a word vector, again assuming it is converted to a 100-dimensional vector, to obtain the corresponding speech-derived feature vector.
[0039] Step S123: Time-sequence alignment and feature concatenation of the text feature vectors and speech-derived feature vectors corresponding to all sub-command information are performed to generate the command feature encoding result. Each sub-command information is associated with an execution instruction in the parameter adjustment requirement.
[0040] Since text instructions may be input before voice instructions, alignment is performed in this time sequence. During concatenation, the text feature vector and the voice-derived feature vector are sequentially connected to form a new vector. This vector is the instruction feature encoding result, and each sub-instruction information is associated with an execution instruction in the parameter adjustment requirement. For example, the text instruction mentioned above is associated with the fertilization execution instruction, and the voice instruction is associated with the irrigation execution instruction. In this way, in subsequent processing, the corresponding operation can be accurately performed according to the instruction feature encoding result.
[0041] Step S124 , extracting crop growth stage characteristics, soil nutrient distribution characteristics, and historical yield data from the target crop growth dataset.
[0042] In the wheat planting scenario, relevant features were extracted from the target crop growth dataset. Regarding crop growth stage characteristics, wheat is in the jointing stage. During this stage, wheat growth accelerates, nutrient and water requirements increase, internodes begin to elongate rapidly, and the number and area of leaves also increase. Soil nutrient distribution characteristics show that the nitrogen content in the upper soil layer (0-10 cm) is 12 mg / kg and the phosphorus content is 6 mg / kg; the nitrogen content in the 10-20 cm layer is 10 mg / kg and the phosphorus content is 5 mg / kg. Historical yield data shows that the farm's average wheat yield over the past three years has been 300 kg / mu, with the highest yield reaching 320 kg / mu the year before last.
[0043] Step S125 , extracting a temperature change sequence, a humidity change sequence, and a light intensity sequence from the environmental indicator parameter set.
[0044] For example, the temperature series shows that over the past two weeks, the average daytime temperature has gradually increased from 12°C to 16°C, while the average nighttime temperature has risen from 3°C to 6°C. The humidity series shows that over the past five days, the humidity has decreased from 55% to 45%. The light intensity series shows that the average daily sunlight duration is 9 hours, with light intensity reaching 800 lux on sunny days and around 300 lux on cloudy days.
[0045] Step S126, align the growth stage characteristics with the temperature change sequence in a time window to generate a first correlation feature, perform spatial area mapping on the soil nutrient distribution characteristics and the humidity change sequence to generate a second correlation feature, and perform trend matching analysis on the historical yield data and the light intensity sequence to generate a third correlation feature.
[0046] Taking a week as a time window, during the jointing period, the temperature rises from 12 to 14 degrees Celsius. Wheat growth also accelerates with the temperature increase. By analyzing this relationship, we generate a first correlation feature. For example, statistical analysis shows that for every 1 degree Celsius increase in temperature, the daily growth height of wheat increases by 0.1 centimeters, which is a manifestation of a correlation feature.
[0047] Further, stratifying the soil by depth, we found that for the upper soil layer (0-10 cm), when the moisture content dropped from 55% to 45%, the nitrogen availability in the soil decreased due to the reduced water content, leading to a decrease in nitrogen absorption efficiency by wheat. Calculating the percentage of nitrogen availability reduction, we assumed that the original percentage of nitrogen available for wheat absorption was 60%, and that the decrease in moisture content reduced it to 40%. Therefore, the availability reduction is (60% - 40%) = 20%. This relationship is part of the second correlation feature.
[0048] Furthermore, over the past three years, the highest yield year saw abundant sunlight during the critical wheat growth period, reaching an average of 900 lux. Last year, the year with the lowest yield, saw an average of only 700 lux during this critical period. Comparing these data reveals a trend relationship between light intensity and yield: for example, a 100 lux increase in light intensity is associated with a 10 kg / mu increase in yield. This is the third correlation characteristic.
[0049] Step S127: fusing the first correlation feature, the second correlation feature, and the third correlation feature to generate the joint growth feature encoding result.
[0050] In this embodiment, the combined growth feature coding result integrates the relationship between wheat growth stage, soil nutrients, historical yield and environmental factors such as temperature, humidity, and light, and can comprehensively reflect the relationship between wheat growth and the environment.
[0051] In a possible implementation, the agricultural parameter adjustment model is trained by the following steps: Step S210 , obtaining a historical crop growth data set, a historical environmental indicator parameter set, and a corresponding historical adjustment parameter sequence, and constructing a training sample set.
[0052] In the wheat farm scenario, the historical crop growth dataset covers various data from past years of wheat cultivation. For example, data on wheat sowing dates, variety information, plant height, number of tillers, and leaf area index at various growth stages over the past five years are available. For example, a winter wheat variety planted in 2018, sown on October 10th, saw its plant height grow from 5 cm to 10 cm during the wintering period, and its tiller number increased from 2 to 4. The same variety planted in 2019, due to warmer weather, had its sowing date brought forward to October 5th. During the wintering period, its plant height grew from 6 cm to 12 cm, and its tiller number increased from 3 to 5. The historical environmental indicator parameter set includes temperature fluctuations for the corresponding years, such as the average winter minimum temperature in 2018, which was -5°C, and in 2019, which was -3°C. Humidity data shows that humidity fluctuated between 40% and 60% during the jointing period in 2018 and between 35% and 55% in 2019. Light intensity is also detailed, including the duration and intensity of sunlight on sunny and cloudy days in different years. The historical adjustment parameter sequence records adjustments made to these growth and environmental conditions. For example, in 2018, due to slower wheat growth during the winter, fertilizer application rates were increased by 15%, and irrigation frequency was adjusted from once a week to twice a week. In 2019, due to lower humidity during the jointing period, irrigation rates were increased by 10% each time. These data together constitute the training sample set.
[0053] Step S220: constructing an initial agricultural parameter adjustment model, wherein the initial agricultural parameter adjustment model includes an instruction encoding module, a joint encoding module, and a dynamic association module.
[0054] The parameters of the initial agricultural parameter adjustment model are randomly initialized. For example, the weight matrix in the instruction encoding module is initialized to some random values, and some internal parameters of the joint encoding module are also initialized to random numbers. The same is true for the parameters of the multi-level attention submodule and the parameter generation submodule in the dynamic association module.
[0055] Step S230: Input the historical crop growth dataset and the historical environmental indicator parameter set in the training sample set into the joint encoding module to generate sample joint features. Input the historical user instruction information in the training sample set into the instruction encoding module to generate sample instruction features.
[0056] In the joint encoding module, growth stage features, soil nutrient distribution characteristics, and historical yield data, similar to those mentioned above, are extracted from historical crop growth datasets. For example, in 2018, during the jointing stage of wheat growth, the nitrogen content in the upper soil layer was 13 mg / kg, the phosphorus content was 7 mg / kg, and the historical yield was 280 kg / mu. Temperature, humidity, and light intensity sequences are extracted from the historical environmental parameter set. For example, during the jointing stage in 2018, the temperature fluctuated between 10 and 15 degrees Celsius, the humidity fluctuated between 40% and 60%, and the light intensity averaged 800 lux on sunny days. This data is fused using a specific encoding method to generate sample joint features. Simultaneously, historical user command information from the training sample set is input into the command encoding module to generate sample command features. Historical user command information may include instructions such as "Due to the low temperatures during the jointing stage in 2018, it is necessary to increase fertilizer application to promote growth." The command encoding module encodes these instructions to generate sample command features.
[0057] Step S240: performing feature association calculation on the sample joint feature and the sample instruction feature through the dynamic association module to generate a prediction adjustment parameter sequence.
[0058] Step S250, calculating the difference loss value between the predicted adjustment parameter sequence and the historical adjustment parameter sequence, and updating the parameters of the initial agricultural parameter adjustment model according to the difference loss value until convergence, to obtain a trained agricultural parameter adjustment model.
[0059] In this embodiment, the difference loss value is calculated by comparing the differences between corresponding elements in the predicted adjustment parameter sequence and the historical adjustment parameter sequence. For example, if the predicted fertilizer application rate increases by 12% and the actual historical increase is 15%, the difference between the two is calculated to be 3%. This difference calculation is performed for all adjustment parameters, and then these differences are combined using a specific loss function (such as the mean squared error loss function) to obtain a total difference loss value. Based on this difference loss value, the parameters of the initial agricultural parameter adjustment model are updated using the backpropagation algorithm. Starting from the output layer, the backpropagation algorithm calculates the gradient of each parameter based on the loss value. The parameters in the model are then updated according to the set learning rate. For example, if the learning rate is set to 0.01 and the gradient of a parameter is 0.5, the parameter is updated to the original value minus 0.01 multiplied by 0.5. This process is repeated until the difference loss value reaches a very small value (convergence), at which point the trained agricultural parameter adjustment model is obtained. This agricultural parameter adjustment model can be used for parameter adjustment in actual wheat planting scenarios.
[0060] In one possible implementation, the dynamic association module includes a multi-level attention submodule and a parameter generation submodule.
[0061] Step S240 includes: Step S241: Perform cross-modal attention calculation on the sample joint features and sample instruction features through the multi-level attention sub-module to generate a feature weight distribution map.
[0062] Step S242 : performing weighted screening on the sample joint features according to the feature weight distribution map to generate a screened joint feature subset.
[0063] For example, if the weight of a joint feature block in the feature weight distribution graph is 0.8, then all elements in the joint feature block are multiplied by 0.8, and then according to the set filtering threshold, the joint feature blocks with larger values after weight adjustment are retained as the filtered joint feature subset.
[0064] Step S243: input the filtered joint feature subset into the parameter generation submodule, and generate the prediction adjustment parameter sequence through a multi-layer neural network.
[0065] Each layer of a multi-layer neural network performs specific linear and nonlinear transformations on the input data. For example, the first layer performs a weighted sum of the joint feature subsets of the input and adds a bias term. It then performs a nonlinear transformation using an activation function (such as the ReLU function). The transformed result serves as the input to the next layer. After multiple layers of this processing, a sequence of predicted adjustment parameters is ultimately generated. For example, the predicted adjustment parameter for fertilizer application during the jointing period in 2018 might be a 12% increase, and the adjustment parameter for irrigation application might be an 8% increase each time.
[0066] In a possible implementation, step S241 includes: Step S2411: Divide the sample joint feature into multiple joint feature blocks based on a preset time window length, and divide the sample instruction feature into multiple instruction feature segments based on semantic paragraph boundaries. Each joint feature block contains fused features of crop growth data and environmental indicator parameters for a continuous time interval, and each instruction feature segment corresponds to an independent sub-instruction semantic unit.
[0067] In the wheat farm scenario, taking historical data from a wheat farm as an example, assuming a preset time window length of one week, the sample joint features include data from multiple years of wheat cultivation. For example, a sample joint feature block for a week in 2018 includes wheat growth data for that week, such as plant height increasing from 10 cm to 12 cm, the number of tillers remaining at 3, and environmental parameters such as temperature between 12°C and 15°C and humidity between 40% and 50%. These crop growth data and environmental parameters are integrated to form a joint feature block. Regarding sample instruction features, for example, the historical instruction "Due to low temperatures and slow wheat growth during that week of 2018, increase nitrogen fertilizer application by 15% and increase irrigation frequency" is a single instruction feature segment, "increase nitrogen fertilizer application by 15%" is a single instruction feature segment, and "increase irrigation frequency" is a single instruction feature segment. Each instruction feature segment corresponds to an independent sub-instruction semantic unit.
[0068] Step S2412: Perform a bidirectional similarity calculation on each joint feature block and all instruction feature segments to generate a correlation matrix between each joint feature block and each instruction feature segment. The bidirectional similarity calculation includes a forward cosine similarity from the joint feature block to the instruction feature segment and a reverse weighted matching from the instruction feature segment to the joint feature block.
[0069] For example, to calculate forward cosine similarity, consider a joint feature block from 2018 and the instruction feature segment "Increase nitrogen fertilizer application by 15%." The elements in the joint feature block, which include wheat growth data and environmental parameters, are converted into vectors, and the elements in the instruction feature segment are also converted into vectors. The dot product of the vectors is calculated. For example, if the joint feature block vector is [1, 2, 3] (this is just a simplified example) and the instruction feature segment vector is [4, 5, 6], the dot product is 1×4 + 2×5 + 3×6 = 32. The modulus of the two is then calculated. The modulus of the joint feature block vector is square root of (1² + 2² + 3²) = square root of 14, while the modulus of the instruction feature segment vector is square root of (4² + 5² + 6²) = square root of 77. The forward cosine similarity is the dot product divided by the modulus product, or 32 / (root 14 × root 77), resulting in a value between 0 and 1 representing the degree of similarity between the joint feature block and the instruction feature segment. For the reverse weighted matching calculation, each element in the instruction feature segment is assumed to have a preset importance weight. For example, in the instruction feature segment "Increase nitrogen fertilizer application by 15%," the "nitrogen fertilizer" element has a weight of 0.6, and the "15%" element has a weight of 0.4. The elements in the joint feature block are matched against these weights. For example, if there is a data element about soil nitrogen content in the joint feature block, it is multiplied by the weight of the "nitrogen fertilizer" element. The result of multiplying the other relevant elements by their corresponding weights is then added to produce a reverse weighted matching value. This generates a correlation matrix between each joint feature block and each instruction feature segment.
[0070] In step S2413, the correlation matrices of all instruction feature segments corresponding to the same joint feature block are horizontally spliced to form a block-level correlation tensor, and the block-level correlation tensor is subjected to a maximum pooling operation to extract the maximum response intensity value of each joint feature block relative to different instruction feature segments.
[0071] For example, for a joint feature block from 2018, its correlation matrices with three instruction feature segments are [0.3, 0.4], [0.5, 0.6], and [0.2, 0.3], respectively. After horizontal concatenation, the resulting block-level correlation tensor is [0.3, 0.4, 0.5, 0.6, 0.2, 0.3]. Max pooling is performed on the block-level correlation tensor to extract the maximum response strength value of each joint feature block relative to different instruction feature segments. In this block-level correlation tensor, the maximum response strength value is 0.6.
[0072] Step S2414 , dynamically sorting the joint feature blocks according to the maximum response strength value, retaining the joint feature blocks whose maximum response strength value is higher than the preset activation threshold as valid feature blocks, and mapping the position coordinates of all valid feature blocks to the feature space grid.
[0073] Assuming a preset activation threshold of 0.5, sort the maximum response intensity values calculated for the joint feature blocks for all years and select those with a maximum response intensity greater than 0.5 as valid feature blocks. For example, the joint feature blocks for a week in 2018 and a week in 2019 meet the criteria and become valid feature blocks. The position coordinates of all valid feature blocks are mapped to a feature space grid. Assuming the feature space grid is a two-dimensional plane, the position coordinates (x, y) of each valid feature block are determined by its position in the data. For example, the coordinates of a valid feature block for a week in 2018 are (1, 2), and the coordinates of a valid feature block for a week in 2019 are (3, 4), and so on.
[0074] Step S2415: Perform spatial density cluster analysis on the valid feature blocks in the feature space grid to identify feature block clusters in high-density areas and assign a regional attention weight coefficient to each feature block cluster, wherein the regional attention weight coefficient is positively correlated with the density value of the feature block cluster.
[0075] Specifically, the density is determined by calculating the number of valid feature blocks in each region. For example, if there are five valid feature blocks in the region (1-3, 2-4) and two valid feature blocks in the region (5-7, 6-8), the former has a higher density. A regional attention weight coefficient is assigned to each feature block cluster, which is positively correlated with the density of the feature block cluster. For example, a region with a density of 5 has an attention weight of 0.8, while a region with a density of 2 has an attention weight of 0.4.
[0076] Step S2416: perform weighted fusion on the regional attention weight coefficient and the maximum response intensity value of each joint feature block in the corresponding feature block cluster to generate an initial weight distribution map.
[0077] For example, in an area with a density of 5, there is a joint feature block with a maximum response intensity value of 0.6. After weighted fusion, its weight in the initial weight distribution map is 0.8×0.6 = 0.48.
[0078] Step S2417 normalizes the initial weight distribution map so that the weight values of each region are mapped to the interval [0, 1]. The resolution level of the feature space grid is adjusted based on the normalized weight values to generate a standardized feature weight distribution map. The resolution level is proportional to the distribution variance of the weight values. High-variance regions are divided using a fine-grained grid, while low-variance regions are divided using a coarse-grained grid.
[0079] Calculate the sum of the weights for all regions. Suppose the sum is 10. If a region has a weight of 4, then the normalized weight is 4 / 10 = 0.4. Adjust the resolution of the feature space grid based on the normalized weight value to generate a standardized feature weight distribution map. The resolution level is proportional to the variance of the weight distribution. Regions with high variance use a finer-grained grid, while regions with low variance use a coarser-grained grid. For example, if the variance of the weight distribution in a region is large, the grid in that region can be divided into finer grid cells, from the original 1×1 grid cells to 0.5×0.5 grid cells, to more accurately represent the weight distribution.
[0080] Step S2418: Based on the standardized feature weight distribution map, perform time domain smoothing filtering on the environmental indicator parameters in the sample joint features, and update the final weight value of each grid point in the feature weight distribution map.
[0081] For example, for temperature data in environmental indicators, such as the temperature data for a certain week in 2018, which was 12, 13, 14, and 15 degrees Celsius, time-domain smoothing filtering is used to calculate the average of adjacent temperature data: (12 + 13) / 2 = 12.5, (13 + 14) / 2 = 13.5, and so on. These averages are then used to update the original temperature data. Simultaneously, the final weights of each grid point in the feature weight distribution map are updated based on the smoothed environmental indicator parameters. For example, if the environmental indicator corresponding to a grid point has a stronger correlation with fertilization adjustment after smoothing, the weight of that grid point is appropriately increased.
[0082] Step S2419, cross-modal cross-validation is performed on the updated feature weight distribution map and the original sample instruction features to generate an optimized feature weight distribution map as the output result of the multi-level attention sub-module.
[0083] In detail, the weight information in the updated feature weight distribution map is cross-validated with the semantic information in the original sample instruction features. For example, a certain instruction feature segment involves fertilization adjustment. In the updated feature weight distribution map, the weight distribution related to fertilization adjustment is more reasonable. Based on this rationality, the weight distribution map is further optimized, and finally the optimized feature weight distribution map is obtained as the output result of the multi-level attention sub-module. The output result will be used for subsequent weighted screening and other operations to better adjust the relevant parameters of wheat planting.
[0084] In a possible implementation, step S140 includes: Step S141 : adjusting the soil moisture threshold in the target crop growth dataset according to the irrigation parameters in the adjustment parameter sequence.
[0085] For example, the irrigation parameters in the adjusted parameter sequence indicate that due to recent dry weather and the increased water demand of wheat during the jointing stage, the lower limit of soil moisture needs to be raised from 30% to 35%. In the target crop growth dataset, the original soil moisture threshold was 30%, but it has now been updated to 35% based on the adjusted parameter sequence. This means that in practice, irrigation is required when soil moisture drops to 35%, rather than the previous 30%.
[0086] Step S142: adjusting the nutrient supplementation time node in the target crop growth data set according to the fertilization cycle in the adjustment parameter sequence.
[0087] Suppose the fertilization cycle in the parameter adjustment sequence shows that to meet the rapid growth requirements of wheat during the jointing stage, the original plan to fertilize once in the middle of the jointing period now requires fertilization once at the beginning of the jointing period and once in the middle. Therefore, in the target crop growth dataset, the nutrient replenishment time node data is updated from a single middle moment to two time nodes at the beginning and middle of the jointing period to better provide nutrients to the wheat.
[0088] Step S143 : updating the pesticide spraying frequency and dosage parameters in the target crop growth dataset according to the pest prevention strategy in the adjustment parameter sequence.
[0089] If the pest prevention strategy, based on recent pest monitoring data, shows an increasing population density of a particular pest, the pesticide spraying frequency in the adjustment parameter sequence is increased from once every two weeks to once a week, and the dosage is increased from 500 ml per hectare to 800 ml per hectare. Accordingly, the pesticide spraying frequency and dosage parameters in the target crop growth dataset are updated from their original values to the new values.
[0090] Step S144 , combining the adjusted soil moisture threshold, nutrient replenishment time node, and pesticide spraying frequency to generate the optimized crop growth parameter set.
[0091] The optimized crop growth parameter set includes all key parameters related to wheat growth after adjustment, such as the soil moisture threshold of 35%, the nutrient replenishment time nodes at the beginning and middle of the jointing period, and the pesticide spraying frequency of once a week. These parameters will serve as the basis for the subsequent generation of agricultural operation guidance information.
[0092] Step S145 , inputting the optimized crop growth parameter set into a pre-trained strategy generation model, and generating an initial agricultural operation strategy through a decision tree branch module in the strategy generation model.
[0093] Taking a wheat farm as an example, the decision tree branching module in the strategy generation model analyzes the input optimized crop growth parameter set. If the soil moisture threshold is 35%, the decision tree branching module can generate an initial irrigation operation strategy based on this parameter and internal predefined rules. For example, it can determine that the irrigation volume per time is 50 cubic meters per hectare, and the irrigation time is selected in the morning or evening to reduce water evaporation. For nutrient replenishment time nodes at the beginning and middle of the jointing period, the decision tree branching module will generate a fertilization operation strategy based on the fertilizer type and soil nutrient status. For example, at the beginning of the jointing period, a nitrogen-based compound fertilizer is applied at a rate of 150 kilograms per hectare, and at the middle of the period, a fertilizer containing phosphorus and potassium is applied at a rate of 100 kilograms per hectare. For pesticide spraying frequency of once a week, the decision tree branching module will generate a pesticide spraying operation strategy based on the type of pest and disease and the characteristics of the pesticide, such as using a specific insecticide, prepared according to the specified dilution ratio, and then spraying.
[0094] Step S146 , verifying the feasibility of the initial agricultural operation strategy, including detecting the maximum water supply capacity of the irrigation equipment, the fertilizer inventory, and the compliance of pesticide use.
[0095] On a wheat farm, the maximum water supply capacity of the irrigation equipment is a key factor. Assuming the maximum water supply capacity of the farm's irrigation equipment is 10 cubic meters per hour, if the initial agricultural operation strategy requires an irrigation volume of 8 cubic meters per hour, then the water supply capacity is feasible. Regarding fertilizer inventory, if the total amount of fertilizer required to be applied in the fertilization operation strategy generated by the decision tree branch module is 10 tons, and the farm's current fertilizer inventory is 15 tons, then the fertilizer inventory requirements are also met. Regarding the compliance of pesticide use, it is necessary to check whether the pesticides used are within the range permitted by the local agricultural department and whether they are operated in accordance with the prescribed dosage, safety interval, and other requirements. If the pesticides used in the initial agricultural operation strategy are licensed and the usage method complies with regulations, then the compliance of pesticide use is also feasible.
[0096] Step S147: If the feasibility verification result meets the execution condition of the initial agricultural operation strategy, the initial agricultural operation strategy is determined as the final agricultural operation guidance information.
[0097] For example, if all the parameters of the above-mentioned irrigation, fertilization and pesticide spraying meet the requirements in the feasibility verification, then the initial agricultural operation strategy initially generated by the decision tree branch module, including irrigation amount, fertilization amount, fertilization time, pesticide spraying type, dosage and time, will be determined as the final agricultural operation guidance information, and the farm can carry out wheat planting management operations according to this agricultural operation guidance information.
[0098] Step S148: If the feasibility verification result does not meet the execution condition, the parameters in the initial agricultural operation strategy are constrained and adjusted to generate adjusted agricultural operation guidance information.
[0099] Assuming the maximum water supply capacity of the irrigation equipment is only 6 cubic meters per hour, while the initial agricultural operation strategy calls for 8 cubic meters per hour, the irrigation rate needs to be adjusted. The irrigation rate can be recalculated based on the water supply capacity and the actual water demand of the wheat, for example, adjusted to 5 cubic meters per hour. The irrigation time can also be adjusted accordingly or the number of irrigations can be increased to ensure that the wheat receives sufficient water. In the case of insufficient fertilizer inventory, if the amount of fertilizer required by the fertilization operation strategy exceeds the inventory, it is necessary to reduce the amount of fertilizer applied or adjust the type of fertilizer, using the existing fertilizer in stock to make a reasonable combination. In the case of non-compliant pesticide use, it is necessary to replace it with a compliant pesticide and re-determine parameters such as the dosage and spraying time based on the characteristics of the new pesticide to generate the adjusted agricultural operation guidance information.
[0100] The strategy generation model is trained on multiple tasks through a joint training module, including: Step S310: Acquire a first training task data set, where the first training task data set includes a mapping relationship between crop growth parameters and agricultural operation strategies.
[0101] In the wheat planting scenario, the crop growth parameters in the first training task dataset include, for example, soil fertility level, wheat variety, plant height and tiller number at different growth stages. The corresponding agricultural operation strategies include fertilizer application rates for different fertility levels, appropriate sowing times and densities for different wheat varieties, and irrigation and pest control strategies based on plant height and tiller number. For example, in conditions with high soil fertility, the fertilizer application rate is relatively low; for short-stemmed wheat varieties, the sowing density can be appropriately increased.
[0102] Step S320: Acquire a second training task data set, where the second training task data set includes a mapping relationship between environmental abnormal events and emergency strategies.
[0103] In the wheat planting scenario, abnormal environmental events may include drought, flooding, low temperature and freezing damage, and outbreaks of pests and diseases. For example, in the event of a drought, the emergency strategy may be to increase the frequency and amount of irrigation per irrigation, while also implementing water conservation measures such as mulching. The emergency strategy for flooding is to drain water promptly, adjust soil aeration, and supplement nutrients when necessary to restore wheat growth. When low temperature and freezing damage occurs, the emergency strategy is to implement warming measures such as covering with straw. When pests and diseases break out, the emergency strategy is to increase the frequency and dosage of pesticide spraying, and to use biological or physical control methods as an auxiliary measure.
[0104] Step S330: alternately train the first training task data set and the second training task data set through the joint training module to calculate the first task loss value and the second task loss value.
[0105] During the alternating training process, the strategy generation model is first trained using the first training task dataset. The first task loss value is calculated based on the mapping relationship between the model's predictions and actual crop growth parameters and agricultural operation strategies. For example, if the model's predicted fertilizer application rate differs significantly from the actual required fertilizer application rate, a numerical value representing the magnitude of the difference is calculated using a predefined calculation method (such as mean squared error) as the first task loss value. Training is then performed using the second training task dataset. Similarly, the second task loss value is calculated based on the mapping relationship between the model's predicted emergency response strategies and actual environmental anomalies and emergency response strategies. For example, in the event of drought, if the model's predicted irrigation amount differs from the actual required irrigation amount, the second task loss value is calculated.
[0106] Step S340: Perform weighted fusion on the first task loss value and the second task loss value to generate a joint loss function, and update the parameters of the strategy generation model according to the joint loss function.
[0107] Assuming the loss value of the first task is 0.3 and the loss value of the second task is 0.5, and the weight of the first task is set to 0.4 and the weight of the second task is set to 0.6, then the weighted fusion joint loss function value is 0.4 × 0.3 + 0.6 × 0.5 = 0.42. Based on this joint loss function value, the backpropagation algorithm is used to update the parameters in the policy generation model. Starting from the output layer of the model, the backpropagation algorithm calculates the gradient of each parameter based on the joint loss function value. Then, the parameters in the model are updated according to a set learning rate (such as 0.01). For example, if the gradient of a parameter is 0.2, the parameter is updated to the original value minus 0.01 × 0.2. By repeating this process, the policy generation model becomes more accurate in mapping crop growth parameters to agricultural operation strategies and mapping environmental anomalies to emergency response strategies.
[0108] In one possible implementation, the method further includes: Step S410: After the agricultural operation guidance information is generated, the agricultural operation guidance information is converted into voice broadcast content through a voice synthesis module.
[0109] For example, previously defined agricultural operation guidance includes an irrigation strategy for wheat during the jointing stage: irrigation on Monday, Wednesday, and Friday mornings, with a rate of 50 cubic meters per hectare per session. A fertilization strategy involves applying a nitrogen-based compound fertilizer at the beginning of the jointing stage at a rate of 150 kilograms per hectare, followed by a phosphorus-potassium fertilizer at a rate of 100 kilograms per hectare during the intervening stages. A pest control strategy involves spraying a specific insecticide once a week at a rate of 800 milliliters per hectare. The speech synthesis module converts this information into spoken content, such as "During the wheat jointing stage, irrigation should be carried out on Monday, Wednesday, and Friday mornings, with a rate of 50 cubic meters per hectare per session. At the beginning of the jointing stage, apply a nitrogen-based compound fertilizer at a rate of 150 kilograms per hectare, followed by a phosphorus-potassium fertilizer at a rate of 100 kilograms per hectare during the intervening stages. A specific insecticide should be sprayed once a week at a rate of 800 milliliters per hectare." Step S420: synchronously sending the voice broadcast content and the text-based operation step chart to the user terminal.
[0110] Specifically, the operation step chart presents the entire process in clear tables and graphics. The table lists the time, content, and dosage of each operation. For example, the first row may display "Irrigation: Monday, Wednesday, and Friday mornings, 50 cubic meters per hectare." The graphic may be a simple timeline, indicating the timing of fertilization and pest control, and their relationship to the wheat growth stage. This way, farmers can hear the voice broadcast content and see the detailed text operation step chart on the user terminal, making it easier for them to operate.
[0111] Step S430: receiving a command execution confirmation signal fed back by the user terminal, and updating the current state of the target crop growth dataset according to the confirmation signal.
[0112] For example, after a farmer completes the irrigation, fertilization, and pest control operations as required, they click the confirmation button on the user terminal and receive a confirmation signal confirming the execution of the instruction. Based on this confirmation signal, the system updates the current status of the target crop growth dataset. Suppose that before the operation is executed, the target crop growth dataset shows that the wheat moisture content is expected to be 60%, the soil nutrient content before fertilization is the set value, and the pest threat level is medium. After receiving the confirmation signal, the dataset is updated based on the actual operation, such as calculating the actual soil moisture change based on the irrigation amount, updating the soil nutrient content based on the fertilization amount and type, and adjusting the pest threat level based on the pest control operation.
[0113] Step S440 : When it is detected that there is a deviation between the current state and the optimized crop growth parameter set, a deviation warning message is generated and the parameter adjustment process is re-triggered.
[0114] For example, after a period of time, the sensor detects that the soil moisture is decreasing faster than expected, which may cause the actual soil moisture to fall below the soil moisture threshold in the optimized crop growth parameter set. Or it may be found that the wheat growth rate is slower than expected, and the actual plant height growth and tiller number do not reach the expected values in the optimized crop growth parameter set. In this case, the system will generate a deviation warning message, such as "Soil moisture is lower than the expected threshold, please check the irrigation system or adjust the irrigation strategy" or "Wheat growth is slow, please check whether there are any problems with fertilization or pest control and consider adjusting parameters." Then, the parameter adjustment process will be retriggered to re-evaluate and adjust the crop growth parameters.
[0115] For example, in one possible implementation, the method further includes: Step S510, real-time collection of multi-dimensional execution feedback data corresponding to the optimized crop growth parameter set in the actual agricultural scene, wherein the multi-dimensional execution feedback data includes soil moisture sensor time series data, crop growth status image sequence and environmental indicator fluctuation characteristics.
[0116] Specifically, soil moisture sensor time series data continuously records changes in soil moisture over time, for example, recording data every hour, forming a time series. Crop growth image sequences are obtained by regularly photographing wheat or using drones to capture large areas. These images reflect the wheat's growth status at different times. Environmental indicator fluctuations include changes in environmental factors such as temperature, humidity, and light intensity.
[0117] Step S520: extracting an actual irrigation response curve corresponding to the irrigation parameters in the agricultural operation guidance information from the soil moisture sensor time series data, and extracting leaf color distribution characteristics and plant height change rate from the crop growth status image sequence.
[0118] In this embodiment, the actual irrigation response curve is extracted by analyzing the changes in soil moisture before and after irrigation in the soil moisture sensor time series data. For example, if irrigation is carried out on Monday morning according to the operating instructions, the soil moisture is observed to rise from 30% to 40% after irrigation, and then gradually decreases over time. Connecting these data points yields the actual irrigation response curve. When extracting leaf color distribution features from a sequence of crop growth images, image analysis techniques are used to analyze the color of the wheat leaves in each image and calculate the distribution of pixels of different colors, such as the percentage of green pixels and the percentage of yellow pixels. This is the leaf color distribution feature. The plant height change rate is extracted by comparing the changes in plant height in images taken at different times to calculate the plant height growth value per unit time. For example, if the plant height increases from 20 cm to 22 cm in one week, the plant height change rate is 2 cm per week.
[0119] Step S530 : The actual irrigation response curve is matched against the expected irrigation response curve in the optimized crop growth parameter set for waveform similarity to generate an irrigation execution difference coefficient. Simultaneously, the leaf color distribution characteristics are compared at the pixel level with a preset healthy growth benchmark color range to generate a leaf color difference distribution map. The plant height change rate is then compared against a target growth rate threshold for trend deviation analysis to generate a height growth deviation.
[0120] Suppose the expected irrigation response curve in the optimized crop growth parameter set indicates that soil moisture remains between 35% and 40% for a long period after irrigation and then slowly decreases. However, the actual irrigation response curve shows that soil moisture quickly drops below 30% after irrigation. When calculating waveform similarity matching, the numerical differences between the two curves at the same time point are compared, and the sum or average of these differences is calculated. This statistical value is then converted to a value between 0 and 1 as the irrigation execution difference coefficient. If the two curves differ significantly, the irrigation execution difference coefficient is close to 0; if the two curves are relatively similar, the irrigation execution difference coefficient is close to 1. Simultaneously, the leaf color distribution characteristics are compared pixel-by-pixel with a preset healthy growth benchmark color gamut to generate a leaf color difference distribution map. The preset healthy growth benchmark color gamut is determined based on a large amount of healthy wheat leaf color data. For example, the green color gamut of healthy wheat leaves is a specific RGB value range. Each pixel in the actual leaf color distribution characteristics is compared with this benchmark color gamut, and the color difference of each pixel is calculated. This color difference information is combined to generate the leaf color difference distribution map. The plant height change rate is analyzed for trend deviation from the target growth rate threshold to generate a height growth deviation. For example, if the target growth rate threshold is 3 cm per week and the actual plant height change rate is 2 cm per week, the difference between the two values is calculated to be 1 cm. This difference is then converted into a numerical value representing the degree of deviation using a pre-defined algorithm, which serves as the height growth deviation.
[0121] Step S540, performing light intensity compensation correction on the leaf color difference distribution map according to the fluctuation characteristics of the environmental indicators to generate a corrected leaf color difference distribution map, and spatially superimposing and fusing the corrected leaf color difference distribution map with the height growth deviation to generate a comprehensive growth abnormality area heat map.
[0122] For example, if the fluctuation characteristics of environmental indicators indicate low recent light intensity, the yellowish cast on leaves due to insufficient light will be corrected in the leaf color difference distribution map. By analyzing the relationship between light intensity and leaf color in historical data, the normal leaf color range under the current light intensity is determined. The color difference information in the leaf color difference distribution map is then adjusted based on this leaf color range to produce a corrected leaf color difference distribution map. The corrected leaf color difference distribution map is spatially superimposed and fused with the height growth deviation to generate a comprehensive growth anomaly area heat map. This process spatially superimposes the color difference information of each pixel in the leaf color difference distribution map with the height growth deviation. For example, in the comprehensive growth anomaly area heat map, areas with large color difference and high height growth deviation appear as high-temperature areas, indicating more severe growth anomalies; areas with small color difference and low height growth deviation appear as low-temperature areas, indicating generally normal growth.
[0123] Step S550: Input the irrigation execution variance coefficient and the comprehensive growth abnormality area heat map into a predefined variance weight allocation model to generate an environmentally sensitive variance distribution map. The variance weight allocation model dynamically adjusts the weight ratio of the variance area based on the correlation strength between environmental indicators and crop growth parameters in historical data.
[0124] For example, historical data shows that light intensity significantly affects wheat leaf color and growth rate. When an anomaly occurs in a light-related region within the integrated growth anomaly heat map, that region is given a higher weight in the difference weight allocation model. If the irrigation implementation variance coefficient is 0.3, the difference weight allocation model adjusts the weights of the different regions within the integrated growth anomaly heat map to generate an environmentally sensitive variance distribution map. This map highlights areas with significant growth variance related to irrigation and environmental factors.
[0125] Step S560: Incrementally adjust the parameters of the dynamic association module in the agricultural parameter adjustment model based on the environment-sensitive difference distribution map to generate an adaptively updated dynamic association module. The incremental parameter adjustment includes performing gradient backpropagation optimization on the cross-modal attention weight matrix of the multi-level attention submodule in the dynamic association module, with the optimization direction being proportional to the reverse error of the high-weight difference region in the environment-sensitive difference distribution map.
[0126] For example, if the environmentally sensitive difference distribution map shows that the irrigation-related area is a high-weight difference area, and the actual irrigation amount is lower than expected, then the weights related to irrigation in the cross-modal attention weight matrix of the multi-level attention submodule will be adjusted according to the gradient backpropagation algorithm. When calculating the gradient, the magnitude of the adjustment is determined by the size and direction of the difference. For example, if the difference in irrigation amount is large, the magnitude of the adjustment will also be large, so that irrigation-related factors are given more weight in subsequent association calculations.
[0127] Step S570 , re-calculating the association between the target crop growth dataset and the current environmental indicator parameter set through the adaptively updated dynamic association module, generating an updated adjustment parameter sequence, and triggering a synchronous update of the agricultural operation guidance information.
[0128] During the re-association calculation, the adaptively updated dynamic association module re-evaluates the relationship between the wheat growth data in the target crop growth dataset and the current set of environmental indicator parameters. For example, based on the new weight adjustment, it pays more attention to the impact of soil moisture on wheat growth and recalculates the adjustment parameter sequence, such as fertilizer application rate, irrigation amount, and pest control strategy, in combination with current environmental indicators such as temperature and light. Based on this updated adjustment parameter sequence, agricultural operation guidance information is then synchronously updated, such as adjusting irrigation frequency, fertilizer application rate, or changing pest control pesticides.
[0129] Step S580: After applying the updated agricultural operation guidance information to actual agricultural scenarios, the multi-dimensional execution feedback data collection and processing process is restarted, forming a closed-loop iterative optimization chain. The environmentally sensitive difference distribution map generated in each iteration serves as input for the next round of incremental parameter adjustment. The closed-loop iterative optimization chain is terminated when both the irrigation execution difference coefficient and the height growth deviation are below a preset convergence threshold.
[0130] For example, in a new round of operations, after performing irrigation, fertilization, and pest control according to the updated agricultural operation guidance information, multi-dimensional execution feedback data such as soil moisture sensor time series data, crop growth status image sequences, and environmental indicator fluctuation characteristics are collected again, and the previous analysis and calculation process is repeated. The termination condition of this closed-loop iterative optimization link is that the irrigation execution difference coefficient and height growth deviation are both lower than the preset convergence threshold. Assume that the preset convergence threshold is that the irrigation execution difference coefficient is less than 0.1 and the height growth deviation is less than 0.5 cm / week. When this condition is met, it means that the current agricultural operation guidance information can well meet the needs of wheat growth and no large-scale adjustments are required. The system will stop the iterative optimization process until the next large deviation occurs or the environmental factors change significantly.
[0131] Figure 2 The schematic diagram shows exemplary hardware and software components of a server 100 that can implement the concepts of the present application according to some embodiments of the present application. For example, a processor 120 can be used on the server 100 to perform the functions of the present application.
[0132] The server 100 can be a general-purpose server or a special-purpose server, both of which can be used to implement the AI-based agricultural service interactive data processing method of the present application. Although only one server is shown in this application, for convenience, the functions described in this application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0133] For example, the server 100 may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and various forms of storage media 140, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the server 100 may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application may be implemented based on these program instructions. The server 100 also includes an input / output (I / O) interface 150 between the computer and other input / output devices.
[0134] For ease of explanation, only one processor is described in the server 100. However, it should be noted that the server 100 in the present application may also include multiple processors, so the steps performed by one processor described in the present application may also be performed jointly or individually by multiple processors. For example, if the processor of the server 100 performs step A and step B, it should be understood that step A and step B may also be performed jointly by two different processors or individually in one processor. For example, the first processor performs step A and the second processor performs step B, or the first processor and the second processor perform steps A and B together.
[0135] In addition, an embodiment of the present invention also provides a readable storage medium, in which computer-executable instructions are preset. When the processor executes the computer-executable instructions, the above-mentioned AI-based agricultural service interaction data processing method is implemented.
[0136] It should be noted that in order to simplify the description of the present invention and thus help understand one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, multiple features are sometimes combined into one embodiment, figure or description thereof.
Claims
1. An AI-based agricultural service interactive data processing method, characterized in that: The method comprises: Obtaining an interaction instruction input by a target user in an agricultural service interaction scenario, the interaction instruction including a target crop growth dataset, an environmental indicator parameter set, and user instruction information; wherein the user instruction information is used to describe at least one parameter adjustment requirement for the target crop growth dataset; Performing semantic feature encoding on the user instruction information to generate an instruction feature encoding result, and performing joint feature encoding on the target crop growth dataset and the environmental indicator parameter set to generate a joint growth feature encoding result; Inputting the instruction feature encoding result and the joint growth feature encoding result into a pre-trained agricultural parameter adjustment model, and generating an adjustment parameter sequence matching the parameter adjustment requirement through a dynamic association module in the agricultural parameter adjustment model; The target crop growth data set is iteratively optimized based on the adjustment parameter sequence to generate an optimized crop growth parameter set, and corresponding agricultural operation guidance information is generated based on the optimized crop growth parameter set; wherein the agricultural operation guidance information includes at least one execution instruction of irrigation parameters, fertilization cycle and pest and disease prevention strategy.
2. The AI-based agricultural service interactive data processing method according to claim 1, characterized in that: The user instruction information includes a plurality of sub-instruction information, and the information type of the sub-instruction information includes a text instruction type and a voice instruction type; The performing semantic feature encoding on the user instruction information to generate an instruction feature encoding result includes: For each sub-instruction information, if its information type is a text instruction type, calling a text encoder to perform word vector conversion on the sub-instruction information to generate a corresponding text feature vector; If the information type is a voice command type, call the voice recognition module to convert the sub-command information into text content, and perform word vector conversion on the text content to generate a corresponding voice-derived feature vector; The text feature vectors and speech-derived feature vectors corresponding to all sub-instruction information are time-sequentially aligned and feature-spliced to generate the instruction feature encoding result; wherein each sub-instruction information is associated with an execution instruction in the parameter adjustment requirement.
3. The AI-based agricultural service interactive data processing method according to claim 1, characterized in that: The performing joint feature coding on the target crop growth dataset and the environmental indicator parameter set to generate a joint growth feature coding result includes: Extracting crop growth stage characteristics, soil nutrient distribution characteristics, and historical yield data from the target crop growth dataset; Extracting a temperature change sequence, a humidity change sequence, and a light intensity sequence from the environmental indicator parameter set; Aligning the growth stage feature with the temperature change sequence in a time window to generate a first correlation feature, performing spatial region mapping on the soil nutrient distribution feature and the humidity change sequence to generate a second correlation feature, and performing trend matching analysis on the historical yield data and the light intensity sequence to generate a third correlation feature; The first correlation feature, the second correlation feature and the third correlation feature are fused to generate the joint growth feature encoding result.
4. The AI-based agricultural service interactive data processing method according to claim 1, characterized in that: The agricultural parameter adjustment model is trained by the following steps: Obtain historical crop growth data sets, historical environmental indicator parameter sets, and corresponding historical adjustment parameter sequences to construct a training sample set; Constructing an initial agricultural parameter adjustment model, wherein the initial agricultural parameter adjustment model includes an instruction encoding module, a joint encoding module, and a dynamic association module; Inputting the historical crop growth dataset and the historical environmental indicator parameter set in the training sample set into the joint encoding module to generate sample joint features; Inputting historical user instruction information in the training sample set into the instruction encoding module to generate sample instruction features; Performing feature association calculation on the sample joint features and the sample instruction features through the dynamic association module to generate a prediction adjustment parameter sequence; The difference loss value between the predicted adjustment parameter sequence and the historical adjustment parameter sequence is calculated, and the parameters of the initial agricultural parameter adjustment model are updated according to the difference loss value until convergence, thereby obtaining a trained agricultural parameter adjustment model.
5. The AI-based agricultural service interactive data processing method according to claim 4, characterized in that: The dynamic association module includes a multi-level attention submodule and a parameter generation submodule; The step of performing feature association calculation on the sample joint feature and the sample instruction feature by the dynamic association module to generate a prediction adjustment parameter sequence includes: Performing cross-modal attention calculation on the sample joint features and the sample instruction features through the multi-level attention submodule to generate a feature weight distribution map; Performing weighted screening on the sample joint features according to the feature weight distribution map to generate a screened joint feature subset; The filtered joint feature subset is input into the parameter generation submodule, and the prediction adjustment parameter sequence is generated through a multi-layer neural network.
6. The AI-based agricultural service interactive data processing method according to claim 5, characterized in that: The multi-level attention submodule performs cross-modal attention calculation on the sample joint features and the sample instruction features to generate a feature weight distribution map, including: Dividing the sample joint feature into multiple joint feature blocks according to a preset time window length, and dividing the sample instruction feature into multiple instruction feature segments according to semantic paragraph boundaries; wherein each joint feature block contains the fusion features of crop growth data and environmental indicator parameters for a continuous time interval, and each instruction feature segment corresponds to an independent sub-instruction semantic unit; Performing a bidirectional similarity calculation on each of the joint feature blocks and all instruction feature segments to generate a correlation matrix between each joint feature block and each instruction feature segment; wherein the bidirectional similarity calculation includes a forward cosine similarity from the joint feature block to the instruction feature segment and a reverse weighted matching degree from the instruction feature segment to the joint feature block; The correlation matrices of all instruction feature segments corresponding to the same joint feature block are horizontally spliced to form a block-level correlation tensor, and the block-level correlation tensor is subjected to a maximum pooling operation to extract the maximum response intensity value of each joint feature block relative to different instruction feature segments; Dynamically sorting the joint feature blocks according to the maximum response intensity value, retaining the joint feature blocks with maximum response intensity values higher than a preset activation threshold as valid feature blocks, and mapping the position coordinates of all valid feature blocks to a feature space grid; Performing spatial density cluster analysis on the valid feature blocks in the feature space grid to identify feature block clusters in high-density areas, and assigning a regional attention weight coefficient to each feature block cluster; wherein the regional attention weight coefficient is positively correlated with the density value of the feature block cluster; Performing weighted fusion on the regional attention weight coefficient and the maximum response intensity value of each joint feature block in the corresponding feature block cluster to generate an initial weight distribution map; Normalizing the initial weight distribution map so that the weight value of each region is mapped to the interval [0, 1], and adjusting the resolution level of the feature space grid according to the normalized weight value to generate a standardized feature weight distribution map; wherein the resolution level is proportional to the distribution variance of the weight value, and a fine-grained grid is used for high-variance regions and a coarse-grained grid is used for low-variance regions; Based on the standardized feature weight distribution map, performing time domain smoothing filtering on the environmental indicator parameters in the sample joint features, and updating the final weight value of each grid point in the feature weight distribution map; The updated feature weight distribution map is cross-modally cross-validated with the original sample instruction features to generate an optimized feature weight distribution map as the output result of the multi-level attention sub-module.
7. The AI-based agricultural service interactive data processing method according to claim 1, characterized in that: The iterative optimization of the target crop growth dataset based on the adjustment parameter sequence to generate an optimized crop growth parameter set includes: adjusting the soil moisture threshold in the target crop growth dataset according to the irrigation parameter in the adjustment parameter sequence; Adjusting the nutrient supplementation time node in the target crop growth dataset according to the fertilization cycle in the adjustment parameter sequence; updating the pesticide spraying frequency and dosage parameters in the target crop growth dataset according to the pest and disease prevention strategy in the adjustment parameter sequence; The adjusted soil moisture threshold, nutrient replenishment time node and pesticide spraying frequency are combined to generate the optimized crop growth parameter set.
8. The AI-based agricultural service interactive data processing method according to claim 1, characterized in that: Generating corresponding agricultural operation guidance information according to the optimized crop growth parameter set includes: Inputting the optimized crop growth parameter set into a pre-trained strategy generation model, and generating an initial agricultural operation strategy through a decision tree branch module in the strategy generation model; Conduct feasibility verification of the initial agricultural operation strategy, including testing the maximum water supply capacity of irrigation equipment, fertilizer inventory, and pesticide use compliance; If the feasibility verification result satisfies the execution condition of the initial agricultural operation strategy, the initial agricultural operation strategy is determined as the final agricultural operation guidance information; If the feasibility verification result does not meet the execution condition, the parameters in the initial agricultural operation strategy are constrained and adjusted to generate adjusted agricultural operation guidance information; The strategy generation model is trained on multiple tasks through a joint training module, including: Acquire a first training task data set, where the first training task data set includes a mapping relationship between crop growth parameters and agricultural operation strategies; Acquire a second training task data set, where the second training task data set includes a mapping relationship between environmental abnormal events and emergency strategies; Alternately training the first training task data set and the second training task data set through the joint training module to calculate the first task loss value and the second task loss value; The first task loss value and the second task loss value are weightedly fused to generate a joint loss function, and the parameters of the strategy generation model are updated according to the joint loss function.
9. The AI-based agricultural service interactive data processing method according to claim 1, characterized in that: The method further comprises: After the agricultural operation guidance information is generated, the agricultural operation guidance information is converted into voice broadcast content through a speech synthesis module; Synchronously sending the voice broadcast content and the operation step chart in text form to the user terminal; receiving a command execution confirmation signal fed back by a user terminal, and updating a current state of the target crop growth dataset according to the confirmation signal; When it is detected that there is a deviation between the current state and the optimized crop growth parameter set, a deviation warning message is generated and the parameter adjustment process is re-triggered.
10. A server, characterized in that: The server includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the AI-based agricultural service interactive data processing method described in any one of claims 1 to 9 above.
Citation Information
Cited By
Crop yield prediction method based on whole growing season characteristics and producing area clustering
CN121257828A
Vertical farm integrated control system and method and computer readable storage medium
CN121596814A
