Agricultural scientific research model training method, device, electronic equipment and storage medium

By encrypting and processing agricultural research data and model training, the problems of agricultural research data sharing and privacy protection are solved, efficient data analysis and model training are realized, and data sharing and security in the agricultural research field are improved.

CN118364503BActive Publication Date: 2025-01-07BEIJING ACADEMY OF AGRICULTURE & FORESTRY SCIENCES
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410365554.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-01-07
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

Existing agricultural scientific research data sharing and model training are inefficient, and traditional encryption technologies cannot effectively protect data privacy, resulting in the threat of security and privacy during data sharing.

Method used

By acquiring multiple data sets corresponding to agricultural research needs, performing data cleaning and encryption processing, using public keys to encrypt data, obtaining public identification data sets and aligning target privacy data sets, and preset models based on encrypted data sets Carry out training and decrypt model parameters to generate agricultural research models.

Benefits of technology

It realizes effective alignment and consistency of data from different sources in the encrypted state, protects data privacy, improves the practicality and security of agricultural scientific research data analysis, and improves model training efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118364503B_ABST
    Figure CN118364503B_ABST
Patent Text Reader

Abstract

The present invention provides an agricultural scientific research model training method, device, electronic device and storage medium, which belongs to the field of agricultural data processing technology. The method includes: obtaining a data set; encrypting each data set; obtaining a public identification data set based on the intersection of identification data sets, and then obtaining a target privacy data set; training based on the target privacy data set to obtain an agricultural scientific research model. The present invention determines the encrypted target privacy data set according to the identification data set, and realizes the effective alignment of data from different sources in an encrypted state, which is beneficial to improving the consistency and integrity of the target privacy data set and protecting the security of privacy data. The present invention obtains the aligned target privacy data set according to the public identification data set, and then trains the preset model to obtain the agricultural scientific research model. While protecting data privacy, it improves the practicality and security of agricultural scientific research data analysis, which is beneficial to improving the efficiency of model training in the field of agricultural scientific research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agricultural data processing, and in particular to an agricultural scientific research model training method, device, electronic equipment and storage medium. Background Art

[0002] At present, my country has entered the era of big data. Data has become an important strategic resource and key production factor of the country. Data sharing and effective use are increasingly valued by all walks of life. Agricultural scientific research data is particularly important as an important field of big data analysis, research and application. At present, scientific research institutions have a significant distrust of data sharing security issues with other institutions. They are not assured and are unwilling to share data easily, which leads to the data always being limited to the application scope of their respective institutions.

[0003] At present, agricultural scientific research data sharing and training mainly rely on traditional database management systems and some primary data encryption technologies. Although these methods have promoted data sharing and utilization to a certain extent, they still have many shortcomings.

[0004] In summary, the training efficiency of existing agricultural scientific research models is low. Summary of the invention

[0005] The present invention provides an agricultural scientific research model training method, device, electronic equipment and storage medium, which are used to solve the defect of low training efficiency of agricultural scientific research models in agricultural scientific research in the prior art, and to improve the training efficiency of models in the field of agricultural scientific research.

[0006] In a first aspect, the present invention provides an agricultural scientific research model training method, comprising: acquiring at least two data sets corresponding to agricultural research needs; encrypting the privacy data set of each of the data sets to obtain an encrypted data set, wherein each of the encrypted data sets includes an identification data set and an encrypted privacy data set; based on the intersection of all the identification data sets, obtaining a public identification data set, and based on the public identification data set, obtaining an encrypted target privacy data set; based on the target privacy data set, training a preset model, decrypting the model parameters of the trained preset model, and obtaining an agricultural scientific research model, wherein the agricultural scientific research model is used to solve the agricultural research needs.

[0007] According to an agricultural scientific research model training method provided by the present invention, the privacy data set of each of the data sets is encrypted to obtain an encrypted data set, including: hashing each of the data sets to obtain at least two hash data sets, each of the hash data sets including an identification hash set and a privacy hash set; using the identification hash set as the identification data set; and using a public key to perform high-level encryption on the privacy hash set to obtain the encrypted privacy data set.

[0008] According to an agricultural scientific research model training method provided by the present invention, after hashing each of the data sets to obtain at least two hash data sets, it also includes: using the public key to perform low-level encryption on the identification hash set to obtain the identification data set.

[0009] According to an agricultural scientific research model training method provided by the present invention, the public identification data set includes at least one public identification data, and obtaining an encrypted target privacy data set based on the public identification data set includes: obtaining the target privacy data associated with each of the public identification data from the encrypted privacy data set, and obtaining the target privacy data set based on all the target privacy data.

[0010] According to an agricultural scientific research model training method provided by the present invention, the preset model is trained based on the target privacy data set, including: determining an approximate calculation representation of the objective function based on the objective function of the preset model and the model type of the preset model; substituting the target privacy data in the target privacy data set into the approximate calculation representation to obtain a predicted value of the preset model, and obtaining an error of the preset model based on a true value of the target privacy data and the predicted value; iteratively training the parameters of the preset model based on the target privacy data; and determining that the training of the preset model is completed when the error is less than a set value or the number of iterative training reaches a set number.

[0011] According to an agricultural scientific research model training method provided by the present invention, the objective function based on the preset model and the model type of the preset model determine the approximate computational representation of the objective function, including: when the objective function is a polynomial regression function and the preset model is a linear model, based on the least squares method, determining the polynomial coefficients that best suit the target privacy data to determine the approximate computational representation; when the objective function is a nonlinear regression function and the preset model is a neural network model, based on Taylor expansion, determining the polynomial coefficients to determine the approximate computational representation; when the preset model is a decision tree function and the preset model is a random forest model, determining the approximate computational representation based on Chebyshev polynomials.

[0012] According to an agricultural scientific research model training method provided by the present invention, the acquisition of at least two data sets corresponding to agricultural research needs includes: based on the agricultural research needs, determining multiple agricultural scientific research data associated with the agricultural research needs from at least one database, and obtaining an initial data set based on all the agricultural scientific research data in each of the databases, each of the agricultural scientific research data including identification data and privacy data; performing data cleaning, data conversion, data standardization, feature extraction and data selection on at least one of the initial data sets to obtain at least one of the data sets.

[0013] In a second aspect, the present invention also provides an agricultural scientific research model training device, comprising: a data acquisition module, used to acquire at least two data sets corresponding to agricultural research needs; an encryption module, used to encrypt the privacy data set of each of the data sets to obtain an encrypted data set, each of the encrypted data sets includes an identification data set and an encrypted privacy data set; an intersection module, used to acquire a public identification data set based on the intersection of all the identification data sets, and to acquire an encrypted target privacy data set based on the public identification data set; a training module, used to train a preset model based on the target privacy data set, and decrypt the model parameters of the trained preset model to obtain an agricultural scientific research model, wherein the agricultural scientific research model is used to solve the agricultural research needs.

[0014] In a third aspect, the present invention 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, the agricultural scientific research model training method as described above is implemented.

[0015] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the agricultural scientific research model training methods described above.

[0016] The agricultural scientific research model training method, device, electronic device and storage medium provided by the present invention obtain at least two data sets corresponding to agricultural research needs; encrypt the privacy data set of each data set to obtain an encrypted data set, each of which includes an identification data set and an encrypted privacy data set; obtain a public identification data set based on the intersection of all the identification data sets, and obtain an encrypted target privacy data set based on the public identification data set; train a preset model based on the target privacy data set, decrypt the model parameters of the trained preset model, and obtain an agricultural scientific research model, which is used to solve the agricultural research needs. The present invention determines the encrypted target privacy data set according to the identification data set, realizes the effective alignment of data from different sources in an encrypted state, and is conducive to improving the consistency and integrity of the target privacy data set. The preset model is trained according to the encrypted target privacy data set to obtain the agricultural scientific research model, and the security of the privacy data is protected. The present invention obtains the aligned target privacy data set according to the public identification data set, and then trains the preset model to obtain the agricultural scientific research model, which improves the practicality and security of agricultural scientific research data analysis while protecting data privacy, and is conducive to improving the efficiency of model training in the field of agricultural scientific research. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 This is one of the flow charts of the agricultural scientific research model training method provided by the present invention;

[0019] Figure 2 This is the second flow chart of the agricultural scientific research model training method provided by the present invention;

[0020] Figure 3 This is the third flow chart of the agricultural scientific research model training method provided by the present invention;

[0021] Figure 4 It is a structural schematic diagram of the agricultural scientific research model training device provided by the present invention;

[0022] Figure 5 It is a structural schematic diagram 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] Combine the following Figure 1-Figure 5 The agricultural scientific research model training method, device and electronic equipment provided by the embodiments of the present invention are described.

[0025] Figure 1 This is one of the flow charts of the agricultural scientific research model training method provided by the present invention, such as Figure 1 As shown, including but not limited to step S100 to step S400, each step is specifically as follows:

[0026] There are currently multiple problems in the analysis and sharing of agricultural scientific research data. First, the amount of data is huge and scattered across different institutions and regions, resulting in data silos and limiting the effective use of data. Second, privacy protection and data security issues in data sharing and training are becoming increasingly prominent, especially in the field of agricultural scientific research, which involves a large amount of sensitive data, including personal information, geographic location, production technology, model algorithms, etc. Once leaked, this information may cause immeasurable losses to data subjects and scientific research institutions. How to achieve the sharing and analysis of agricultural scientific research data while ensuring the security and privacy of data is an important issue to be solved at this stage.

[0027] Traditional encryption technology requires data decryption during data processing and analysis, and often lacks an effective data privacy protection mechanism, which cannot guarantee the security of personal privacy and scientific research results during data sharing, greatly increasing the risk of data leakage. Therefore, it is necessary to develop a set of agricultural scientific research data sharing training systems that not only protect data privacy, but also have high computing efficiency, can realize data analysis and mining, and have a reasonable incentive mechanism.

[0028] S100: Obtain at least two data sets corresponding to agricultural research needs.

[0029] It should be noted that the execution subject of the embodiments of the present application can be a server, a computer device, such as a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc.

[0030] Acquire at least two data sets corresponding to agricultural research needs. Specifically, based on the agricultural research needs, determine multiple agricultural scientific research data associated with the agricultural research needs from at least one database, and obtain an initial data set based on all the agricultural scientific research data in each database, where each agricultural scientific research data includes identification data and privacy data; perform data cleaning, data conversion, data standardization, feature extraction and data selection on at least one initial data set to obtain at least one data set.

[0031] Agricultural research needs include at least the type of data (e.g., meteorological data, soil data, crop growth data, etc.), the purpose of sharing (e.g., scientific research analysis, yield forecasting, pest and disease monitoring, etc.), and any other specific needs (e.g., the time frame for data sharing, specific data processing requirements, etc.). Agricultural research data include soil property data, climate change data, crop growth model data, pest and disease detection information, etc.

[0032] Obtain agricultural research data related to agricultural research needs from the databases of multiple scientific research institutions. Use the agricultural research data obtained from each database as an initial data set. Each agricultural research data includes identification data and privacy data. Identification data includes public data that does not contain sensitive information, such as publicly released climate data, non-sensitive agricultural research results, etc. For identification data, users may choose a lower encryption level or no encryption to facilitate subsequent determination of the public identification data set. Privacy data involves sensitive information, such as personal information, detailed geographic location data, proprietary production technology and model algorithms, etc. For privacy data, users need to set a higher encryption level based on the sensitivity of the data and sharing needs to ensure security and privacy protection during sharing and processing.

[0033] Data preprocessing is performed on at least one of the initial data sets obtained. Data preprocessing includes operations such as data cleaning, data conversion, data standardization, feature extraction, and data selection. The main purpose of data preprocessing is to ensure that agricultural scientific research data meets certain quality standards and format requirements before entering encryption and subsequent processing processes. The preprocessed data is divided into training sets, validation sets, and test sets to ensure that the preset model can be trained and evaluated on independent data sets, thereby evaluating the generalization ability of the preset model.

[0034] S200: Encrypt the privacy data set of each data set to obtain an encrypted data set.

[0035] Each encrypted dataset includes an identification dataset and an encrypted privacy dataset.

[0036] The private data set of each data set is encrypted at a high level using a public key to obtain an encrypted private data set. The identification data set of each data set is unencrypted data or low-level encrypted data.

[0037] The privacy data set of each data set is encrypted to obtain an encrypted data set. Specifically, each data set is hashed to obtain at least two hash data sets, each hash data set includes an identification hash set and a privacy hash set; the identification hash set is used as the identification data set; the privacy hash set is encrypted at a high level using a public key to obtain an encrypted privacy data set.

[0038] For example, there are two data sets, namely, the participant data set P1 and the initiator data set P2. The participant data set P1 is X A =(X, A1, A2, A3, ...). The initiator data set P2 is X B =(Y, B1, B2, B3, ...). Among them, X and Y are identification data, and all identification data of each data set constitute the identification data set of the data set. A1, A2, A3, B1, B2, B3... are privacy data (agricultural research data). All privacy data of each data set constitute a privacy data set. The initiator uses fully homomorphic encryption to calculate and generate a public key (pk) and a private key (sk). The initiator sends the public key to the participants. Apply the hash function to hash each data set to obtain a hash data set. The expression of the hash data set is:

[0039]

[0040] Among them, Hx A is the hash data set of the participant data set, Hx B is the hash data set of the initiator’s data set, X A is the data set of participants, X B is the initiator’s data set, and H(x) is the hash function.

[0041] The unencrypted identification hash set is directly used as the identification data set; the initiator and the participants use the public key to perform high-level encryption on the privacy hash set to obtain the encrypted privacy data set. According to the unencrypted identification data set and the high-level encrypted privacy data set of each data set, the encrypted data set of the data set is obtained.

[0042] After hashing each data set to obtain at least two hash data sets, the method further includes: using a public key to perform low-level encryption on the identification hash set to obtain the identification data set.

[0043] The initiator and the participants use the public key to perform low-level encryption on their respective identification hash sets, and use the encrypted identification hash sets as identification data sets. Based on the low-level encrypted identification hash sets and the high-level encrypted privacy data sets of each data set, the encrypted data set of the data set is obtained. The expression formula of the encrypted data set is:

[0044] E pk (Hx A )={E pk (H(x))|x∈X A};

[0045] Among them, E pk (Hx A ) is the encrypted data set of the participants, E pk (H(x)) is the encryption of the hash function, X A The data set of the participants.

[0046] S300: Based on the intersection of all identification data sets, a public identification data set is obtained, and based on the public identification data set, an encrypted target privacy data set is obtained.

[0047] like Figure 2 As shown, the participant sends the encrypted data set of the participant to the initiator. The initiator performs a private data set intersection operation (intersection operation) on the identification data set of the initiator and the identification data set of the participant. When the identification data set is a low-level encrypted identification data set, the intersection operation uses fully homomorphic encryption technology to intersect the identification data set of the initiator and the identification data set of the participant in an encrypted state to obtain a public identification data set.

[0048] The public identification data set includes at least one public identification data. Based on the public identification data set, an encrypted target privacy data set is obtained. Specifically, the target privacy data associated with each public identification data is obtained from the encrypted privacy data set. Based on all the target privacy data, a target privacy data set is obtained.

[0049] The privacy data set includes multiple privacy data, each of which corresponds to an identification data. The target privacy data associated with each public identification data is obtained from the encrypted privacy data set, and the target privacy data is the encrypted privacy data. Based on all the target privacy data, the target privacy data set is obtained. The expression of the target privacy data set is:

[0050] E pk (HX AB ) = f intersect (E pk (HX A ), E pk (HX B ));

[0051] Among them, E pk (HX AB ) is the target privacy dataset, E pk (Hx A ) is the encrypted data set of the participants, E pk (Hx B) is the encrypted data set of the initiator, f intersect To find the intersection of the data sets.

[0052] S400: Based on the target privacy data set, the preset model is trained, and the model parameters of the trained preset model are decrypted to obtain the agricultural scientific research model.

[0053] Agricultural research models are used to address agricultural research needs.

[0054] Agricultural research models are used for research in the field of agricultural research. Figure 2 As shown, the preset model is trained according to the target privacy data set to obtain the agricultural research model. The encrypted calculation results output by the agricultural research model are obtained. Result decryption and optimization: The encrypted calculation results are decrypted, plaintext data analysis and model training results are provided, and decision analysis and optimization are performed. After completing the data analysis and model training, the initiator P2 obtains the private key of the security key database (generated by fully homomorphic encryption calculation) to decrypt the encrypted calculation results, provide plaintext data analysis and model training results, and perform decision analysis and optimization.

[0055] Further, such as Figure 2 As shown, visualization and report generation: the decrypted data analysis and model training results are displayed in the form of visual charts and reports by selecting appropriate visualization methods, such as line charts, bar charts, pie charts, scatter plots, map visualization, etc., based on the types of collected results and information and user needs.

[0056] Further, such as Figure 2 As shown in the figure, implement data sharing incentives: provide incentives for agricultural research institutions (agricultural research data providers) to encourage them to share high-quality data and actively participate in the entire agricultural research data sharing and analysis system.

[0057] Define the incentive mechanism: Design appropriate incentive strategies so that data providers, data analysts, and other participants can receive corresponding rewards in the process of sharing and using agricultural research data. The incentive mechanism can include economic rewards (such as platform points, coupons, etc.) or non-economic rewards (such as providing data storage space, computing resource priority, etc.).

[0058] Establish evaluation criteria: Develop evaluation criteria and indicators to measure the value of data contributions, such as data quality, data volume, data update frequency, data usage, user evaluation feedback, etc.

[0059] Reward issuance: According to the evaluation criteria, corresponding rewards are issued to data providers and data analysts. Rewards can be issued once or periodically after certain conditions and thresholds are met.

[0060] The agricultural research model training method provided by the embodiment of the present invention obtains at least two data sets corresponding to agricultural research needs; encrypts the privacy data set of each data set to obtain an encrypted data set, each encrypted data set includes an identification data set and an encrypted privacy data set; based on the intersection of all identification data sets, obtains a public identification data set, and based on the public identification data set, obtains an encrypted target privacy data set; based on the target privacy data set, trains a preset model, decrypts the model parameters of the trained preset model, and obtains an agricultural research model, which is used to solve agricultural research needs. The embodiment of the present invention determines the encrypted target privacy data set according to the identification data set, realizes the effective alignment of data from different sources in an encrypted state, and is conducive to improving the consistency and integrity of the target privacy data set. The preset model is trained according to the encrypted target privacy data set to obtain the agricultural research model, and the security of the privacy data is protected. The present invention obtains the aligned target privacy data set according to the public identification data set, and then trains the preset model to obtain the agricultural research model, while protecting data privacy, it improves the practicality and security of agricultural research data analysis, and is conducive to improving the efficiency of model training in the field of agricultural research.

[0061] Based on the above embodiment, the preset model is trained based on the target privacy data set, including steps S410 to S440, each of which is specifically as follows:

[0062] S410: Determine an approximate calculation representation of the objective function based on the objective function of the preset model and the model type of the preset model.

[0063] S420: Substitute the target privacy data in the target privacy data set into the approximate calculation representation to obtain the predicted value of the preset model, and obtain the error of the preset model based on the true value and the predicted value of the target privacy data.

[0064] S430: Iteratively train the parameters of the preset model based on the target privacy data.

[0065] S440: When the error is less than a set value or the number of iterative training reaches a set number, it is determined that the preset model training is completed.

[0066] According to different data types and agricultural research needs, select appropriate preset models for data analysis and model training. According to the target privacy data set after full homomorphic encryption, the preset model is trained, allowing users to perform complex analysis and learning algorithms on the encrypted target privacy data set without decrypting the data. The entire process maintains the encryption state of the target privacy data set and does not leak any sensitive information. Figure 2As shown in the figure, the preset model can be a built-in general model or a preset model uploaded by the user. A model upload interface is provided so that users can upload and train a custom preset model according to their needs.

[0067] The preset model is a built-in general model: a predefined general model library covering different data analysis and machine learning tasks, such as regression analysis, classification tasks, cluster analysis, etc. Users can select the most suitable preset model from the built-in model library for calculation and training according to their data analysis needs and goals. The built-in model has been optimized for fully homomorphic encrypted data to ensure efficiency and accuracy when running on encrypted data.

[0068] Custom upload of preset models: For users with specific analysis needs, a model upload interface is provided, allowing users to upload customized data analysis and machine learning models. The uploaded preset models are verified and adapted by the system to ensure that they are compatible with fully homomorphic encrypted data and can run effectively in an encrypted environment. Users can perform customized training on the uploaded preset models according to their needs, including parameter adjustment, training cycle setting, etc., to achieve the best analysis results.

[0069] For users who have different requirements for computing accuracy and efficiency, approximate computing representation is added to improve computing efficiency and reduce computing resource requirements while maintaining acceptable accuracy loss, thereby reducing the computing resources and storage space required in a fully homomorphic encryption environment, while speeding up computing.

[0070] like Figure 3 As shown, based on the objective function of the preset model and the model type of the preset model, the approximate computational representation of the objective function is determined. Specifically, when the objective function is a polynomial regression function and the preset model is a linear model, the polynomial coefficients that best suit the target privacy data are determined based on the least squares method to determine the approximate computational representation; when the objective function is a nonlinear regression function and the preset model is a neural network model, the polynomial coefficients are determined based on Taylor expansion to determine the approximate computational representation; when the preset model is a decision tree function and the preset model is a random forest model, the approximate computational representation is determined based on Chebyshev polynomials.

[0071] Analyze the specific analysis needs and application scenarios of agricultural scientific research data, and select appropriate approximate calculation representation according to the objective function or model type. Figure 3 As shown in FIG, the objective function is the model objective that the preset model wants to optimize. According to the characteristics of the objective function, a suitable approximate calculation representation is selected for approximation.

[0072] For linear models and polynomial regression functions, to meet the polynomial approximation requirements, the least squares method is used to find the polynomial coefficients that best fit the target privacy data. For neural network models and nonlinear regression functions (local approximation), the Taylor expansion is used to expand the target function into a polynomial form. For random forest models and decision tree functions (global approximation), Chebyshev polynomials are used for approximation.

[0073] Substitute the target privacy data in the target privacy data set into the approximate calculation representation to obtain the predicted value of the preset model. Based on the true value and predicted value of the target privacy data, obtain the error of the preset model. Based on the target privacy data, iteratively train the parameters of the preset model. By using an iterative method to adjust the parameters of the preset model, find a parameter set that minimizes the value of the loss function of the preset model, thereby minimizing the approximation error. Repeat the following iterative process until the convergence condition is reached, such as the absolute value of the gradient is less than a preset threshold, or the number of iterations reaches a certain set value. In each iteration, the parameters of the preset model can be expressed as:

[0074]

[0075] Among them, L(θ) is the loss function; θ is the parameter of the preset model; θ old are the parameters of the preset model before iteration; α is the learning rate, which is used to control the step size in the gradient direction; It is the gradient of the loss function with respect to the parameters, representing the direction in which the loss function rises fastest at the parameters before the iteration.

[0076] According to the iterated approximate calculation representation, the approximated polynomial is obtained. The approximated polynomial is converted into a fully homomorphic encryption operation to ensure that all calculation steps can be executed in an encrypted state. Figure 3 As shown in Figure 1, the operation represented by the approximate calculation is performed on the target privacy dataset. The approximated polynomial calculation is performed in a fully homomorphic encryption environment to obtain the encrypted calculation result.

[0077] The embodiments of the present invention use approximate computing representation to improve computing efficiency and reduce the demand for computing resources while maintaining an acceptable loss of precision, thereby reducing the computing resources and storage space required in a fully homomorphic encryption environment while speeding up the calculation.

[0078] The embodiment of the present invention also provides an agricultural scientific research model training device, such as Figure 4 As shown, Figure 4 It is a structural diagram of the agricultural scientific research model training device provided by the present invention. It should be noted that the agricultural scientific research model training device provided by the embodiment of the present invention can execute the agricultural scientific research model training method described in any of the above embodiments during specific operation, which will not be described in detail in this embodiment.

[0079] Reference Figure 4 , an embodiment of the present invention provides an agricultural scientific research model training device, comprising:

[0080] The data acquisition module 401 is used to acquire at least two data sets corresponding to agricultural research needs.

[0081] The encryption module 402 is used to encrypt the privacy data set of each data set to obtain an encrypted data set, where each encrypted data set includes an identification data set and an encrypted privacy data set.

[0082] The intersection module 403 is used to obtain a public identification data set based on the intersection of all identification data sets, and obtain an encrypted target private data set based on the public identification data set.

[0083] The training module 404 is used to train the preset model based on the target privacy data set, decrypt the model parameters of the trained preset model, and obtain the agricultural scientific research model, which is used to meet agricultural research needs.

[0084] The agricultural scientific research model training device provided by the embodiment of the present invention obtains at least two data sets corresponding to agricultural research needs; encrypts the privacy data set of each data set to obtain an encrypted data set, each encrypted data set includes an identification data set and an encrypted privacy data set; based on the intersection of all identification data sets, a public identification data set is obtained, and based on the public identification data set, an encrypted target privacy data set is obtained; based on the target privacy data set, a preset model is trained, and the model parameters of the trained preset model are decrypted to obtain an agricultural scientific research model, which is used to solve agricultural research needs. The embodiment of the present invention determines the encrypted target privacy data set according to the identification data set, realizes the effective alignment of data from different sources in an encrypted state, and is conducive to improving the consistency and integrity of the target privacy data set. The preset model is trained according to the encrypted target privacy data set to obtain the agricultural scientific research model, and the security of the privacy data is protected. The present invention obtains the aligned target privacy data set according to the public identification data set, and then trains the preset model to obtain the agricultural scientific research model. While protecting data privacy, the practicality and security of agricultural scientific research data analysis are improved, which is conducive to improving the efficiency of the agricultural scientific research model training method in the field of agricultural scientific research.

[0085] In one embodiment, the encryption module 402 is used to: perform hash processing on each data set to obtain at least two hash data sets, each hash data set including an identification hash set and a privacy hash set; use the identification hash set as the identification data set; and use the public key to perform high-level encryption on the privacy hash set to obtain an encrypted privacy data set.

[0086] In one embodiment, the encryption module 402 is further used to: use a public key to perform low-level encryption on the identification hash set to obtain an identification data set.

[0087] In one embodiment, the intersection module 403 is used to obtain target private data associated with each public identification data from the encrypted private data set, and obtain a target private data set based on all the target private data.

[0088] In one embodiment, the training module 404 is used to: determine the approximate computational representation of the objective function based on the objective function of the preset model and the model type of the preset model; substitute the target privacy data in the target privacy data set into the approximate computational representation to obtain the predicted value of the preset model, and obtain the error of the preset model based on the true value and predicted value of the target privacy data; iteratively train the parameters of the preset model based on the target privacy data; and determine that the training of the preset model is completed when the error is less than the set value or the number of iterative training reaches the set number.

[0089] In one embodiment, the training module 404 is used for: when the objective function is a polynomial regression function and the preset model is a linear model, based on the least squares method, determining the polynomial coefficients that best suit the target privacy data to determine the approximate computing representation; when the objective function is a nonlinear regression function and the preset model is a neural network model, based on Taylor expansion, determining the polynomial coefficients to determine the approximate computing representation; when the preset model is a decision tree function and the preset model is a random forest model, determining the approximate computing representation based on Chebyshev polynomials.

[0090] In one embodiment, the data acquisition module 401 is used to: based on agricultural research needs, determine multiple agricultural scientific research data associated with the agricultural research needs from at least one database, obtain an initial data set based on all agricultural scientific research data in each database, and each agricultural scientific research data includes identification data and privacy data; perform data cleaning, data conversion, data standardization, feature extraction and data selection on at least one initial data set to obtain at least one data set.

[0091] Figure 5 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a 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 may call the logic instructions in the memory 530 to execute the agricultural research model training method, which includes: obtaining at least two data sets corresponding to agricultural research needs; encrypting the privacy data set of each data set to obtain an encrypted data set, each encrypted data set including an identification data set and an encrypted privacy data set; obtaining a public identification data set based on the intersection of all identification data sets, and obtaining an encrypted target privacy data set based on the public identification data set; training a preset model based on the target privacy data set, decrypting the model parameters of the trained preset model, and obtaining an agricultural research model, which is used to solve agricultural research needs.

[0092] 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 such an 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 for 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.

[0093] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the agricultural scientific research model training method provided by the above-mentioned embodiments, the method comprising: obtaining at least two data sets corresponding to agricultural research needs; encrypting the privacy data set of each data set to obtain an encrypted data set, each encrypted data set comprising an identification data set and an encrypted privacy data set; based on the intersection of all identification data sets, obtaining a public identification data set, and based on the public identification data set, obtaining an encrypted target privacy data set; based on the target privacy data set, training a preset model, decrypting the model parameters of the trained preset model, and obtaining an agricultural scientific research model, which is used to meet agricultural research needs.

[0094] 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.

[0095] 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, it 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.

[0096] 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 method for training an agricultural scientific research model, characterized in that: include: Obtain at least two datasets corresponding to agricultural research needs; Encrypting the privacy data set of each of the data sets to obtain an encrypted data set, wherein each of the encrypted data sets includes an identification data set and an encrypted privacy data set; The identification data set is public data that does not contain sensitive information; Based on the intersection of all the identification data sets, a public identification data set is obtained, and based on the public identification data set, an encrypted target private data set is obtained; Based on the target privacy data set, a preset model is trained, and model parameters of the trained preset model are decrypted to obtain an agricultural scientific research model, where the agricultural scientific research model is used to solve the agricultural research needs; The training of a preset model based on the target privacy data set includes: Based on the objective function of the preset model and the model type of the preset model, determining an approximate computational representation of the objective function; performing a fully homomorphic encryption operation on the approximate computational representation; Substituting the target private data in the target private data set into the approximate calculation representation to obtain a predicted value of the preset model, and obtaining an error of the preset model based on a true value of the target private data and the predicted value; Based on the target privacy data, iteratively train the parameters of the preset model; When the error is less than a set value or the number of iterative training reaches a set number, it is determined that the preset model training is completed; The determining, based on the objective function of the preset model and the model type of the preset model, an approximate calculation representation of the objective function comprises: When the objective function is a polynomial regression function and the preset model is a linear model, based on the least squares method, the polynomial coefficients of the target privacy data are determined to determine the approximate calculation representation; When the objective function is a nonlinear regression function and the preset model is a neural network model, the polynomial coefficients are determined based on Taylor expansion to determine the approximate calculation representation; When the preset model is a decision tree function and the preset model is a random forest model, the approximate calculation representation is determined based on Chebyshev polynomials.

2. The agricultural scientific research model training method according to claim 1, characterized in that: The step of encrypting the privacy data set of each data set to obtain an encrypted data set includes: Performing hash processing on each of the data sets to obtain at least two hash data sets, each of the hash data sets comprising an identification hash set and a privacy hash set; Using the identification hash set as the identification data set; The private hash set is encrypted at a high level using a public key to obtain the encrypted private data set.

3. The agricultural scientific research model training method according to claim 2, characterized in that: After performing hash processing on each of the data sets to obtain at least two hash data sets, the method further includes: The identification hash set is encrypted at a low level using the public key to obtain the identification data set.

4. The agricultural scientific research model training method according to claim 1, characterized in that: The public identification data set includes at least one public identification data, and the step of acquiring the encrypted target private data set based on the public identification data set includes: acquiring target private data associated with each of the public identification data from the encrypted private data set, Based on all the target private data, the target private data set is obtained.

5. The agricultural scientific research model training method according to claim 1, characterized in that: The obtaining of at least two data sets corresponding to agricultural research needs includes: Based on the agricultural research demand, determining a plurality of agricultural scientific research data associated with the agricultural research demand from at least one database, and obtaining an initial data set based on all the agricultural scientific research data in each database, wherein each of the agricultural scientific research data includes identification data and privacy data; Data cleaning, data conversion, data standardization, feature extraction and data selection are performed on at least one of the initial data sets to obtain at least one of the data sets.

6. An agricultural scientific research model training device, characterized in that: include: A data acquisition module, used to acquire at least two data sets corresponding to agricultural research needs; An encryption module, used to encrypt the privacy data set of each of the data sets to obtain an encrypted data set, each of the encrypted data sets including an identification data set and an encrypted privacy data set; An intersection module, used to obtain a public identification data set based on the intersection of all the identification data sets, and to obtain an encrypted target private data set based on the public identification data set; The identification data set is public data that does not contain sensitive information; A training module, used to train a preset model based on the target privacy data set, decrypt the model parameters of the trained preset model, and obtain an agricultural scientific research model, wherein the agricultural scientific research model is used to solve the agricultural research needs; The training module is further used to determine an approximate computational representation of the objective function based on the objective function of the preset model and the model type of the preset model; perform a fully homomorphic encryption operation on the approximate computational representation; substitute the target privacy data in the target privacy data set into the approximate computational representation to obtain a predicted value of the preset model, and obtain an error of the preset model based on a true value of the target privacy data and the predicted value; perform iterative training on the parameters of the preset model based on the target privacy data; determine that the training of the preset model is completed when the error is less than a set value or the number of iterative training reaches a set number; The training module is also used to determine the polynomial coefficients of the target privacy data based on the least squares method to determine the approximate calculation representation when the objective function is a polynomial regression function and the preset model is a linear model; when the objective function is a nonlinear regression function and the preset model is a neural network model, determine the polynomial coefficients based on Taylor expansion to determine the approximate calculation representation; when the preset model is a decision tree function and the preset model is a random forest model, determine the approximate calculation representation based on Chebyshev polynomials.

7. 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 computer program, it implements the agricultural scientific research model training method as described in any one of claims 1 to 5.

8. 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 agricultural scientific research model training method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Longitudinal federated learning privacy protection method and system based on deep hash

    CN116070277A

  • Federal learning-based model training method and device

    CN116957103A

  • Battery capacity prediction model training and prediction method, system, equipment and medium

    CN117129875A

  • Training method of electrical load prediction model for industrial park and related equipment

    CN117332879A