Animal and plant ion concentration analysis and early warning method, system, equipment and storage medium

Through improved ReliefF feature extraction algorithm and LDAM loss function, the problem of high-dimensionality and sample imbalance in animal and plant sensor data is solved, and more efficient early warning data processing and better early warning effect are achieved.

CN114722936BActive Publication Date: 2025-02-28SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210358264.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-07
Publication Date
2025-02-28
Estimated Expiration
2042-04-07

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with high-dimensional problems in animal and plant sensor data, resulting in overfitting of the model, low operating efficiency, and reduced classification prediction accuracy and stability. Especially in the case of unbalanced samples, the model's generalization ability is poor, resulting in poor early warning analysis results.

Method used

Using the improved ReliefF feature extraction algorithm, the optimal feature set with the strongest correlation and the smallest redundancy is determined through K-maxmin clustering hierarchy and non-repeated sampling, and the data dimension is reduced. At the same time, the LDAM loss function and the delayed rebalancing DRW method are used to deal with the sample imbalance problem, and the early warning model is trained, using the deep residual network as the backbone network and the stochastic gradient descent as the optimizer.

Benefits of technology

It effectively reduces the data dimension, improves the processing and analysis capabilities of early warning data, improves the accuracy and efficiency of the early warning model, and improves the early warning effect in the case of sample imbalance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114722936B_ABST
    Figure CN114722936B_ABST
Patent Text Reader

Abstract

The present invention discloses an animal and plant ion concentration analysis and early warning method, system, equipment and storage medium, the method comprises: collecting characteristic data of animals and plants, the characteristic data comprises ion flow data, ion concentration data, environmental material data and early warning data; preprocessing the collected characteristic data to obtain an initial sample set, the preprocessing comprises data cleaning, data conversion, data integration and outlier diagnosis; extracting the optimal feature set from the initial sample set based on the improved ReliefF algorithm; using the LDAM loss function and delayed rebalancing DRW to handle the imbalance problem, using the deep residual network as the backbone network of the ion concentration early warning model, using the random gradient descent SGD as the optimizer of the ion concentration early warning model, using the optimal feature set to train the ion concentration early warning model, and finally using the trained ion concentration early warning model to predict the ion concentration early warning level. The present invention can realize the effective processing and analysis of early warning data to achieve faster efficiency and better effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of sensor data early warning, and specifically relates to an animal and plant ion concentration analysis early warning method, system, equipment and storage medium. Background Art

[0002] Obtaining information on the exchange and absorption of inorganic ions between plants and animals during their growth and the environment will help reveal the mechanisms of their life activities, assist agricultural scientific research, and promote agricultural production. After obtaining ion flow information of the interaction between plants and animals and the environment through plant and animal ion flow sensors based on ion selective microelectrode technology, and obtaining in-body ion concentration information of plants and animals and ion concentration information in environmental substances through in-body ion concentration sensors based on microelectrophoresis and capacitive coupling non-contact conductivity detection technology, how to mine the exchange and absorption information of ions between plants and animals during their growth and the environment online and conduct ion concentration analysis and early warning has become an urgent problem to be solved in plant and animal sensor data mining.

[0003] However, due to the large scale of plant and animal sensor data, high sample dimensions, and many sample features, existing models have difficulty processing high-dimensional data and have low analytical capabilities. In addition, the dimension and quality of the input vector directly affect the accuracy of classification prediction. Too many input vectors will cause the model to overfit, reduce operating efficiency, and input collinearity will also reduce the stability of the model. Secondly, since plant and animal sensor data samples are unbalanced, if the unbalanced samples are directly used to train the model, it is obvious that the model will learn better on the majority class samples, and the model will be biased towards the majority class results, resulting in poor generalization effect on the minority class, resulting in a decrease in model accuracy and a decrease in the model warning analysis effect. Summary of the invention

[0004] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and to provide an animal and plant ion concentration analysis and early warning method, system, equipment and storage medium. After data investigation, collection and preprocessing, the improved ReliefF feature extraction algorithm is used to determine the optimal feature set with the strongest correlation and the smallest redundancy, reduce the data dimension, and realize effective processing and analysis of the early warning data; then, the LDAM loss function and delayed rebalancing DRW method are used to deal with the impact of sample imbalance on prediction accuracy, train the early warning model, and then realize the analysis and early warning of animal and plant ion concentrations to achieve faster efficiency and better results.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] On one hand, the present invention provides an animal and plant ion concentration analysis and early warning method, comprising the following steps:

[0007] Collecting characteristic data of animals and plants, the characteristic data including ion flow data, ion concentration data, environmental substance data and early warning data;

[0008] Preprocessing the collected feature data to obtain an initial sample set, wherein the preprocessing includes data cleaning, data conversion, data integration and outlier diagnosis;

[0009] Extract the optimal feature set from the initial sample set based on the improved ReliefF algorithm. The ReliefF algorithm implements stratified sampling and non-repetitive sampling after clustering the initial sample set using the K-maxmin clustering algorithm, searches for the nearest neighbor samples of the same type of samples and the nearest neighbor samples of different types of samples after sampling, calculates the statistical index of each feature, determines whether the sampling is completed, outputs the feature weight if it is completed, sorts the feature weights to select the feature set, and outputs the optimal feature set after dimensionality reduction through the correlation coefficient;

[0010] The LDAM loss function and delayed rebalancing DRW are used to deal with the imbalance problem. The deep residual network is used as the backbone network of the ion concentration warning model. The stochastic gradient descent SGD is used as the optimizer of the ion concentration warning model. The optimal feature set is used to train the ion concentration warning model. Finally, the trained ion concentration warning model is used to predict the ion concentration warning level.

[0011] As a preferred technical solution, the characteristic data of animals and plants are collected, specifically:

[0012] The ion flow data of the interaction between the plant and animal body and the environment are obtained through the plant and animal ion flow sensor based on ion selective microelectrode technology, and the in-body ion concentration data of the plant and animal and the environmental substance data are obtained through the in-body ion concentration sensor of the plant and animal based on microelectrophoresis and capacitive coupling non-contact conductivity detection technology;

[0013] According to the nutrient content classification standard, the animal and plant ion concentrations are classified to obtain early warning data.

[0014] As a preferred technical solution, the ion flow data includes the absorption rates of Ca2+, K+, Na+, Mg2+, Cl-, NH4+, NO3-, and PO4- ions;

[0015] The ion concentration data include Ca2+, K+, Na+, Mg2+, Cl-, NH4+, NO3-, and PO4- ion concentrations;

[0016] The environmental substance data include the concentrations of Ca2+, K+, Na+, Mg2+, Cl-, NH4+, NO3-, and PO4- ions in the environmental substances.

[0017] As a preferred technical solution, the data cleaning is to remove null values ​​and duplicate values ​​in the initial sample set;

[0018] The data conversion includes standardization processing, data classification processing and data quantification processing of the initial sample set;

[0019] The data integration is to integrate, summarize and associate data from multiple data sources in the initial sample set;

[0020] The outlier diagnostics eliminate erroneous inputs and meaningless values ​​that may appear in the initial sample set.

[0021] As a preferred technical solution, the optimal warning feature subset is extracted from the sample test set based on the improved ReliefF algorithm to screen out the vector with the strongest correlation and the smallest redundancy, specifically:

[0022] The K-maxmin clustering algorithm is used to cluster the initial sample set, and then stratified sampling is performed according to the category ratio. The total number of samples M is proportionally distributed to all categories, and the number of sampling points for each category is determined by the proportion of the category to the total samples; the K-maxmin clustering algorithm is used to cluster and stratify the training sample set D, specifically:

[0023] Given θ, 0<θ<1, and any sample is taken as the first cluster center Z1, such as ;

[0024] Find the new center of the set: calculate the distance D from all other samples to Z1 i1 , if D k1 =max{D i1}, then take x k For the second cluster center Z2, calculate the distance D of all samples to cluster centers Z1 and Z2 i1 and D i2 , if D i =max{min(D i1 , D i2 )}, i = 1, 2, ..., n, and D i >θ*D 12 , D 12 is the distance between Z1 and Z2, then take x i is the third set center Z3. If Z3 exists, calculate D i =max{min(D i1 , D i2 , D i3 )}, i = 1, 2, ..., n, and D i >θ*D 12 , then establish a fourth aggregation center;

[0025] And so on, until the maximum and minimum distances are no greater than θ*D 12, end the calculation of finding the aggregation center;

[0026] According to the nearest neighbor principle, all samples are assigned to the nearest aggregation center;

[0027] According to the clustering criteria, the clustering results are examined. If the clustering results exceed the set threshold range, θ is reselected, the first aggregation center Z1 is selected, and the step of finding a new aggregation center is returned until the clustering results are within the set threshold range.

[0028] Assume that the training sample set is D, the number of sample sampling is m, the characteristic statistic index threshold is δ, and the number of neighbor samples is k; the output is the characteristic statistic index T of each feature, and all statistical indicators are set to 0, and T is an empty set;

[0029] Starting from the i-th time, a sample E is extracted from the sample set D by stratified and non-repetitive sampling; the k nearest neighbors H are found from the sample set of the same category as sample E. j , and then find the k nearest neighbors M from each inconsistent sample set j (C), where i = 1, 2, ..., m; j = 1, 2, ..., k;

[0030] Calculate the statistical indicators of each feature. The statistical indicators for a feature A are:

[0031]

[0032] Among them, p(C) is the proportion of the category, p(Class(E)) is the proportion of the category of sample E, and diff(A, E1, E2) represents the difference between sample E1 and sample E2 in feature A. The calculation formula is as follows:

[0033]

[0034] Repeat the above steps until i times of extraction, and update the statistical indicators of each feature;

[0035] The above feature weight statistics are sorted, and the features below the threshold δ are screened and eliminated. The dimension of the optimal feature set is reduced by using the correlation coefficient method, and the redundant feature vectors are further eliminated to obtain the optimal feature set.

[0036] As a preferred technical solution, the correlation coefficient method is used to reduce the dimension of the optimal feature set, and further eliminate redundant feature vectors to obtain the optimal feature set, specifically:

[0037] The correlation coefficient between each feature vector extracted by the ReliefF algorithm is calculated to obtain a correlation coefficient matrix. If the correlation coefficient is greater than the set threshold, it means that the correlation is strong, and the corresponding feature vector is placed in the redundant set; if there are redundant features, the feature vectors with smaller weights of the redundant features are eliminated.

[0038] As a preferred technical solution, a deep residual network is used as the backbone network of the ion concentration warning model, and a stochastic gradient descent SGD is used as the optimizer of the ion concentration warning model. The optimal feature set is used to train the ion concentration warning model, specifically:

[0039] Given an initial dataset Initial parameterized model f θ , randomly initialize the model parameters θ, train the ion concentration warning model in two stages, and use LDAM as the loss function.

[0040] In the first stage, the normal training is performed from t=1 to T0, and SampleMiniBatch(D, m) is taken. Using SGD optimization, Learning rate α = α / γ;

[0041] In the second stage, reweighted training is performed after T0. The backbone network uses ResNet-32. In each epoch, the loss is reweighted according to the frequency of each category. SampleMiniBatch (D, m) is taken. Renormalize the learning rate using SGD optimization,

[0042] Among them, the LDAM loss function is specifically:

[0043] in

[0044] In order to measure the model's ability to handle imbalanced samples, the confusion matrix is ​​used as the evaluation indicator of the model. The last horizontal row and the last vertical column represent the classification accuracy and recall rate, and the last element represents the overall prediction accuracy of the model.

[0045] On the other hand, the present invention provides an animal and plant ion concentration analysis and early warning system, which is applied to the animal and plant ion concentration analysis and early warning method, and includes a data acquisition module, an initialization module, a feature extraction module and an early warning module;

[0046] The data acquisition module is used to collect characteristic data of animals and plants, and the characteristic data includes ion flow data, ion concentration data, environmental substance data and early warning data;

[0047] The initialization module is used to preprocess the collected feature data to obtain an initial sample set, wherein the preprocessing includes data cleaning, data conversion, data integration and outlier diagnosis;

[0048] The feature extraction module is used to extract the optimal feature set from the initial sample set based on the improved ReliefF algorithm. The ReliefF algorithm implements stratified sampling and non-repetitive sampling after clustering the initial sample set using the K-maxmin clustering algorithm, searches for the nearest neighbor samples of the same type of samples and the nearest neighbor samples of different types of samples after sampling, calculates the statistical index of each feature, determines whether the sampling is completed, outputs the feature weight if it is completed, sorts the feature weights to select the feature set, and outputs the optimal feature set after reducing the dimension through the correlation coefficient;

[0049] The early warning module is used to use the LDAM loss function and delayed rebalancing DRW to deal with the imbalance problem, use the deep residual network as the backbone network of the ion concentration early warning model, use the stochastic gradient descent SGD as the optimizer of the ion concentration early warning model, use the optimal feature set to train the ion concentration early warning model, and finally use the trained ion concentration early warning model to predict the ion concentration warning level.

[0050] Another aspect of the present invention provides an electronic device, the electronic device comprising: at least one processor; and

[0051] a memory communicatively connected to the at least one processor; wherein,

[0052] The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the animal and plant ion concentration analysis and early warning method.

[0053] On the other hand, the present invention provides a computer-readable storage medium storing a program, which, when executed by a processor, implements the animal and plant ion concentration analysis and early warning method.

[0054] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0055] (1) The present invention improves the feature extraction algorithm of ReliefF, proposes K-maxmin clustering stratification and non-repetitive sampling, and performs K-maxmin algorithm clustering on the initial data set to achieve stratified sampling and non-repetitive sampling, which can effectively avoid the problem of low local sampling probability in random sampling, and strictly limit each sampling to non-repetitive sampling, ensuring that each sampling assigns a new weight to the feature vector, thereby significantly improving the classification effect of the random sampling point on the classification result. The correlation coefficient method is used to reduce the dimension of the optimal feature set, and the redundant feature vectors are further eliminated to obtain the optimal feature set. In this way, the optimal feature set with the strongest correlation and the smallest redundancy is determined, the data dimension is reduced, and the effective processing and analysis of the warning data is achieved.

[0056] (2) The present invention uses the LDAM loss function and the delayed rebalancing DRW method to deal with the impact of sample imbalance on prediction accuracy, trains an early warning model, and then realizes the analysis and early warning of animal and plant ion concentrations to achieve faster efficiency and better results, thereby improving the accuracy and efficiency of early warning. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0058] Figure 1 This is a flow chart of the early warning method for analyzing ion concentrations of animals and plants in an embodiment of the present invention;

[0059] Figure 2 This is a flow chart of a feature extraction method of ReliefF in an embodiment of the present invention;

[0060] Figure 3 This is a schematic diagram of the structure of feature weights in an embodiment of the present invention;

[0061] Figure 4 This is a schematic diagram of the structure of the animal and plant ion concentration analysis and early warning system in an embodiment of the present invention;

[0062] Figure 5 Schematic diagram of the structure of a computer-readable storage medium in an embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0064] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0065] like Figure 1As shown, this embodiment provides an animal and plant ion concentration analysis and early warning method, comprising the following steps:

[0066] S1. Collect characteristic data of plants and animals.

[0067] Furthermore, through the investigation of ions in animals and plants, a multi-parameter ion online monitoring platform is used to collect ion flow data of the interaction between animals and plants and the environment obtained by the integrated animal and plant ion flow sensor based on ion selective microelectrode technology, animal and plant in-body ion concentration data obtained by the animal and plant in-body ion concentration sensor based on microelectrophoresis and capacitive coupled non-contact conductivity detection technology, and ion concentration information in environmental substances.

[0068] Furthermore, the warning levels are divided according to the grading standards of effective nutrient abundance and deficiency based on the animal and plant ion concentrations. For example, they can be divided into 6 levels: 1: extremely high, 2: high, 3: upper-middle, 4: medium, 5: low, and 6: extremely low.

[0069] S2. Data preprocessing: Preprocess the collected warning data, ion flow data, ion concentration data, and environmental substance information, including data cleaning, data conversion, data integration, and outlier diagnosis.

[0070] Furthermore, data cleaning is to process the null values ​​and duplicate values ​​in the initial data to ensure the integrity, consistency and rationality of the data set. Null values ​​in the data sample can be eliminated or replaced by the average or median. Duplicate value identification rules can be set according to the logical relationship between data samples.

[0071] For example, if two samples have the same ion name, ion concentration, and absorbance rate, it is considered that there may be a duplicate sample and one of them should be excluded. Other rules can be proposed based on specific problems.

[0072] Furthermore, data conversion mainly includes standardization, data classification and quantification to facilitate data analysis. Data can be standardized using the max-min method, z-score method or decimal scaling method. For ion absorption rate data, continuous values ​​are discretely classified to highlight data differences.

[0073] Furthermore, data achievement is the integration, aggregation and association of data from multiple data sources. Due to the diversity of data sources, cross-validation of data is required.

[0074] Furthermore, outlier diagnostics effectively identify and eliminate erroneous inputs and meaningless values ​​that may appear in the initial data. Outliers may lead to a decrease in the accuracy of the prediction results. Therefore, statistical methods, clustering methods, or graph-based methods should be used to search and remove outliers.

[0075] Through the above preprocessing steps, we finally get 25 initial features of 4 categories with each sample as a unit. The initial feature set is shown in Table 1.

[0076] Table 1 Initial feature set information

[0077]

[0078] S3, feature extraction. In this embodiment, the improved ReliefF algorithm is used to extract key warning features, such as Figure 2 As shown, the specific steps are as follows:

[0079] Suppose the training sample set is D, the number of sample sampling is m, the feature statistic index threshold is δ, and the number of neighbor samples is k; the output is the feature statistic index T of each feature, and all statistical indicators are set to 0, and T is an empty set.

[0080] S31. Use K-maxmin clustering algorithm to cluster and stratify the training sample set D.

[0081] Furthermore, the specific steps of step S31 are:

[0082] S311. Given θ, 0<θ<1, and taking any sample as the first cluster center, such as Z1.

[0083] S312, find the new collection center: calculate the distance D from all other samples to Z1 i1 , if D k1 =max{D i1}, then take x k For the second cluster center Z2, calculate the distance D of all samples to cluster centers Z1 and Z2 i1 and D i2 , if D i =max{min(D i1 , D i2 )}, i = 1, 2, ..., n, and D i >θ*D 12 , D 12 is the distance between Z1 and Z2, then take x i is the third set center Z3. If Z3 exists, calculate D i =max{min(D i1 , D i2 , D i3 )}, i = 1, 2, ..., n, and D i >θ*D 12 , then establish the fourth aggregation center. And so on, until the maximum and minimum distances are no greater than θ*D 12 , ending the calculation of finding the aggregation center.

[0084] S313. According to the nearest neighbor principle, all samples are assigned to the nearest aggregation center.

[0085] S314, examine the clustering results according to the clustering criteria. If the clustering results exceed the set threshold range, reselect θ, the first aggregation center Z1, and return to the step of finding a new aggregation center until the clustering results are within the set threshold range.

[0086] S32, starting from the i-th time (i=1, 2, ..., m), a sample E is extracted from the sample set D by stratified and non-repetitive sampling; the k nearest neighbors H are found from the sample set of the same category as the sample E. j (j=1, 2, ..., k), and then find the k nearest neighbors M from each inconsistent sample set j (C), where j = 1, 2, ..., k.

[0087] S33, calculate the statistical index of each feature. For a certain feature A, the i-th sampling statistical index is:

[0088]

[0089] Among them, p(C) is the proportion of the category, p(Class(E)) is the proportion of the category of sample E, and diff(A, E1, E2) represents the difference between sample E1 and sample E2 in feature A. The calculation formula is as follows:

[0090]

[0091] S34, repeat the above steps until i (equal to m) times are extracted, and update the statistical indicators of each feature.

[0092] S35. Finally, the feature weight average value, that is, the feature statistic indicator threshold δ, is calculated according to the feature statistic indicator, and features below the threshold δ are eliminated to obtain a suitable feature set.

[0093] S36. According to the Pearson correlation coefficient calculation method: Where Cov(X, Y) is the covariance of sample X and sample Y, σ X and σ Y are the variances of sample X and sample Y, respectively. In this embodiment, the correlation coefficient between each feature vector extracted by the ReliefF algorithm is calculated to obtain a correlation coefficient matrix. It is generally believed that the correlation coefficient is greater than 0.7, and the corresponding feature vector is placed in a redundant set. If there are redundant features, the feature vectors with smaller weights of the redundant features are eliminated to obtain the optimal feature set.

[0094] In one specific embodiment, the sampling times are 50, the number of nearest neighbors is 8, and the number of iterations is 100. The feature weight results are as follows: Figure 3 As shown:

[0095] Figure 3 The average weight is 0.203, which is the threshold for feature weight screening. Figure 3 It can be concluded that there are 13 feature weights below the threshold, so the weakly correlated features to be eliminated are {f15, f16, f14, f24, f13, f21, f6, f22, f5, f9, f23, f17, f25}. According to the Pearson correlation coefficient method mentioned above, there are three strongly correlated vector pairs (f4, f3), (f2, f7) and (f19, f20), so f3, f7 and f20 are eliminated. Therefore, the feature extraction result retains the features directly related to the warning as {f2, f4, f8, f10, f11, f12, f18, f19}. Then a sensitivity analysis is performed, and the number of samples and the number of nearest neighbors are adjusted to 80 and 10 respectively. The calculation results are not much different from the above, indicating that the improved ReliefF algorithm is relatively stable and there is no need to increase the number of iterations to improve performance.

[0096] S4, ion concentration analysis and warning, using LDAM loss function and delayed rebalancing DRW to deal with imbalance problems, the ion concentration warning model uses ResNet-32 (deep residual network) network as the backbone network, SGD (stochastic gradient descent) as the optimizer; use the optimal feature set to train the ion concentration warning model, and finally use the trained ion concentration warning model to predict the ion concentration warning level. The specific training steps are:

[0097] Given an initial dataset Initial parameterized model f θ , randomly initialize the model parameters θ. Train in two stages, use LDAM as the loss function,

[0098] In the first stage, the normal training is performed from t=1 to T0, and SampleMiniBatch(D,m) is taken. Using SGD optimization, Optionally, the learning rate α=α / γ.

[0099] In the second stage, reweighted training is performed after T0. In each epoch, the loss is reweighted according to the frequency of each category. SampleMiniBatch(D,m) is taken. Renormalize the learning rate SGD optimization,

[0100] Among them, the LDAM loss function is specifically:

[0101] in

[0102] It can be understood that in order to measure the model's ability to handle imbalanced samples, the confusion matrix is ​​used as the evaluation indicator of the model. The last horizontal row and the last vertical column represent the classification accuracy and recall rate, and the last element represents the overall prediction accuracy of the model.

[0103] This application improves the feature extraction algorithm of ReliefF, proposes K-maxmin clustering stratification and non-repetitive sampling, and performs K-maxmin algorithm clustering on the initial data set to achieve stratified sampling and non-repetitive sampling, which can effectively avoid the problem of low local sampling probability in random sampling, and strictly limit each sampling to non-repetitive sampling, ensuring that each sampling assigns new weights to the feature vector, thereby significantly improving the classification effect of the random sampling point on the classification result. The correlation coefficient method is used to reduce the dimension of the optimal feature set, and further eliminate redundant feature vectors to obtain the optimal feature set. The LDAM loss function and delayed rebalancing DRW are used to deal with the imbalance problem, and the deep residual network is used as the backbone network of the ion concentration warning model. The stochastic gradient descent SGD is used as the optimizer of the ion concentration warning model. The optimal feature set is used to train the ion concentration warning model, and finally the trained ion concentration warning model is used to predict the ion concentration warning level.

[0104] It should be noted that, for the sake of convenience, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously.

[0105] Based on the same idea as the animal and plant ion concentration analysis and early warning method in the above-mentioned embodiment, the present invention also provides an animal and plant ion concentration analysis and early warning system, which can be used to execute the above-mentioned animal and plant ion concentration analysis and early warning method. For ease of explanation, the structural schematic diagram of the animal and plant ion concentration analysis and early warning system embodiment only shows the parts related to the embodiment of the present invention. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than shown in the diagram, or combine certain components, or arrange the components differently.

[0106] See also Figure 4 In another embodiment of the present application, there is provided an animal and plant ion concentration analysis and warning system 100, the system comprising a data acquisition module 101, an initialization module 102, a feature extraction module 103 and a warning module 104;

[0107] The data acquisition module 101 is used to collect characteristic data of animals and plants, and the characteristic data includes ion flow data, ion concentration data, environmental substance data and early warning data;

[0108] The initialization module 102 is used to preprocess the collected feature data to obtain an initial sample set, wherein the preprocessing includes data cleaning, data conversion, data integration and outlier diagnosis;

[0109] The feature extraction module 103 is used to extract the optimal feature set from the initial sample set based on the improved ReliefF algorithm. The ReliefF algorithm implements stratified sampling and non-repetitive sampling after clustering the initial sample set using the K-maxmin clustering algorithm, searches for the nearest neighbor samples of the same type of samples and the nearest neighbor samples of different types of samples after sampling, calculates the statistical index of each feature, determines whether the sampling is completed, outputs the feature weight if it is completed, sorts the feature weights to select the feature set, and outputs the optimal feature set after dimensionality reduction through the correlation coefficient;

[0110] The warning module 104 is used to use the LDAM loss function and delayed rebalancing DRW to deal with the imbalance problem, use the deep residual network as the backbone network of the ion concentration warning model, use the stochastic gradient descent SGD as the optimizer of the ion concentration warning model, use the optimal feature set to train the ion concentration warning model, and finally use the trained ion concentration warning model to predict the ion concentration warning level.

[0111] It should be noted that the animal and plant ion concentration analysis and early warning system of the present invention corresponds one-to-one to the animal and plant ion concentration analysis and early warning method of the present invention. The technical features and beneficial effects described in the above-mentioned embodiment of the animal and plant ion concentration analysis and early warning method are all applicable to the embodiment of the animal and plant ion concentration analysis and early warning. For specific contents, please refer to the description in the embodiment of the method of the present invention. It will not be repeated here. This is hereby declared.

[0112] In addition, in the implementation of the animal and plant ion concentration analysis and early warning system in the above-mentioned embodiment, the logical division of each program module is only an example. In actual application, the above-mentioned functions can be assigned to different program modules as needed, for example, for the configuration requirements of the corresponding hardware or the convenience of software implementation. That is, the internal structure of the animal and plant ion concentration analysis and early warning system is divided into different program modules to complete all or part of the functions described above.

[0113] See also Figure 5In one embodiment, an electronic device for implementing an animal and plant ion concentration analysis and early warning method is provided. The electronic device 200 may include a first processor 201, a first memory 202 and a bus, and may also include a computer program stored in the first memory 202 and executable on the first processor 201, such as an animal and plant ion concentration analysis and early warning 203.

[0114] Among them, the first memory 202 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the first memory 202 can be an internal storage unit of the electronic device 200, such as a mobile hard disk of the electronic device 200. In other embodiments, the first memory 202 can also be an external storage device of the electronic device 200, 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 200. Further, the first memory 202 can also include both an internal storage unit of the electronic device 200 and an external storage device. The first memory 202 can not only be used to store application software and various types of data installed in the electronic device 200, such as the code of the animal and plant ion concentration analysis warning program 203, but also can be used to temporarily store data that has been output or is to be output.

[0115] In some embodiments, the first processor 201 may be composed of an integrated circuit, 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 first processor 201 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 various functions and processes data of the electronic device 200 by running or executing programs or modules stored in the first memory 202, and calling data stored in the first memory 202.

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

[0117] The animal and plant ion concentration analysis and warning program 203 stored in the first memory 202 of the electronic device 200 is a combination of multiple instructions. When running in the first processor 201, it can achieve:

[0118] Collecting characteristic data of animals and plants, the characteristic data including ion flow data, ion concentration data, environmental substance data and early warning data;

[0119] Preprocessing the collected feature data to obtain an initial sample set, wherein the preprocessing includes data cleaning, data conversion, data integration and outlier diagnosis;

[0120] Extract the optimal feature set from the initial sample set based on the improved ReliefF algorithm. The ReliefF algorithm implements stratified sampling and non-repetitive sampling after clustering the initial sample set using the K-maxmin clustering algorithm, searches for the nearest neighbor samples of the same type of samples and the nearest neighbor samples of different types of samples after sampling, calculates the statistical index of each feature, determines whether the sampling is completed, outputs the feature weight if it is completed, sorts the feature weights to select the feature set, and outputs the optimal feature set after dimensionality reduction through the correlation coefficient;

[0121] The LDAM loss function and delayed rebalancing DRW are used to deal with the imbalance problem. The deep residual network is used as the backbone network of the ion concentration warning model. The stochastic gradient descent SGD is used as the optimizer of the ion concentration warning model. The optimal feature set is used to train the ion concentration warning model. Finally, the trained ion concentration warning model is used to predict the ion concentration warning level.

[0122] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0123] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0124] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. An early warning method for analyzing ion concentrations of plants and animals, characterized in that: The steps include: Collecting characteristic data of animals and plants, the characteristic data including ion flow data, ion concentration data, environmental substance data and early warning data; Preprocessing the collected feature data to obtain an initial sample set, wherein the preprocessing includes data cleaning, data conversion, data integration and outlier diagnosis; Extract the optimal feature set from the initial sample set based on the improved ReliefF algorithm. The ReliefF algorithm implements stratified sampling and non-repetitive sampling after clustering the initial sample set using the K-maxmin clustering algorithm, searches for the nearest neighbor samples of the same type of samples and the nearest neighbor samples of different types of samples after sampling, calculates the statistical index of each feature, determines whether the sampling is completed, outputs the feature weight if it is completed, sorts the feature weights to select the feature set, and outputs the optimal feature set after dimensionality reduction through the correlation coefficient; The LDAM loss function and delayed rebalancing DRW are used to deal with the imbalance problem. The deep residual network is used as the backbone network of the ion concentration warning model, and the stochastic gradient descent SGD is used as the optimizer of the ion concentration warning model. The optimal feature set is used to train the ion concentration warning model. Finally, the trained ion concentration warning model is used to predict the ion concentration warning level. The characteristic data of animals and plants collected are specifically: The ion flow data of the interaction between the plant and animal body and the environment are obtained through the plant and animal ion flow sensor based on ion selective microelectrode technology, and the in-body ion concentration data of the plant and animal and the environmental substance data are obtained through the in-body ion concentration sensor of the plant and animal based on microelectrophoresis and capacitive coupling non-contact conductivity detection technology; According to the nutrient content classification standard, the concentration of animal and plant ions is classified to obtain early warning data; The ion current data include Ca 2+ , K + 、Na + Mg 2+ , Cl - NH 4+ 、NO 3- ,PO 4- Ion absorption rate; The ion concentration data include Ca 2+ , K + 、Na + Mg 2+ , Cl - NH 4+ 、NO 3- ,PO 4- Ion concentration; The environmental substance data includes Ca in environmental substances 2+ , K + 、Na + Mg 2+ , Cl - NH 4+ 、NO 3- ,PO 4- Ion concentration; The deep residual network is used as the backbone network of the ion concentration warning model, the stochastic gradient descent SGD is used as the optimizer of the ion concentration warning model, and the optimal feature set is used to train the ion concentration warning model. Specifically: Given an initial dataset Initial parameterized model f θ , randomly initialize the model parameters θ, train the ion concentration warning model in two stages, and use LDAM as the loss function. In the first stage, the normal training is performed from t=1 to T0, and SampleMiniBatch(D, m) is taken. Using SGD optimization, Learning rate α = α / γ; In the second stage, reweighted training is performed after T0. The backbone network uses ResNet-32. In each epoch, the loss is reweighted according to the frequency of each category. SampleMiniBatch (D, m) is taken. Renormalize the learning rate using SGD optimization, Among them, the LDAM loss function is specifically: in In order to measure the model's ability to handle imbalanced samples, the confusion matrix is ​​used as the evaluation indicator of the model. The last horizontal row and the last vertical column represent the classification accuracy and recall rate, and the last element represents the overall prediction accuracy of the model.

2. The animal and plant ion concentration analysis and early warning method according to claim 1, characterized in that: The data cleaning is to remove the null values ​​and duplicate values ​​in the initial sample set; The data conversion includes standardization processing, data classification processing and data quantification processing of the initial sample set; The data integration is to integrate, summarize and associate the data from multiple data sources in the initial sample set; The outlier diagnostics eliminate erroneous inputs and meaningless values ​​that may appear in the initial sample set.

3. The animal and plant ion concentration analysis and early warning method according to claim 1, characterized in that: Based on the improved ReliefF algorithm, the optimal warning feature subset is extracted from the sample test set, and the vectors with the strongest correlation and the smallest redundancy are screened out.

4. The animal and plant ion concentration analysis and early warning method according to claim 3, characterized in that: The correlation coefficient method is used to reduce the dimension of the optimal feature set, and the redundant feature vectors are further eliminated to obtain the optimal feature set, which is as follows: The correlation coefficient between each feature vector extracted by the ReliefF algorithm is calculated to obtain a correlation coefficient matrix. If the correlation coefficient is greater than the set threshold, it means that the correlation is strong, and the corresponding feature vector is placed in the redundant set; if there are redundant features, the feature vectors with smaller weights of the redundant features are eliminated.

5. Animal and plant ion concentration analysis and early warning system, characterized by: The animal and plant ion concentration analysis and early warning method applied to any one of claims 1-4 comprises a data acquisition module, an initialization module, a feature extraction module and an early warning module; The data acquisition module is used to collect characteristic data of animals and plants, and the characteristic data includes ion flow data, ion concentration data, environmental substance data and early warning data; The initialization module is used to preprocess the collected feature data to obtain an initial sample set, wherein the preprocessing includes data cleaning, data conversion, data integration and outlier diagnosis; The feature extraction module is used to extract the optimal feature set from the initial sample set based on the improved ReliefF algorithm. The ReliefF algorithm implements stratified sampling and non-repetitive sampling after clustering the initial sample set using the K-maxmin clustering algorithm, searches for the nearest neighbor samples of the same type of samples and the nearest neighbor samples of different types of samples after sampling, calculates the statistical index of each feature, determines whether the sampling is completed, outputs the feature weight if it is completed, sorts the feature weights to select the feature set, and outputs the optimal feature set after reducing the dimension through the correlation coefficient; The early warning module is used to use the LDAM loss function and delayed rebalancing DRW to deal with the imbalance problem, use the deep residual network as the backbone network of the ion concentration early warning model, use the stochastic gradient descent SGD as the optimizer of the ion concentration early warning model, use the optimal feature set to train the ion concentration early warning model, and finally use the trained ion concentration early warning model to predict the ion concentration warning level.

6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the animal and plant ion concentration analysis and early warning method as described in any one of claims 1-4.

7. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the animal and plant ion concentration analysis and early warning method described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Installation for breeding animal and plant, the animal and plant bred by using the same, activated gas generator, method for breeding the animal and plant, and the animal and plant bred by the method

    JP2005192550A