Agricultural product data optimization storage method and system based on agricultural product association

Through the data optimization storage method based on agricultural product correlation, the problem of the lack of dynamic update and intelligent analysis capabilities of agricultural product data storage architecture in the existing technology is solved, the availability and quality of data are improved, and the real-time, flexibility and the real-time and flexibility of modern agriculture are met. Security requirements.

CN119046623BActive Publication Date: 2025-02-18SHENZHEN ZHONGNONG NET E-BUSINESS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411554036.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-18
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

The existing agricultural product data storage architecture lacks dynamic updates and intelligent analysis capabilities, and cannot meet the needs of modern agriculture for real-time, flexibility and security, and the data quality is affected by noise and missing values.

Method used

The data optimization storage method based on agricultural product correlation is adopted to improve the availability and quality of data through steps such as data deduplication, standardization, outlier identification and missing value filling. Specific steps include data dilution checking and deduplication, missing value recognition and marking, structured processing, outlier value recognition and classification, associated data set construction and missing value filling.

Benefits of technology

It improves the availability and quality of agricultural product data, enhances the real-time and flexibility of data, reduces the impact of noise and missing values, and meets the needs of modern agriculture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046623B_ABST
    Figure CN119046623B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of recording carrier processing, and is a method and system for optimizing storage of agricultural product data based on the association of agricultural products, comprising: performing deduplication and standardization operations on agricultural product data to be stored, and marking missing value labels to obtain standard agricultural product data; identifying abnormal values ​​in the standard agricultural product data according to a clustering algorithm to obtain primary abnormal data; using a pre-trained abnormal value association recognition model to identify associated information in the primary abnormal data, and classifying the primary abnormal data according to the associated information to obtain true abnormal values ​​and abnormal fluctuation values; deleting true abnormal values ​​in the standard agricultural product data to obtain de-abnormal data; obtaining a related data set, and filling missing values ​​in the de-abnormal data according to the related data set and the associated information to obtain optimized agricultural product data. The present invention can improve the data availability after the agricultural product data is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of recording carrier processing, and in particular to a method and system for optimizing storage of agricultural product data based on agricultural product relevance. Background Art

[0002] With the development of information technology, a large amount of data is generated in agricultural production, such as soil characteristics and crop growth conditions. These data come not only from traditional agricultural monitoring, but also from multiple channels such as IoT devices, drone remote sensing and satellite technology. These data are often affected by noise and missing values ​​during collection and storage, resulting in a decline in data quality and restricting the intelligent process of agricultural production.

[0003] The existing storage architecture usually optimizes data processing according to preset strategies and lacks dynamic update and intelligent analysis capabilities. It cannot meet the real-time, flexibility and security requirements of modern agriculture. Summary of the invention

[0004] The present invention provides an agricultural product data optimization storage method based on agricultural product relevance, the main purpose of which is to improve the data availability of the agricultural product data after optimization.

[0005] To achieve the above-mentioned purpose, the present invention provides a method for optimizing and storing agricultural product data based on agricultural product association, comprising:

[0006] Acquire agricultural product data to be stored, perform a data duplication check operation on the agricultural product data to be stored to obtain duplicate data, and perform a deduplication operation on the agricultural product data to be stored based on the duplicate data to obtain deduplication agricultural product data;

[0007] Identifying missing values ​​on the deduplicated agricultural product data to obtain missing value locations, marking the missing value locations with preset missing value labels to obtain complete agricultural product data, and performing structured processing on the complete agricultural product data according to a pre-constructed data standard to obtain standard agricultural product data;

[0008] Using a pre-built K-means clustering algorithm, an outlier identification operation is performed on the standard agricultural product data to obtain primary abnormal data;

[0009] Using a pre-trained outlier association recognition model, the primary abnormal data is subjected to association feature recognition of a preset association category to obtain association information;

[0010] Classifying the primary abnormal data according to the associated information to obtain true abnormal values ​​and abnormal fluctuation values;

[0011] Acquire a related data set of the same period as the agricultural product data to be stored, perform feature extraction on the related data set to obtain a related data feature set, and identify related data in the related data set that meets the related information based on the related information and the related data feature set to obtain a related data set;

[0012] Retaining the abnormal fluctuation value in the standard agricultural product data and deleting the real abnormal value to obtain abnormal data;

[0013] According to the missing value labels, a data filling operation based on the associated data set is performed on the de-abnormal data to obtain agricultural product optimization data.

[0014] Optionally, the method uses a pre-built K-means clustering algorithm to perform an outlier identification operation on the standard agricultural product data to obtain primary abnormal data, including:

[0015] Acquire a data label set in the standard agricultural product data, and perform a multidimensional space mapping operation on the standard agricultural product data based on the data label set to obtain an agricultural product data coordinate set;

[0016] Using a pre-built K-means clustering algorithm, a clustering grouping operation with an adaptive number of clusters is performed on the agricultural product data coordinate set to obtain a cluster cluster set;

[0017] Identify the cluster center of each cluster in the cluster set, calculate the distance between each agricultural product data in the cluster and the cluster center, and normalize the distance to obtain a distance percentage;

[0018] Agricultural product data with a distance percentage greater than a preset outlier distance are screened as primary outlier data.

[0019] Optionally, before using the pre-trained outlier association recognition model, the method further includes:

[0020] Randomly masking pre-constructed unwashed agricultural product data to obtain masked data, obtaining artificial labels for the masked data, and constructing a training sample set based on the masked data and the artificial labels, wherein the artificial labels include outlier authentication labels and outlier-related data authentication labels;

[0021] Obtain an outlier association recognition model including an outlier recognition network and an outlier association relationship recognition network, obtain a training sample from the training sample set in turn, use the outlier association recognition model to perform forward network prediction on the training sample, and obtain an outlier judgment prediction result and an outlier association relationship prediction result;

[0022] Using the pre-built binary cross entropy loss algorithm, the loss value of the outlier authentication label of the training sample and the outlier judgment prediction result is calculated to obtain a first loss value, wherein the first loss value is expressed as:

[0023]

[0024] In the formula, represents the first loss value, N represents the number of samples of the training samples, Indicates training samples, Indicates The outlier authentication labels corresponding to the training samples are Indicates The outlier value corresponding to the training sample determines the prediction result;

[0025] Using the pre-built multi-label cross entropy loss algorithm, the loss value of the outlier-related data authentication label of the training sample and the outlier association relationship prediction result is calculated to obtain a second loss value, wherein the second loss value is expressed as:

[0026]

[0027] In the formula, represents the second loss value, represents the number of the preset association categories, represents one of the temporal relationship, spatial relationship, frequency relationship and causal relationship in the preset association category, Indicates The outlier-related data authentication labels corresponding to the training samples, Indicates The prediction results of the outlier association relationship corresponding to the training samples;

[0028] According to a pre-constructed gradient descent algorithm, the first loss value and the second loss value are minimized to obtain a first network model parameter and a second network model parameter respectively, and a network reverse update operation is performed on the outlier association recognition model according to the first network model parameter and the second network model parameter to obtain an updated outlier association recognition model;

[0029] Determining whether all training samples in the training sample set participate in training;

[0030] When not all the training samples in the training sample set participate in the training, return to the above operation step of sequentially acquiring one training sample from the training sample set, and iteratively update the updated outlier association recognition model;

[0031] When all the training samples in the training sample set participate in the training, the training process is stopped, a pre-constructed test sample set is obtained, and the updated outlier association recognition model is tested using the test sample set to obtain the test accuracy;

[0032] When the test accuracy is greater than a preset qualified threshold, the updated outlier association recognition model is determined as a trained outlier association recognition model.

[0033] Optionally, the use of a pre-trained outlier association recognition model to perform association feature recognition of a preset association category on the primary abnormal data to obtain association information includes:

[0034] Using a pre-trained outlier association recognition model, a text segmentation quantization operation is performed on the primary abnormal data to obtain a text segmentation vector sequence;

[0035] Performing self-attention weight configuration on the text word segmentation vector sequence to obtain a context-enhanced word segmentation vector sequence, and performing vector concatenation on the context-enhanced word segmentation vector sequence to obtain a preliminary abnormal data matrix;

[0036] Performing feature extraction on the preliminary abnormal data matrix to obtain a set of associated feature sequences, wherein the associated categories extracted by the convolution kernel in the feature extraction include time relationship, spatial relationship, frequency relationship and causal relationship;

[0037] Performing a full connection calculation operation based on data association on the association feature sequence set, obtaining association scores between various agricultural product data in various association categories, and obtaining an association score sequence set;

[0038] The agricultural product data sets whose association scores are greater than a preset association threshold value in the association score sequence set are screened, and a key-value pair of the agricultural product data set-association category is constructed to obtain association information.

[0039] Optionally, before classifying the primary abnormal data according to the association information, the method further includes:

[0040] Determine whether the associated information is a null value;

[0041] When the associated information is a null value, it is determined that all the primary abnormal data are real abnormal data, and the real abnormal data are deleted from the standard agricultural product data to obtain noise reduction standard data;

[0042] According to a pre-built median interpolation algorithm, the missing values ​​of the noise reduction standard data are filled to obtain the agricultural product optimization data, and the agricultural product optimization data is stored;

[0043] When the association relationship is not a null value, the primary abnormal data is classified according to the association information.

[0044] Optionally, the classifying the primary abnormal data according to the associated information to obtain the real abnormal value and the abnormal fluctuation value includes:

[0045] Obtaining each agricultural product data set in the associated information;

[0046] Performing a union operation on each of the agricultural product data sets to obtain an abnormal fluctuation value;

[0047] The set difference between the primary abnormal data and the abnormal fluctuation value is calculated to obtain the true abnormal value.

[0048] Optionally, performing a data filling operation based on the associated data set on the de-abnormal data according to the missing value labels to obtain agricultural product optimization data includes:

[0049] Obtaining the data type corresponding to the missing value label to obtain the missing value data type, and obtaining agricultural product data within a preset value range before and after the missing value label from the de-abnormalized data to obtain a reference data set;

[0050] Performing feature extraction on the reference data set to obtain a reference data feature set, and performing a curve fitting operation based on the reference data feature set to obtain a value change curve of the missing value data type, and identifying the missing value value corresponding to the missing value label position based on the value change curve to obtain a primary missing value;

[0051] Acquire the agricultural product data set corresponding to the missing value data type from the association information to obtain the missing value related data set, and acquire the association category corresponding to each agricultural product data set in the missing value related data set to obtain the missing value association relationship set;

[0052] Identify all data types in the missing value related data set to obtain the missing value associated data type, and obtain agricultural product data of the missing value associated data type from the associated data set to obtain an associated missing value data set;

[0053] According to the associated missing value data set and the missing value associated relationship set, the primary missing values ​​are numerically corrected to obtain real missing values, and the missing value labels are replaced with the real missing values ​​to obtain agricultural product optimization data.

[0054] Optionally, after obtaining the agricultural product optimization data, the method further includes:

[0055] Acquire the real abnormal values ​​of multiple batches of agricultural product data to be stored within a preset time period to obtain long-interval abnormal data;

[0056] Using the outlier association recognition model to perform outlier classification on the long-interval abnormal data to obtain an outlier classification result;

[0057] According to the abnormal value classification result, the agricultural product data belonging to the abnormal fluctuation value in the long-interval abnormal data is restored to the agricultural product optimization data to obtain updated agricultural product optimization data.

[0058] Optionally, after obtaining the agricultural product optimization data, the method further includes:

[0059] According to the preset optimization frequency, obtain pre-built optimization detection sample data;

[0060] Using the optimized detection sample data, the outlier association recognition model is tested for outlier recognition accuracy to obtain an outlier recognition accuracy score;

[0061] Determining whether the outlier recognition accuracy score is less than the qualified threshold;

[0062] When the outlier recognition accuracy score is less than the qualified threshold, the outlier association recognition model is fine-tuned and trained using the optimized detection sample data.

[0063] To achieve the above-mentioned purpose, the present invention also provides an agricultural product data optimization storage system based on agricultural product association, comprising:

[0064] A data structured processing module is used to obtain agricultural product data to be stored, perform a data duplication check operation on the agricultural product data to be stored to obtain duplicate data, and perform a deduplication operation on the agricultural product data to be stored based on the duplicate data to obtain deduplication agricultural product data, and perform missing value identification on the deduplication agricultural product data to obtain missing value positions, and perform a marking operation on the missing value positions with preset missing value labels to obtain complete agricultural product data, and perform structured processing on the complete agricultural product data according to a pre-constructed data standard to obtain standard agricultural product data;

[0065] An outlier preliminary identification module is used to perform an outlier identification operation on the standard agricultural product data using a pre-built K-means clustering algorithm to obtain primary outlier data;

[0066] A true outlier identification module is used to use a pre-trained outlier association identification model to identify the association features of the preset association category of the primary abnormal data to obtain association information, and to classify the primary abnormal data according to the association information to obtain true outliers and abnormal fluctuation values;

[0067] The abnormal associated data filling module is used to obtain a related data set of the same period as the agricultural product data to be stored, perform feature extraction on the related data set to obtain a related data feature set, and identify the related data in the related data set that meets the related information based on the related information and the related data feature set to obtain a related data set, and retain the abnormal fluctuation values ​​in the standard agricultural product data and delete the real abnormal values ​​to obtain de-abnormal data, and perform data filling operations based on the associated data set on the de-abnormal data based on the missing value labels to obtain agricultural product optimized data.

[0068] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0069] a memory storing at least one instruction; and

[0070] The processor executes the instructions stored in the memory to implement the above-mentioned agricultural product data optimization storage method based on agricultural product correlation.

[0071] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned agricultural product data optimization storage method based on agricultural product correlation.

[0072] The present invention solves the problem described in the background technology. The present invention first performs preprocessing operations on the agricultural product data to be stored by data deduplication and standardization to obtain standard agricultural product data, wherein the missing values ​​in the standard agricultural product data are not processed temporarily; then, the abnormal values ​​in the standard agricultural product data are preliminarily identified by a clustering algorithm to obtain primary abnormal data; then, the present invention uses a pre-trained abnormal value association recognition model to identify whether there is associated information in the primary abnormal data, wherein the associated information refers to a certain association relationship in each agricultural product data set; then, the primary abnormal data is classified according to the associated information to obtain true abnormal values ​​and abnormal fluctuation values, wherein the true abnormal values ​​are caused by human factors and system noise and can be directly deleted, while the abnormal fluctuation values ​​are caused by interference from other factors and belong to true values; therefore, the present invention only deletes the true abnormal values ​​in the primary abnormal data to obtain the de-abnormal data, thereby finally filling the missing values ​​in the de-abnormal data, wherein, during the filling process, it will be considered whether the missing value data type of the missing value is related to the associated information, thereby more accurately filling the values ​​and increasing the data availability. Therefore, the present invention can improve the accuracy of data abnormal value identification and missing value filling, and increase the availability of optimized data. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1A schematic diagram of a flow chart of a method for optimizing storage of agricultural product data based on agricultural product association provided by an embodiment of the present invention;

[0074] Figure 2 A functional module diagram of an agricultural product data optimization storage system based on agricultural product association provided by an embodiment of the present invention;

[0075] Figure 3 A schematic diagram of the structure of an electronic device for implementing the agricultural product data optimization storage method based on agricultural product association provided by an embodiment of the present invention.

[0076] 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

[0077] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0078] The embodiment of the present application provides an agricultural product data optimization storage method based on the association of agricultural products. The execution subject of the agricultural product data optimization storage method based on the association of agricultural products includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the agricultural product data optimization storage method based on the association of agricultural products can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0079] Reference Figure 1 FIG. 1 is a flow chart of a method for optimizing and storing agricultural product data based on agricultural product association provided by an embodiment of the present invention. In this embodiment, the method for optimizing and storing agricultural product data based on agricultural product association includes:

[0080] S1. Acquire agricultural product data to be stored, perform a data duplication check operation on the agricultural product data to be stored to obtain duplicate data, and perform a deduplication operation on the agricultural product data to be stored based on the duplicate data to obtain deduplication agricultural product data.

[0081] In the embodiment of the present invention, the agricultural product data to be stored includes soil characteristics, crop growth conditions, secondary processing conditions, quality inspection conditions, etc. Due to the long agricultural product data chain and the diversity of data sources, data may be repeated. For example, an agricultural product producer uploads a batch of agricultural product information, and a transporter uploads transportation information for the same batch of agricultural products, which may result in repeated uploading of some agricultural product names, origins, varieties, and other information.

[0082] S2. Identify missing values ​​for the deduplicated agricultural product data to obtain missing value locations, and mark the missing value locations with preset missing value labels to obtain complete agricultural product data, and perform structured processing on the complete agricultural product data according to a pre-constructed data standard to obtain standard agricultural product data.

[0083] In the embodiment of the present invention, in order to increase the data availability of data filling, it is intended to query whether the missing value is associated with other data after the associated data-associated relationship behind the abnormal value data is discovered. When associated with other data, the missing value is corrected and filled according to the associated data-relationship. Therefore, the missing value label is first used here to perform a marking operation.

[0084] Furthermore, the data standard refers to the data format specified in the agricultural product data storage system, such as the date format, the string format, and the text format, etc. The data standard can improve the execution efficiency and accuracy of various functions (such as retrieval and reading) of the agricultural product storage system. Therefore, before storing the data, the embodiment of the present invention first uses structured processing to unify the format of the agricultural product data to obtain standard agricultural product data.

[0085] S3. Using a pre-built K-means clustering algorithm, perform an outlier identification operation on the standard agricultural product data to obtain primary abnormal data.

[0086] The K-means clustering algorithm is an unsupervised learning algorithm, which is mainly used to divide a data set into K different clusters. The data points in each cluster are similar to each other, but have large differences with the data points in other clusters.

[0087] In detail, in the embodiment of the present invention, the pre-built K-means clustering algorithm is used to perform an outlier identification operation on the standard agricultural product data to obtain primary abnormal data, including:

[0088] Acquire a data label set in the standard agricultural product data, and perform a multidimensional space mapping operation on the standard agricultural product data based on the data label set to obtain an agricultural product data coordinate set;

[0089] Using a pre-built K-means clustering algorithm, a clustering grouping operation with an adaptive number of clusters is performed on the agricultural product data coordinate set to obtain a cluster cluster set;

[0090] Identify the cluster center of each cluster in the cluster set, calculate the distance between each agricultural product data in the cluster and the cluster center, and normalize the distance to obtain a distance percentage;

[0091] Agricultural product data with a distance percentage greater than a preset outlier distance are screened as primary outlier data.

[0092] Specifically, the present invention first maps each agricultural product data to a point in a multidimensional space through multidimensional space mapping, and then adaptively clusters the standard agricultural product data through the K-means clustering algorithm to form a cluster set. Then, the embodiment of the present invention obtains the cluster center of each cluster in the cluster set, and then calculates the distance between each data point in the cluster and the cluster center according to the cosine similarity algorithm. In the embodiment of the present invention, the cluster center is taken as 0, and the point farthest from the cluster center in the cluster is taken as 1, and a normalization operation is performed. Then, according to the cluster observation experience, the outlier distance can be configured, such as 0.98, 0.95, etc. When the data point in the outermost layer of the cluster exceeds 0.98 distance, it can be regarded as a discrete point, and thus as primary abnormal data.

[0093] S4. Using a pre-trained outlier association recognition model, identify association features of a preset association category on the primary abnormal data to obtain association information.

[0094] In an embodiment of the present invention, the outlier association identification model is a neural network model, which is used to determine whether the primary outlier value is a true outlier value or an abnormal fluctuation value based on whether there is a certain time, space, frequency and causal relationship between the primary abnormal data, and output the data set with a certain relationship.

[0095] Among them, the true outlier value refers to the erroneous value caused by noise interference during the storage, transmission or collection process of the data, which needs to be deleted; and the abnormal fluctuation value refers to the data that is different from the general value but is accurate and valid, and is a value caused by changes in other related data, and needs to be retained.

[0096] In detail, in the embodiment of the present invention, the pre-trained outlier association recognition model is used to identify the association features of the preset association category of the primary abnormal data to obtain the association information, including:

[0097] Using a pre-trained outlier association recognition model, a text segmentation quantization operation is performed on the primary abnormal data to obtain a text segmentation vector sequence;

[0098] Performing self-attention weight configuration on the text word segmentation vector sequence to obtain a context-enhanced word segmentation vector sequence, and performing vector concatenation on the context-enhanced word segmentation vector sequence to obtain a preliminary abnormal data matrix;

[0099] Performing feature extraction on the preliminary abnormal data matrix to obtain a set of associated feature sequences, wherein the associated categories extracted by the convolution kernel in the feature extraction include time relationship, spatial relationship, frequency relationship and causal relationship;

[0100] Performing a full connection calculation operation based on data association on the association feature sequence set, obtaining association scores between various agricultural product data in various association categories, and obtaining an association score sequence set;

[0101] The agricultural product data sets whose association scores are greater than a preset association threshold value in the association score sequence set are screened, and a key-value pair of the agricultural product data set-association category is constructed to obtain association information.

[0102] Specifically, in an embodiment of the present invention, firstly, a Chinese word segmentation tool is used to perform text segmentation and word segmentation quantization operations to obtain a text segmentation vector sequence. Then, in order to explore the associations between the text segmentation sequences, the present invention performs weighted calculations through a self-attention mechanism to obtain a context-enhanced segmentation vector sequence. Then, in order to improve the extraction efficiency of text features, the present invention cuts and splices the context-enhanced segmentation vector sequence to form a matrix form to obtain a preliminary abnormal data matrix. Finally, a set of associated feature sequences is obtained through feature extraction. Among them, the association categories extracted by the convolution kernel in the feature extraction include temporal relationships, spatial relationships, frequency relationships, and causal relationships.

[0103] The self-attention mechanism is a widely used technology in the field of natural language processing, which allows the model to autonomously focus on information at different positions in the sequence when processing the input sequence, thereby capturing long-range dependencies. The present invention can increase the probability of capturing the potential relationship between each primary abnormal data through the self-attention mechanism.

[0104] The embodiment of the present invention utilizes the pre-trained abnormal value association recognition model to identify the association features of the preset association categories of the primary abnormal data, and obtains the association scores between the various agricultural product data in each association category. When the association score is greater than the preset association threshold, such as 50%, it indicates that there is an association, and the agricultural product data set with the association is constructed into a key-value pair with the association category to obtain association information. The key-value pair in the association information can be expressed as [(data type a, data type c...data type f)--causal relationship].

[0105] Furthermore, in an embodiment of the present invention, before using the pre-trained outlier association recognition model, the method further includes:

[0106] Randomly masking pre-constructed unwashed agricultural product data to obtain masked data, obtaining artificial labels for the masked data, and constructing a training sample set based on the masked data and the artificial labels, wherein the artificial labels include outlier authentication labels and outlier-related data authentication labels;

[0107] Obtain an outlier association recognition model including an outlier recognition network and an outlier association relationship recognition network, obtain a training sample from the training sample set in turn, use the outlier association recognition model to perform forward network prediction on the training sample, and obtain an outlier judgment prediction result and an outlier association relationship prediction result;

[0108] Using the pre-built binary cross entropy loss algorithm, the loss value of the outlier authentication label of the training sample and the outlier judgment prediction result is calculated to obtain a first loss value, wherein the first loss value is expressed as:

[0109]

[0110] In the formula, represents the first loss value, N represents the number of samples of the training samples, Indicates training samples, Indicates The outlier authentication labels corresponding to the training samples are Indicates The outlier value corresponding to the training sample determines the prediction result;

[0111] Using the pre-built multi-label cross entropy loss algorithm, the loss value of the outlier-related data authentication label of the training sample and the outlier association relationship prediction result is calculated to obtain a second loss value, wherein the second loss value is expressed as:

[0112]

[0113] In the formula, represents the second loss value, represents the number of the preset association categories, represents one of the temporal relationship, spatial relationship, frequency relationship and causal relationship in the preset association category, Indicates The outlier-related data authentication labels corresponding to the training samples, Indicates The prediction results of the outlier association relationship corresponding to the training samples;

[0114] According to a pre-constructed gradient descent algorithm, the first loss value and the second loss value are minimized to obtain a first network model parameter and a second network model parameter respectively, and a network reverse update operation is performed on the outlier association recognition model according to the first network model parameter and the second network model parameter to obtain an updated outlier association recognition model;

[0115] Determining whether all training samples in the training sample set participate in training;

[0116] When not all the training samples in the training sample set participate in the training, return to the above operation step of sequentially acquiring one training sample from the training sample set, and iteratively update the updated outlier association recognition model;

[0117] When all the training samples in the training sample set participate in the training, the training process is stopped, a pre-constructed test sample set is obtained, and the updated outlier association recognition model is tested using the test sample set to obtain the test accuracy;

[0118] When the test accuracy is greater than a preset qualified threshold, the updated outlier association recognition model is determined as a trained outlier association recognition model.

[0119] The masking is a data preprocessing method, which generates new training samples by masking certain input features, thereby increasing the speed of constructing the training sample set.

[0120] Furthermore, the outlier authentication label is used to determine whether the agricultural product data is an outlier, including [yes or no]; the outlier-related data authentication label includes the association relationship between the outlier and other data types, such as one or more of the temporal relationship, spatial relationship, and causal relationship.

[0121] The outlier recognition network and the abnormal association relationship recognition network in the outlier association recognition model of the present invention are two networks, one is a binary classification network, and the other is a multi-label recognition network. Therefore, two pre-built loss value algorithms are used to calculate the loss value, and the model parameters are updated according to the gradient descent algorithm and the algorithm for reverse transmission of network parameters. Among them, the cross entropy loss algorithm is an algorithm that measures the difference between two probability distributions, and the gradient descent algorithm is an optimization algorithm for minimizing the loss function. Both are common in the training process of the neural network model and will not be described here.

[0122] Finally, the present invention uses the whole training process of the training samples to control the training progress, and controls the training completion by testing accuracy. When the test accuracy is greater than the preset qualified threshold, a trained outlier association recognition model is obtained. In addition, when the training sample set is trained, but the test accuracy does not meet the standard, the unwashed agricultural product data can be randomly masked again, and a new training sample set can be constructed for retraining.

[0123] S5. Classify the primary abnormal data according to the associated information to obtain true abnormal values ​​and abnormal fluctuation values.

[0124] In the embodiment of the present invention, when there is a correlation in the associated information, it indicates that some agricultural product data in the primary abnormal data are abnormal fluctuation values ​​caused by interference from certain information data, and are not all real abnormal values ​​caused by human interference and system noise.

[0125] In detail, in the embodiment of the present invention, before classifying the primary abnormal data according to the association information, the method further includes:

[0126] Determine whether the associated information is a null value;

[0127] When the associated information is a null value, it is determined that all the primary abnormal data are real abnormal data, and the real abnormal data are deleted from the standard agricultural product data to obtain noise reduction standard data;

[0128] According to a pre-built median interpolation algorithm, the missing values ​​of the noise reduction standard data are filled to obtain the agricultural product optimization data, and the agricultural product optimization data is stored;

[0129] When the association relationship is not a null value, the primary abnormal data is classified according to the association information.

[0130] Specifically, the present invention can analyze the associated information before classifying the primary abnormal data. When the associated information contains a null value, it indicates that no data interferes with the agricultural product data. Therefore, all the primary abnormal data are abnormal values ​​caused by human interference and system noise. All primary abnormal data can be directly deleted, and the missing values ​​can be filled using the traditional median interpolation algorithm.

[0131] The median interpolation algorithm refers to a method of replacing missing values ​​with the median in a data set to maintain the stability and central tendency of data distribution.

[0132] Further, in an embodiment of the present invention, the primary abnormal data is classified according to the associated information to obtain the real abnormal value and the abnormal fluctuation value, including:

[0133] Obtaining each agricultural product data set in the associated information;

[0134] Performing a union operation on each of the agricultural product data sets to obtain an abnormal fluctuation value;

[0135] The set difference between the primary abnormal data and the abnormal fluctuation value is calculated to obtain the true abnormal value.

[0136] Specifically, in the embodiment of the present invention, the key-value pairs in the association information can be expressed as [(data type a, data type c...data type f)--causal relationship], [(data type d, data type e...)--frequency relationship]... When the various agricultural product data sets are subjected to a union operation, the abnormal fluctuation value [data type a, data type c...data type f] is obtained, and the data types not involved in the abnormal fluctuation value, such as [data type b], do not have any data relationship with other data, indicating that [data type b] is indeed noise, and therefore [data type b] is determined to be a true abnormal value.

[0137] S6. Acquire a related data set of the same period as the agricultural product data to be stored, perform feature extraction on the related data set to obtain a related data feature set, and identify the related data in the related data set that meets the related information based on the related information and the related data feature set to obtain a related data set.

[0138] In an embodiment of the present invention, firstly, the Internet technology and agricultural product alliance data or other pre-built data interfaces are used to obtain a relevant data set of the same period as the agricultural product data to be stored. The relevant data set may include data in various aspects, such as climate change, natural disasters, geographic location, man-made accidents, etc.

[0139] The present invention performs feature recognition on the relevant data set and then performs big data screening according to the factors involved in the associated information to obtain the relevant data set. Therefore, the larger the relevant data set, the higher the accuracy of abnormality recognition.

[0140] S7. Retain the abnormal fluctuation value in the standard agricultural product data and delete the real abnormal value to obtain abnormality-free data.

[0141] In the embodiment of the present invention, in order to ensure the availability of data after outlier processing, only the real outliers in the standard agricultural product data are deleted, thereby obtaining outlier-free data.

[0142] S8. According to the missing value labels, a data filling operation based on the associated data set is performed on the de-abnormal data to obtain optimized agricultural product data.

[0143] In detail, in an embodiment of the present invention, performing a data filling operation based on the associated data set on the de-abnormal data according to the missing value label to obtain the agricultural product optimization data includes:

[0144] Obtaining the data type corresponding to the missing value label to obtain the missing value data type, and obtaining agricultural product data within a preset value range before and after the missing value label from the de-abnormalized data to obtain a reference data set;

[0145] Performing feature extraction on the reference data set to obtain a reference data feature set, and performing a curve fitting operation based on the reference data feature set to obtain a value change curve of the missing value data type, and identifying the missing value value corresponding to the missing value label position based on the value change curve to obtain a primary missing value;

[0146] Acquire the agricultural product data set corresponding to the missing value data type from the association information to obtain the missing value related data set, and acquire the association category corresponding to each agricultural product data set in the missing value related data set to obtain the missing value association relationship set;

[0147] Identify all data types in the missing value related data set to obtain the missing value associated data type, and obtain agricultural product data of the missing value associated data type from the associated data set to obtain an associated missing value data set;

[0148] According to the associated missing value data set and the missing value associated relationship set, the primary missing values ​​are numerically corrected to obtain real missing values, and the missing value labels are replaced with the real missing values ​​to obtain agricultural product optimization data.

[0149] Specifically, after obtaining the de-abnormalized data, the present invention needs to fill in the unprocessed missing values. To ensure that the filled data has high availability, it is first necessary to query whether the missing value data type at the position of the missing value label is in the agricultural product data set of the associated information.

[0150] When the missing value data type is not in the agricultural product data set, it indicates that the missing value is not interfered by other data. The embodiment of the present invention obtains the agricultural product data within a preset numerical range before and after the missing value label to obtain a reference data set. The preset numerical range can be 100 characters before and after.

[0151] Then, the numerical variation curve of the missing value data type is fitted according to the reference data set to obtain the specific missing value value.

[0152] When the missing value data type is in the agricultural product data set, it indicates that the data at the missing value position is affected by the associated information, and it is necessary to obtain the agricultural product data of the missing value associated data type from the associated data set to obtain the associated missing value data set. Then, according to the associated missing value data set and the missing value association relationship set, the primary missing value is numerically corrected to obtain the real missing value. This step can be achieved through a pre-trained neural network model.

[0153] In the embodiment of the present invention, after the actual missing values ​​corresponding to the missing value labels are calculated, data filling can be performed to obtain agricultural product optimization data, which is then stored in a pre-constructed database.

[0154] Furthermore, in the embodiment of the present invention, after obtaining the agricultural product optimization data, the method further includes:

[0155] Acquire the real abnormal values ​​of multiple batches of agricultural product data to be stored within a preset time period to obtain long-interval abnormal data;

[0156] Using the outlier association recognition model to perform outlier classification on the long-interval abnormal data to obtain an outlier classification result;

[0157] According to the abnormal value classification result, the agricultural product data belonging to the abnormal fluctuation value in the long-interval abnormal data is restored to the agricultural product optimization data to obtain updated agricultural product optimization data.

[0158] In the embodiment of the present invention, the above steps S1 to S8 are for optimizing the data of a single batch of agricultural products to be stored. However, many seasonal and long-period data may be deleted because they are judged as true outliers due to the short time span of the single batch of agricultural products to be stored.

[0159] Therefore, the present invention saves the deleted real abnormal values ​​within a preset time period (e.g., three months) to observe whether new associated information appears in the real abnormal values. When new associated information appears, it can be shown that the real abnormal values ​​are actually potential abnormal fluctuation values, so data recovery can be performed to improve data quality.

[0160] Furthermore, in the embodiment of the present invention, after obtaining the agricultural product optimization data, the method further includes:

[0161] According to the preset optimization frequency, obtain pre-built optimization detection sample data;

[0162] Using the optimized detection sample data, the outlier association recognition model is tested for outlier recognition accuracy to obtain an outlier recognition accuracy score;

[0163] Determining whether the outlier recognition accuracy score is less than the qualified threshold;

[0164] When the outlier recognition accuracy score is less than the qualified threshold, the outlier association recognition model is fine-tuned and trained using the optimized detection sample data.

[0165] It should be known that the data optimization process is carried out all the time, while the types and quantities of agricultural product data are gradually increasing. To ensure the accuracy of data optimization, in the embodiment of the present invention, the model is regularly optimized according to a preset optimization frequency.

[0166] Specifically, the present invention will construct optimized detection sample data through artificial labeling, and then use the optimized detection sample data to perform an outlier recognition accuracy test to obtain an outlier recognition accuracy score. Similar to the above training process, a preset 95% qualified threshold can be used for evaluation and optimization, thereby ensuring the iterative update of the outlier association recognition model.

[0167] The present invention solves the problem described in the background technology. The present invention first performs preprocessing operations on the agricultural product data to be stored by data deduplication and standardization to obtain standard agricultural product data, wherein the missing values ​​in the standard agricultural product data are not processed temporarily; then, the abnormal values ​​in the standard agricultural product data are preliminarily identified by a clustering algorithm to obtain primary abnormal data; then, the present invention uses a pre-trained abnormal value association recognition model to identify whether there is associated information in the primary abnormal data, wherein the associated information refers to a certain association relationship in each agricultural product data set; then, the primary abnormal data is classified according to the associated information to obtain true abnormal values ​​and abnormal fluctuation values, wherein the true abnormal values ​​are caused by human factors and system noise and can be directly deleted, while the abnormal fluctuation values ​​are caused by interference from other factors and belong to true values; therefore, the present invention only deletes the true abnormal values ​​in the primary abnormal data to obtain the de-abnormal data, thereby finally filling the missing values ​​in the de-abnormal data, wherein, during the filling process, it will be considered whether the missing value data type of the missing value is related to the associated information, thereby more accurately filling the values ​​and increasing the data availability. Therefore, the present invention can improve the accuracy of data abnormal value identification and missing value filling, and increase the availability of optimized data.

[0168] like Figure 2 1 is a functional module diagram of an agricultural product data optimization storage system based on agricultural product association provided by an embodiment of the present invention.

[0169] The agricultural product data optimization storage system 100 based on agricultural product association of the present invention can be installed in an electronic device. According to the functions to be implemented, the agricultural product data optimization storage system 100 based on agricultural product association can include a data structured processing module 101, an abnormal value preliminary identification module 102, a real abnormal value identification module 103 and an abnormally associated data filling module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0170] The data structured processing module 101 is used to obtain agricultural product data to be stored, perform a data duplication check operation on the agricultural product data to be stored to obtain duplicate data, and perform a deduplication operation on the agricultural product data to be stored based on the duplicate data to obtain deduplication agricultural product data, and perform missing value identification on the deduplication agricultural product data to obtain missing value positions, and perform a marking operation on the missing value positions with preset missing value labels to obtain complete agricultural product data, and perform structured processing on the complete agricultural product data according to a pre-constructed data standard to obtain standard agricultural product data;

[0171] The outlier preliminary identification module 102 is used to perform an outlier identification operation on the standard agricultural product data using a pre-built K-means clustering algorithm to obtain primary outlier data;

[0172] The real outlier identification module 103 is used to use the pre-trained outlier association identification model to identify the association features of the preset association category of the primary abnormal data to obtain association information, and classify the primary abnormal data according to the association information to obtain the real outlier value and the abnormal fluctuation value;

[0173] The abnormal associated data filling module 104 is used to obtain a related data set of the same period as the agricultural product data to be stored, perform feature extraction on the related data set to obtain a related data feature set, and identify the related data in the related data set that meets the related information based on the related information and the related data feature set to obtain a related data set, and retain the abnormal fluctuation values ​​in the standard agricultural product data and delete the real abnormal values ​​to obtain de-abnormal data, and perform data filling operations based on the associated data set on the de-abnormal data based on the missing value labels to obtain agricultural product optimized data.

[0174] In detail, the modules in the agricultural product data optimization storage system 100 based on agricultural product association in the embodiment of the present invention are used in the same manner as above. Figure 1The same technical means are used as the method for optimizing storage of agricultural product data based on agricultural product correlation described in the specification and can produce the same technical effects, so they will not be repeated here.

[0175] like Figure 3 , which is a schematic diagram of the structure of an electronic device for implementing a method for optimizing and storing agricultural product data based on agricultural product associations provided by an embodiment of the present invention.

[0176] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an agricultural product data optimization storage method program based on agricultural product association.

[0177] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 also includes an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the agricultural product data optimization storage method program based on the association of agricultural products, but also can be used to temporarily store data that has been output or is to be output.

[0178] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as agricultural product data optimization storage method programs based on agricultural product associations, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0179] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0180] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0181] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0182] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0183] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0184] The agricultural product data optimization storage method program based on agricultural product association stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0185] Acquire agricultural product data to be stored, perform a data duplication check operation on the agricultural product data to be stored to obtain duplicate data, and perform a deduplication operation on the agricultural product data to be stored based on the duplicate data to obtain deduplication agricultural product data;

[0186] Identifying missing values ​​on the deduplicated agricultural product data to obtain missing value locations, marking the missing value locations with preset missing value labels to obtain complete agricultural product data, and performing structured processing on the complete agricultural product data according to a pre-constructed data standard to obtain standard agricultural product data;

[0187] Using a pre-built K-means clustering algorithm, an outlier identification operation is performed on the standard agricultural product data to obtain primary abnormal data;

[0188] Using a pre-trained outlier association recognition model, the primary abnormal data is subjected to association feature recognition of a preset association category to obtain association information;

[0189] Classifying the primary abnormal data according to the associated information to obtain true abnormal values ​​and abnormal fluctuation values;

[0190] Acquire a related data set of the same period as the agricultural product data to be stored, perform feature extraction on the related data set to obtain a related data feature set, and identify related data in the related data set that meets the related information based on the related information and the related data feature set to obtain a related data set;

[0191] Retaining the abnormal fluctuation value in the standard agricultural product data and deleting the real abnormal value to obtain abnormal data;

[0192] According to the missing value labels, a data filling operation based on the associated data set is performed on the de-abnormal data to obtain agricultural product optimization data.

[0193] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0194] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0195] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0196] Acquire agricultural product data to be stored, perform a data duplication check operation on the agricultural product data to be stored to obtain duplicate data, and perform a deduplication operation on the agricultural product data to be stored based on the duplicate data to obtain deduplication agricultural product data;

[0197] Identifying missing values ​​on the deduplicated agricultural product data to obtain missing value locations, marking the missing value locations with preset missing value labels to obtain complete agricultural product data, and performing structured processing on the complete agricultural product data according to a pre-constructed data standard to obtain standard agricultural product data;

[0198] Using a pre-built K-means clustering algorithm, an outlier identification operation is performed on the standard agricultural product data to obtain primary abnormal data;

[0199] Using a pre-trained outlier association recognition model, the primary abnormal data is subjected to association feature recognition of a preset association category to obtain association information;

[0200] Classifying the primary abnormal data according to the associated information to obtain true abnormal values ​​and abnormal fluctuation values;

[0201] Acquire a related data set of the same period as the agricultural product data to be stored, perform feature extraction on the related data set to obtain a related data feature set, and identify related data in the related data set that meets the related information based on the related information and the related data feature set to obtain a related data set;

[0202] Retaining the abnormal fluctuation value in the standard agricultural product data and deleting the real abnormal value to obtain abnormal data;

[0203] According to the missing value labels, a data filling operation based on the associated data set is performed on the de-abnormal data to obtain agricultural product optimization data.

[0204] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, and actual implementation may have other division methods.

[0205] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0206] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0207] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0208] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for optimizing storage of agricultural product data based on agricultural product association, characterized in that: The method comprises: Acquire agricultural product data to be stored, perform a data duplication check operation on the agricultural product data to be stored to obtain duplicate data, and perform a deduplication operation on the agricultural product data to be stored based on the duplicate data to obtain deduplication agricultural product data; Identifying missing values ​​on the deduplicated agricultural product data to obtain missing value locations, marking the missing value locations with preset missing value labels to obtain complete agricultural product data, and performing structured processing on the complete agricultural product data according to a pre-constructed data standard to obtain standard agricultural product data; Using a pre-built K-means clustering algorithm, an outlier identification operation is performed on the standard agricultural product data to obtain primary abnormal data; Using the pre-trained outlier association recognition model, the primary abnormal data is subjected to association feature recognition of a preset association category to obtain association information, including: Using a pre-trained outlier association recognition model, a text segmentation quantization operation is performed on the primary abnormal data to obtain a text segmentation vector sequence; Performing self-attention weight configuration on the text word segmentation vector sequence to obtain a context-enhanced word segmentation vector sequence, and performing vector concatenation on the context-enhanced word segmentation vector sequence to obtain a preliminary abnormal data matrix; Performing feature extraction on the preliminary abnormal data matrix to obtain a set of associated feature sequences, wherein the associated categories extracted by the convolution kernel in the feature extraction include time relationship, spatial relationship, frequency relationship and causal relationship; Performing a full connection calculation operation based on data association on the association feature sequence set, obtaining association scores between various agricultural product data in various association categories, and obtaining an association score sequence set; Filtering the agricultural product data set whose correlation score is greater than a preset correlation threshold in the correlation score sequence set, constructing a key-value pair of the agricultural product data set-correlation category, and obtaining correlation information; Determine whether the associated information is a null value; When the associated information is a null value, it is determined that all the primary abnormal data are real abnormal data, and the real abnormal data are deleted from the standard agricultural product data to obtain noise reduction standard data; According to a pre-built median interpolation algorithm, the missing values ​​of the noise reduction standard data are filled to obtain the agricultural product optimization data, and the agricultural product optimization data is stored; When the associated information is not a null value, the primary abnormal data is classified according to the associated information to obtain a true abnormal value and an abnormal fluctuation value, including: Obtaining each agricultural product data set in the associated information; Performing a union operation on each of the agricultural product data sets to obtain an abnormal fluctuation value; Calculate the aggregate difference between the primary abnormal data and the abnormal fluctuation value to obtain a true abnormal value; Acquire a related data set of the same period as the agricultural product data to be stored, perform feature extraction on the related data set to obtain a related data feature set, and identify related data in the related data set that meets the related information based on the related information and the related data feature set to obtain a related data set; Retaining the abnormal fluctuation value in the standard agricultural product data and deleting the real abnormal value to obtain abnormal data; According to the missing value labels, a data filling operation based on the associated data set is performed on the de-abnormal data to obtain agricultural product optimization data.

2. The agricultural product data optimization storage method based on agricultural product association according to claim 1, characterized in that: The pre-built K-means clustering algorithm is used to perform an outlier identification operation on the standard agricultural product data to obtain primary abnormal data, including: Acquire a data label set in the standard agricultural product data, and perform a multidimensional space mapping operation on the standard agricultural product data based on the data label set to obtain an agricultural product data coordinate set; Using a pre-built K-means clustering algorithm, a clustering grouping operation with an adaptive number of clusters is performed on the agricultural product data coordinate set to obtain a cluster cluster set; Identify the cluster center of each cluster in the cluster set, calculate the distance between each agricultural product data in the cluster and the cluster center, and normalize the distance to obtain a distance percentage; Agricultural product data with a distance percentage greater than a preset outlier distance are screened as primary outlier data.

3. The agricultural product data optimization storage method based on agricultural product association according to claim 2, characterized in that: Before using the pre-trained outlier association recognition model, the method further includes: Randomly masking pre-constructed unwashed agricultural product data to obtain masked data, obtaining artificial labels for the masked data, and constructing a training sample set based on the masked data and the artificial labels, wherein the artificial labels include outlier authentication labels and outlier-related data authentication labels; Obtain an outlier association recognition model including an outlier recognition network and an outlier association relationship recognition network, obtain a training sample from the training sample set in turn, use the outlier association recognition model to perform forward network prediction on the training sample, and obtain an outlier judgment prediction result and an outlier association relationship prediction result; Using the pre-built binary cross entropy loss algorithm, the loss value of the outlier authentication label of the training sample and the outlier judgment prediction result is calculated to obtain a first loss value, wherein the first loss value is expressed as: In the formula, represents the first loss value, N represents the number of samples of the training samples, Indicates training samples, Indicates The outlier authentication labels corresponding to the training samples are Indicates The outlier value corresponding to the training sample determines the prediction result; Using the pre-built multi-label cross entropy loss algorithm, the loss value of the outlier-related data authentication label of the training sample and the outlier association relationship prediction result is calculated to obtain a second loss value, wherein the second loss value is expressed as: In the formula, represents the second loss value, represents the number of the preset association categories, represents one of the temporal relationship, spatial relationship, frequency relationship and causal relationship in the preset association category, Indicates The outlier-related data authentication labels corresponding to the training samples, Indicates The prediction results of the outlier association relationship corresponding to the training samples; According to a pre-constructed gradient descent algorithm, the first loss value and the second loss value are minimized to obtain a first network model parameter and a second network model parameter respectively, and a network reverse update operation is performed on the outlier association recognition model according to the first network model parameter and the second network model parameter to obtain an updated outlier association recognition model; Determining whether all training samples in the training sample set participate in training; When not all the training samples in the training sample set participate in the training, return to the above operation step of sequentially acquiring one training sample from the training sample set, and iteratively update the updated outlier association recognition model; When all the training samples in the training sample set participate in the training, the training process is stopped, a pre-constructed test sample set is obtained, and the updated outlier association recognition model is tested using the test sample set to obtain the test accuracy; When the test accuracy is greater than a preset qualified threshold, the updated outlier association recognition model is determined as a trained outlier association recognition model.

4. The agricultural product data optimization storage method based on agricultural product association according to claim 3 is characterized in that: The step of performing a data filling operation based on the associated data set on the de-abnormal data according to the missing value labels to obtain agricultural product optimization data includes: Obtaining the data type corresponding to the missing value label to obtain the missing value data type, and obtaining agricultural product data within a preset numerical range before and after the missing value label from the de-abnormalized data to obtain a reference data set; Performing feature extraction on the reference data set to obtain a reference data feature set, and performing a curve fitting operation based on the reference data feature set to obtain a value change curve of the missing value data type, and identifying the missing value value corresponding to the missing value label position based on the value change curve to obtain a primary missing value; Acquire the agricultural product data set corresponding to the missing value data type from the association information to obtain the missing value related data set, and acquire the association category corresponding to each agricultural product data set in the missing value related data set to obtain the missing value association relationship set; Identify all data types in the missing value related data set to obtain the missing value associated data type, and obtain agricultural product data of the missing value associated data type from the associated data set to obtain an associated missing value data set; According to the associated missing value data set and the missing value associated relationship set, the primary missing values ​​are numerically corrected to obtain real missing values, and the missing value labels are replaced with the real missing values ​​to obtain agricultural product optimization data.

5. The agricultural product data optimization storage method based on agricultural product association according to claim 4 is characterized in that: After obtaining the agricultural product optimization data, the method further includes: Acquire the real abnormal values ​​of multiple batches of agricultural product data to be stored within a preset time period to obtain long-interval abnormal data; Using the outlier association recognition model to perform outlier classification on the long-interval abnormal data to obtain an outlier classification result; According to the abnormal value classification result, the agricultural product data belonging to the abnormal fluctuation value in the long-interval abnormal data is restored to the agricultural product optimization data to obtain updated agricultural product optimization data.

6. The agricultural product data optimization storage method based on agricultural product association according to claim 5, characterized in that: After obtaining the agricultural product optimization data, the method further includes: According to the preset optimization frequency, obtain pre-built optimization detection sample data; Using the optimized detection sample data, the outlier association recognition model is tested for outlier recognition accuracy to obtain an outlier recognition accuracy score; Determining whether the outlier recognition accuracy score is less than the qualified threshold; When the outlier recognition accuracy score is less than the qualified threshold, the outlier association recognition model is fine-tuned and trained using the optimized detection sample data.

7. An agricultural product data optimization storage system based on agricultural product association, characterized in that: The system is used to implement the agricultural product data optimization storage method based on agricultural product association according to claim 1, and the system includes: A data structured processing module is used to obtain agricultural product data to be stored, perform a data duplication check operation on the agricultural product data to be stored to obtain duplicate data, and perform a deduplication operation on the agricultural product data to be stored based on the duplicate data to obtain deduplication agricultural product data, and perform missing value identification on the deduplication agricultural product data to obtain missing value positions, and perform a marking operation on the missing value positions with preset missing value labels to obtain complete agricultural product data, and perform structured processing on the complete agricultural product data according to a pre-constructed data standard to obtain standard agricultural product data; An outlier preliminary identification module is used to perform an outlier identification operation on the standard agricultural product data using a pre-built K-means clustering algorithm to obtain primary outlier data; A true outlier identification module is used to use a pre-trained outlier association identification model to identify the association features of the preset association category of the primary abnormal data to obtain association information, and to classify the primary abnormal data according to the association information to obtain true outliers and abnormal fluctuation values; The abnormal associated data filling module is used to obtain a related data set of the same period as the agricultural product data to be stored, perform feature extraction on the related data set to obtain a related data feature set, and identify the related data in the related data set that meets the related information based on the related information and the related data feature set to obtain a related data set, and retain the abnormal fluctuation values ​​in the standard agricultural product data and delete the real abnormal values ​​to obtain de-abnormal data, and perform data filling operations based on the associated data set on the de-abnormal data based on the missing value labels to obtain agricultural product optimized data.

Citation Information

Patent Citations

  • Power system anomaly monitoring method based on log feature intelligent mining

    CN114048870A

  • Dam safety early warning method and system based on monitoring data analysis

    CN116128312A