A method and system for constructing agricultural product information database
By performing missing value detection, data preprocessing and security mechanism construction on the agricultural product information database, combined with the permission management of the blockchain network, the problem of insufficient security of traditional databases is solved and efficient security control and traceability of data are achieved.
Patent Information
- Application Number
- CN202410822584.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Traditional agricultural product information databases have insufficient data security protection, and there are security risks such as data leakage, tampering, and unauthorized access. They lack effective data encryption, access control, and security monitoring mechanisms, resulting in poor security.
Through missing value detection and filling of original agricultural product information data, data preprocessing and cleaning, distributed storage technology and data security mechanism are constructed, and the blockchain network is used for permission management and data transaction database construction to achieve data security control and Traceability.
It improves the data security and reliability of the agricultural product information database, prevents illegal access and data leakage, strengthens access control policies, and ensures data transparency and transaction compliance and credibility.
Smart Images

Figure CN118395505B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a construction method and system based on an agricultural product information database. Background Art
[0002] Traditional agricultural product information collection and management mainly rely on paper documents and manual records, which have the problems of untimely and inaccurate information. With the popularization of the Internet, agricultural informatization has ushered in new opportunities. With the continuous development of computer technology and network technology, the construction method of agricultural product information database has gradually tended to be information-based, networked and intelligent. With the rise of mobile Internet and Internet of Things technology, the construction method of agricultural product information database has been further improved. Through technical means such as mobile phone apps and Internet of Things sensors, farmers can obtain the latest agricultural product information anytime and anywhere, realizing real-time update and personalized push of agricultural product information. At the current stage, the development of artificial intelligence technology has provided new ideas and methods for the construction of agricultural product information database. Based on big data and machine learning algorithms, agricultural product information can be deeply mined and analyzed to provide a scientific basis for agricultural production decision-making. However, the current traditional database construction is not perfect in data security protection of agricultural product information, and there are security risks such as data leakage, tampering, and unauthorized access. It lacks effective data encryption, access control and security monitoring mechanisms, resulting in poor security. Summary of the invention
[0003] Based on this, it is necessary to provide a method and system for constructing an agricultural product information database to solve at least one of the above technical problems.
[0004] To achieve the above purpose, a method for constructing an agricultural product information database is provided, the method comprising the following steps:
[0005] Step S1: obtaining original agricultural product information data; performing missing value detection and filling on the original agricultural product information data to generate agricultural product information filling data; performing data preprocessing on the agricultural product information filling data to generate processed agricultural product information data; performing data cleaning on the processed agricultural product information data to generate standard agricultural product information data;
[0006] Step S2: perform data storage partitioning on the standard agricultural product information data to generate agricultural product information partition storage data; use distributed storage technology to cache hot data on the agricultural product information partition storage data to generate an agricultural information optimization index; construct a data security mechanism for the agricultural product information partition storage data based on the agricultural information optimization index to generate an agricultural product data security management and control mechanism; perform data security control on the agricultural product information partition storage data based on the agricultural product data security management and control mechanism to generate an agricultural information security authority management data set;
[0007] Step S3: Perform authority change frequency analysis on the agricultural information security authority management data set to generate user authority change frequency data; perform abnormal change frequency analysis on the user authority change frequency data to generate abnormal change spectrum data; compare the abnormal change spectrum data with the preset standard change spectrum threshold to generate high-risk users and low-risk users; intercept illegal access of high-risk users to generate high-risk illegal access interception data; monitor normal access of low-risk users to generate low-risk normal access monitoring data; make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data;
[0008] Step S4: Deploy the blockchain network of the agricultural information security authority management data set according to the intelligent user access decision data to generate an agricultural product information access blockchain network; construct a transaction database for the agricultural product information access blockchain network to obtain an agricultural product information transaction database; use a visualization method to visualize the agricultural product information transaction database and generate an agricultural product information transaction report.
[0009] The present invention can improve the integrity and reliability of data by detecting and filling missing values of original agricultural product information data, generating agricultural product information filling data, and performing data preprocessing and cleaning to generate standard agricultural product information data. The standard agricultural product information data is partitioned and stored, and hot spot data is cached using distributed storage technology, which can improve the storage efficiency and access speed of data. By building an agricultural product data security management and control mechanism and data security control, the security of agricultural product information is ensured to prevent illegal access and data leakage. By performing permission change frequency analysis and abnormal change spectrum analysis on the agricultural information security authority management data set, high-risk and low-risk users can be identified, and illegal access interception is performed on high-risk users, and normal access monitoring is performed on low-risk users. The generation of intelligent user access decision data can help optimize access control strategies and improve the security and efficiency of the system. By deploying the agricultural information security authority management data set on a blockchain network, the transparency and traceability of data can be increased. At the same time, the application of building an agricultural product information transaction database and a visualization method can provide a more intuitive and understandable agricultural product information transaction report. Therefore, the present invention improves the data security protection of the agricultural product information database through perfect data processing, storage and security mechanisms.
[0010] In this specification, a construction system based on an agricultural product information database is provided, which is used to execute the above-mentioned construction method based on an agricultural product information database. The construction system based on an agricultural product information database includes:
[0011] The data processing module is used to obtain original agricultural product information data; perform missing value detection and filling on the original agricultural product information data to generate agricultural product information filling data; perform data preprocessing on the agricultural product information filling data to generate processed agricultural product information data; perform data cleaning on the processed agricultural product information data to generate standard agricultural product information data;
[0012] The security storage module is used to perform data storage partitioning on standard agricultural product information data and generate agricultural product information partition storage data; use distributed storage technology to cache hot data on agricultural product information partition storage data and generate agricultural information optimization index; construct a data security mechanism for agricultural product information partition storage data based on agricultural information optimization index and generate agricultural product data security management and control mechanism; perform data security control on agricultural product information partition storage data based on agricultural product data security management and control mechanism and generate agricultural information security authority management data set;
[0013] The user access control module is used to analyze the frequency of permission changes on the agricultural information security permission management data set to generate user permission change frequency data; to analyze the frequency of abnormal changes on the user permission change frequency data to generate abnormal change spectrum data; to compare the abnormal change spectrum data with the preset standard change spectrum threshold to generate high-risk users and low-risk users; to intercept illegal access of high-risk users to generate high-risk illegal access interception data; to monitor normal access of low-risk users to generate low-risk normal access monitoring data; to make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data;
[0014] The database construction module is used to deploy the blockchain network of the agricultural information security authority management data set according to the intelligent user access decision data, and generate the agricultural product information access blockchain network; construct the transaction database of the agricultural product information access blockchain network to obtain the agricultural product information transaction database; use the visualization method to visualize the agricultural product information transaction database and generate the agricultural product information transaction report.
[0015] The beneficial effect of the present invention is that by performing missing value detection, filling and data preprocessing on the original agricultural product information data, the quality problems such as missing and errors in the original data are solved, thereby improving the accuracy and integrity of the data. Distributed storage technology is used to partition the agricultural product information, and the access efficiency and management flexibility of the data are improved through hot data caching and agricultural information optimization indexing technology. At the same time, a data security management and control mechanism is constructed to ensure the security of agricultural product information. By performing permission change frequency analysis and abnormal change frequency analysis on the agricultural information security authority management data set, high-risk users and low-risk users are identified, and illegal access interception is performed on high-risk users, thereby enhancing the security and controllability of agricultural product information access. The intelligent user access decision data is applied to the blockchain network deployment, and the blockchain management of agricultural product information access is realized, thereby improving the traceability and security of data transactions, and ensuring the compliance and credibility of agricultural product information transactions. Therefore, the present invention improves the data security protection of the agricultural product information database through perfect data processing, storage and security mechanisms. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of the steps of a construction method based on agricultural product information database;
[0017] Figure 2 for Figure 1 Detailed implementation steps of step S3 in FIG.
[0018] Figure 3 for Figure 2 Detailed implementation steps of step S33;
[0019] Figure 4 for Figure 2 Detailed implementation steps of step S34 are shown in the flowchart;
[0020] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0021] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. 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 technicians in this field without creative work are within the scope of protection of the present invention.
[0022] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.
[0023] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0024] To achieve this, please refer to Figures 1 to 4 , a method for constructing an agricultural product information database, the method comprising the following steps:
[0025] Step S1: obtaining original agricultural product information data; performing missing value detection and filling on the original agricultural product information data to generate agricultural product information filling data; performing data preprocessing on the agricultural product information filling data to generate processed agricultural product information data; performing data cleaning on the processed agricultural product information data to generate standard agricultural product information data;
[0026] Step S2: perform data storage partitioning on the standard agricultural product information data to generate agricultural product information partition storage data; use distributed storage technology to cache hot data on the agricultural product information partition storage data to generate an agricultural information optimization index; construct a data security mechanism for the agricultural product information partition storage data based on the agricultural information optimization index to generate an agricultural product data security management and control mechanism; perform data security control on the agricultural product information partition storage data based on the agricultural product data security management and control mechanism to generate an agricultural information security authority management data set;
[0027] Step S3: Perform authority change frequency analysis on the agricultural information security authority management data set to generate user authority change frequency data; perform abnormal change frequency analysis on the user authority change frequency data to generate abnormal change spectrum data; compare the abnormal change spectrum data with the preset standard change spectrum threshold to generate high-risk users and low-risk users; intercept illegal access of high-risk users to generate high-risk illegal access interception data; monitor normal access of low-risk users to generate low-risk normal access monitoring data; make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data;
[0028] Step S4: Deploy the blockchain network of the agricultural information security authority management data set according to the intelligent user access decision data to generate an agricultural product information access blockchain network; construct a transaction database for the agricultural product information access blockchain network to obtain an agricultural product information transaction database; use a visualization method to visualize the agricultural product information transaction database and generate an agricultural product information transaction report.
[0029] The present invention can improve the integrity and reliability of data by detecting and filling missing values of original agricultural product information data, generating agricultural product information filling data, and performing data preprocessing and cleaning to generate standard agricultural product information data. The standard agricultural product information data is partitioned and stored, and hot spot data is cached using distributed storage technology, which can improve the storage efficiency and access speed of data. By building an agricultural product data security management and control mechanism and data security control, the security of agricultural product information is ensured to prevent illegal access and data leakage. By performing permission change frequency analysis and abnormal change spectrum analysis on the agricultural information security authority management data set, high-risk and low-risk users can be identified, and illegal access interception is performed on high-risk users, and normal access monitoring is performed on low-risk users. The generation of intelligent user access decision data can help optimize access control strategies and improve the security and efficiency of the system. By deploying the agricultural information security authority management data set on a blockchain network, the transparency and traceability of data can be increased. At the same time, the application of building an agricultural product information transaction database and a visualization method can provide a more intuitive and understandable agricultural product information transaction report. Therefore, the present invention improves the data security protection of the agricultural product information database through perfect data processing, storage and security mechanisms.
[0030] In the embodiment of the present invention, reference Figure 1 The above is a schematic flow chart of the steps of a method for constructing an agricultural product information database according to the present invention. In this example, the method for constructing an agricultural product information database according to the present invention includes the following steps:
[0031] Step S1: obtaining original agricultural product information data; performing missing value detection and filling on the original agricultural product information data to generate agricultural product information filling data; performing data preprocessing on the agricultural product information filling data to generate processed agricultural product information data; performing data cleaning on the processed agricultural product information data to generate standard agricultural product information data;
[0032] In an embodiment of the present invention, raw data is obtained from channels such as agricultural data sources, agricultural product trading platforms, or agricultural product production enterprises. To ensure the integrity and accuracy of the data, data acquisition tools or APIs can be used to obtain data. Statistical methods or machine learning algorithms are used to detect missing values in the original agricultural product information data to determine the location and number of missing values. Missing values can be filled by statistical quantities such as mean, median, mode, or predicted filling using a machine learning model. The filled agricultural product information data is preprocessed, including operations such as outlier processing, data normalization, and data standardization. Outlier processing can use methods such as truncation, shrinkage, and smoothing to process outliers to ensure data stability and accuracy. Data normalization and data standardization can make the distribution of data more uniform, which is conducive to subsequent model training and data analysis. Data cleaning is performed on the preprocessed agricultural product information data, including operations such as deduplication, error correction, and unified format. Deduplication operations can delete duplicate data records, reduce data redundancy, and improve data quality. Error correction operations can repair errors or inconsistencies in the data to ensure data accuracy and consistency. The unified format can convert data into a standard data format to facilitate subsequent data analysis and application.
[0033] Step S2: perform data storage partitioning on the standard agricultural product information data to generate agricultural product information partition storage data; use distributed storage technology to cache hot data on the agricultural product information partition storage data to generate an agricultural information optimization index; construct a data security mechanism for the agricultural product information partition storage data based on the agricultural information optimization index to generate an agricultural product data security management and control mechanism; perform data security control on the agricultural product information partition storage data based on the agricultural product data security management and control mechanism to generate an agricultural information security authority management data set;
[0034] In an embodiment of the present invention, by using a database management system (DBMS) or a distributed storage system to partition and store standard agricultural product information data, partitioning can be performed according to factors such as geographic location, time, and product type. Dividing storage areas helps to improve data access efficiency and the flexibility of data management. Based on distributed storage technology, a hot data cache is set to cache frequently accessed data in memory or fast storage media to speed up data access. Technologies such as memory databases (such as Redis) and distributed cache systems (such as Memcached) can be used to cache hot data. According to the optimized index of agricultural information, a data security mechanism is established, including access control, identity authentication, encrypted transmission, and other measures. Access control lists (ACLs), identity authentication protocols (such as OAuth), and transport layer security protocols (TLS / SSL) can be used to achieve data security. Based on the established agricultural product data security mechanism, access control and permission management are performed on the partitioned storage data of agricultural product information to ensure the security and integrity of the data. Rights management systems (such as RBAC), audit logs, data encryption, and other means can be used to securely control and supervise data.
[0035] Step S3: Perform authority change frequency analysis on the agricultural information security authority management data set to generate user authority change frequency data; perform abnormal change frequency analysis on the user authority change frequency data to generate abnormal change spectrum data; compare the abnormal change spectrum data with the preset standard change spectrum threshold to generate high-risk users and low-risk users; intercept illegal access of high-risk users to generate high-risk illegal access interception data; monitor normal access of low-risk users to generate low-risk normal access monitoring data; make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data;
[0036] In an embodiment of the present invention, by extracting user authority change records from an agricultural information security authority management data set, the authority change frequency of each user is counted. SQL query or data analysis tools (such as Python's Pandas library) can be used for data processing and frequency calculation. Abnormal detection is performed on the user authority change frequency data to identify abnormal authority change frequencies. Statistical methods (such as mean, standard deviation), machine learning algorithms (such as outlier detection algorithms), etc. can be used for abnormal detection. The abnormal change frequency data is compared with the preset standard change spectrum threshold to determine high-risk users and low-risk users. For high-risk users, illegal access interception is implemented, and measures such as IP blocking and account suspension can be adopted. Normal access monitoring is performed on low-risk users to ensure that their authority change behavior meets expectations. Technical means such as log recording and real-time monitoring systems can be used to monitor and record the access behavior of low-risk users. Comprehensive analysis and intelligent decision-making are performed on high-risk illegal access interception data and low-risk normal access monitoring data. Machine learning algorithms (such as decision trees, logistic regression), rule engines and other technologies can be used for intelligent decision-making to identify potential risk users or abnormal behaviors, and take corresponding measures to deal with them.
[0037] Step S4: Deploy the blockchain network of the agricultural information security authority management data set according to the intelligent user access decision data to generate an agricultural product information access blockchain network; construct a transaction database for the agricultural product information access blockchain network to obtain an agricultural product information transaction database; use a visualization method to visualize the agricultural product information transaction database and generate an agricultural product information transaction report.
[0038] In an embodiment of the present invention, a blockchain network for accessing agricultural product information is constructed by using a blockchain platform (such as Ethereum, Hyperledger Fabric, etc.). The intelligent user access decision data is recorded on the blockchain in the form of transactions to ensure the immutability and transparency of the data. The transaction data on the blockchain is extracted to construct an agricultural product information transaction database. The design of the database should take into account the characteristics of the blockchain, such as adopting a distributed storage and decentralized design to ensure the security and reliability of the data. The agricultural product information transaction database is visualized using visualization tools (such as Tableau, Power BI, etc.). Appropriate charts and dashboards are designed to display the transaction status, trends and statistics of agricultural product information. Based on the visualization results and the data in the database, an agricultural product information transaction report is generated. The report may include content such as transaction volume, transaction type, participant information, etc., and is presented in the form of charts and text to facilitate decision makers and stakeholders to understand and analyze the transaction status of agricultural product information.
[0039] Preferably, step S1 comprises the following steps:
[0040] Step S11: obtaining original agricultural product information data through agricultural data sources;
[0041] Step S12: performing missing value detection on the original agricultural product information data to obtain the original agricultural product information missing detection value; comparing the original agricultural product information missing detection value with a preset missing threshold, and when the original agricultural product information missing detection value is greater than the preset missing threshold, performing variable deletion on the corresponding original agricultural product information data;
[0042] Step S13: when the original agricultural product information missing detection value is less than the preset missing threshold, the corresponding original agricultural product information data is screened for data variable types to obtain numerical type missing variables and discrete type missing variables;
[0043] Step S14: Perform statistical filling on missing variables of numerical type to generate numerical filling data; perform dummy variable filling on missing variables of discrete type to generate discrete filling data; perform data integration on numerical filling data and discrete filling data to generate agricultural product information filling data;
[0044] Step S15: preprocessing the agricultural product information filling data to generate processed agricultural product information data, wherein the data preprocessing includes outlier processing, data normalization and data standardization;
[0045] Step S16: Perform data quality assessment on the processed agricultural product information data to generate agricultural product information data quality assessment indicators; perform data cleaning on the processed agricultural product information data using the agricultural product information data quality assessment indicators to generate standard agricultural product information data.
[0046] The present invention ensures the integrity of the data by detecting and processing missing values in the original data. This helps to ensure the accuracy and reliability of subsequent analysis and application. Filling in missing variables of numerical type and dummy variables of missing variables of discrete type, as well as data integration, helps to fill in the missing data, making the data more usable and continuous. The processed data is preprocessed and quality evaluated, including outlier processing, data normalization and standardization, and the generation of data quality evaluation indicators. These steps help to improve the consistency, accuracy and credibility of the data. Generate standard agricultural product information data, which has been completely processed and evaluated and can be used as reliable basic data for further analysis, decision-making and application.
[0047] In an embodiment of the present invention, raw agricultural product information data is extracted from an agricultural data source by using a suitable data acquisition tool or API. Ensure that the acquired data contains enough fields and information to meet subsequent analysis requirements. Use data processing tools (such as the Pandas library in Python) or statistical software to detect missing values. Calculate the number of missing values or the missing rate of each variable. According to the characteristics and type of the data, the data is divided into numerical type and discrete type. Use a suitable method (such as a data type detection function or a visualization tool) to determine the data type of each variable. For missing variables of numerical type, use statistics such as mean and median to fill missing values. For missing variables of discrete type, use dummy variables (One-HotEncoding) and other methods to fill. Integrate the filled data into a data set, including numerical type filled data and discrete type filled data. For outlier processing of the filled data, outlier detection and processing can be performed based on statistical methods or machine learning methods. Perform data normalization and standardization to ensure that the scale consistency and distribution of the data meet expectations. Use suitable quality assessment indicators (such as data integrity, accuracy, consistency, etc.) to evaluate the processed data. Perform data cleaning according to the evaluation results, including deleting outliers, repairing erroneous data, etc. Ultimately, standard agricultural product information data is generated to ensure that the data quality meets the requirements.
[0048] Preferably, step S16 comprises the following steps:
[0049] Step S161: using statistical methods to perform data quality assessment on the processed agricultural product information data to generate agricultural product information data quality assessment indicators, wherein the data quality assessment includes accuracy assessment, completeness assessment, consistency assessment and uniqueness assessment;
[0050] Step S162: performing duplicate data identification on the processed agricultural product information data according to the agricultural product information data quality assessment index to generate an agricultural product information duplicate data set;
[0051] Step S163: merging duplicate data of the agricultural product information duplicate data set to generate agricultural product deduplication information data;
[0052] Step S164: performing data consistency verification on the agricultural product deduplication information data to generate agricultural product consistency verification data; performing data correction on the agricultural product consistency verification data to generate standard agricultural product information data.
[0053] The present invention compares the consistency of data with the actual situation and evaluates the accuracy of data, which helps to find errors or inconsistencies in the data. Evaluating whether the data is complete and whether there are missing values or data omissions helps to determine the completeness and availability of the data. Checking whether there are logical inconsistencies in the data, such as inconsistencies in different fields of the same agricultural product information, helps to improve the logical consistency of the data. Ensuring that the records in the data are unique avoids the occurrence of duplicate records, which helps to improve the uniqueness and accuracy of the data. By identifying and marking duplicate records in the processed data, it is possible to avoid introducing unnecessary deviations or misleading results in subsequent analysis. Generating a duplicate data set of agricultural product information helps to better understand the duplication in the data and provides a basis for subsequent data cleaning and processing. Merging duplicate data sets can reduce the size of the data set and improve the efficiency of data storage and processing. Generating deduplication information data helps to eliminate duplicate records in the data, thereby improving the quality and credibility of the data. By performing consistency verification on the deduplication information data, the logic and internal consistency of the data can be ensured. The data correction step helps to correct logical errors or inconsistencies in the data, thereby generating more accurate and reliable standard agricultural product information data.
[0054] In the embodiment of the present invention, the consistency between the processed agricultural product information data and the actual situation is compared. Cross-validation, logic check, expert judgment and other methods can be used for evaluation. The number of missing values or missing rate of each field is counted to check whether the data has missing values. It can also be evaluated by logic check, comparison of the number of records in the data set and other methods. Check whether there are logical inconsistencies in the data, such as inconsistencies in different fields of the same agricultural product information. It can be evaluated by logic check, comparison of the values of related fields and other methods. Check whether there are duplicate records in the data. It can be evaluated by unique constraints, data comparison and other methods. Use appropriate methods (such as data sorting, hash algorithm, etc.) to identify duplicate data for the processed agricultural product information data. Identify and extract duplicate records to generate a duplicate agricultural product information data set. Merge the duplicate records in the duplicate data set to generate a duplicate agricultural product information data set without duplicate records. Perform consistency check on the deduplication information data to ensure the logical and internal consistency of the data. For example, check the consistency of fields such as product name, price, and place of origin. Perform data correction on the inconsistencies found, which can be manually corrected or automatically processed according to the actual situation to ensure that the generated standard agricultural product information data has high quality and consistency.
[0055] Preferably, step S2 comprises the following steps:
[0056] Step S21: Analyze the data characteristics of the standard agricultural product information data to generate agricultural product information characteristic data; analyze the access mode of the standard agricultural product information data to generate agricultural product information access mode data; perform data storage partitioning according to the agricultural product information characteristic data and the agricultural product information access mode data to generate agricultural product information partition storage data;
[0057] Step S22: using distributed storage technology to replicate the agricultural product information partition storage data to generate agricultural product information replication storage data; transmitting the agricultural product information replication storage data to different storage nodes in the distributed storage for redundant backup to generate an agricultural product redundant backup data set;
[0058] Step S23: constructing a data index for the redundant backup data set of agricultural products to generate an agricultural information data index; using an optimized query algorithm to cache hot data for the redundant backup data set of agricultural products based on the agricultural information data index to generate an optimized agricultural information index;
[0059] Step S24: constructing a data security mechanism for the agricultural product information partition storage data according to the agricultural information optimization index, and generating an agricultural product data security management and control mechanism;
[0060] Step S25: Based on the agricultural product data security management and control mechanism, data security control is performed on the agricultural product information partition storage data to generate an agricultural information security authority management data set.
[0061] By analyzing the characteristics of agricultural product information data, the present invention can better understand the structure, attributes and laws of data, and provide a basis for subsequent storage and processing. Analyzing the user's access mode to agricultural product information data is helpful to optimize data storage and query performance and improve data access efficiency. Data can be replicated through distributed storage technology to improve data availability and fault tolerance, ensuring that data is still available when a failure occurs. Data is transferred to different storage nodes for redundant backup, which can protect data from hardware failures, network failures, etc., and ensure data security and persistence. Building data indexes can speed up data retrieval and improve data query efficiency and response time. Caching redundant backup data sets based on hot data can optimize query performance, reduce data access delays, and improve the overall performance of the system. Building a security mechanism for data based on agricultural product information optimization indexes can ensure data security during storage, transmission and processing, and prevent data leakage, tampering and other security risks. Data security control is performed based on data security mechanisms, including access control, identity authentication, data encryption, etc., to ensure that only authorized users can access and operate data. An agricultural information security authority management data set is established to manage and control data access rights, protect data confidentiality and integrity, and reduce the risk of data leakage.
[0062] In an embodiment of the present invention, a data analysis tool (such as Python's Pandas library, R language, etc.) is used to perform characteristic analysis on standard agricultural product information data, including statistical description, visualization, and other methods, to generate agricultural product information characteristic data. Log data or user behavior data is used to analyze the access pattern of agricultural product information, and data mining or machine learning technology is used to identify common access patterns to generate agricultural product information access pattern data. Distributed storage technology (such as Hadoop HDFS, Apache HBase, etc.) is used to replicate the partitioned storage data of agricultural product information to generate agricultural product information replication storage data. The replicated storage data is transmitted to different storage nodes, and redundant backup is performed using the replication mechanism of the distributed storage system to generate an agricultural product redundant backup data set. Data index is constructed for the agricultural product redundant backup data set, and an index is constructed using a database management system (such as MySQL, PostgreSQL, etc.) or a search engine (such as Elasticsearch) and other tools to generate an agricultural information data index. An optimized query algorithm (such as B-tree, hash index, etc.) is used to cache hot data of the agricultural product redundant backup data set based on the data index to improve the access speed of hot data and generate an optimized index for agricultural information. According to the optimized index of agricultural information, a data security mechanism is constructed for the partitioned storage data of agricultural product information, including data encryption, access control, identity authentication and other security measures, to generate a data security management and control mechanism for agricultural product information. Based on the agricultural product data security management and control mechanism, data security control is performed on the partitioned storage data of agricultural product information to ensure that only authorized users can access and operate the data. An agricultural information security authority management data set is established to record user authority, access records and other information to achieve secure management and auditing of data.
[0063] Preferably, step S25 comprises the following steps:
[0064] Step S251: performing data semantic analysis on the agricultural product information partition storage data based on the agricultural product data security management and control mechanism to generate agricultural product information semantic data;
[0065] Step S252: encrypting and storing the agricultural product information semantic data to generate agricultural product semantic information encrypted data; performing access identity recognition on the agricultural product information partition storage data according to the agricultural product data security management and control mechanism to generate identity recognition data;
[0066] Step S253: Performing user authority analysis on the identity recognition data to generate user authority data; retaining data access records for the agricultural product semantic information encrypted data according to the user authority data to generate agricultural product encrypted information access retention records;
[0067] Step S254: Monitor data access to the retained records of agricultural product encrypted information access to generate an agricultural product safety audit monitoring data set; manage access records to the agricultural product safety audit monitoring data set through user authority data to generate an agricultural information security authority management data set.
[0068] The present invention can extract the actual meaning and semantic relationship of the data by performing semantic analysis on the data, which helps to understand the real meaning and business meaning of the data. Encrypting and storing the semantic data of agricultural product information can prevent unauthorized visitors from obtaining sensitive data and protect the confidentiality of the data. Performing identity identification on the data based on the agricultural product data security management and control mechanism can ensure that only authenticated users can access the data, thereby improving the access security of the data. Performing authority analysis on the identity identification data to determine the user's access rights to the data and ensure the compliance and security of the data. Recording and retaining the encrypted information access data according to the user's authority and recording the access history of the data help track the use of the data and security audit. Monitoring the access retention records to promptly detect abnormal access behavior and protect the integrity and security of the data. Managing the security audit monitoring data based on the user authority data ensures that data access complies with the authority regulations and strengthens the control and management of data access.
[0069] In the embodiment of the present invention, semantic analysis is performed on the partitioned storage data of agricultural product information by using natural language processing technology, data mining algorithm, etc., to extract the actual meaning and semantic relationship of the data, and generate agricultural product information semantic data. The agricultural product information semantic data is encrypted using encryption algorithms (such as AES, RSA, etc.) to ensure the security and confidentiality of the data during storage. Based on the agricultural product data security management and control mechanism, the visitor is identified, and the user identity is determined using identity authentication technology (such as username and password, token, two-factor authentication, etc.), and identity identification data is generated. According to the identity identification data, the user's authority is analyzed to determine the user's access rights to agricultural product information and generate user authority data. According to the user authority data, data access records are retained for the agricultural product information semantic encrypted data, and the user's access behavior and operation on the data are recorded to generate agricultural product encrypted information access retention records. The agricultural product encrypted information access retention records are monitored, and the data access behavior is monitored in real time using log analysis tools or monitoring systems, abnormal behavior is found and timely measures are taken. Based on the user authority data, access record management is performed on the agricultural product safety audit monitoring data set, and the user's access rights to the data are managed, including authorization, revocation, modification and other operations, to ensure that data access complies with authority regulations.
[0070] Preferably, step S3 comprises the following steps:
[0071] Step S31: Perform authority change frequency analysis on the agricultural information security authority management data set to generate user authority change frequency data;
[0072] Step S32: Perform fast Fourier transform on the user authority change frequency data to generate a user authority change spectrum graph; perform abnormal change frequency analysis on the user authority change spectrum graph to generate abnormal change spectrum data; compare the abnormal change spectrum data with a preset standard change spectrum threshold, and when the abnormal change spectrum data is greater than or equal to the standard change spectrum threshold, mark the user corresponding to the user authority change frequency data as a high-risk user; when the abnormal change spectrum data is less than the standard change spectrum threshold, mark the user corresponding to the user authority change frequency data as a low-risk user;
[0073] Step S33: intercept illegal access of high-risk users to generate high-risk illegal access interception data; monitor normal access of low-risk users to generate low-risk normal access monitoring data;
[0074] Step S34: Make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data.
[0075] The present invention generates user authority change frequency data by analyzing the change frequency of user authority in the agricultural information security authority management data set. Fast Fourier transform is performed on the user authority change frequency data to convert it into a spectrum diagram so as to better analyze the frequency distribution. The abnormal change frequency in the spectrum diagram is analyzed and compared with the preset standard change spectrum threshold to identify high-risk users and low-risk users. For users marked as high-risk users, illegal access is intercepted to prevent them from engaging in potential security risk behaviors. Normal access monitoring is performed on users marked as low-risk users to protect their rights and interests in normal use of the system. Combining high-risk illegal access interception data and low-risk normal access monitoring data, decisions are made through intelligent algorithms, such as automatically adjusting user permissions, issuing early warning notifications, etc., to improve the response speed and security of the system.
[0076] As an example of the present invention, refer to Figure 2 As shown, in this example, step S3 includes:
[0077] Step S31: Perform authority change frequency analysis on the agricultural information security authority management data set to generate user authority change frequency data;
[0078] In an embodiment of the present invention, by collecting and organizing the agricultural information security authority management data set, it is ensured that the user's authority change records are included, including operations such as adding, modifying and deleting permissions. The authority change records of each user are counted and analyzed, and the authority change frequency of each user is calculated. The authority change frequency can be calculated according to time units (such as daily, weekly, monthly), or other time intervals can be selected according to actual needs. The authority change frequency data is analyzed and processed, and indicators such as the average authority change frequency, maximum change frequency, and minimum change frequency of each user can be calculated. A distribution map or trend map of the authority change frequency can also be drawn for visual analysis. Outlier detection is performed to identify users with abnormally high or abnormally low authority change frequencies. These users have security risks or abnormal operations and need further review and processing. Based on the analysis results, user authority change frequency data is generated, and the authority change frequency information of each user is recorded for subsequent security analysis and processing.
[0079] Step S32: Perform fast Fourier transform on the user authority change frequency data to generate a user authority change spectrum graph; perform abnormal change frequency analysis on the user authority change spectrum graph to generate abnormal change spectrum data; compare the abnormal change spectrum data with a preset standard change spectrum threshold, and when the abnormal change spectrum data is greater than or equal to the standard change spectrum threshold, mark the user corresponding to the user authority change frequency data as a high-risk user; when the abnormal change spectrum data is less than the standard change spectrum threshold, mark the user corresponding to the user authority change frequency data as a low-risk user;
[0080] In an embodiment of the present invention, the user authority change frequency data is sampled and converted into a discrete data sequence in the time domain. The time domain data is converted into frequency domain data using a fast Fourier transform algorithm (such as the Cooley-Tukey algorithm). This will obtain the amplitude and phase information of each frequency component. According to the transformation result, a user authority change spectrum diagram is drawn, in which the horizontal axis represents the frequency and the vertical axis represents the amplitude or energy. The generated spectrum diagram is subjected to anomaly detection, and a statistical method or a machine learning method can be used for anomaly detection to identify frequency components that are inconsistent with the expected frequency distribution. The abnormal frequency components are extracted to form abnormal change spectrum data, and the abnormal frequency component information corresponding to each user is recorded. According to the security requirements and actual conditions of the system, a standard change spectrum threshold is set to determine what degree of frequency anomaly is considered to be high risk. The abnormal change spectrum data is compared with the preset standard change spectrum threshold to determine which users are marked as high-risk users and which users are marked as low-risk users. When the abnormal change spectrum data is greater than or equal to the standard change spectrum threshold, the corresponding user is marked as a high-risk user. When the abnormal change spectrum data is less than the standard change spectrum threshold, the corresponding user is marked as a low-risk user.
[0081] Step S33: intercept illegal access of high-risk users to generate high-risk illegal access interception data; monitor normal access of low-risk users to generate low-risk normal access monitoring data;
[0082] In an embodiment of the present invention, the user access behavior of the system is monitored in real time by using a real-time monitoring system or security protection equipment. Design access interception rules for high-risk users, such as restricting their access to specific sensitive data or functional modules. When illegal access behavior of high-risk users is detected, the system automatically executes corresponding interception actions, such as blocking user accounts, prohibiting access to specific resources, sending alarm notifications, etc. Record the interception event information, including the user who triggered the interception, time, interception reason, etc., and generate high-risk illegal access interception data for subsequent audit and analysis. Continuously record the access behavior of low-risk users, including login information, access pages, operation behavior, etc. Perform real-time or regular behavior analysis on the access behavior of low-risk users to discover potential abnormal or risky behaviors. Set trigger rules for abnormal behavior and establish corresponding alarm mechanisms to promptly discover abnormal behavior of low-risk users and take corresponding measures. Generate low-risk normal access monitoring data and record the normal access behavior of low-risk users for subsequent audit and analysis.
[0083] Step S34: Make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data.
[0084] In the embodiment of the present invention, the high-risk illegal access interception data and the low-risk normal access monitoring data are integrated to facilitate comprehensive analysis and decision-making. The integrated data is preprocessed, including data cleaning, deduplication, format conversion, etc., to ensure data quality and consistency. An intelligent algorithm suitable for the current scenario is selected, such as a machine learning algorithm, a deep learning algorithm, a rule-based algorithm, etc. The selected algorithm is tuned and parameterized according to the data characteristics and requirements to improve the accuracy and efficiency of the decision. The integrated data set is divided into a training set and a test set. The training set is used to train the model of the intelligent algorithm so that it can learn the patterns and laws of user access behavior from the data. The test set is used to verify and evaluate the trained model to evaluate the performance and accuracy of the model. The trained intelligent model is used to predict new data, and intelligent user access decisions are generated based on the model prediction results. Decision rules for different access behaviors, such as permission, rejection, restriction, etc., are formulated to deal with different situations and risk levels. The intelligent decision results are recorded to form intelligent user access decision data as the basis for further execution of operations by the system.
[0085] Preferably, step S33 includes the following steps:
[0086] Step S331: screening the agricultural information security authority management data set for user access based on high-risk users to obtain a high-risk user access data set; performing access address addressing on the high-risk user access data set to generate high-risk user access address data;
[0087] Step S332: dividing the access addresses of high-risk users to obtain frequently used address data and infrequently used address data of high-risk users; performing first identity and authority authentication on the high-risk users according to the frequently used address data of high-risk users, thereby generating first identity authentication data, wherein the first identity and authority authentication includes account and password authentication;
[0088] Step S333: Performing a second identity authentication on the high-risk user according to the uncommon address data of the high-risk user, thereby generating second identity authentication data, wherein the second identity authentication includes account password authentication and biometric authentication; confirming the authentication results of the first identity authentication data and the second identity authentication data, and when the authentication result of the first identity authentication data or the second identity authentication data is false, performing illegal access interception on the high-risk user, and generating high-risk illegal access interception data;
[0089] Step S334: Perform normal access monitoring on low-risk users to generate low-risk normal access monitoring data.
[0090] The present invention screens out the access data of high-risk users from the agricultural information security authority management data set according to the high-risk user identifier, including all their access records. The access data of high-risk users is subjected to address resolution to identify the specific address or IP accessed by the user. The access addresses of high-risk users are divided into two categories: common addresses and uncommon addresses. For common addresses, a first identity authority authentication, such as account password authentication, is performed to confirm the identity and authority of the user. For uncommon addresses, a second identity authority authentication, such as account password authentication and biometric authentication, is performed to improve security. The authentication results of the first identity authentication data and the second identity authentication data are confirmed. If any authentication result is false, it indicates that the user's identity is impersonated or there is abnormal access behavior. When the authentication result of the first identity authentication data or the second identity authentication data is false, illegal access interception is performed on the high-risk user to prevent the user from accessing system resources, and high-risk illegal access interception data is generated. Normal access monitoring is performed on low-risk users, and their access behaviors, including login, operation, etc., are recorded to generate low-risk normal access monitoring data for subsequent audit and analysis.
[0091] As an example of the present invention, refer to Figure 3 As shown, in this example, step S33 includes:
[0092] Step S331: screening the agricultural information security authority management data set for user access based on high-risk users to obtain a high-risk user access data set; performing access address addressing on the high-risk user access data set to generate high-risk user access address data;
[0093] In an embodiment of the present invention, all access records involving high-risk users are screened out from an agricultural information security authority management data set. According to a pre-set high-risk user identification or risk assessment model, which users are identified as high-risk users are identified. Access address information, including IP addresses, URL addresses, etc., is extracted from the screened high-risk user access data. The extracted access addresses are normalized, for example, the IP addresses are converted into specific geographic location information, or the URL addresses are normalized. The screened high-risk user access data is integrated with the corresponding access address data to establish a high-risk user access address data set.
[0094] Step S332: dividing the access addresses of high-risk users to obtain frequently used address data and infrequently used address data of high-risk users; performing first identity and authority authentication on the high-risk users according to the frequently used address data of high-risk users, thereby generating first identity authentication data, wherein the first identity and authority authentication includes account and password authentication;
[0095] In an embodiment of the present invention, the access addresses of high-risk users are divided into two categories: common addresses and uncommon addresses according to the frequency of access or other characteristics of the addresses. The common addresses and uncommon addresses of users can be judged according to indicators such as access frequency, access time period, and access duration. For common addresses, the common account and password authentication method is used to verify the identity of the user to ensure that the account and password entered by the user match the account and password recorded by the system. The user name and password input boxes provided in the user login interface can be compared with the user account information in the system database for authentication. The account and password authentication results of each high-risk user at the common address are recorded, including information such as authentication success and authentication failure. The authentication results are stored in a structured data format, including field information such as user identification, authentication address, and authentication results.
[0096] Step S333: Performing a second identity authentication on the high-risk user according to the uncommon address data of the high-risk user, thereby generating second identity authentication data, wherein the second identity authentication includes account password authentication and biometric authentication; confirming the authentication results of the first identity authentication data and the second identity authentication data, and when the authentication result of the first identity authentication data or the second identity authentication data is false, performing illegal access interception on the high-risk user, and generating high-risk illegal access interception data;
[0097] In the embodiment of the present invention, the account password authentication method is also adopted for the uncommon addresses of high-risk users to ensure that the account password entered by the user matches the account password recorded by the system. In addition to the account password authentication, the user's biometrics can be authenticated by biometric recognition technology, such as fingerprint recognition, face recognition, iris recognition, etc., to increase the security of authentication. The account password authentication and biometric authentication results of each high-risk user at an uncommon address are recorded, including information such as authentication success and authentication failure. The authentication results are stored in a structured data format, including field information such as user identification, authentication address, authentication method, and authentication result. The authentication results of the first identity authentication data and the second identity authentication data are compared. If any of the authentication results is false, it means that the user identity authentication fails. When the authentication result of the first identity authentication data or the second identity authentication data is false, the system will immediately intercept the illegal access of the high-risk user and prevent it from continuing to access system resources. At the same time, the relevant information of the interception event is recorded, including the user identification, interception address, interception reason, etc., to generate high-risk illegal access interception data.
[0098] Step S334: Perform normal access monitoring on low-risk users to generate low-risk normal access monitoring data.
[0099] In the embodiment of the present invention, the access behavior of low-risk users is continuously monitored, including activities such as login, operation, and data access. The access data of low-risk users can be collected through system logs, audit logs, or special access monitoring tools. The access behavior of low-risk users is analyzed, including access frequency, access time, access content, etc. Data mining technology or machine learning algorithms are used to detect abnormal access behaviors of low-risk users, such as abnormally frequent logins, abnormal data access behaviors, etc. According to the normal access behavior of low-risk users, corresponding monitoring data is generated, including access statistics reports, access logs, abnormal behavior alarms, etc. The monitoring data is stored in a structured format, including user identification, access time, access content, access results, and other information. When the monitoring system detects abnormal access behavior of low-risk users, corresponding processing measures are taken in a timely manner, such as suspending the account, issuing warning notifications, etc. For abnormal behaviors found, the system can automatically send alarm notifications to administrators or security teams so that timely measures can be taken to deal with potential security threats.
[0100] Preferably, step S34 includes the following steps:
[0101] Step S341: Merge the high-risk illegal access interception data and the low-risk normal access monitoring data to generate a risk access data set;
[0102] Step S342: divide the risk access data set into a data set to obtain a model training set and a model test set; use a decision tree algorithm to perform model training on the model training set to generate a risk user training model; use the model test set to optimize and iterate the risk user training model to generate a risk user decision model;
[0103] Step S343: Import the risk access data set into the risk user decision model for intelligent decision making, thereby generating intelligent user access decision data.
[0104] The present invention ensures that all access behavior data are included by merging high-risk illegal access interception data and low-risk normal access monitoring data. Merge high-risk illegal access interception data and low-risk normal access monitoring data to ensure that all access behavior data are included. Divide the risk access data set into a model training set and a model test set for training and verifying the model. Use machine learning algorithms such as decision tree algorithms to train the model training set to generate a risk user training model. Use the model test set to verify and optimize the trained model to improve the accuracy and generalization ability of the model. Apply the risk user decision model to the risk access data set, perform intelligent decision analysis, identify high-risk access behaviors, and take corresponding measures to deal with them. According to the output results of the decision model, classify and mark the risk access data to generate intelligent user access decision data for subsequent risk management and security prevention.
[0105] As an example of the present invention, refer to Figure 4 As shown, in this example, step S34 includes:
[0106] Step S341: Merge the high-risk illegal access interception data and the low-risk normal access monitoring data to generate a risk access data set;
[0107] In an embodiment of the present invention, a risk access data set containing all access behaviors is formed by merging high-risk illegal access interception data and low-risk normal access monitoring data. Ensure that the two types of data have the same data structure and fields to facilitate merging. If the data structures are different, data conversion or formatting is required so that they can be unified into one data set. Add a tag to each piece of data to distinguish between high-risk illegal access interception data and low-risk normal access monitoring data. This can be achieved by adding a new field to indicate the type or risk level of the data. During the merging process, some data may be missing. The missing values need to be processed according to the situation, and you can choose to delete the missing values, fill in the missing values, etc. to ensure the integrity of the data. The merged risk access data set is stored in a suitable data storage medium, such as a database, data warehouse or file system, to facilitate subsequent data analysis and mining.
[0108] Step S342: divide the risk access data set into a data set to obtain a model training set and a model test set; use a decision tree algorithm to perform model training on the model training set to generate a risk user training model; use the model test set to optimize and iterate the risk user training model to generate a risk user decision model;
[0109] In an embodiment of the present invention, the risk access data set is divided into two parts: a model training set and a model test set. The data set can be divided into a training set and a test set according to a certain ratio (such as 70% training set, 30% test set) to ensure that the data distribution of the two is consistent. The model training set is trained using a decision tree algorithm. The decision tree algorithm is a commonly used classification algorithm that can divide a data set into different categories according to the attribute value of the feature, and is suitable for risk user classification problems. The trained risk user model is evaluated and optimized using a model test set. The model is cross-validated and other techniques are used to adjust the model parameters to improve the accuracy and generalization ability of the model. Iterative optimization is performed until the model reaches satisfactory performance indicators on the test set. After training and optimization iterations, a risk user decision model with good performance is obtained. The model can accurately classify risk users and can be well generalized to unknown data. The trained model is evaluated, including the calculation of indicators such as accuracy, recall, and F1 value. By evaluating the performance of the model, the performance of the model on unknown data can be understood, and necessary adjustments and improvements can be made.
[0110] Step S343: Import the risk access data set into the risk user decision model for intelligent decision making, thereby generating intelligent user access decision data.
[0111] In an embodiment of the present invention, the pre-processed risk access data set is imported into a trained risk user decision model. The trained risk user decision model is used to perform intelligent decision analysis on the risk access data set. The model will generate corresponding intelligent user access decisions based on the input risk access data through inference and calculation of the model. According to the output results of the model, the access behavior of each user is classified or marked to determine the risk level of their access, such as high risk, medium risk, low risk, etc. Different risk levels and corresponding processing measures can be defined according to specific business needs and risk strategies. The intelligent decision results are associated with the original data to generate intelligent user access decision data. These data may include information such as each user's risk level, access behavior type, triggered risk rules, decision basis, etc., which are used for subsequent risk management and security control.
[0112] Preferably, step S4 comprises the following steps:
[0113] Step S41: Deploy a blockchain network for the agricultural information security authority management data set according to the intelligent user access decision data to generate an agricultural product information access blockchain network;
[0114] Step S42: Designing the data structure of the agricultural product information access blockchain network to obtain blockchain structure design data; deploying smart contracts based on the blockchain structure design data to generate agricultural product transaction smart contracts; importing standard agricultural product information data into the agricultural product information access blockchain network to upload data to the blockchain and generate agricultural product transaction on-chain data;
[0115] Step S43: Construct a transaction database for the agricultural product transaction chain data according to the agricultural product transaction smart contract to obtain an agricultural product information transaction database; use a visualization method to visualize the agricultural product information transaction database and generate an agricultural product information transaction report.
[0116] The present invention can ensure the security of data and prevent data tampering and unauthorized access through blockchain network deployment. By putting agricultural product information on the chain, the source and flow of each transaction can be traced to ensure the quality and safety of agricultural products. The deployment of smart contracts can automatically execute transactions and ensure the transparency and credibility of transactions. Designing the data structure of the blockchain network helps to optimize data storage and retrieval and improve the efficiency and performance of the system. By building a transaction database, agricultural product transaction data can be effectively managed and analyzed to provide support for decision-making. Using visualization methods to display transaction data in a graphical manner can help decision makers understand the agricultural product transaction situation more intuitively and promote the scientificity and accuracy of decision-making.
[0117] In the embodiment of the present invention, a suitable blockchain platform or framework, such as Ethereum, Hyperledger Fabric, etc., is selected to construct a blockchain network for accessing agricultural product information. Blockchain nodes are deployed, including verification nodes and consensus nodes of the blockchain, to ensure the stable operation of the network. For intelligent user access decision data, smart contracts are written to define access rules and permission control logic for agricultural product information. Parameters of the blockchain network, such as block size, consensus mechanism, permission management, etc., are configured to ensure the security and scalability of the network. Data structures suitable for blockchain storage are designed, including blocks, transactions, smart contracts, etc., to ensure the security and consistency of data. Smart contracts are deployed to the blockchain network to ensure the correctness and reliability of the contract. Standard agricultural product information data is converted into a format suitable for blockchain storage, and data is uploaded to the chain through smart contracts to ensure the immutability and traceability of the data. A transaction database is constructed based on the agricultural product transaction data uploaded to the blockchain, including information such as transaction time, transaction participants, and transaction content. Data visualization tools, such as Tableau and Power BI, are used to visualize the agricultural product information transaction database and generate visualization reports such as charts and graphs. Based on the visual analysis results, an agricultural product information transaction report is generated, including transaction trend analysis, distribution of transaction participants, distribution of transaction amounts, etc., to provide users with intuitive transaction data analysis results.
[0118] In this specification, a construction system based on an agricultural product information database is provided, which is used to execute the above-mentioned construction method based on an agricultural product information database. The construction system based on an agricultural product information database includes:
[0119] The data processing module is used to obtain original agricultural product information data; perform missing value detection and filling on the original agricultural product information data to generate agricultural product information filling data; perform data preprocessing on the agricultural product information filling data to generate processed agricultural product information data; perform data cleaning on the processed agricultural product information data to generate standard agricultural product information data;
[0120] The security storage module is used to perform data storage partitioning on standard agricultural product information data and generate agricultural product information partition storage data; use distributed storage technology to cache hot data on agricultural product information partition storage data and generate agricultural information optimization index; construct a data security mechanism for agricultural product information partition storage data based on agricultural information optimization index and generate agricultural product data security management and control mechanism; perform data security control on agricultural product information partition storage data based on agricultural product data security management and control mechanism and generate agricultural information security authority management data set;
[0121] The user access control module is used to analyze the frequency of permission changes on the agricultural information security permission management data set to generate user permission change frequency data; to analyze the frequency of abnormal changes on the user permission change frequency data to generate abnormal change spectrum data; to compare the abnormal change spectrum data with the preset standard change spectrum threshold to generate high-risk users and low-risk users; to intercept illegal access of high-risk users to generate high-risk illegal access interception data; to monitor normal access of low-risk users to generate low-risk normal access monitoring data; to make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data;
[0122] The database construction module is used to deploy the blockchain network of the agricultural information security authority management data set according to the intelligent user access decision data, and generate the agricultural product information access blockchain network; construct the transaction database of the agricultural product information access blockchain network to obtain the agricultural product information transaction database; use the visualization method to visualize the agricultural product information transaction database and generate the agricultural product information transaction report.
[0123] The beneficial effect of the present invention is that by performing missing value detection, filling and data preprocessing on the original agricultural product information data, the quality problems such as missing and errors in the original data are solved, thereby improving the accuracy and integrity of the data. Distributed storage technology is used to partition the agricultural product information, and the access efficiency and management flexibility of the data are improved through hot data caching and agricultural information optimization indexing technology. At the same time, a data security management and control mechanism is constructed to ensure the security of agricultural product information. By performing permission change frequency analysis and abnormal change frequency analysis on the agricultural information security authority management data set, high-risk users and low-risk users are identified, and illegal access interception is performed on high-risk users, thereby enhancing the security and controllability of agricultural product information access. The intelligent user access decision data is applied to the blockchain network deployment, and the blockchain management of agricultural product information access is realized, thereby improving the traceability and security of data transactions, and ensuring the compliance and credibility of agricultural product information transactions. Therefore, the present invention improves the data security protection of the agricultural product information database through perfect data processing, storage and security mechanisms.
[0124] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.
[0125] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those 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 should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A method for constructing an agricultural product information database, characterized in that: The following steps are involved: Step S1: Obtaining original agricultural product information data; Detect and fill missing values in the original agricultural product information data to generate agricultural product information filling data; Preprocessing the agricultural product information filling data to generate processed agricultural product information data; The processed agricultural product information data is cleaned to generate standard agricultural product information data; step S1 includes the following steps: Step S11: obtaining original agricultural product information data through agricultural data sources; Step S12: performing missing value detection on the original agricultural product information data to obtain the original agricultural product information missing detection value; comparing the original agricultural product information missing detection value with a preset missing threshold, and when the original agricultural product information missing detection value is greater than the preset missing threshold, performing variable deletion on the corresponding original agricultural product information data; Step S13: when the original agricultural product information missing detection value is less than the preset missing threshold, the corresponding original agricultural product information data is screened for data variable types to obtain numerical type missing variables and discrete type missing variables; Step S14: Perform statistical filling on missing variables of numerical type to generate numerical filling data; perform dummy variable filling on missing variables of discrete type to generate discrete filling data; perform data integration on numerical filling data and discrete filling data to generate agricultural product information filling data; Step S15: preprocessing the agricultural product information filling data to generate processed agricultural product information data, wherein the data preprocessing includes outlier processing, data normalization and data standardization; Step S16: performing data quality assessment on the processed agricultural product information data to generate agricultural product information data quality assessment indicators; performing data cleaning on the processed agricultural product information data using the agricultural product information data quality assessment indicators to generate standard agricultural product information data; Step S2: perform data storage partitioning on standard agricultural product information data to generate agricultural product information partition storage data; use distributed storage technology to cache hot data on agricultural product information partition storage data to generate agricultural information optimization index; construct a data security mechanism for agricultural product information partition storage data based on agricultural information optimization index to generate agricultural product data security management and control mechanism; perform data security control on agricultural product information partition storage data based on agricultural product data security management and control mechanism to generate agricultural information security authority management data set; Step S2 includes the following steps: Step S21: Analyze the data characteristics of the standard agricultural product information data to generate agricultural product information characteristic data; analyze the access mode of the standard agricultural product information data to generate agricultural product information access mode data; perform data storage partitioning according to the agricultural product information characteristic data and the agricultural product information access mode data to generate agricultural product information partition storage data; Step S22: using distributed storage technology to replicate the agricultural product information partition storage data to generate agricultural product information replication storage data; transmitting the agricultural product information replication storage data to different storage nodes in the distributed storage for redundant backup to generate an agricultural product redundant backup data set; Step S23: constructing a data index for the redundant backup data set of agricultural products to generate an agricultural information data index; using an optimized query algorithm to cache hot data for the redundant backup data set of agricultural products based on the agricultural information data index to generate an optimized agricultural information index; Step S24: constructing a data security mechanism for the agricultural product information partition storage data according to the agricultural information optimization index, and generating an agricultural product data security management and control mechanism; Step S25: Based on the agricultural product data security management and control mechanism, data security control is performed on the agricultural product information partition storage data to generate an agricultural information security authority management data set; Step S3: Perform authority change frequency analysis on the agricultural information security authority management data set to generate user authority change frequency data; perform abnormal change frequency analysis on the user authority change frequency data to generate abnormal change spectrum data; compare the abnormal change spectrum data with the preset standard change spectrum threshold to generate high-risk users and low-risk users; intercept illegal access of high-risk users to generate high-risk illegal access interception data; monitor normal access of low-risk users to generate low-risk normal access monitoring data; make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data; Step S4: Deploy the blockchain network of the agricultural information security authority management data set according to the intelligent user access decision data to generate an agricultural product information access blockchain network; construct a transaction database for the agricultural product information access blockchain network to obtain an agricultural product information transaction database; use a visualization method to visualize the agricultural product information transaction database and generate an agricultural product information transaction report.
2. The method for constructing an agricultural product information database according to claim 1, characterized in that: Step S16 includes the following steps: Step S161: using statistical methods to perform data quality assessment on the processed agricultural product information data to generate agricultural product information data quality assessment indicators, wherein the data quality assessment includes accuracy assessment, completeness assessment, consistency assessment and uniqueness assessment; Step S162: performing duplicate data identification on the processed agricultural product information data according to the agricultural product information data quality assessment index to generate an agricultural product information duplicate data set; Step S163: merging duplicate data of the agricultural product information duplicate data set to generate agricultural product deduplication information data; Step S164: performing data consistency verification on the agricultural product deduplication information data to generate agricultural product consistency verification data; performing data correction on the agricultural product consistency verification data to generate standard agricultural product information data.
3. The method for constructing an agricultural product information database according to claim 1, characterized in that: Step S25 includes the following steps: Step S251: performing data semantic analysis on the agricultural product information partition storage data based on the agricultural product data security management and control mechanism to generate agricultural product information semantic data; Step S252: encrypting and storing the agricultural product information semantic data to generate agricultural product semantic information encrypted data; performing access identity recognition on the agricultural product information partition storage data according to the agricultural product data security management and control mechanism to generate identity recognition data; Step S253: Performing user authority analysis on the identity recognition data to generate user authority data; retaining data access records for the agricultural product semantic information encrypted data according to the user authority data to generate agricultural product encrypted information access retention records; Step S254: Monitor data access to the retained records of agricultural product encrypted information access to generate an agricultural product safety audit monitoring data set; manage access records to the agricultural product safety audit monitoring data set through user authority data to generate an agricultural information security authority management data set.
4. The method for constructing an agricultural product information database according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: Perform authority change frequency analysis on the agricultural information security authority management data set to generate user authority change frequency data; Step S32: Perform fast Fourier transform on the user authority change frequency data to generate a user authority change spectrum graph; perform abnormal change frequency analysis on the user authority change spectrum graph to generate abnormal change spectrum data; compare the abnormal change spectrum data with a preset standard change spectrum threshold, and when the abnormal change spectrum data is greater than or equal to the standard change spectrum threshold, mark the user corresponding to the user authority change frequency data as a high-risk user; when the abnormal change spectrum data is less than the standard change spectrum threshold, mark the user corresponding to the user authority change frequency data as a low-risk user; Step S33: intercept illegal access of high-risk users to generate high-risk illegal access interception data; monitor normal access of low-risk users to generate low-risk normal access monitoring data; Step S34: Make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data.
5. The method for constructing an agricultural product information database according to claim 4, characterized in that: Step S33 includes the following steps: Step S331: screening the agricultural information security authority management data set for user access based on high-risk users to obtain a high-risk user access data set; performing access address addressing on the high-risk user access data set to generate high-risk user access address data; Step S332: dividing the access addresses of high-risk users to obtain frequently used address data and infrequently used address data of high-risk users; performing first identity and authority authentication on the high-risk users according to the frequently used address data of high-risk users, thereby generating first identity authentication data, wherein the first identity and authority authentication includes account and password authentication; Step S333: Performing a second identity authentication on the high-risk user according to the uncommon address data of the high-risk user, thereby generating second identity authentication data, wherein the second identity authentication includes account password authentication and biometric authentication; confirming the authentication results of the first identity authentication data and the second identity authentication data, and when the authentication result of the first identity authentication data or the second identity authentication data is false, performing illegal access interception on the high-risk user, and generating high-risk illegal access interception data; Step S334: Perform normal access monitoring on low-risk users to generate low-risk normal access monitoring data.
6. The method for constructing an agricultural product information database according to claim 4, characterized in that: Step S34 includes the following steps: Step S341: Merge the high-risk illegal access interception data and the low-risk normal access monitoring data to generate a risk access data set; Step S342: divide the risk access data set into a data set to obtain a model training set and a model test set; use a decision tree algorithm to perform model training on the model training set to generate a risk user training model; use the model test set to optimize and iterate the risk user training model to generate a risk user decision model; Step S343: Import the risk access data set into the risk user decision model for intelligent decision making, thereby generating intelligent user access decision data.
7. The method for constructing an agricultural product information database according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: Deploy a blockchain network for the agricultural information security authority management data set according to the intelligent user access decision data to generate an agricultural product information access blockchain network; Step S42: Designing the data structure of the agricultural product information access blockchain network to obtain blockchain structure design data; deploying smart contracts based on the blockchain structure design data to generate agricultural product transaction smart contracts; importing standard agricultural product information data into the agricultural product information access blockchain network to upload data to the blockchain and generate agricultural product transaction on-chain data; Step S43: Construct a transaction database for the agricultural product transaction chain data according to the agricultural product transaction smart contract to obtain an agricultural product information transaction database; use a visualization method to visualize the agricultural product information transaction database and generate an agricultural product information transaction report.
8. A system for constructing an agricultural product information database, characterized in that: Used to execute the method for constructing a database based on agricultural product information as claimed in claim 1, the construction system based on the database based on agricultural product information comprises: The data processing module is used to obtain original agricultural product information data; perform missing value detection and filling on the original agricultural product information data to generate agricultural product information filling data; perform data preprocessing on the agricultural product information filling data to generate processed agricultural product information data; perform data cleaning on the processed agricultural product information data to generate standard agricultural product information data; The security storage module is used to perform data storage partitioning on standard agricultural product information data and generate agricultural product information partition storage data; use distributed storage technology to cache hot data on agricultural product information partition storage data and generate agricultural information optimization index; construct a data security mechanism for agricultural product information partition storage data based on agricultural information optimization index and generate agricultural product data security management and control mechanism; perform data security control on agricultural product information partition storage data based on agricultural product data security management and control mechanism and generate agricultural information security authority management data set; The user access control module is used to analyze the frequency of permission changes on the agricultural information security permission management data set to generate user permission change frequency data; to analyze the frequency of abnormal changes on the user permission change frequency data to generate abnormal change spectrum data; to compare the abnormal change spectrum data with the preset standard change spectrum threshold to generate high-risk users and low-risk users; to intercept illegal access of high-risk users to generate high-risk illegal access interception data; to monitor normal access of low-risk users to generate low-risk normal access monitoring data; to make intelligent decisions on high-risk illegal access interception data and low-risk normal access monitoring data to generate intelligent user access decision data; The database construction module is used to deploy the blockchain network of the agricultural information security authority management data set according to the intelligent user access decision data, and generate the agricultural product information access blockchain network; construct the transaction database of the agricultural product information access blockchain network to obtain the agricultural product information transaction database; use the visualization method to visualize the agricultural product information transaction database and generate the agricultural product information transaction report.
Citation Information
Patent Citations
Petrochemical engineering equipment supervision information management system
CN106503927A
Safe and trusted block chain of data in traceability system and management method
CN108804928A
