Cotton production data processing and storing method
By using distributed databases and symmetric encryption methods in cotton production data processing, the problems of slow access speed and low data security of traditional databases are solved, efficient data storage and yield prediction are achieved, and the convenience and convenience of user operations are improved. Data security.
Patent Information
- Application Number
- CN202410722140.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-27
AI Technical Summary
When processing cotton production data, traditional databases have problems such as slow access speed, low efficiency, poor stability, many restrictions on the types of data that can be stored, low security of stored data and easy data loss.
A distributed database is used for data storage, and the data is processed based on the symmetric encryption method. By collecting the growth status data of cotton at each stage, normalization processing, sensitivity coefficient determination, encryption and decryption processing are performed, and yield prediction is performed based on the yield prediction model. .
It improves data retrieval speed and reading efficiency, enhances data security and stability, reduces the risk of data loss, and enables users to easily obtain cotton yield prediction results.
Smart Images

Figure CN118708651A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method for processing and storing cotton production data. Background Art
[0002] Cotton is a pillar industry and plays an important role in economic and agricultural development. The formation cycle of cotton yield is long, the yield formation process is complex, and it is easily affected by environmental factors. Therefore, timely and accurate prediction of cotton yield is of great value and significance to cotton field management, agricultural decision-making, market regulation, etc. With the increasing types and quantity of data used for cotton production analysis, traditional databases have gradually shown problems such as slow access speed, low efficiency, poor stability, many restrictions on the type of data that can be stored, low security of stored data, and easy data loss when facing these data. Summary of the invention
[0003] In view of the above-mentioned defects, the technical problem solved by the present invention is to provide a cotton production data processing and storage method to solve the problems existing in the current technology, such as slow access speed, low efficiency, poor stability, many restrictions on the type of data that can be stored, low security of stored data and easy data loss.
[0004] The present invention provides a cotton production data processing and storage method, comprising:
[0005] Step 1, collecting data on the growth status of cotton at various stages;
[0006] Step 2: Store the original growth data in a distributed database in a distributed structure;
[0007] Step 3: Encrypt the data in the distributed database based on a symmetric encryption method;
[0008] Step 4: According to the user classification, the corresponding growth data in the distributed database is retrieved, and the retrieved growth data is decrypted;
[0009] Step 5: Use the yield prediction model to process the decrypted growth data to obtain the yield prediction result.
[0010] Preferably, the specific steps of step 2 include:
[0011] Step 2.1: Normalize the initial growth data. The normalized data x g The function is expressed as: Where x0 is the initial growth data, μ and σ are the mean and variance of the growth data set respectively;
[0012] Step 2.2: According to the characteristics of distributed growth data, obtain the sensitivity coefficient of data attributes, sensitivity coefficient κsensitive It is expressed as: where η change and η Uncertainties They represent the rate of change of growth data and the rate of change of internal uncertainties of growth data respectively;
[0013] Step 2.3: Determine the current data attribute based on the sensitivity coefficient. If the current data attribute is a sensitive attribute, obtain the classification result corresponding to the current data. If the current data attribute is a non-sensitive attribute, extract the data feature vector, and obtain the correlation coefficient between the growth data feature and the standard attribute type feature based on the extracted feature vector. Obtain the corresponding classification result based on the correlation coefficient until the classification of all growth data is completed.
[0014] Preferably, the specific steps of step 3 include using three different keys K1, K2, and K3 based on a symmetric encryption method to encrypt and decrypt the plaintext three times to obtain ciphertext for storage, wherein the specific steps of encrypting the plaintext into ciphertext include: first encrypting the plaintext with key K1, then decrypting it with key K2, and finally encrypting it with key K3 to obtain ciphertext, and the encryption process function is expressed as c=E K3 (D K2 (E K1 (P))), where C is the ciphertext, P is the plaintext, E is the encryption function, and D is the decryption function.
[0015] Preferably, the specific steps of step 4 include:
[0016] Step 4.1: Based on the classification results of the growth data attributes, initialize the user access rights according to the user role type, and generate the data protection public key and private key in an encrypted manner;
[0017] Step 4.2: distribute the generated growth data protection public key to multiple users who have passed identity authentication, and distribute the private key to the designated user through fixed-point transmission;
[0018] Step 4.3: The user uses the public key and private key to access the decrypted growth data. The user who does not meet the access rights can only retrieve the ciphertext of the growth data. The specific steps of decrypting the ciphertext into plaintext include: first decrypting the ciphertext with key K3, then encrypting it with key K2, and finally decrypting it with key K1 to obtain the plaintext. The decryption process function is expressed as P = D K1 (E K2 (D K3 (C))).
[0019] Preferably, the specific steps of generating the data protection public key and private key in an encrypted manner in step 4.1 include:
[0020] Step 4.1.1: Use the chaotic map to iterate the binary sequence generated by ySign () The threshold function is converted into a binary sequence, and the result is used as the privacy protection public key of the data. The generated growth data protection public key k pub Quantitative expression: k pub =(n,y Sign (x n )), where x n is the distributed growth data to be encrypted, and n is the encrypted data number;
[0021] Step 4.1.2: Generate the corresponding private key using the public key according to the growth data classification. The private key function is expressed as:
[0022] Where β is a random number.
[0023] Preferably, the specific steps of obtaining the corresponding classification result according to the correlation coefficient in step 2.3 include: if the correlation coefficient is higher than the threshold λ0 corresponding to the current attribute, then the corresponding growth data is compared with τ standard The corresponding types are divided into one category, otherwise the standard attribute type characteristics are replaced and the correlation coefficient is recalculated until the attribute type that meets the threshold condition is obtained.
[0024] Preferably, the feature vector in step 2.3 includes information entropy and information gain, and the specific steps of extracting the data feature vector include:
[0025] Step 2.3.1. Obtain information entropy τ Information entropy and information gain τ gain The function of information entropy and information gain is expressed as: where n conceal is the amount of growth data, P i is the probability that the information belongs to any attribute, W(X) and W(X|S) are the number of samples in the growth data set and the number of samples with S attribute, respectively;
[0026] Step 2.3.2: Get the weight ω of each attribute based on the information gain value i , the attribute weight function is expressed as:
[0027] Step 2.3.3: According to the calculation results of each attribute weight, the extracted growth data features are fused to obtain the final data feature vector. The fusion processing function is expressed as: τ = ∑ω i ·τ i , where τ i is the extracted feature component, and τ is the growth data fusion feature.
[0028] Preferably, in step 4.1.1, sign ()The threshold function is expressed as:
[0029]
[0030] Preferably, the function of the correlation coefficient λ in step 2.3 is expressed as:
[0031] where τ standard is the standard feature of the set data attributes, and τ is the extracted growth data feature vector.
[0032] Preferably, in step 5, the yield prediction model extracts the yield estimation parameters in the growth data to predict the yield based on the seed cotton yield estimation function, and the seed cotton yield estimation function is expressed as:
[0033] y=0.9(a+b+1 / 3×c) / kρw, where y is cotton yield, ρ is harvest density, ω is single boll weight, a is the number of mature bolls, b is the number of flocculent bolls, c is the number of young bolls, and k is the total number of plants.
[0034] It can be seen from the above scheme that the cotton production data processing and storage method provided by the present invention is based on the setting of a distributed database to classify and store growth data, which can effectively improve the data retrieval speed and reading efficiency. The distributed database has a large storage space, multiple storage types, small usage limitations, and fewer restrictions on the types of data that can be stored; the data is encrypted based on a symmetric encryption method, which effectively ensures the security and stability of the data and avoids economic losses caused by data loss and missing; the method of predicting yield through a yield prediction model makes it simple and intuitive for users to view the yield prediction results, and it is more convenient to use. The present invention solves the problems of slow access speed, low efficiency, poor stability, many restrictions on the types of data that can be stored, low security of stored data and easy data loss in the existing technology, and has a significant effect and is suitable for wide promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only 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.
[0036] Figure 1 A process block diagram of a cotton production data processing and storage method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0038] See also Figure 1 Now, a specific implementation method of a cotton production data processing and storage method provided by the present invention is described. The specific steps of the cotton production data processing and storage method include:
[0039] S1. Collect data on the growth status of cotton at various stages;
[0040] After the collected growth status data is stored, it can be retrieved when needed, and the yield forecast information under this growth status can be obtained based on the current growth data, so as to timely adjust the fertilization, deworming and other operation data in the subsequent stages.
[0041] S2, storing the original growth data in a distributed database in a distributed structure;
[0042] The specific steps of S2 include:
[0043] S2.1. Normalize the initial growth data. The normalized data x g The function is expressed as: Where x0 is the initial growth data, μ and σ are the mean and variance of the growth data set respectively;
[0044] The growing data is processed in shards, and each partition consists of at least one server. The auxiliary nodes included in the internal partition are used to implement an asynchronous master-slave copy mechanism. The master node is mainly read-based, and the child node is mainly write-based. Between these two types of nodes, operation logs are used to ensure data consistency. Between these two types of nodes, all operation data and timestamps will be written to the operation log, and all slave nodes will monitor the operation log to synchronize with the master node.
[0045] When any cluster server fails, the privacy big data in the distributed structure will automatically become read-only, which can effectively prevent the initial data information from being changed due to misoperation when the storage structure is unstable, and can also avoid data inconsistency between configuration server nodes. When a configuration server fails, it will not affect the operation of the overall storage structure, and can ensure that the mined data can be successfully written into the distributed storage structure.
[0046] S2.2. According to the characteristics of distributed growth data, obtain the sensitivity coefficient of data attributes, sensitivity coefficient κ sensitive It is expressed as: where η change and η Uncertainties They represent the rate of change of growth data and the rate of change of internal uncertainties of growth data respectively;
[0047] S2.3. Determine the current data attribute according to the sensitivity coefficient. If the current data attribute is a sensitive attribute, obtain the classification result corresponding to the current data. If the current data attribute is a non-sensitive attribute, extract the data feature vector, and obtain the correlation coefficient between the growth data feature and the standard attribute type feature based on the extracted feature vector. Obtain the corresponding classification result according to the correlation coefficient until the classification of all growth data is completed.
[0048] The specific steps of obtaining the corresponding classification result according to the correlation coefficient in S2.3 include: if the correlation coefficient is higher than the threshold λ0 corresponding to the current attribute, then the corresponding growth data is compared with τ standard The corresponding types are divided into one category, otherwise the standard attribute type characteristics are replaced and the correlation coefficient is recalculated until the attribute type that meets the threshold condition is obtained.
[0049] The function of the correlation coefficient λ in S2.3 is expressed as:
[0050] where τ standard is the standard feature of the set data attributes, and τ is the extracted growth data feature vector.
[0051] The feature vector in S2.3 includes information entropy and information gain. The specific steps of extracting the data feature vector include:
[0052] S2.3.1. Obtaining information entropy τ Informnation entropy and information gain τ gain The function of information entropy and information gain is expressed as: where n conceal is the amount of growth data, P i is the probability that the information belongs to any attribute, W(X) and W(X|S) are the number of samples in the growth data set and the number of samples with S attribute, respectively;
[0053] S2.3.2. Obtain the weight ω of each attribute based on the information gain value i , the attribute weight function is expressed as:
[0054]
[0055] S2.3.3. According to the calculation results of each attribute weight, the extracted growth data features are fused to obtain the final data feature vector. The fusion processing function is expressed as: τ = Σω i ·τ i , where τ i is the extracted feature component, and τ is the growth data fusion feature.
[0056] The information stored in the database is classified according to the source of cotton data and the storage format of the data, which can be divided into structured data (such as data measured in field experiments and laboratory experiments) and unstructured data (such as satellite images and drone image data). The distributed database will classify and store the data according to whether it is structured data to optimize the call time and access performance of the data.
[0057] S3, encrypting the data in the distributed database based on the symmetric encryption method;
[0058] Since the cotton-related data stored in the database may be sensitive and confidential, after obtaining the relevant cotton production data, the key data needs to be desensitized before it can be written into the database or processed in the next step. Most of the cotton data collected by this method do not have real-time requirements, so a symmetric encryption method is used to prevent the leakage of sensitive information while ensuring that the analysis results can be traced back to the real source data.
[0059] The symmetric encryption method in S3 adopts multi-key encryption processing based on the DESS (Data Encryption Standard) encryption method. The specific steps of S3 include using three different keys K1, K2, and K3 based on the symmetric encryption method to encrypt and decrypt the plaintext three times to obtain the ciphertext for storage. The specific steps of encrypting the plaintext into ciphertext include: first encrypting the plaintext with key K1, then decrypting it with key K2, and finally encrypting it with key K3 to obtain the ciphertext. The encryption process function is expressed as c=E K3 (D K2 (E K1 (P))), where C is the ciphertext, P is the plaintext, E is the encryption function, and D is the decryption function.
[0060] This method has a longer key length and a more complex encryption process, making it more secure.
[0061] S4. According to the user classification, the corresponding growth data in the distributed database is retrieved, and the retrieved growth data is decrypted;
[0062] The specific steps of S4 include:
[0063] S4.1. Based on the classification results of the growth data attributes, the user access rights are initialized according to the user role type, and the data protection public key and private key are generated in an encrypted manner;
[0064] The specific steps of generating the data protection public key and private key in an encrypted manner in S4.1 include:
[0065] S4.1.1. The binary sequence generated by chaotic mapping iteration is passed through y Sign () The threshold function is converted into a binary sequence, and the result is used as the privacy protection public key of the data. The generated growth data protection public key k pub Quantitative expression: k pub =(n,y Sign (x n )), where x n is the distributed growth data to be encrypted, and n is the encrypted data number;
[0066] y in S4.1.1 Sign ()The threshold function is expressed as:
[0067] S4.1.2. Generate the corresponding private key using the public key according to the growth data classification. The private key function is expressed as:
[0068] Where β is a random number.
[0069] S4.2. The generated growth data protection public key is distributed to multiple users who have passed identity authentication, and the private key is distributed to the designated user through fixed-point transmission;
[0070] S4.3. The user uses the public key and private key to access the decrypted growth data. The user who does not meet the access rights can only retrieve the ciphertext of the growth data. The specific steps of decrypting the ciphertext into plaintext include: first decrypting the ciphertext with key K3, then encrypting it with key K2, and finally decrypting it with key K1 to obtain the plaintext. The decryption process function is expressed as P = D K1 (E K2 (D K3 (C))).
[0071] S5. Use the yield prediction model to process the decrypted growth data to obtain the yield prediction result.
[0072] Since different users may need to use different cotton yield prediction models to predict cotton yield in different regions, this method constructs a corresponding yield prediction model to predict cotton yield based on the custom cotton yield prediction model provided by the user. Users can upload their own cotton yield prediction model file and set the parameter list to achieve the need to use their own cotton yield prediction model to predict the cotton yield in their own research area within the operation process. The yield prediction model in S5 extracts the yield estimation parameters in the growth data and predicts the yield based on the seed cotton yield estimation function. The seed cotton yield estimation function is expressed as: y = 0.9 (a + b + 1 / 3 × c) / kρw, where y is the cotton yield, ρ is the harvest density, ω is the single boll weight, a is the number of mature bolls, b is the number of flocculent bolls, c is the number of young bolls, and k is the total number of plants.
[0073] Compared with the prior art, this cotton production data processing and storage method is based on the setting of a distributed database, and the growth data is classified and stored, which can effectively improve the data retrieval speed and reading efficiency. The distributed database has a large storage space, multiple storage types, few usage limitations, and fewer restrictions on the type of data that can be stored. The data is encrypted based on a symmetric encryption method, which effectively ensures the security and stability of the data and avoids economic losses caused by data loss and missing. The yield prediction method through the yield prediction model makes it simple and intuitive for users to view the yield prediction results, and it is more convenient to use.
[0074] This method builds a distributed database for storing cotton heterogeneous data based on big data technology, and uses the distributed database to realize the classified storage of cotton heterogeneous data, thereby improving the data access performance, management efficiency and reliability, and can better classify, store and manage structured and unstructured cotton-related data in a unified manner; users can use this method to conveniently query and manage the data they upload, and can also easily call the cotton yield prediction model to quickly predict cotton yield.
[0075] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced. The contents not described in detail in the embodiments of the present invention belong to the prior art known to professional and technical personnel in this field.
[0076] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A cotton production data processing and storage method, characterized in that: include: Step 1, collecting data on the growth status of cotton at various stages; Step 2: Store the original growth data in a distributed database in a distributed structure; Step 3: Encrypt the data in the distributed database based on a symmetric encryption method; Step 4: According to the user classification, the corresponding growth data in the distributed database is retrieved, and the retrieved growth data is decrypted; Step 5: Use the yield prediction model to process the decrypted growth data to obtain the yield prediction result.
2. A cotton production data processing and storage method according to claim 1, characterized in that: The specific steps of step 2 include: Step 2.1: Normalize the initial growth data. The normalized data x g The function is expressed as: Where x0 is the initial growth data, μ and σ are the mean and variance of the growth data set respectively; Step 2.2: According to the characteristics of distributed growth data, obtain the sensitivity coefficient of data attributes, sensitivity coefficient κ sensitive It is expressed as: where η change and η Uncertainties They represent the rate of change of growth data and the rate of change of internal uncertainties of growth data respectively; Step 2.3: Determine the current data attribute based on the sensitivity coefficient. If the current data attribute is a sensitive attribute, obtain the classification result corresponding to the current data. If the current data attribute is a non-sensitive attribute, extract the data feature vector, and obtain the correlation coefficient between the growth data feature and the standard attribute type feature based on the extracted feature vector. Obtain the corresponding classification result based on the correlation coefficient until the classification of all growth data is completed.
3. A cotton production data processing and storage method according to claim 2, characterized in that: The specific steps of step 3 include using three different keys K1, K2, and K3 based on the symmetric encryption method to encrypt and decrypt the plaintext three times to obtain the ciphertext for storage, wherein the specific steps of encrypting the plaintext into the ciphertext include: first encrypting the plaintext with key K1, then decrypting it with key K2, and finally encrypting it with key K3 to obtain the ciphertext, and the encryption process function is expressed as C=E K3 (D K2 (E K1 (P))), where C is the ciphertext, P is the plaintext, E is the encryption function, and D is the decryption function.
4. A cotton production data processing and storage method according to claim 3, characterized in that: The specific steps of step 4 include: Step 4.1: Based on the classification results of the growth data attributes, initialize the user access rights according to the user role type, and generate the data protection public key and private key in an encrypted manner; Step 4.2: distribute the generated growth data protection public key to multiple users who have passed identity authentication, and distribute the private key to the designated user through fixed-point transmission; Step 4.3: The user uses the public key and private key to access the decrypted growth data. The user who does not meet the access rights can only retrieve the ciphertext of the growth data. The specific steps of decrypting the ciphertext into plaintext include: first decrypting the ciphertext with key K3, then encrypting it with key K2, and finally decrypting it with key K1 to obtain the plaintext. The decryption process function is expressed as P = D K1 (E K2 (D K3 (C))).
5. A cotton production data processing and storage method according to claim 4, characterized in that: The specific steps of generating the data protection public key and private key in an encrypted manner in step 4.1 include: Step 4.1.1: Use the chaotic map to iterate the binary sequence generated by y Sign () The threshold function is converted into a binary sequence, and the result is used as the privacy protection public key of the data. The generated growth data protection public key k pub Quantitative expression: k pub =(n,y Sign (x n )), where x n is the distributed growth data to be encrypted, and n is the encrypted data number; Step 4.1.2: Generate the corresponding private key using the public key according to the growth data classification. The private key function is expressed as: Where β is a random number.
6. A cotton production data processing and storage method according to claim 2, characterized in that: The specific steps of obtaining the corresponding classification result according to the correlation coefficient in step 2.3 include: if the correlation coefficient is higher than the threshold λ0 corresponding to the current attribute, then the corresponding growth data is compared with τ standard The corresponding types are divided into one category, otherwise the standard attribute type characteristics are replaced and the correlation coefficient is recalculated until the attribute type that meets the threshold condition is obtained.
7. A cotton production data processing and storage method according to claim 6, characterized in that: The feature vector in step 2.3 includes information entropy and information gain, and the specific steps of extracting the data feature vector include: Step 2.3.
1. Obtain information entropy τ Informationentropy and information gain τ gain The function of information entropy and information gain is expressed as: Where n conceal is the amount of growth data, P i is the probability that the information belongs to any attribute, W(X) and W(X|S) are the number of growing data sample sets and the number of sample sets with S attribute, respectively; Step 2.3.2: Get the weight ω of each attribute based on the information gain value i , the attribute weight function is expressed as: Step 2.3.3: According to the calculation results of each attribute weight, the extracted growth data features are fused to obtain the final data feature vector. The fusion processing function is expressed as: τ = ∑ω i ·τ i , where τ i is the extracted feature component, and τ is the growth data fusion feature.
8. A cotton production data processing and storage method according to claim 5, characterized in that: In step 4.1.1 Sign ()The threshold function is expressed as:
9. A cotton production data processing and storage method according to claim 7, characterized in that: The function of the correlation coefficient λ in step 2.3 is expressed as: where τ standard is the standard feature of the set data attributes, and τ is the extracted growth data feature vector.
10. A cotton production data processing and storage method according to claim 1, characterized in that: In step 5, the yield prediction model extracts the yield estimation parameters in the growth data and predicts the yield based on the seed cotton yield estimation function. The seed cotton yield estimation function is expressed as: y=0.9(a+b+1 / 3×c) / kρw, where y is cotton yield, ρ is harvest density, ω is single boll weight, a is the number of mature bolls, b is the number of flocculent bolls, c is the number of young bolls, and k is the total number of plants.
