Multi-subject united variety yield prediction method and system for protecting data privacy

By constructing a federal isomorphic forest model in variety yield prediction, using randomly selected target samples and features, local clients are notified to conduct local training, and the problem of multi-subject joint restriction is solved, and efficient data privacy protection and variety yield prediction is achieved.

CN119849985APending Publication Date: 2025-04-18BEIJING RES CENT FOR INFORMATION TECH & AGRI

Patent Information

Application Number
CN202510316784.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The variety yield prediction method in the prior art has limited joint restrictions on multi-subjects due to the privacy protection of breeding data, making it difficult to achieve effective data sharing and joint prediction.

Method used

A multi-subject joint variety yield prediction method is adopted to protect data privacy. By randomly selecting target samples and features, local clients are notified to conduct local training, and local optimal division characteristics are obtained to build a federated isomorphic forest model to achieve information synchronization between multiple subjects and consistency in model construction.

Benefits of technology

Without disclosing or sharing its own data, achieving multi-subject joint variety yield prediction has enhanced the robustness and prediction capabilities of the model and protected data privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849985A_ABST
    Figure CN119849985A_ABST
Patent Text Reader

Abstract

The invention provides a multi-subject joint variety yield prediction method and system for protecting data privacy, and is applied to the technical field of variety yield prediction.The method comprises the steps that a local optimal division feature with the minimum difference degree in a local division feature set is determined as a global optimal division feature; acquiring a ciphertext sample set of left and right sub-trees transmitted by the target client corresponding to the global optimal division feature; broadcasting the ciphertext sample sets of the left and right sub-trees to other clients in the plurality of local clients, so that the other clients generate tree nodes with the same structure as the target client; constructing a plurality of decision trees according to preset parameters until the federal isomorphic forest model is constructed; based on the federal isomorphic forest model, predicting the to-be-predicted test sets in the plurality of local clients to obtain a yield prediction result of the target variety; according to the invention, combined variety yield prediction can be carried out under the condition that multiple subjects do not disclose or share own data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of variety yield prediction, and in particular to a multi-agent joint variety yield prediction method and system that protects data privacy. Background Art

[0002] Big data-driven artificial intelligence technologies, such as machine learning, are widely used in variety yield prediction. However, new artificial intelligence technologies often require a large amount of training data to perform well, which is unrealistic in many cases. Most breeding entities are usually able to set up a limited number of test points and lack sufficient data to independently train machine learning models.

[0003] However, breeding data, especially crop phenotypic data obtained through complex and time-consuming field trials, are relatively private assets for each breeder and are difficult to share.

[0004] It can be seen from this that the variety yield prediction method in the relevant technology has the technical problem of limited multi-subject collaboration due to the security and privacy protection of breeding data. Summary of the invention

[0005] The present invention provides a multi-agent joint variety yield prediction method and system that protects data privacy, so as to solve the defect of the variety yield prediction method in the prior art that the multi-agent joint is limited, and realize that multiple subjects can perform joint variety yield prediction without disclosing or sharing their own data.

[0006] The present invention provides a multi-agent joint variety yield prediction method for protecting data privacy, comprising the following steps. Based on randomly selected target samples and target features corresponding to target varieties, multiple local clients are notified respectively, wherein the local training data set of each local client includes the target sample and the target feature; the local optimal partitioning features transmitted by the multiple local clients are obtained to obtain a local partitioning feature set, wherein the local optimal partitioning feature is a sample feature with the smallest difference between the predicted value and the true value of each local client in the multiple local clients within the data range of the target sample and the target feature; the local optimal partitioning feature with the smallest difference in the local partitioning feature set is determined as the global optimal partitioning feature; the ciphertext sample set of the left and right subtrees transmitted by the target client corresponding to the global optimal partitioning feature is obtained; the ciphertext sample set of the left and right subtrees is broadcasted to other clients among the multiple local clients, so that the other clients generate tree nodes with the same structure as the target client; the above steps are repeated to construct multiple decision trees according to preset parameters until the federal isomorphic forest model is constructed; based on the federal isomorphic forest model, the test set to be predicted in the multiple local clients is predicted to obtain the yield prediction result of the target variety.

[0007] According to a multi-agent joint variety yield prediction method that protects data privacy, the method comprises: calling the multiple local clients, and based on each sample of the test set to be predicted, descending from the root node of each tree of the federated isomorphic forest model of the local client until all samples of the test set to be predicted fall into the leaf node to obtain a leaf node sample set; obtaining the leaf node sample set of each local client among the multiple local clients; taking the intersection based on the leaf node sample set of each local client to obtain the test set to be predicted; determining the label average value corresponding to the leaf node where each sample to be predicted in the test set to be predicted is located; and determining the yield prediction result of the target variety based on the label average value corresponding to the leaf node where each sample to be predicted is located.

[0008] According to a multi-agent joint variety yield prediction method for protecting data privacy provided by the present invention, each sample of the test set to be predicted is dropped from the root node of each tree of the federated isomorphic forest model of the local client until all samples of the test set to be predicted fall into leaf nodes to obtain a leaf node sample set, including: taking each sample of the test set to be predicted as a current sample, recursively executing the following steps until all samples of the test set to be predicted fall into leaf nodes to obtain a leaf node sample set: when the current node of the federated isomorphic forest model of the local client carries partition information, based on the partition information, the current sample is divided into a target leaf node, wherein the target leaf node includes a left subtree leaf node and a right subtree leaf node; when the current node of the federated isomorphic forest model of the local client is an empty node, the current sample is simultaneously dropped to the left subtree leaf node and the right subtree leaf node of the empty node.

[0009] According to a multi-agent joint variety yield prediction method that protects data privacy provided by the present invention, before the randomly selected target samples and target features corresponding to the target varieties are notified to multiple local clients respectively, the method also includes: distributing an encryption algorithm and a public key to multiple system clients; calling each of the multiple system clients, and encrypting the sample index of the local training data set of each system client and the feature code of the local training data set of each system client according to the encryption algorithm and the public key to obtain a sample index set and a feature code set; obtaining the sample index set and the feature code set of each system client among the multiple system clients.

[0010] According to a multi-agent joint variety yield prediction method that protects data privacy provided by the present invention, before obtaining the local optimal partitioning features respectively transmitted by the multiple local clients to obtain the local partitioning feature set, the method also includes: calling each local client among the multiple local clients to traverse each sample value of each feature in the local training data set; based on each sample value of each feature, dividing the local training data set into a left data set and a right data set; taking the sum of the mean square error of the left data set and the mean square error of the right data set as the mean square error of each sample value; determining the feature corresponding to the sample value with the smallest mean square error as the local optimal partitioning feature of the local training data set.

[0011] According to a multi-agent joint variety yield prediction method that protects data privacy provided by the present invention, after broadcasting the ciphertext sample set of the left and right subtrees to other clients among the multiple local clients so that the other clients generate tree nodes with the same structure as the target client, the method also includes: when the tree node is generated, determining the generalization of the decision tree corresponding to the tree node based on a pre-pruning condition; when the generalization of the decision tree is reduced, pruning the tree node.

[0012] The present invention also provides a multi-agent joint variety yield prediction system for protecting data privacy, comprising the following modules: a notification module, used to notify multiple local clients respectively based on randomly selected target samples and target features corresponding to the target varieties, wherein the local training data set of each local client includes the target sample and the target feature; an acquisition module, used to acquire the local optimal partitioning features respectively transmitted by the multiple local clients to obtain a local partitioning feature set, wherein the local optimal partitioning feature is a sample feature of each local client in the multiple local clients with the smallest difference between the predicted value and the true value within the data range of the target sample and the target feature; a determination module, used to determine the local partitioning feature. The local optimal partitioning feature with the smallest difference in the set is the global optimal partitioning feature; the acquisition module is also used to obtain the ciphertext sample set of the left and right subtrees transmitted by the target client corresponding to the global optimal partitioning feature; the broadcast module is used to broadcast the ciphertext sample set of the left and right subtrees to other clients among the multiple local clients, so that the other clients generate tree nodes with the same structure as the target client; the construction module is used to repeatedly execute the above steps to construct multiple decision trees according to preset parameters until the federated isomorphic forest model is completed; the prediction module is used to predict the test set to be predicted in the multiple local clients based on the federated isomorphic forest model to obtain the yield prediction result of the target variety.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a multi-agent joint variety yield prediction method for protecting data privacy as described in any one of the above-mentioned methods.

[0014] 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 any of the multi-agent joint variety yield prediction methods for protecting data privacy as described above.

[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the multi-agent joint variety yield prediction methods for protecting data privacy as described above.

[0016] The multi-agent joint variety yield prediction method and system for protecting data privacy provided by the present invention can ensure the diversity and representativeness of data by randomly selecting target samples and target features, and at the same time, notify all clients with these samples and features in the local training data set to prepare for subsequent multi-agent joint prediction; each local client independently finds the sample feature with the smallest difference between the predicted value and the true value as the local optimal partitioning feature based on its local training data set, making full use of the data resources of each client, while avoiding direct sharing of data and protecting data privacy; by comparing the degree of difference of each local optimal partitioning feature, the global optimal partitioning feature is selected, and the advantage of multi-agent joint is utilized; by broadcasting the ciphertext sample set of the left and right subtrees transmitted by the target client corresponding to the global optimal partitioning feature, calling other clients to generate tree nodes with the same structure as the target client, achieving information synchronization among multiple subjects and consistency of model construction; by iteratively executing the above steps, multiple decision trees are constructed to form a federated isomorphic forest model, which enhances the robustness and prediction ability of the model; using the constructed federated isomorphic forest model, the test set to be predicted in each local client is predicted to obtain the yield prediction result of the target variety, and multi-agent joint variety yield prediction is achieved under the premise of protecting data privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of the multi-agent joint variety yield prediction method for protecting data privacy provided by the present invention.

[0019] Figure 2 It is a flowchart of the decision tree construction process provided by the present invention.

[0020] Figure 3 It is a flow chart of the sample to be predicted falling into a leaf node provided by the present invention.

[0021] Figure 4 It is a structural schematic diagram of the multi-agent joint variety yield prediction system for protecting data privacy provided by the present invention.

[0022] Figure 5 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] The present invention relates to the field of crop variety yield prediction, and in particular to a multi-agent joint yield prediction method and system based on federated learning and with data security and privacy protection as a prerequisite.

[0025] In recent years, big data-driven artificial intelligence technologies, such as machine learning, have been widely used in variety yield prediction and have demonstrated impressive results. However, new artificial intelligence technologies often require a large amount of training data to perform well, which is unrealistic in many cases. Most breeding entities are usually able to set up a limited number of test points and lack sufficient data to independently train machine learning models; in addition, due to barriers, it is difficult for different breeding entities to open up cooperation and share superior germplasm resources among entities. Therefore, in the scenario of intelligent breeding, the importance of breaking through the limitations of breeding entities for joint yield prediction has become increasingly prominent.

[0026] However, breeding data, especially crop phenotypic data obtained through complex and time-consuming field trials, are extremely valuable assets for each breeding entity and the lifeblood of each breeding unit. Due to their sensitivity, they are difficult to share. There is a huge contradiction between the inability to share data and the need for joint breeding. The competing interests between different entities have affected the possibility of cooperation and openness in data sharing that can benefit all parties.

[0027] Therefore, the application of federated learning in the field of variety yield prediction can solve the needs of the majority of breeding entities for joint breeding. Based on federated learning, it is of great significance to study the key technologies of variety yield prediction based on data security and privacy protection, so that the majority of breeding entities can cooperate without disclosing or sharing their own data and jointly benefit from the new generation of artificial intelligence technology.

[0028] In view of the defects in the prior art, the present invention combines the phenotypic data collected in the early field trials of the varieties and the meteorological data of the areas where the test points are located, and proposes a multi-agent joint yield prediction method and system based on data security and privacy protection to solve the above problems.

[0029] Based on the federated learning technology framework and the random forest algorithm, the present invention proposes a new method in which the server coordinates all clients to build a decision tree and share the same model structure. This method is called the federated isomorphic forest and is used for joint production forecasting by multiple entities. A significant advantage of this method is that it is compatible with both horizontal and vertical federated learning scenarios.

[0030] It should be noted that according to the differences in the distribution of isolated data, federated learning scenarios can be divided into three categories: horizontal federated learning refers to the same client features but different samples, vertical federated learning refers to the same client samples but different features, and federated transfer learning refers to different client samples and features. Most existing methods can only solve horizontal federation problems.

[0031] Optionally, the multi-agent joint variety yield prediction method for protecting data privacy in the embodiment of the present application can be executed by a server, or by a terminal device, or jointly by a server and a terminal device, taking the case where the multi-agent joint variety yield prediction method for protecting data privacy in this embodiment is executed by a server (server end) as an example.

[0032] Figure 1 is a flow chart of the multi-agent joint variety yield prediction method for protecting data privacy provided by the present invention, such as Figure 1 As shown, the method includes the following steps.

[0033] Step 101 , based on randomly selected target samples and target features corresponding to target varieties, multiple local clients are notified respectively.

[0034] The local training data set of each local client includes target samples and target features.

[0035] In the embodiment of the present invention, the server randomly selects target samples and target features corresponding to the target varieties, and notifies all local clients whose local training data sets include the target samples and target features respectively.

[0036] The server initializes and randomly selects some samples and Features ,in, represents the target sample, Represents the global sample set corresponding to all clients, represents the target feature, Represents the global feature set corresponding to all clients. The server privately notifies all clients whose local data (local training dataset) has the target samples and target features.

[0037] That is, the local client We only know that some samples and features in our local data have been selected, but we don’t know which samples and features of other clients have been selected, nor do we know how many samples and features the server has selected in total.

[0038] Step 102: Obtain local optimal partitioning features respectively transmitted by multiple local clients to obtain a local partitioning feature set.

[0039] The local optimal partitioning feature is a sample feature of each local client among multiple local clients with the smallest difference between the predicted value and the true value within the data range of the target sample and the target feature.

[0040] In the embodiment of the present invention, each local client that is notified The sample selected locally is within the data range of the target sample ( ), the locally selected feature is within the data range of the target feature ( ), by calculating the difference between the predicted value and the true value of the selected sample to determine the local client The local optimal partitioning feature , and then the local optimal partition feature The corresponding difference degree measurement value is sent to the server.

[0041] The server obtains the local optimal partitioning features transmitted by each local client among the multiple local clients, and constructs a local partitioning feature set.

[0042] Furthermore, the degree of difference between the predicted value and the true value can be calculated through classification tasks or regression tasks. Generally, classification tasks can use the Gini index or entropy, and regression tasks can use mean-square error (mse) and mean absolute error (mae).

[0043] Through the embodiment of the present invention, each local client independently finds the sample feature with the smallest difference between the predicted value and the true value as the local optimal partition feature based on its local training data set. This step fully utilizes the data resources of each client, while avoiding direct sharing of data and protecting data privacy.

[0044] Step 103: determine the local optimal partition feature with the smallest difference in the local partition feature set as the global optimal partition feature.

[0045] In the embodiment of the present invention, the feature with the smallest mean square error is selected from the local optimal division features sent by all local clients. , confirming it as the global optimal partition feature of this round .

[0046] Through the embodiment of the present invention, the global optimal partitioning feature is selected by comparing the difference between each local optimal partitioning feature. This step ensures the consistency and accuracy in the model building process, and at the same time reflects the advantage of multi-agent joint prediction.

[0047] Step 104: Obtain a set of ciphertext samples of the left and right subtrees transmitted by the target client corresponding to the global optimal partitioning feature.

[0048] In the embodiment of the present invention, after the server obtains the local optimal partitioning features sent by all local clients, it selects the feature with the best (smallest) difference degree metric value as the global optimal partitioning feature. , and inform the global optimal partition feature Corresponding target client Perform left and right subtree partitioning and save detailed partitioning information (including partitioning features and partitioning thresholds) at the current partitioning node.

[0049] Target Client The ciphertext sample set of the left and right subtrees that have been divided and The server obtains the ciphertext sample set of the left and right subtrees transmitted by the target client corresponding to the global optimal partitioning feature.

[0050] Through the embodiment of the present invention, the target client divides its local training data set into left and right subtrees according to the global optimal partitioning feature, and transmits the sample set in ciphertext form. This step not only protects data privacy, but also provides a basis for other clients to generate tree nodes with the same structure.

[0051] Step 105 : broadcast the ciphertext sample sets of the left and right subtrees to other clients among the multiple local clients, so that the other clients generate tree nodes with the same structure as the target client.

[0052] In the embodiment of the present invention, the target client The ciphertext sample set of the left and right subtrees that have been divided and It is sent to the server, which then broadcasts it to other clients, allowing other clients to also generate tree nodes with the same structure but without detailed information.

[0053] Through the embodiment of the present invention, by broadcasting the ciphertext sample set, other clients can generate tree nodes with the same structure as the target client based on the ciphertext samples of the left and right subtrees. This step achieves information synchronization among multiple subjects and consistency in model construction.

[0054] Step 106, repeat the above steps to build multiple decision trees according to preset parameters until the federated isomorphic forest model is built.

[0055] Iterate step S101 to step S105 until a decision tree is built. In the above process, the pre-pruning condition is checked when each node of the tree is generated. Pre-pruning is one of the main tools used by decision tree algorithms in machine learning to solve the risk of overfitting. The main idea is to calculate the impact of each node generation on the generalization performance of the entire tree. If the generalization is reduced, the node is directly pruned, and the client and server create leaf nodes accordingly. .

[0056] In an embodiment of the present invention, the above steps are repeatedly performed to continuously construct multiple decision trees according to preset parameters until the entire federated isomorphic forest model is constructed.

[0057] Through the example of the present invention, by iteratively executing the above steps, multiple decision trees are constructed to form a federated isomorphic forest model. This step enhances the robustness and predictive ability of the model, because the combination of multiple decision trees can improve the accuracy and stability of the prediction.

[0058] Step 107, based on the federated isomorphic forest model, predict the test sets to be predicted in multiple local clients to obtain the yield prediction result of the target variety.

[0059] In the embodiment of the present invention, the federated homogeneous forest model is obtained by joint training of multiple local clients under the premise of protecting data privacy. Each local client is trained based on its local training data set (including target samples and target features) and contributes its local optimal partitioning features; the local optimal partitioning features are summarized and used to determine the global optimal partitioning features, and then the nodes of the decision tree are constructed; by repeating this process, a federated homogeneous forest model consisting of multiple decision trees is constructed.

[0060] In the federated homogeneous forest model, the prediction process can be distributed, and each decision tree (or a subset of trees) can be assigned to one or more local clients for prediction; the local clients use their local resources and computing power to predict the samples in the test set and generate prediction results. The prediction results can be classification labels (for classification problems) or regression values ​​(for regression problems, such as yield prediction).

[0061] The forecast results of all local clients need to be aggregated to the central server (server) or a designated client. During the aggregation process, the forecast results may need to be decrypted (if they were encrypted before). Then, the central server (server) or designated client can further process and analyze these results, such as calculating the mean, median or other statistics, to obtain the final yield forecast results.

[0062] Through the above steps of the embodiment of the present invention, by randomly selecting target samples and target features, the diversity and representativeness of the data can be ensured, and at the same time, all clients with these samples and features in the local training data set are notified to prepare for the subsequent multi-agent joint prediction; each local client independently finds the sample feature with the smallest difference between the predicted value and the true value as the local optimal partitioning feature based on its local training data set, making full use of the data resources of each client, while avoiding direct sharing of data and protecting data privacy; by comparing the degree of difference of each local optimal partitioning feature, the global optimal partitioning feature is selected, and the advantage of multi-agent joint is utilized; by broadcasting the ciphertext sample set of the left and right subtrees transmitted by the target client corresponding to the global optimal partitioning feature, calling other clients to generate tree nodes with the same structure as the target client, the information synchronization between multiple subjects and the consistency of model construction are achieved; by iteratively executing the above steps, multiple decision trees are constructed to form a federated isomorphic forest model, which enhances the robustness and prediction ability of the model; using the constructed federated isomorphic forest model, the test set to be predicted in each local client is predicted to obtain the yield prediction result of the target variety, and the multi-agent joint variety yield prediction is achieved under the premise of protecting data privacy.

[0063] According to a multi-agent joint variety yield prediction method for protecting data privacy provided by the present invention, based on the federated isomorphic forest model, prediction is performed on a test set to be predicted in multiple local clients to obtain a yield prediction result of a target variety, including: Call multiple local clients, and based on each sample of the test set to be predicted, descend from the root node of each tree of the federated isomorphic forest model of the local client until all samples of the test set to be predicted fall into the leaf node, thereby obtaining a leaf node sample set; Obtain a leaf node sample set of each local client among multiple local clients; Take the intersection of the leaf node sample sets of each local client to obtain the test set to be predicted; Determine the label average value corresponding to the leaf node where each sample to be predicted in the test set to be predicted is located; Based on the average value of the labels corresponding to the leaf nodes where each sample to be predicted is located, the yield prediction result of the target variety is determined.

[0064] In the embodiment of the present invention, each local client sends the local sample set that falls in the leaf node (i.e., the leaf node sample set) ( Indicates The leaf node sample set of local clients, Indicates The leaf node sample set of the local client The server obtains a set of leaf node samples of each local client among multiple local clients.

[0065] The server gathers all The leaf node sample set of each client ( Indicates The leaf node sample set of local clients, represents the total number of clients), then the set of samples to be predicted that actually fall into each leaf node (i.e., the test set to be predicted) is obtained by taking the intersection operation. ,in , Indicates samples to be predicted, Indicates The leaf node sample set of the local client leaf node samples.

[0066] Like the classic centralized random forest model for regression tasks, after all samples to be predicted have fallen into leaf nodes, the final yield prediction result can be easily obtained from the server by calculating the average value of the label corresponding to the leaf node where the sample is located.

[0067] In some embodiments, for each sample in the test set to be predicted, on each tree of the homogeneous random forest model of each local client, starting from the root node, the sample is gradually dropped down according to the feature value until the sample falls into a leaf node. This process is performed for all samples in the test set to ensure that each sample can find its corresponding leaf node in the model of each local client.

[0068] The server collects all leaf nodes where the samples to be predicted fall on each local client to form a leaf node sample set. This set includes all samples that fall into the same leaf node based on the test set sample characteristics on each local client.

[0069] An intersection operation is performed on the leaf node sample sets of all local clients. Only when a sample falls into the same leaf node on all clients will it be included in the final test set to be predicted. This step is actually a consensus mechanism for the prediction results to ensure the stability and reliability of the prediction results.

[0070] For each sample in the test set to be predicted, find its corresponding leaf node on each local client and calculate the average value of the sample labels in these leaf nodes. The labels usually represent the actual yield value or other target variables.

[0071] Based on the average label value of each sample to be predicted, the final yield prediction result of the target variety is determined. The yield prediction result is a comprehensive consideration of the prediction results of all local clients. The deviation is reduced and the accuracy of the prediction is improved by taking the intersection and calculating the average value.

[0072] Through the embodiment of the present invention, a federated learning framework is relied upon, in which data is kept on the local client and not centrally processed, thereby protecting data privacy. At the same time, by taking the intersection and calculating the average, the prediction results of multiple clients can be fully utilized to improve the robustness and accuracy of the prediction.

[0073] According to a multi-agent joint variety yield prediction method for protecting data privacy provided by the present invention, based on each sample of the test set to be predicted, the sample is dropped from the root node of each tree of the federated isomorphic forest model of the local client until all samples of the test set to be predicted fall into the leaf node, and a leaf node sample set is obtained, including: Take each sample of the test set to be predicted as the current sample, and recursively perform the following steps until all samples of the test set to be predicted fall into the leaf node, and obtain the leaf node sample set: When the current node of the federated isomorphic forest model of the local client carries partition information, the current sample is partitioned into a target leaf node based on the partition information, wherein the target leaf node includes a left subtree leaf node and a right subtree leaf node; When the current node of the federated isomorphic forest model of the local client is an empty node, the current sample is simultaneously dropped to the left subtree node and the right subtree node of the empty node.

[0074] In the embodiment of the present invention, the trained federated homogeneous forest model is used to batch predict production. Each sample in the test set to be predicted ( Indicates the local client The predicted samples are stored locally, starting from the root node of each tree of the federated isomorphic forest model.

[0075] If the current node of the local model has detailed partitioning information, the sample is determined based on the partitioning characteristics and the partitioning threshold. Should it fall into the left or right subtree? If the current node is empty, then the sample Fall to the left and right subtrees at the same time.

[0076] Recursively perform the above steps until all samples to be predicted fall into one or several leaf nodes of each tree. middle.

[0077] Through the embodiments of the present invention, under the framework of federated learning, data is retained on the local client and does not need to be centralized in a central location, which reduces the risk of data leakage and protects the privacy of users or organizations. Each local client independently trains a model on its data and collaborates with other clients by updating model parameters or aggregating prediction results, thereby achieving knowledge sharing without directly sharing the original data.

[0078] According to a multi-agent joint variety yield prediction method for protecting data privacy provided by the present invention, before notifying multiple local clients respectively based on randomly selected target samples and target features corresponding to the target variety, the method further includes: Distribute encryption algorithms and public keys to multiple system clients; Calling each of the multiple system clients, and encrypting the sample index of the local training data set of each system client and the feature code of the local training data set of each system client according to the encryption algorithm and the public key, to obtain a sample index set and a feature code set; A sample index set and a feature code set of each system client among multiple system clients are obtained.

[0079] In the embodiment of the present invention, a unified encryption algorithm and public key are specified and managed by a (central) server and distributed to all system clients.

[0080] Furthermore, the encryption algorithm is used to protect the privacy and security of each client's local data, and any encryption algorithm can be used according to actual needs. Since the server only needs to align features and samples based on the data ciphertext and does not need to decrypt, a hash encryption algorithm represented by MD5 can be used for one-way, irreversible encryption, making the client data more secure.

[0081] The embodiment of the present invention uses the MD5 algorithm and specifies an initial public key, which is distributed to all system clients.

[0082] Each system client encrypts all sample indexes and feature codes in the local training data set according to a unified encryption algorithm and key, and then sends them to the server for aggregation. That is, the server has the sample index set and feature number set of all data, but does not know the true meaning of these features and samples, nor does it know what all the data actually is.

[0083] Here, the system client is a client that is pre-associated with the server, and the local training dataset includes the target samples and target features randomly selected by the server, which will be used as the local client.

[0084] Through the embodiment of the present invention, a hash encryption algorithm such as MD5 is used for one-way, irreversible encryption, which further enhances the security of the data; this encryption method makes it impossible for an attacker to obtain the original data by decryption even if the data is intercepted, thereby protecting the integrity and authenticity of the data. Although the server cannot decrypt the data, it can still align features and samples based on the encrypted data (such as sample index and feature code), which enables the server to effectively process and analyze the data without exposing the original data.

[0085] According to a multi-agent joint variety yield prediction method for protecting data privacy provided by the present invention, before obtaining the local optimal partitioning features respectively transmitted by multiple local clients to obtain the local partitioning feature set, the method further includes: Call each local client of the multiple local clients to traverse each sample value of each feature in the local training data set; Based on each sample value of each feature, the local training data set is divided into a left data set and a right data set; The sum of the mean square error of the left data set and the mean square error of the right data set is taken as the mean square error of each sample value; The feature corresponding to the sample value with the smallest mean square error is determined as the local optimal partition feature of the local training data set.

[0086] In the embodiment of the present invention, the mean square error is calculated To determine the local optimal partitioning characteristics for each local client , the specific calculation steps are: first traverse each feature (in, Indicates the current feature. Indicates the local client Each sample value of the feature set ,Will Divide into 2 sets and Then the two sets are calculated by the following formula .

[0087] ; ; in, represents the average value, For local clients The number of samples in the local training dataset, For sample The corresponding label value, represents the mean square error.

[0088] The final calculation of the total , (here, represents the mean square error of the sample values, and Represents the mean square error of the left data set and the mean square error of the right data set respectively) The smallest feature is the local optimal partition feature , and at the same time, the sample value That is the local optimal partition threshold, and then the local optimal partition feature and The value is sent to the server.

[0089] Mean squared error (MSE) is a commonly used metric to measure the performance of a prediction model. It represents the average of the squares of the differences between the predicted values ​​and the actual values. The smaller the value of MSE, the better the prediction performance of the model, because it means that the difference between the predicted values ​​and the actual values ​​is smaller.

[0090] Through the embodiment of the present invention, the average value can be used to understand the central tendency of the data, and the mean square error can be used to measure the accuracy of the model prediction.

[0091] According to a multi-agent joint variety yield prediction method for protecting data privacy provided by the present invention, after broadcasting the ciphertext sample set of the left and right subtrees to other clients among multiple local clients so that the other clients generate tree nodes with the same structure as the target client, the method further includes: When a tree node is generated, the generalization of the decision tree corresponding to the tree node is determined based on the pre-pruning condition; When the generalization of the decision tree decreases, the tree nodes are pruned.

[0092] In the embodiment of the present invention, during the process of decision tree construction, the pre-pruning condition is checked when each node of the tree is generated. Pre-pruning is one of the main tools used by decision tree algorithm in machine learning to solve the risk of overfitting. The main idea is to calculate the impact of each node generation on the generalization performance of the whole tree. If the generalization is reduced, the node is directly pruned, and the client and server create leaf nodes accordingly. .

[0093] Pre-pruning is a technique that stops tree node splitting early in the decision tree generation process, aiming to prevent the decision tree from overfitting the training data. Before each node of the decision tree is split, it is evaluated according to predefined pruning conditions to see whether the split can improve the generalization ability of the decision tree. These pruning conditions may include: Information gain / Gini impurity / entropy reduction: If the information gain, Gini impurity, or entropy reduction of the child node after the split is lower than a certain threshold, it is considered that the split will not bring about a significant improvement in generalization ability, so the split is stopped.

[0094] The number of samples contained in the node: If the number of samples contained in a node is less than a certain threshold, the splitting is stopped to avoid overfitting when the samples are sparse.

[0095] Validation set accuracy / loss: Use an independent validation set to evaluate the change in accuracy or loss before and after the split. If the validation set performance does not improve significantly after the split, stop the split.

[0096] By applying these pre-pruning conditions, unnecessary splits can be terminated early during the decision tree construction process, thereby maintaining the simplicity and generalization ability of the decision tree.

[0097] Pruning usually includes the following methods: Post-Pruning: After the decision tree is fully generated, traverse upward from the leaf node. If the subtree of an internal node performs worse on the validation set than replacing the internal node with a leaf node (whose category is the category with the most samples in the subtree), pruning is performed.

[0098] Cost Complexity Pruning: A pruning parameter is introduced to control the complexity of the decision tree. The larger the parameter, the more severe the pruning. Then, the optimal pruning parameter is selected through methods such as cross-validation.

[0099] Error Reduction Pruning: Use an independent validation set to evaluate the change in error rate before and after pruning. If the error rate decreases after pruning, pruning is performed.

[0100] Through the embodiment of the present invention, the goal of pruning is to remove those parts that do not contribute much to the generalization ability of the decision tree, so as to obtain a simpler decision tree with stronger generalization ability.

[0101] The following describes an example of a multi-agent joint variety yield prediction method for protecting data privacy provided by the present invention in practical application.

[0102] It should be noted that the target crop in the embodiment of the present invention may be any existing crop, such as corn, rice, cotton, wheat, soybean, etc., and the embodiment of the present invention does not specifically limit this.

[0103] It should be noted that, in the embodiments of the present invention, the target crop is corn, and the technical solution of the embodiments of the present invention is described in detail.

[0104] The multi-agent joint production forecasting method proposed in the embodiment of the present invention includes the following steps.

[0105] Step S1, each breeding subject participating in the cooperation is regarded as a client in the system, represented as Each local client Each of them constructs its own local training dataset, expressed as , including variety test data and meteorological environment data. The varieties to be predicted of all subjects and the varieties used as training data should belong to the same crop. Each data in the local training data set is a field test completed by a subject for a certain variety at a certain test point. Each data is represented by six-character data {subject, variety, test point, test year, trait feature set, meteorological indicator set}.

[0106] Furthermore, the trait feature set in step S1 includes phenological period, agronomic traits, pest (disease) zoning and grouping survey items, and designated test traits.

[0107] Furthermore, the meteorological index set in step S1 includes temperature, humidity, air pressure, wind, sunshine, etc. These meteorological data should be the phased statistical values ​​within the start and end time of the growth period of each variety test. The mean and variance of each type of meteorological index within the stage can be further calculated separately and used as training data features.

[0108] It should be noted that this method requires a large amount of data communication and mathematical calculations between the server and the participating breeding entities. Therefore, the scale of cooperative entities to which the method is applicable will be limited by computing power and network bandwidth resources. The greater the computing power and the faster the network communication, the more cooperative entities can be supported.

[0109] In step S2, the central server specifies and manages a unified encryption algorithm and public key, and distributes them to all clients.

[0110] Furthermore, the encryption algorithm in step S2 is used to protect the privacy and security of local data of each client, and any encryption algorithm can be used according to actual needs. Since the server only needs to align features and samples based on the data ciphertext and does not need to decrypt, a hash encryption algorithm represented by MD5 can be used for one-way, irreversible encryption, thereby making the client data more secure.

[0111] The embodiment of the present invention uses the MD5 algorithm and specifies an initial public key, which is distributed to all clients.

[0112] Step S3: Each local client Both local training datasets All sample indexes and feature codes in the data are encrypted according to a unified encryption algorithm and key, and then sent to the server for aggregation. That is, the server has the sample index set and feature number set of all data, but cannot know the true meaning of these features and samples, nor what all the data actually is.

[0113] In an embodiment of the present invention, the features and samples in the local training data set of each client are first encoded according to standard English abbreviations. For example, the plant height is encoded as PH (Plant Height), the maximum temperature mean is encoded as MaxTM (Maximum Temperature Mean), and so on. Subsequently, one-way, irreversible encryption is performed using the MD5 algorithm based on the key sent by the server. Tables 1 and 2 give several examples of feature encoding and sample encoding encryption. Finally, all the encrypted ciphertexts of the feature codes are sent to the server together. Since each client uses the standard feature code and the same key for MD5 encryption, the ciphertexts of the same features are the same, which helps with feature alignment. At the same time, it is difficult for both the server and other external malicious attackers to crack these ciphertexts to learn the true meaning of the features.

[0114] Table 1

[0115] Table 2

[0116] Step S4: The server initializes and randomly selects some samples and Features , privately notify all clients whose local data has these samples and features. In other words, the client only knows that some samples and features in its local data have been selected, but does not know which samples and features of other clients have been selected, nor does it know how many samples and features the server has selected in total.

[0117] Step S5: Each local client that is notified Samples selected locally and Features Within the data range, the local optimal partitioning feature is determined by calculating the difference between the predicted value and the true value. , and then the local optimal partition feature The corresponding difference degree measurement value is sent to the server.

[0118] Furthermore, in step S5, the general classification task of calculating the difference between the predicted value and the true value can use the Gini coefficient or entropy, and the regression task can use the mean square error and mean absolute error.

[0119] The embodiment of the present invention is to calculate To determine its local optimal partitioning features , the specific calculation steps are: first traverse each feature Each sample value of ,Will Divide into 2 sets and Then the two sets are calculated by the following formula .

[0120] ; ; in for The number of samples in For sample The corresponding label value.

[0121] The final calculation of the total , select The smallest feature is the local optimal partition feature , and at the same time, the sample value That is the local optimal partition threshold, and then the local optimal partition feature and The value is sent to the server.

[0122] Step S6: After the server collects all the information sent by the client, it selects the feature with the best difference degree metric value and confirms it as the global optimal segmentation feature. , and notify the corresponding target client Perform left and right subtree partitioning and save detailed partitioning information (including partitioning features and partitioning thresholds) at the current partitioning node.

[0123] The embodiment of the present invention selects the local optimal partitioning features sent by all clients. Minimum features , confirming it as the global optimal partition feature of this round .

[0124] Step S7, target client The ciphertext sample set of the left and right subtrees that have been divided and It is sent to the server, which then broadcasts it to other clients, allowing other clients to also generate tree nodes with the same structure but without detailed information.

[0125] refer to Figure 2 , Figure 2 It is a flowchart of the decision tree construction process provided by the present invention, which includes steps S5-S7.

[0126] Step S8, iterate steps S5-S7 until a decision tree is built. In the above process, the pre-pruning condition is checked when each node of the tree is generated. Pre-pruning is one of the main tools used by decision tree algorithms in machine learning to solve the risk of overfitting. The main idea is to calculate the impact of each node generation on the generalization performance of the entire tree. If the generalization is reduced, the node is directly pruned, and the client and server create leaf nodes accordingly. .

[0127] Step S9, in the entire federated learning network, the training steps of steps S4-S8 are continuously repeated, and multiple decision trees are continuously constructed according to preset parameters until the entire federated isomorphic forest model is constructed.

[0128] Step S10: Use the trained model to perform batch production forecasts on each local client. Each sample in the test set to be predicted , starting from the root node of each tree of the locally stored forest model and descending downwards.

[0129] Step S11: If the current node of the local model stores detailed partitioning information, the sample is determined based on the partitioning feature and the partitioning threshold. Should it fall into the left or right subtree? If the current node is empty, then the sample Fall to the left and right subtrees at the same time.

[0130] refer to Figure 3 , Figure 3 It is a schematic diagram of the process of the sample to be predicted falling into the leaf node provided by the present invention, which includes steps S10-S11.

[0131] Step S12, recursively perform steps S10-S11 until all samples to be predicted fall into one or several leaf nodes of each tree middle.

[0132] Step S13: Each local client All local samples fall into the leaf node set Send to the server.

[0133] Step S14: The server gathers all The leaf node sample set of each client Finally, the set of samples to be predicted that actually fall into each leaf node is obtained by taking the intersection operation. ,in .

[0134] Step S15, like the classic centralized random forest model for regression tasks, after all samples to be predicted have fallen into leaf nodes, the final yield prediction result can be easily obtained from the server by calculating the average value of the label corresponding to the leaf node where the sample is located.

[0135] The embodiment of the present invention divides the data set on each client into a training set and a test set in a ratio of 4:1, that is, 80% of the data is used as the training set, and the remaining 20% ​​is used to test the prediction accuracy of the algorithm. The results are as follows: , indicating that the model trained in the embodiment of the present invention has excellent performance.

[0136] in, The value is a statistic that measures the goodness of fit of the regression model. It indicates how well the regression model fits the observed values ​​and represents the percentage of the dependent variable in the model that can be explained by the independent variable. The value range is between 0 and 1. The larger the value, the better the regression model fits the observed values.

[0137] It is the arithmetic square root of the average of the sum of squared errors, called the root mean square error, and is the most commonly used evaluation indicator for measuring prediction errors in regression models.

[0138] Mean absolute error Also known as Norm loss is the average of the absolute values ​​of the errors, It can accurately reflect the size of the actual prediction error and is used to evaluate the degree of deviation between the true value and the fitted value. and The closer the value is to 0, the better the model fit is and the higher the model prediction accuracy is.

[0139] Through the embodiments of the present invention, a multi-agent joint yield prediction method and system based on data security and privacy protection are proposed. Through comprehensive analysis of the variety test data collected locally by each subject and the environmental meteorological data of the corresponding planting area, a new federal isomorphic forest method is proposed. Based on this method, a yield prediction model is obtained by joint training of multiple subjects, which helps the majority of breeding subjects such as seed companies and scientific research institutes to break through the dilemma of data islands and the difficulty of sharing superior germplasm resources. Joint modeling and intelligent prediction can be performed without disclosing or sharing their own data, thereby solving the objective needs and practical problems of intelligent joint variety yield prediction.

[0140] The multi-agent joint variety yield prediction system for protecting data privacy provided by the present invention is described below. The multi-agent joint variety yield prediction system for protecting data privacy described below and the multi-agent joint variety yield prediction method for protecting data privacy described above can be referenced to each other.

[0141] refer to Figure 4 , Figure 4 It is a structural schematic diagram of the multi-agent joint variety yield prediction system for protecting data privacy provided by the present invention.

[0142] A notification module 401 is used to notify a plurality of local clients respectively based on the randomly selected target samples and target features corresponding to the target varieties, wherein the local training data set of each local client includes the target samples and target features; The acquisition module 402 is used to acquire the local optimal partitioning features transmitted by the multiple local clients respectively, and obtain a local partitioning feature set, wherein the local optimal partitioning feature is a sample feature of each local client in the multiple local clients with the smallest difference between the predicted value and the true value within the data range of the target sample and the target feature; A determination module 403 is used to determine the local optimal partition feature with the smallest difference in the local partition feature set as the global optimal partition feature; The acquisition module 402 is further used to acquire a set of ciphertext samples of the left and right subtrees transmitted by the target client corresponding to the global optimal partitioning feature; A broadcast module 404, configured to broadcast the ciphertext sample set of the left and right subtrees to other clients among the multiple local clients, so that the other clients generate tree nodes with the same structure as the target client; A construction module 405 is used to repeatedly execute the above steps to construct multiple decision trees according to preset parameters until the construction of the federated isomorphic forest model is completed; The prediction module 406 is used to predict the test sets to be predicted in multiple local clients based on the federated isomorphic forest model to obtain the yield prediction result of the target variety.

[0143] Specifically, the multi-subject joint variety yield prediction system for protecting data privacy provided by the present invention can implement all the method steps implemented by the multi-subject joint variety yield prediction method embodiment for protecting data privacy, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those of the method embodiment will not be described in detail here.

[0144] Figure 5 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute a multi-agent joint variety yield prediction method for protecting data privacy, the method comprising: based on the randomly selected target samples and target features corresponding to the target variety, notifying multiple local clients respectively, wherein the local training data set of each local client includes the target sample and the target feature; obtaining the local optimal partitioning features transmitted by the multiple local clients respectively, and obtaining a local partitioning feature set, wherein the local optimal partitioning feature is the sample feature with the smallest difference between the predicted value and the true value of each local client in the multiple local clients within the data range of the target sample and the target feature; determining the local optimal partitioning feature with the smallest difference in the local partitioning feature set as the global optimal partitioning feature; obtaining the ciphertext sample set of the left and right subtrees transmitted by the target client corresponding to the global optimal partitioning feature; broadcasting the ciphertext sample set of the left and right subtrees to other clients among the multiple local clients, so that the other clients generate tree nodes with the same structure as the target client; repeating the above steps, constructing multiple decision trees according to the preset parameters until the federated isomorphic forest model is completed; based on the federated isomorphic forest model, predicting the test sets to be predicted in the multiple local clients to obtain the yield prediction result of the target variety.

[0145] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0146] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program 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 multi-agent joint variety yield prediction method for protecting data privacy provided by the above methods. The method includes: based on randomly selected target samples and target features corresponding to the target variety, notifying multiple local clients respectively, wherein the local training data set of each local client includes the target sample and the target feature; obtaining the local optimal partitioning features transmitted by the multiple local clients respectively, and obtaining a local partitioning feature set, wherein the local optimal partitioning feature is each local client in the multiple local clients. The method comprises the following steps: finding the sample feature with the smallest difference between the predicted value and the true value within the data range of the target sample and the target feature on the client side; determining the local optimal partition feature with the smallest difference in the local partition feature set as the global optimal partition feature; obtaining the ciphertext sample set of the left and right subtrees transmitted by the target client corresponding to the global optimal partition feature; broadcasting the ciphertext sample set of the left and right subtrees to other clients among multiple local clients, so that other clients generate tree nodes with the same structure as the target client; repeating the above steps, building multiple decision trees according to the preset parameters, until the federal isomorphic forest model is built; based on the federal isomorphic forest model, predicting the test sets to be predicted in multiple local clients, and obtaining the yield prediction results of the target variety.

[0147] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the processor executes the multi-agent joint variety yield prediction method for protecting data privacy provided by the above methods, the method comprising: based on randomly selected target samples and target features corresponding to the target varieties, notifying multiple local clients respectively, wherein the local training data set of each local client includes the target sample and the target feature; obtaining the local optimal partitioning features respectively transmitted by the multiple local clients to obtain a local partitioning feature set, wherein the local optimal partitioning feature is the data of each local client in the target sample and the target feature. The sample feature with the smallest difference between the predicted value and the true value within the range; determine the local optimal partition feature with the smallest difference in the local partition feature set as the global optimal partition feature; obtain the ciphertext sample set of the left and right subtrees transmitted by the target client corresponding to the global optimal partition feature; broadcast the ciphertext sample set of the left and right subtrees to other clients in multiple local clients, so that other clients generate tree nodes with the same structure as the target client; repeat the above steps to build multiple decision trees according to the preset parameters until the federated isomorphic forest model is built; based on the federated isomorphic forest model, predict the test sets to be predicted in multiple local clients to obtain the yield prediction results of the target variety.

[0148] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-agent joint variety yield prediction method that protects data privacy, characterized in that: include: Based on the randomly selected target samples and target features corresponding to the target varieties, respectively notifying a plurality of local clients, wherein the local training data set of each local client includes the target samples and the target features; Acquire local optimal partitioning features respectively transmitted by the multiple local clients to obtain a local partitioning feature set, wherein the local optimal partitioning feature is a sample feature of each local client among the multiple local clients with the smallest difference between a predicted value and a true value within a data range of the target sample and the target feature; Determine the local optimal partition feature with the smallest difference in the local partition feature set as the global optimal partition feature; Obtaining a set of ciphertext samples of left and right subtrees transmitted by a target client corresponding to the global optimal partitioning feature; Broadcasting the ciphertext sample sets of the left and right subtrees to other clients among the multiple local clients, so that the other clients generate tree nodes with the same structure as that of the target client; Repeat the above steps to build multiple decision trees according to the preset parameters until the federated isomorphic forest model is built; Based on the federated isomorphic forest model, prediction is performed on the test sets to be predicted in the multiple local clients to obtain the yield prediction result of the target variety.

2. The multi-agent joint variety yield prediction method for protecting data privacy according to claim 1 is characterized in that: The method of predicting the test sets to be predicted in the multiple local clients based on the federated isomorphic forest model to obtain the yield prediction result of the target variety includes: Call the multiple local clients, and based on each sample of the test set to be predicted, descend from the root node of each tree of the federated isomorphic forest model of the local clients until all samples of the test set to be predicted fall into the leaf nodes, thereby obtaining a leaf node sample set; Obtaining a leaf node sample set of each local client among the multiple local clients; Taking the intersection based on the leaf node sample set of each local client to obtain a test set to be predicted; Determine the label average value corresponding to the leaf node where each sample to be predicted in the test set to be predicted is located; Based on the label average value corresponding to the leaf node where each sample to be predicted is located, the yield prediction result of the target variety is determined.

3. The multi-agent joint variety yield prediction method for protecting data privacy according to claim 2 is characterized in that: The method of descending from the root node of each tree of the federated isomorphic forest model of the local client based on each sample of the test set to be predicted until all samples of the test set to be predicted fall into the leaf nodes to obtain a leaf node sample set includes: Each sample of the test set to be predicted is used as the current sample, and the following steps are recursively performed until all samples of the test set to be predicted fall into the leaf node, thereby obtaining a leaf node sample set: When the current node of the federated isomorphic forest model of the local client carries partition information, based on the partition information, the current sample is partitioned into a target leaf node, wherein the target leaf node includes a left subtree leaf node and a right subtree leaf node; When the current node of the federated isomorphic forest model of the local client is an empty node, the current sample is simultaneously placed on the left subtree node and the right subtree node of the empty node.

4. The multi-agent joint variety yield prediction method for protecting data privacy according to claim 1 is characterized in that: Before notifying a plurality of local clients respectively based on the randomly selected target samples and target features corresponding to the target varieties, the method further includes: Distribute encryption algorithms and public keys to multiple system clients; Calling each of the multiple system clients, and encrypting the sample index of the local training data set of each system client and the feature code of the local training data set of each system client according to the encryption algorithm and the public key to obtain a sample index set and a feature code set; A sample index set and a feature code set of each system client in the multiple system clients are obtained.

5. The multi-agent joint variety yield prediction method for protecting data privacy according to claim 1 is characterized in that: Before obtaining the local optimal partitioning features respectively transmitted by the multiple local clients to obtain the local partitioning feature set, the method further includes: Calling each local client of the multiple local clients to traverse each sample value of each feature in the local training data set; Based on each sample value of each feature, the local training data set is divided into a left data set and a right data set; The sum of the mean square error of the left data set and the mean square error of the right data set is used as the mean square error of each sample value; The feature corresponding to the sample value with the smallest mean square error is determined as the local optimal division feature of the local training data set.

6. The multi-agent joint variety yield prediction method for protecting data privacy according to claim 1 is characterized in that: After broadcasting the ciphertext sample sets of the left and right subtrees to other clients among the multiple local clients so that the other clients generate tree nodes with the same structure as the target client, the method further includes: When the tree node is generated, determining the generalization of the decision tree corresponding to the tree node based on the pre-pruning condition; When the generalization of the decision tree decreases, the tree nodes are pruned.

7. A multi-agent joint variety yield prediction system that protects data privacy, characterized in that: include: A notification module, configured to notify a plurality of local clients respectively based on randomly selected target samples and target features corresponding to the target varieties, wherein a local training data set of each local client includes the target samples and the target features; An acquisition module, used to acquire the local optimal partitioning features respectively transmitted by the multiple local clients, and obtain a local partitioning feature set, wherein the local optimal partitioning feature is a sample feature of each local client among the multiple local clients with the smallest difference between a predicted value and a true value within a data range of the target sample and the target feature; A determination module, used to determine the local optimal partitioning feature with the smallest difference in the local partitioning feature set as the global optimal partitioning feature; The acquisition module is further used to acquire a set of ciphertext samples of the left and right subtrees transmitted by the target client corresponding to the global optimal partitioning feature; A broadcast module, used for broadcasting the ciphertext sample set of the left and right subtrees to other clients among the multiple local clients, so that the other clients generate tree nodes with the same structure as the target client; A construction module is used to repeatedly execute the above steps to build multiple decision trees according to preset parameters until the federated isomorphic forest model is completed; A prediction module is used to predict the test sets to be predicted in the multiple local clients based on the federated isomorphic forest model to obtain the yield prediction result of the target variety.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the multi-agent joint variety yield prediction method that protects data privacy as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-agent joint variety yield prediction method protecting data privacy as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the multi-agent joint variety yield prediction method protecting data privacy as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Health monitoring model construction method and system based on federated random forest learning

    CN111178408A

  • Data abstract generation method, model training method, related device and system

    CN114358120A

  • Crop variety yield prediction method and device based on distributed data

    CN115564145A

  • Federal learning method, system and device based on prototype and storage medium

    CN119129779A

  • Risk control strategy automatic generation method and device, equipment and medium

    CN119358654A

Cited By

  • Privacy information encryption protection method and system of service platform

    CN120930164A

  • A privacy information encryption protection method and system of a service platform

    CN120930164B