Method and device for matching crop variety to planting site

By generating heterogeneous graphs using a data-driven approach and employing graph collaborative filtering technology to score the adaptability of maize varieties to planting locations, this approach solves the subjective bias and cold-start problems in existing maize variety recommendations, achieving more accurate adaptation recommendations.

CN122114525APending Publication Date: 2026-05-29SDIC SEED TECHNOLOGY CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SDIC SEED TECHNOLOGY CO LTD
Filing Date
2026-03-09
Publication Date
2026-05-29

Smart Images

  • Figure CN122114525A_ABST
    Figure CN122114525A_ABST
Patent Text Reader

Abstract

The application provides a crop variety and planting site adaptation method and device, which are applied to the field of agricultural science and technology technology. The method comprises the following steps: obtaining variety trait characteristics of a target crop, planting site environment characteristics, and yield data of different crop varieties in different planting sites; determining an adaptability matrix between the target crop variety and the planting site according to the yield data, wherein the adaptability matrix is used to represent the adaptability state between different target crop varieties and different planting sites, and the adaptability state comprises suitable planting, unsuitable planting, and non-planting; generating a heterogeneous graph based on the variety trait characteristics, the planting site environment characteristics, and the adaptability matrix; inputting the heterogeneous graph into a pre-trained graph recommendation model, and outputting an adaptability score based on the graph recommendation model, wherein the graph recommendation model adopts a graph collaborative filtering technology, and training samples of the graph recommendation model comprise positive samples of suitable planting, negative samples of unsuitable planting, and non-evaluation samples of non-planting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural technology, and in particular to a method and apparatus for matching crop varieties with planting locations. Background Technology

[0002] In agricultural production, the compatibility between corn varieties and planting locations is a crucial factor in determining corn yield and quality. Agricultural practitioners need to select suitable corn varieties based on the environmental conditions of the planting area to avoid the risk of reduced yields due to insufficient variety-plot compatibility and to meet the actual needs of large-scale, precision farming.

[0003] In existing technologies, there are two main approaches to recommending maize varieties and planting sites based on their suitability: one approach relies on expert experience for evaluation, where experts assess the compatibility between the traits of maize varieties and the environmental conditions of the planting site based on past planting cases; the other approach utilizes limited planting data to build a recommendation system, using traditional collaborative filtering techniques or Bayesian Personalized Ranking (BPR) loss functions to establish a model and achieve preliminary matching recommendations between varieties and plots.

[0004] However, the existing solutions mentioned above all have significant drawbacks: First, the evaluation method based on expert experience is highly subjective, lacks unified data standards for support, and is prone to recommendation bias due to differences in individual expert judgments, and lacks objectivity in the data segmentation process; Second, due to the difficulty in collecting corn planting data and the limited sample size, traditional recommendation systems are prone to the "cold start" problem, making it difficult to form effective recommendations for new varieties or newly developed planting plots, and the models are prone to overfitting and have weak generalization ability; Third, the traditional BPR loss function treats "unsuitable for planting" and "not planted" samples together when processing samples, resulting in exposure bias and false negatives in the recommendation system, making it impossible to accurately discover potential suitable combinations between varieties and plots. Summary of the Invention

[0005] This invention provides a method and apparatus for matching crop varieties with planting locations, which solves the problems of subjective bias due to expert experience, cold start and overfitting, exposure bias caused by mixed samples in traditional maize variety and planting location recommendations, and false negatives. It can improve the recommendation accuracy and model generalization ability.

[0006] This invention provides a method for matching crop varieties with planting locations, comprising: acquiring the varietal characteristics of the target crop, the environmental characteristics of the planting location, and yield data of different crop varieties at different planting locations; determining an adaptation matrix between the target crop varieties and planting locations based on the yield data, the adaptation matrix representing the adaptation status between different target crop varieties and different planting locations, the adaptation status including: suitable for planting, unsuitable for planting, and not planted; generating a heterogeneous graph based on the varietal characteristics, the environmental characteristics of the planting location, and the adaptation matrix; inputting the heterogeneous graph into a pre-trained graph recommendation model, and outputting an adaptation score based on the graph recommendation model; wherein, the graph recommendation model employs graph collaborative filtering technology, and its training samples include positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples not planted.

[0007] This invention also provides a crop variety and planting location adaptation device, comprising the following modules: an acquisition module and a processing module; the acquisition module is used to acquire the varietal characteristics of the target crop, the environmental characteristics of the planting location, and the yield data of different crop varieties at different planting locations; the processing module is used to determine an adaptation matrix between the target crop variety and the planting location based on the yield data, the adaptation matrix representing the adaptation status between different target crop varieties and different planting locations, the adaptation status including: suitable for planting, unsuitable for planting, and not planted; generating a heterogeneous graph based on the varietal characteristics, the environmental characteristics of the planting location, and the adaptation matrix; inputting the heterogeneous graph into a pre-trained graph recommendation model, and outputting an adaptation score based on the graph recommendation model; wherein, the graph recommendation model adopts graph collaborative filtering technology, and its training samples include positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples not planted.

[0008] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the crop variety and planting location adaptation method as described above.

[0009] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the crop variety and planting location adaptation method as described above.

[0010] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the crop variety and planting location adaptation method as described above.

[0011] The crop variety and planting location matching method and apparatus provided by this invention, on the one hand, replaces the traditional expert experience evaluation with data-driven recommendation process, effectively eliminating recommendation bias caused by differences in individual expert judgments and ensuring that the recommendation results have unified standards and objective basis; on the other hand, the phenotypic characteristics of the variety and the environmental characteristics of the planting location can be directly used as feature inputs for new varieties and new planting locations without relying on past planting data, fundamentally solving the cold start problem faced by traditional recommendation systems; moreover, the graph recommendation model, with the help of the topological structure of heterogeneous graphs, can capture high-order associations between varieties and planting locations, reduce dependence on limited sample data, reduce the risk of model overfitting, and significantly improve the model's generalization ability for matching recommendations of different varieties and different planting locations; furthermore, dividing the training samples into three categories—positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples not planted—avoids the problem of mixed sample processing in traditional methods, effectively eliminating exposure bias and false negatives in recommendation systems, and accurately mining potential matching combinations between varieties and planting locations. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0013] Figure 1 This is a flowchart illustrating the crop variety and planting location adaptation method provided by the present invention. Figure 2 This is a schematic diagram of the heterogeneous graph generation process of the crop variety and planting location adaptation method provided by the present invention; Figure 3 This is a schematic diagram of the processing procedure of the map recommendation model in the crop variety and planting location matching method provided by the present invention; Figure 4 This is a schematic diagram of the crop variety and planting location adaptation device provided by the present invention; Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0015] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0016] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0017] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.

[0018] This application describes some exemplary embodiments for illustrative purposes. It should be understood that this application may be implemented in other ways not specifically shown in the accompanying drawings.

[0019] like Figure 1 As shown, this application provides a method for adapting crop varieties to planting locations, which can be applied to a crop variety and planting location adaptation device. The method may include steps S101-S104: S101, The crop variety and planting location matching device acquires the varietal characteristics of the target crop, the environmental characteristics of the planting location, and the yield data of different crop varieties at different planting locations.

[0020] Optionally, the adapter can employ a multilayer perceptron (MLP) model to generate varietal characteristics of the target crop based on varietal trait data and environmental characteristics of the planting location based on environmental data of the planting location.

[0021] For example, such as Figure 2 As shown, taking corn as the target crop as an example, the adaptation device can perform feature embedding processing on corn variety trait data through the feature embedding generation module. By converting the corn variety trait data into embedding vectors through MLP encoding, the device generates corn variety trait features based on the corn variety trait data. Similarly, the device can perform feature embedding processing on planting location environmental data through the same module. By converting the planting location environmental data into embedding vectors through MLP encoding, the device generates planting location environmental features based on the planting location environmental data.

[0022] Optionally, the adapter can directly use the varietal trait data of the target crop as the varietal trait characteristics of the target crop and the environmental data of the planting location as the environmental characteristics of the planting location. For example, the adapter can directly use the varietal trait data of maize as the varietal trait characteristics of maize and the environmental data of the planting location as the environmental characteristics of the planting location.

[0023] Optionally, varietal trait data may include multiple data that reflect the varietal growth advantages and disadvantages of the target crop, such as lodging rate, lodging breakage rate, severity of gray spot disease, incidence of stem rot disease, incidence of black spot disease, plant height, ear height, empty stalk rate, growth period, incidence of ear rot disease, 100-grain weight, ear length, grain length, and average grain moisture content at harvest.

[0024] Optionally, the environmental data for the planting site may include multiple data that reflect the climate and meteorological conditions of the planting site, such as average maximum temperature, variance of maximum temperature, average temperature, variance of temperature, average minimum temperature, variance of minimum temperature, average temperature difference, variance of temperature difference, average surface air pressure, variance of surface air pressure, average relative humidity, variance of relative humidity, average precipitation, variance of precipitation, average maximum wind speed, variance of maximum wind speed, average wind speed, variance of wind speed, average wind direction angle, variance of wind direction angle, average sunshine duration, variance of sunshine duration, average wind force level, and variance of wind force level.

[0025] Optionally, yield data for different crop varieties at different planting locations refers to the actual yield per acre or per hectare of the target crop after planting at different locations.

[0026] Optionally, after acquiring the varietal trait data of the target crop and the environmental data of the planting location, the adaptation device can preprocess these data, including missing value handling and normalization. Specifically, missing data can be filled using methods such as mean or median interpolation, and the data format can be normalized using methods such as Z-Score normalization, Max-Min normalization, or standard deviation normalization to ensure the accuracy of subsequent data processing.

[0027] It should be noted that by acquiring the above three types of core data, on the one hand, high-quality data support can be provided for subsequent adaptive matrix construction, heterogeneous graph generation, and graph recommendation model judgment, avoiding adaptation judgment errors caused by missing data or inconsistent formats; on the other hand, compared with the traditional judgment method that only relies on partial data, the combination of the three types of data can more comprehensively depict the adaptation relationship between varieties and locations, laying the foundation for subsequent accurate recommendations.

[0028] For example, a certain corn variety may meet the yield target in a certain location, but its lodging rate is found to be high based on its varietal characteristics. Meanwhile, the environmental characteristics of that location indicate strong winds. Subsequent adaptation assessments can further verify the long-term adaptability of the variety to that location, thus avoiding the problem of meeting yield targets in the short term but being susceptible to disasters in the long term.

[0029] S102, The crop variety and planting location adaptation device determines the adaptation matrix between the target crop variety and the planting location based on the yield data.

[0030] The aforementioned fitness matrix is ​​used to represent the fitness status between different target crop varieties and different planting locations. The fitness status includes: suitable for planting, unsuitable for planting, and not planted, with corresponding values ​​of 1, 0, and -1, respectively.

[0031] Optionally, the crop variety and planting location adaptation device determines the adaptation matrix between the target crop variety and the planting location based on the yield data, including: traversing all combinations of target crop varieties and all planting locations according to the adaptation judgment rules to generate the adaptation matrix; the adaptation judgment rules are: if the yield data of the target variety at the target location is greater than the target threshold, then the target variety is determined to be suitable for planting at the target location; if the yield data of the target variety at the target location is not greater than the target threshold, then the target variety is determined to be unsuitable for planting at the target location; if no yield data of the target variety at the target location is obtained, then it is determined to be in an unplanted state.

[0032] For example, such as Figure 2As shown, the adaptation device can construct an adaptation matrix based on the yield data of different corn varieties at different planting locations using the adaptation matrix construction module. Taking corn varieties 1 and 2, and planting locations 1 and 2 as an example, the target threshold is first set to 550 kg / mu. This target threshold can be preset based on local average crop yield, expected planting income, etc. Next, the adaptation device can iterate through all combinations of corn varieties and planting locations. If the actual yield of variety 1 at location 1 is 620 kg / mu, then variety 1 is determined to be suitable for planting at location 1; if the actual yield of variety 1 at location 2 is 520 kg / mu, then variety 1 is determined to be unsuitable for planting at location 2; if variety 2 has not been planted at location 1, then variety 2 is determined to be in an unplanted state at location 1; if the actual yield of variety 2 at location 2 is 580 kg / mu, then variety 2 is determined to be suitable for planting at location 2. In the final fitness matrix, the fitness state of element M[1][1] corresponding to “Variety 1-Location 1” is 1, the fitness state of element M[1][2] corresponding to “Variety 1-Location 2” is 0, the fitness state of element M[2][1] corresponding to “Variety 2-Location 1” is -1, and the fitness state of element M[2][2] corresponding to “Variety 2-Location 2” is 1.

[0033] It should be noted that, on the one hand, by using clear thresholds and traversal rules, fuzzy yield data can be transformed into standardized fit states, avoiding the bias of relying on experts' subjective judgments of "whether a certain variety is suitable for a certain plot of land," and ensuring that the judgment standards for fit relationships of different varieties and different locations are consistent. On the other hand, separately classifying the unplanted state provides data labels for subsequent graph recommendation models to mine combinations that "have not been tried but may be suitable," which can effectively reduce the false negative problem of the recommendation system and improve the comprehensiveness and accuracy of the recommendations.

[0034] S103. The crop variety and planting location adaptation device generates a heterogeneous graph based on the variety traits, the environmental characteristics of the planting location, and the adaptation matrix.

[0035] Optionally, the crop variety and planting location adaptation device generates a heterogeneous graph based on the variety traits, the environmental characteristics of the planting location, and the adaptation matrix, including: creating a type I node based on the variety traits of all target crop varieties, with one type I node corresponding to one variety trait of a crop variety; creating a type II node based on the environmental characteristics of all planting locations, with one type II node corresponding to one environmental characteristic of a planting location; and constructing adaptation relationship edges between type I nodes and type II nodes based on the adaptation state of each element in the adaptation matrix to obtain the heterogeneous graph.

[0036] Optionally, the crop variety and planting location adaptation device constructs adaptive relationship edges between a type I node and a type II node based on the adaptation state of each element in the adaptation matrix to obtain the heterogeneous graph, including: if the adaptation state of an element in the adaptation matrix is ​​suitable for planting, then the adaptive relationship edge between the corresponding nodes corresponds to a first weight; if the adaptation state of an element is unsuitable for planting, then the adaptive relationship edge between the corresponding nodes corresponds to a second weight; if the adaptation state of an element is not planted, then no adaptive relationship edge is created between the corresponding nodes.

[0037] like Figure 2 As shown, the heterogeneous graph of maize varieties and planting locations includes two types of nodes: one type of node... Type II nodes: The first type of node corresponds to the maize variety, and each first type of node corresponds to the trait of a maize variety. The second type of node corresponds to the planting location, and each second type of node corresponds to the environmental characteristics of a planting location. The connection edges between the first type of node and the second type of node can reflect the adaptability between the maize variety and the planting location.

[0038] For example, taking corn varieties 1 and 2, and planting locations 1 and 2, as an example, the adaptation device first creates a type of node based on variety traits. For instance, it uses traits of variety 1 such as "lodging rate 2%, plant height 200cm, and 100-kernel weight 35g" as attributes to generate a "variety 1 node," and similarly generates a "variety 2 node." Next, it creates a type of node based on the environmental characteristics of the planting location. For instance, it uses environmental characteristics of location 1 such as "average maximum temperature 32℃, average rainfall 600mm, and average sunshine duration 8 hours" as attributes to generate a "location 1 node," and similarly generates a "location 2 node." Subsequently, it constructs relationship edges based on the adaptation matrix, assuming that the adaptation matrix contains "variety 1 - location 1." Given that "Variety 1 - Location 2" is suitable for planting, "Variety 2 - Location 1" is unsuitable for planting, "Variety 2 - Location 1" is not planted, and "Variety 2 - Location 2" is suitable for planting, and assuming a first weight of 1 and a second weight of 0, an adaptive relationship edge with a weight of 1 is created between "Variety 1 node" and "Location 1 node", an adaptive relationship edge with a weight of 0 is created between "Variety 1 node" and "Location 2 node", no edge is created between "Variety 2 node" and "Location 1 node", and an edge with a weight of 1 is created between "Variety 2 node" and "Location 2 node", ultimately forming a heterogeneous graph containing 4 nodes and 3 edges.

[0039] It should be noted that, on the one hand, heterogeneous graphs integrate variety characteristics, location characteristics, and adaptation relationships into a unified structure, avoiding the problem of fragmented related information caused by scattered data storage in traditional solutions. Subsequent models can directly call up the three types of key information simultaneously based on the graph structure, improving data processing efficiency. On the other hand, by distinguishing the degree of adaptation through weights and marking the unplanted state with "no borders," the core information of the adaptation matrix is ​​preserved, and structural support is provided for graph recommendation models to capture higher-order relationships. This helps to improve the accuracy and generalization ability of subsequent recommendations, while avoiding the omission of potential suitable combinations due to the unplanted state being misjudged as unsuitable for planting.

[0040] S104. The crop variety and planting location matching device inputs the heterogeneous graph into a pre-trained graph recommendation model and outputs an adaptability score based on the graph recommendation model.

[0041] The graph recommendation model employs graph collaborative filtering technology, and its training samples include positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples that were not planted. By explicitly distinguishing between negative samples unsuitable for planting and unevaluated samples that were not planted, the model solves the exposure bias and false negative problems caused by the mixed processing of the two types of samples in traditional methods.

[0042] Optionally, the graph recommendation model includes a node feature aggregation module and an adaptability score calculation module; the crop variety and planting location adaptation device inputs the heterogeneous graph into the pre-trained graph recommendation model and outputs an adaptability score based on the graph recommendation model, including: aggregating the features of each type I node in the heterogeneous graph with the features of its neighboring nodes through the node feature aggregation module to obtain a first aggregated feature; aggregating the features of each type II node with the features of its neighboring nodes to obtain a second aggregated feature; and inputting the first aggregated feature and the second aggregated feature into the adaptability score calculation module to determine the adaptability score between the target crop variety and the planting location.

[0043] Specifically, the node feature aggregation module includes multiple graph neural network layers. In each layer, the graph neural network layer aggregates the features of the target type I nodes and their neighboring nodes in the heterogeneous graph, and then fuses the aggregated features with the features of the target type I nodes themselves in the current layer to generate the embedding representation of the target type I nodes in that layer. Similarly, the graph neural network layer aggregates the features of the target type II nodes and their neighboring nodes, and then fuses the aggregation result with the features of its current node to obtain the embedding representation of the target type II nodes in that layer. Then, the node embedding representations output by each layer are concatenated according to the node dimension to obtain the final embedding representation of each node. The final embedding representation of the target type I nodes is defined as the first aggregated feature, and the final embedding representation of the target type II nodes is defined as the second aggregated feature; the target type I nodes are nodes corresponding to the target crop variety, and the target type II nodes are nodes corresponding to the planting location. Finally, the first aggregated feature and the second aggregated feature are input to the adaptability scoring module to obtain the adaptability score between the target crop variety and the planting location output by the adaptability scoring module.

[0044] For example, such as Figure 3 As shown, the node feature aggregation module can aggregate target nodes of a certain type in a heterogeneous graph. and its neighboring nodes ( and The system aggregates the environmental characteristics of the planting location of the maize plant, and combines these with the varietal traits of the maize itself to generate a first aggregated feature that reflects its relationship with the surrounding environment through graph aggregation (AGG). Similarly, the node feature aggregation module can aggregate the target second-class nodes. and its neighboring nodes ( The characteristics of maize varieties are aggregated, and then combined with the environmental characteristics of their planting locations to generate a second aggregated feature. Afterwards, the target class of nodes... The first aggregation feature and the target binary node The second aggregated feature is input into the adaptive scoring calculation module, where a dot product operation is performed to obtain the corresponding adaptive score.

[0045] Alternatively, taking the corn variety node s as an example, the node aggregation operation formula of the graph neural network layer can be expressed as: ,in, This represents the node representation of the maize variety at level k+1. The node representing the planting location at the k-th layer. This represents the set of neighbors of variety s in the heterogeneity graph. Let l represent the set of neighboring nodes of the planting location l in the heterogeneous graph. This is used to adjust the contribution of node l to node s, preventing nodes with higher degrees from having an excessive impact on the aggregation result. To prevent the transition smoothing problem, the specific formula for obtaining the final representation through the update operation is as follows: ,in, This is the final representation of the maize variety node 's'. The aggregation method for planting location nodes is the same as that for maize variety nodes, and will not be repeated here. Finally, based on the first and second aggregation features, the adaptability score data between maize varieties and planting locations is obtained through the adaptability score calculation module. The calculation formula is the adaptability score. .

[0046] Optionally, the crop variety and planting location matching device can also match the target crop variety with the highest adaptation score for each planting location and the planting location with the highest adaptation score for each target crop variety based on the adaptation score.

[0047] In this embodiment, on the one hand, the entire recommendation process is data-driven instead of traditional expert experience evaluation, effectively eliminating recommendation bias caused by differences in individual expert judgments and ensuring that the recommendation results have unified standards and objective basis. On the other hand, varietal traits and environmental characteristics of planting locations can be directly used as feature inputs for new varieties and new planting locations without relying on past planting data, thus fundamentally solving the cold start problem faced by traditional recommendation systems. Moreover, the graph recommendation model, with the help of the topological structure of heterogeneous graphs, can capture high-order relationships between varieties and planting locations, reducing dependence on limited sample data, lowering the risk of model overfitting, and significantly improving the model's generalization ability to adapt recommendations for different varieties and different planting locations. Furthermore, the training samples are divided into three categories: positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples that have not been planted. This avoids the problem of mixed sample processing in traditional methods, effectively eliminating exposure bias and false negatives in the recommendation system, and accurately mining potential suitable combinations between varieties and planting locations.

[0048] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0049] It should be noted that the apparatus in the embodiments of this application includes a virtual device and a physical device. The virtual device can be an adaptation device for crop varieties and planting locations, and the physical device can include electronic devices, computer storage media, and computer program products.

[0050] The crop variety and planting location adaptation method provided in this application can be implemented by a crop variety and planting location adaptation device, or a control module for crop variety and planting location adaptation within the crop variety and planting location adaptation device. This application example uses a crop variety and planting location adaptation device to illustrate the crop variety and planting location adaptation device provided in this application.

[0051] It should be noted that, according to the above method examples, the crop variety and planting location adaptation device can be divided into functional modules. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. Optionally, the module division in this embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0052] like Figure 4 As shown, this application embodiment provides a crop variety and planting location adaptation device 400. The crop variety and planting location adaptation device 400 includes: an acquisition module 401 and a processing module 402.

[0053] The acquisition module 401 can be used to acquire the varietal characteristics of the target crop, the environmental characteristics of the planting location, and the yield data of different crop varieties at different planting locations. The processing module 402 can be used to determine the fitness matrix between the target crop variety and the planting location based on the yield data. The fitness matrix is ​​used to represent the fitness status between different target crop varieties and different planting locations. The fitness status includes: suitable for planting, unsuitable for planting, and not planted. It can generate a heterogeneous graph based on the variety trait characteristics, the environmental characteristics of the planting location, and the fitness matrix. It can input the heterogeneous graph into a pre-trained graph recommendation model and output a fitness score based on the graph recommendation model. The graph recommendation model employs graph collaborative filtering technology, and its training samples include positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples that have not been planted.

[0054] Optionally, the processing module 402 can be used to traverse all combinations of target crop varieties and all planting locations according to the adaptability judgment rule to generate the adaptability matrix; the adaptability judgment rule is as follows: if the yield data of the target variety at the target location is greater than the target threshold, then the target variety is determined to be suitable for planting at the target location; if the yield data of the target variety at the target location is not greater than the target threshold, then the target variety is determined to be unsuitable for planting at the target location; if the yield data of the target variety at the target location is not obtained, then it is determined to be in an unplanted state.

[0055] Optionally, the processing module 402 can be used to create a type I node based on the varietal characteristics of all target crop varieties, with one type I node corresponding to one varietal characteristic of a crop variety; create a type II node based on the environmental characteristics of all planting locations, with one type II node corresponding to one environmental characteristic of a planting location; and construct the adaptive relationship edge between the type I nodes and the type II nodes based on the adaptive state of each element in the adaptive matrix to obtain the heterogeneous graph.

[0056] Optionally, the processing module 402 can be configured to assign a first weight to the adaptive relationship edge between the corresponding nodes if the adaptive state of an element in the adaptive matrix is ​​suitable for planting; assign a second weight to the adaptive relationship edge between the corresponding nodes if the adaptive state of an element is unsuitable for planting; and not create an adaptive relationship edge between the corresponding nodes if the adaptive state of an element is not planted.

[0057] Optionally, the graph recommendation model includes a node feature aggregation module and an adaptability score calculation module; the processing module 402 can be used to aggregate the features of each type I node in the heterogeneous graph with the features of its neighboring nodes through the node feature aggregation module to obtain a first aggregated feature, and to aggregate the features of each type II node with the features of its neighboring nodes to obtain a second aggregated feature; the first aggregated feature and the second aggregated feature are input to the adaptability score calculation module to determine the adaptability score between the target crop variety and the planting location.

[0058] Optionally, the processing module 402 can be used to match the target crop variety with the highest adaptability score for each planting location based on the adaptability score, and to match the planting location with the highest adaptability score for each target crop variety.

[0059] In this embodiment, on the one hand, the entire recommendation process is data-driven instead of traditional expert experience evaluation, effectively eliminating recommendation bias caused by differences in individual expert judgments and ensuring that the recommendation results have unified standards and objective basis. On the other hand, varietal traits and environmental characteristics of planting locations can be directly used as feature inputs for new varieties and new planting locations without relying on past planting data, thus fundamentally solving the cold start problem faced by traditional recommendation systems. Moreover, the graph recommendation model, with the help of the topological structure of heterogeneous graphs, can capture high-order relationships between varieties and planting locations, reducing dependence on limited sample data, lowering the risk of model overfitting, and significantly improving the model's generalization ability to adapt recommendations for different varieties and different planting locations. Furthermore, the training samples are divided into three categories: positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples that have not been planted. This avoids the problem of mixed sample processing in traditional methods, effectively eliminating exposure bias and false negatives in the recommendation system, and accurately mining potential suitable combinations between varieties and planting locations.

[0060] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other through the communications bus 540. The processor 510 can call logic instructions in the memory 530 to execute a crop variety and planting location adaptation method. This method includes: acquiring the varietal traits of the target crop, the environmental characteristics of the planting location, and yield data of different crop varieties at different planting locations; determining an adaptation matrix between the target crop variety and the planting location based on the yield data, the adaptation matrix representing the adaptation status between different target crop varieties and different planting locations, the adaptation status including: suitable for planting, unsuitable for planting, and not planted; generating a heterogeneous graph based on the varietal traits, the environmental characteristics of the planting location, and the adaptation matrix; inputting the heterogeneous graph into a pre-trained graph recommendation model, and outputting an adaptation score based on the graph recommendation model; wherein the graph recommendation model employs graph collaborative filtering technology, and its training samples include positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples not planted.

[0061] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0062] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the crop variety and planting location adaptation method provided by the above methods. The method includes: acquiring the varietal characteristics of the target crop, the environmental characteristics of the planting location, and the yield data of different crop varieties at different planting locations; determining an adaptation matrix between the target crop variety and the planting location based on the yield data, wherein the adaptation matrix is ​​used to represent the adaptation status between different target crop varieties and different planting locations, and the adaptation status includes: suitable for planting, unsuitable for planting, and not planted; generating a heterogeneous graph based on the varietal characteristics, the environmental characteristics of the planting location, and the adaptation matrix; inputting the heterogeneous graph into a pre-trained graph recommendation model, and outputting an adaptation score based on the graph recommendation model; wherein the graph recommendation model adopts graph collaborative filtering technology, and its training samples include positive samples of suitable planting, negative samples of unsuitable planting, and unevaluated samples of not planted.

[0063] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for adapting crop varieties to planting locations provided by the methods described above. This method includes: acquiring varietal traits of a target crop, environmental characteristics of the planting location, and yield data of different crop varieties at different planting locations; determining an adaptation matrix between the target crop variety and the planting location based on the yield data, the adaptation matrix representing the adaptation status between different target crop varieties and different planting locations, the adaptation status including: suitable for planting, unsuitable for planting, and not planted; generating a heterogeneous graph based on the varietal traits, the environmental characteristics of the planting location, and the adaptation matrix; inputting the heterogeneous graph into a pre-trained graph recommendation model, and outputting an adaptation score based on the graph recommendation model; wherein the graph recommendation model employs graph collaborative filtering technology, and its training samples include positive samples of suitable planting, negative samples of unsuitable planting, and unevaluated samples of not planted.

[0064] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0065] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for matching crop varieties with planting locations, characterized in that, include: Obtain the varietal characteristics of the target crop, the environmental characteristics of the planting location, and the yield data of different crop varieties at different planting locations; Based on the yield data, an adaptation matrix is ​​determined between the target crop variety and the planting location. The adaptation matrix is ​​used to represent the adaptation status between different target crop varieties and different planting locations. The adaptation status includes: suitable for planting, unsuitable for planting, and not planted. A heterogeneous graph is generated based on the varietal traits, the environmental characteristics of the planting location, and the adaptation matrix; The heterogeneous graph is input into a pre-trained graph recommendation model, and an adaptability score is output based on the graph recommendation model. The graph recommendation model employs graph collaborative filtering technology, and its training samples include positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples that have not been planted.

2. The method for matching crop varieties with planting locations according to claim 1, characterized in that, The step of determining the adaptability matrix between the target crop variety and the planting location based on the yield data includes: The fitness matrix is ​​generated by iterating through all combinations of target crop varieties and all planting locations according to the fitness judgment rules. The adaptive judgment rule is as follows: If the yield data of the target variety at the target location is greater than the target threshold, then the target variety is determined to be suitable for planting at the target location. If the yield data of the target variety at the target location is not greater than the target threshold, then the target variety is determined to be unsuitable for planting at the target location. If no yield data for the target variety is obtained at the target location, it is determined to be in a non-planted state.

3. The method for matching crop varieties with planting locations according to claim 1, characterized in that, The generation of heterogeneous graphs based on the varietal traits, the environmental characteristics of the planting location, and the adaptation matrix includes: Create a class of nodes based on the varietal characteristics of all target crop varieties, with one varietal characteristic of a crop variety corresponding to one class of nodes; Create two types of nodes based on the environmental characteristics of all planting locations, with one type of node corresponding to the environmental characteristics of one planting location; Based on the fitness state of each element in the fitness matrix, construct the fitness relationship edges between Class I nodes and Class II nodes to obtain the heterogeneous graph.

4. The method for matching crop varieties with planting locations according to claim 3, characterized in that, The process of constructing adaptive relationship edges between first-class nodes and second-class nodes based on the adaptive state of each element in the adaptive matrix to obtain the heterogeneous graph includes: If the fitness state of an element in the fitness matrix is ​​suitable for planting, then the fitness relationship edge between the corresponding nodes corresponds to the first weight. If the fitness state of an element is unsuitable for planting, then the fitness relationship edge between the corresponding nodes corresponds to the second weight. If the fitness state of an element is unplanted, then no fitness relationship edge is created between the corresponding nodes.

5. The method for matching crop varieties with planting locations according to claim 1, characterized in that, The graph recommendation model includes a node feature aggregation module and an adaptive score calculation module; The step of inputting the heterogeneous graph into a pre-trained graph recommendation model and outputting an adaptability score based on the graph recommendation model includes: The node feature aggregation module aggregates the features of each type I node in the heterogeneous graph with the features of its neighboring nodes to obtain a first aggregated feature, and aggregates the features of each type II node with the features of its neighboring nodes to obtain a second aggregated feature. The first aggregated feature and the second aggregated feature are input into the adaptability score calculation module to determine the adaptability score between the target crop variety and the planting location.

6. The method for matching crop varieties with planting locations according to claim 1, characterized in that, The method further includes: Based on the adaptability score, a target crop variety with the highest adaptability score is matched for each planting location, and a planting location with the highest adaptability score is matched for each target crop variety.

7. A crop variety and planting location adaptation device, characterized in that, include: Acquisition module and processing module; The acquisition module is used to acquire the varietal characteristics of the target crop, the environmental characteristics of the planting location, and the yield data of different crop varieties at different planting locations. The processing module is used to determine the fitness matrix between the target crop variety and the planting location based on the yield data. The fitness matrix is ​​used to represent the fitness status between different target crop varieties and different planting locations. The fitness status includes: suitable for planting, unsuitable for planting, and not planted. The module generates a heterogeneous graph based on the variety trait characteristics, the environmental characteristics of the planting location, and the fitness matrix. The module inputs the heterogeneous graph into a pre-trained graph recommendation model and outputs a fitness score based on the graph recommendation model. The graph recommendation model employs graph collaborative filtering technology, and its training samples include positive samples suitable for planting, negative samples unsuitable for planting, and unevaluated samples that have not been planted.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the crop variety and planting location adaptation method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the crop variety and planting location adaptation method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the crop variety and planting location adaptation method as described in any one of claims 1 to 6.