Water quality measurement method and system for aquaculture
By setting up water detection devices in aquaculture ponds, processing data and using decision tree models to predict water quality, the problem of difficulty in judging the suitability of water quality in aquaculture ponds is solved and the economic benefits of aquaculture are guaranteed.
Patent Information
- Application Number
- CN202411490581.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-10-24
AI Technical Summary
The existing aquaculture technology fails to effectively consider the water quality suitability of aquaculture ponds, resulting in poor economic benefits.
A water body quality measurement method is used to obtain data through a water body detection device installed in a breeding pond, data processing is performed to extract a feature matrix, and a decision tree model is used to predict water body quality and obtain the suitability confidence level.
This method can effectively determine whether the breeding pond is suitable for cultivating target aquatic products, ensure the economic benefits of aquaculture, and avoid the breeding losses of unsuitable aquatic products.
Smart Images

Figure CN119001049B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of aquaculture, and in particular to a method and system for measuring water quality in aquaculture. Background Art
[0002] Aquaculture is the production activity of breeding, cultivating and harvesting aquatic plants and animals under human control. It generally includes the whole process of growing aquatic products from seedlings under artificial feeding and management. At present, aquaculture is usually selected by farmers according to their needs, without considering whether the water quality of their breeding ponds is suitable for breeding corresponding aquatic products, which leads to poor economic benefits. Therefore, how to measure the water quality of breeding ponds to ensure the economic benefits of aquaculture is an urgent problem to be solved. Summary of the invention
[0003] The object of the present invention is to provide a water quality measurement method and system for aquaculture.
[0004] In a first aspect, an embodiment of the present invention provides a method for measuring water quality for aquaculture, the method comprising:
[0005] Using a water body detection device disposed in a breeding pond to obtain water body detection data, performing data processing on the water body detection data to obtain a feature matrix of the water body detection data, wherein the data processing includes normalization and principal component analysis, the normalization is used to compress the water body detection data to a predetermined range, and the principal component analysis is used to project the water body detection data to a new feature space to achieve data dimension reduction and feature extraction;
[0006] Using a water quality measurement model, the water quality of the water detection data is predicted according to the characteristic matrix to obtain a quality score of the water detection data, wherein the quality score is used to indicate the confidence that the aquaculture pond is suitable for aquaculture target aquatic products, wherein the water quality measurement model is a decision tree model, and the water quality measurement model includes at least one branch measurement module, each of which is a decision tree, wherein each branch measurement module corresponds to at least one water quality measurement standard, and the water quality measurement standard is a rule for determining whether the aquaculture pond is suitable for aquaculture target aquatic products;
[0007] The water quality measurement model is obtained by training based on a sample data set, wherein the sample data set includes example water body detection data and expected score annotations corresponding to the example water body detection data, and the expected score annotations are calculated according to the following formula:
[0008] ;
[0009] N is the first survival rate threshold, M is the second survival rate threshold, L is the survival rate of the target aquatic product actually cultivated in the example breeding pond corresponding to the example water body detection data, A is the first body length growth threshold, B is the second body length growth threshold, C is the average body length growth of the target aquatic product actually cultivated in the example breeding pond corresponding to the example water body detection data, W1 is the influence parameter of survival rate on quality score, W2 is the influence parameter of body length on quality score, k1 represents the normalized parameter corresponding to survival rate, (NM)*k1=1, k2 represents the normalized parameter corresponding to body length, (AB)*k2=1.
[0010] Optionally, performing data processing on the water body detection data to obtain a feature matrix of the water body detection data includes:
[0011] The water body detection data is normalized by the following method: scaler = MinMaxScaler();
[0012] normalized_data = scaler.fit_transform(data);
[0013] Perform principal component analysis on the normalized data by: pca = PCA(n_components=b);
[0014] principal_components = pca.fit_transform(normalized_data);
[0015] Among them, data is the water body detection data, normalized_data represents the normalized data, principal_components represents the characteristic matrix obtained after principal component analysis, MinMaxScaler() is used to scale the eigenvalues of the data to the range of zero to one, fit_transform() represents scaling the elements in the corresponding data according to the maximum and minimum values of the element values in the data, PCA(n_components=b) represents selecting b principal components for projection, and b is greater than or equal to 2.
[0016] Optionally, the method further comprises:
[0017] When the quality score is greater than a first threshold parameter, extracting positive measurement standards to obtain a positive measurement standard list, wherein the positive measurement standard list includes at least one positive measurement standard extracted from a water quality measurement standard of the water quality measurement model;
[0018] Determining the positive measurement standards in the positive measurement standard list that do not match the water body detection data, and the positive measurement standards that match the water body detection data;
[0019] When the number of the positive measurement standards matching the water body detection data is greater than a first preset threshold, it is determined that the breeding pond is suitable for breeding the target aquatic product.
[0020] Optionally, the method further comprises:
[0021] When the quality score is greater than a second threshold parameter, extracting negative measurement standards to obtain a negative measurement standard list, wherein the negative measurement standard list includes at least one negative measurement standard extracted from the water quality measurement standard of the water quality measurement model;
[0022] Determine the negative measurement standards in the negative measurement standard list that do not match the water body detection data, and the negative measurement standards that match the water body detection data;
[0023] When the number of the negative measurement standards matching the water body detection data is greater than a second preset threshold, it is determined that the breeding pond is not suitable for breeding the target aquatic product.
[0024] Optionally, the method further comprises:
[0025] Performing a call frequency analysis on each water quality measurement standard in the water quality measurement model to obtain the call frequency of each water quality measurement standard in the water quality measurement model;
[0026] According to the calling frequency, performing a standard filtering operation on the water quality measurement standard to obtain at least one candidate measurement standard;
[0027] A positive measurement standard analysis is performed on the candidate measurement standards to obtain positive measurement standards and negative measurement standards.
[0028] Optionally, performing positive measurement standard analysis on the candidate measurement standard to obtain a positive measurement standard and a negative measurement standard includes:
[0029] Acquire sample water body detection data of a sample breeding pond and a score tag corresponding to the sample water body detection data, wherein the score tag is used to indicate the confidence that the sample breeding pond is suitable for breeding the target aquatic product;
[0030] Performing data processing on the example water body detection data to obtain a feature matrix of the example water body detection data, and determining a feature matrix corresponding to the example water body detection data under each candidate measurement standard from the feature matrix of the example water body detection data;
[0031] According to the score labels, a multivariate attribution analysis is performed on the feature matrix corresponding to each candidate measurement standard to obtain the influence parameter corresponding to each candidate measurement standard;
[0032] According to the influence parameter, performing a positive measurement standard analysis on the candidate measurement standard to obtain a positive measurement standard and a negative measurement standard;
[0033] Wherein, the multivariate attribution analysis is expressed as: , P represents the score label of the example water body detection data, n represents the index corresponding to each of the candidate measurement standards, R n represents the characteristic information corresponding to the sample water body detection data under the nth candidate measurement standard, w n represents the influence parameter corresponding to the nth candidate measurement standard, and the w n is based on the P and R of multiple water body detection data of the example n Sure.
[0034] Optionally, performing a positive measurement standard analysis on the candidate measurement standard according to the influence parameter to obtain a positive measurement standard and a negative measurement standard includes:
[0035] selecting a first measurement standard from the candidate measurement standards according to the mode of the influence parameter;
[0036] The first measurement standard whose influence parameter is greater than the preset segmentation threshold is determined as a positive measurement standard, and the first measurement standard whose influence parameter is less than the preset segmentation threshold is determined as a negative measurement standard.
[0037] Optionally, the method of using the water quality measurement model to predict the water quality of the water detection data according to the feature matrix to obtain the quality score of the water detection data further includes:
[0038] Acquire the sample data set, wherein the sample data set includes example water body detection data and expected score annotations corresponding to the example water body detection data;
[0039] Performing data processing on the example water body detection data to obtain a feature matrix of the example water body detection data;
[0040] Using the initial water quality measurement model, the water quality of the example water detection data is predicted according to the characteristic matrix to obtain a first quality score of the example breeding pond being suitable for breeding the target aquatic product;
[0041] According to the first quality score and expected score annotation of the example water body detection data, the variables of the initial water body quality measurement model are updated to obtain a trained water body quality measurement model.
[0042] Optionally, the using the water quality measurement model to predict the water quality of the water body detection data according to the feature matrix to obtain the quality score of the water body detection data includes:
[0043] For each branch measurement module in the water quality measurement model, using the branch measurement module to predict the water quality of the water detection data according to the characteristic matrix to obtain a branch measurement score of the water detection data;
[0044] The branch measurement scores corresponding to each branch measurement module are integrated to obtain the quality score of the water body detection data;
[0045] The branch measurement scores corresponding to each branch measurement module are integrated to obtain the quality score of the water body detection data, including:
[0046] Determine the influence parameters of the branch measurement scores corresponding to each branch measurement module;
[0047] According to the influence parameter, the branch measurement scores corresponding to each branch measurement module are weighted by influence to obtain the quality score of the water body detection data;
[0048] The quality score can be expressed as ;
[0049] wi can be used to represent the influence parameter corresponding to the i-th branch measurement score, X represents the feature matrix, and Yi(X) represents the branch measurement score of the i-th decision tree for the input feature matrix X.
[0050] In a second aspect, an embodiment of the present invention provides a water quality measurement system for aquaculture, the system comprising a computer device;
[0051] The computer device includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device executes the water quality measurement method for aquaculture described in the first aspect.
[0052] Compared with the prior art, the beneficial effects provided by the present invention include: first, water body detection data is obtained through a water body detection device, and the water body detection data is processed to obtain a characteristic matrix that can reflect the water quality characteristics, and then the characteristic matrix is input into a water body quality measurement model to obtain a corresponding quality score, and then it can be judged according to the quality score whether the currently detected breeding pond is suitable for breeding target aquatic products, ensuring that the economic benefits of aquaculture can be guaranteed and avoiding losses caused by breeding unsuitable aquatic products in breeding ponds. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.
[0054] Figure 1 A schematic flow chart of the steps of a method for measuring water quality for aquaculture provided by an embodiment of the present invention;
[0055] Figure 2 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0057] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.
[0058] In order to solve the technical problems in the aforementioned background technology, Figure 1 The flow chart of the water quality measurement method for aquaculture provided by the embodiment of the present invention is as follows. The water quality measurement method for aquaculture is introduced in detail. The execution subject of the method can be a server or any other computer device, such as Figure 1 As shown, the method comprises the following steps:
[0059] Step S201: Acquire water body detection data using a water body detection device disposed in the aquaculture pond.
[0060] In some embodiments, the water body detection data includes detection data of multiple aspects, and the detection data of multiple aspects include at least one of water body temperature, pH, oxygen content, nitrate content, nitrite content, feed residue, and light parameter ratio;
[0061] Among them, the water body detection device may include, for example, a temperature sensor, a feed remaining sensor, a dissolved oxygen sensor, a water temperature and air temperature sensor, a pH sensor, a nitrite sensor and other sensing devices.
[0062] In some possible implementations, multiple water body detection devices may be installed at different locations in the water body of the aquaculture pond to more comprehensively detect the water quality.
[0063] Step S202: performing data processing on the water body detection data to obtain a feature matrix of the water body detection data.
[0064] The data processing performed on the water body detection data may specifically be feature construction of the water body detection data, such as constructing new features from the original data, which is also a means of feature selection. By using feature derivation, a feature matrix of the water body detection data may be obtained.
[0065] For example, data processing can be the generation of new fields from the original data feature fields (i.e., the detection data of various aspects of water body detection data) through transformation or combination operations such as normalization, addition, subtraction, multiplication and division. After the original data has been properly transformed or combined, it can have stronger information value.
[0066] Optionally, data processing includes normalization and principal component analysis, wherein normalization is used to compress the water body detection data to a predetermined range, and principal component analysis is used to project the water body detection data to a new feature space to achieve data dimensionality reduction and feature extraction.
[0067] For example, normalization may refer to scaling different types of water body detection data to a specified range, for example, scaling the value range of temperature data and pH to between 0 and 1, which can be achieved by the following formula: norm =x-min(x) / max(x)−min(x). Furthermore, the normalized data can be subjected to principal component analysis, that is, a set of water body detection data is converted into a corresponding feature matrix through linear changes. Each element in the matrix can be called a principal component, that is, the most important features in the element data, which can reduce the dimension of the data while retaining the information of the original data. Specifically, for example, after calculating the corresponding covariance matrix and eigenvalues based on the normalized data, the most important eigenvectors can be selected according to the size of the eigenvalues. The principal components corresponding to these eigenvectors can explain most of the data variance, and these eigenvectors are further projected to the new feature space to obtain the feature matrix of the final water body detection data. For example, take the following data as the water quality detection data:
[0068] ata = np.array([ [25, 7.0, 8.5, 45],
[0069] [23, 7.2, 7.8, 50],
[0070] [26, 6.9, 9.0, 40],
[0071] [24, 7.1, 8.2, 48],
[0072] [27, 7.3, 8.7, 42]]).
[0073] Each row of data may represent the temperature, pH value, oxygen content, and nitrate content collected from the aquaculture pond at different times or locations.
[0074] Based on the above water quality detection data, normalization processing and principal component analysis can be performed based on the numpy library in Python and MinMaxScaler in the sklearn library.
[0075] For example, normalization can be done by: scaler = MinMaxScaler();
[0076] normalized_data = scaler.fit_transform(data).
[0077] Principal component analysis was performed by: pca = PCA(n_components=2);
[0078] principal_components = pca.fit_transform(normalized_data).
[0079] Among them, MinMaxScaler() is used to scale the eigenvalues of the data to the range of zero to one, fit_transform(data) means scaling the elements in data according to the maximum and minimum values of the element values, and PCA(n_components=2) means selecting two principal components for linear change.
[0080] Executing the above code can get the corresponding feature matrix:
[0081] [[ 1.41421356 -0.58578644]
[0082] [-0.70710678 1.22474487]
[0083] [ 1.41421356 -0.58578644 ]
[0084] [-0.70710678 1.22474487]
[0085] [ 1.41421356 -0.58578644]].
[0086] In this matrix, the first column represents the projection of each sample of the water quality detection data on the first principal component, and the second column represents the projection of each sample of the water quality detection data on the second principal component.
[0087] The variance explained by the principal components is [0.99864872 0.00135128], that is, the first principal component explains almost all the variance (99.864872%), while the second principal component only explains a very small part of the variance (0.135128%). This means that the first principal component is sufficient to capture most of the data information.
[0088] Step S203: using the water quality measurement model, predicting the water quality of the water detection data according to the characteristic matrix, and obtaining a quality score of the water detection data.
[0089] The quality score is used to indicate the confidence that the aquaculture pond is suitable for aquaculture of target aquatic products. In some embodiments, the water quality measurement model is a decision tree model, and the water quality measurement model includes at least one branch measurement module, each branch measurement module is a decision tree, and each branch measurement module corresponds to at least one water quality measurement standard.
[0090] It is understandable that the target aquatic product can be any selected aquatic product, for example, any species of fish, shrimp, crab, shellfish, etc., and the embodiments of the present disclosure are not limited to this.
[0091] In some possible implementations, different water quality measurement models may be trained for different aquatic products. When training corresponding water quality measurement models for different aquatic products, the data of the breeding effects and water quality of the breeding ponds of the aquatic products in history may be used for training. For example, the economic benefits ultimately formed by the historical breeding of these aquatic products, the average weight growth of aquatic products, and the changes in water quality at different stages of breeding these aquatic products may be obtained.
[0092] For example, the survival rate and average body length of every 100 seabass actually raised in a certain breeding pond after 100 days can be collected, and water quality detection data can be collected as the sample water quality detection data for training the above-mentioned water quality detection model. If the survival rate of these 100 seabass after 100 days is greater than the first survival rate threshold N, for example, N=98% and the average body length growth is greater than the first body length growth predetermined threshold A, then the quality score corresponding to the breeding pond can be set to 1, and the quality score can be used as the score label corresponding to the sample detection data. If the survival rate of these 100 seabass after 100 days is less than the second survival rate threshold M, for example, M=50%, and the average body length growth is less than the second body length growth predetermined threshold B, then the quality score corresponding to the breeding pond can be set to 0, and the quality score can be used as the score label corresponding to the sample detection data. If the survival rate of these 100 seabass after 100 days is Z and the average body length growth C is less than the second predetermined threshold B, then the quality score or expected score label P corresponding to the breeding pond can be determined according to the following formula: . Among them, W1 is the influence parameter of survival rate on quality score, W2 is the influence parameter of body length on quality score, k1 represents the normalized parameter corresponding to survival rate, where (NM)*k1=1, k2 represents the normalized parameter corresponding to body length, where (AB)*k2=1.
[0093] It is worth noting that the above parameters for determining the quality score (or expected score label), such as the first predetermined threshold, the second predetermined threshold, and the threshold corresponding to the survival rate, can be set according to actual needs. For example, the above 98% can be replaced by 100%, and 50% can be replaced by 0%. The embodiments of the present disclosure are not limited to this.
[0094] It can be understood that when training the water quality detection model, the model can learn the impact of different aspects of the detection data on the target aquaculture products, as well as whether the impact is positive or negative, based on the actually collected water quality detection data and the corresponding quality scores, so that the model can predict whether the aquaculture pond corresponding to the water quality detection data is suitable for breeding the target aquaculture products based on the updated water quality detection data.
[0095] Among them, the quality score can be regarded as the initial prediction result for the water body detection data. Optionally, in this embodiment, the water body detection data, that is, the water quality of the breeding pond, can be further measured according to the size of the quality score, combined with the positive measurement standard list and the negative measurement standard list. The water quality of the water body detection data is predicted according to the feature matrix, specifically, the confidence of the breeding pond being suitable for breeding target aquatic products is predicted according to the feature matrix.
[0096] Among them, the water quality measurement standard is a rule used to determine whether the breeding pond is suitable for breeding target aquatic products. For example, the water quality measurement standard can be the water temperature range, water temperature size, pH value change range, etc. This embodiment does not limit this.
[0097] In some embodiments, the water quality measurement model may include a neural network model constructed according to a neural network algorithm and a tree model constructed based on a decision tree algorithm, etc., which is not limited in this embodiment.
[0098] In an embodiment of the present invention, water body detection data having multiple detection data is first acquired through a water body detection device, and data processing is performed on the water body detection data to obtain a characteristic matrix that can reflect the water quality characteristics, and then the characteristic matrix is input into a water body quality measurement model to obtain a corresponding quality score, and then it can be judged whether the currently detected breeding pond is suitable for breeding target aquatic products based on the quality score, thereby ensuring that the economic benefits of aquaculture can be guaranteed and avoiding losses caused by breeding unsuitable aquatic products in breeding ponds.
[0099] Optionally, the water quality measurement model includes at least one branch measurement module. When the water quality measurement model is a tree model, the water quality measurement model may be composed of at least one decision tree, and each branch measurement module may be a decision tree.
[0100] In some embodiments, in step S203, using the water quality measurement model to predict the water quality of the water detection data according to the feature matrix to obtain the quality score of the water detection data may include:
[0101] For each branch measurement module in the water quality measurement model, the branch measurement module is used to predict the water quality of the water detection data according to the characteristic matrix to obtain the branch measurement score of the water detection data;
[0102] The branch measurement scores corresponding to each branch measurement module are integrated to obtain the quality score of the water body detection data.
[0103] For example, the water quality measurement model includes j decision trees, j is greater than 0 and less than or equal to n, each decision tree may include multiple child nodes, multiple decision trees may be residually connected, and the structural parameters corresponding to each decision tree may be different. In one example, wi can be used to represent the influence parameter corresponding to the i-th decision tree, Yi(X) represents the output result of the i-th decision tree for the input X, and Y(X) represents the result output by the water quality measurement model, that is, the quality score. Y(X) can be expressed as .
[0104] In some embodiments, the above decision tree model can be implemented using DecisionTreeRegressor in Python's sklearn library. Its code can be as follows: class WaterQualityMeasurementModel:
[0105] def __init__(self, n_trees, max_depth):
[0106] #Initialize the water quality measurement model. param n_trees: the number of decision trees. param max_depth: the maximum depth of each decision tree#
[0107] self.n_trees = n_trees
[0108] self.trees = []
[0109] self.weights = []
[0110] self.max_depth = max_depth
[0111] def fit(self, X, y):
[0112] #Training model. param X: Input features, i.e. sample water body detection data. param y: Expected score label.
[0113] for i in range(self.n_trees):
[0114] tree = DecisionTreeRegressor(max_depth=self.max_depth)
[0115] tree.fit(X, y)
[0116] self.trees.append(tree)
[0117] # Assume that the influence parameter wi is randomly generated or determined in some way
[0118] self.weights.append(np.random.uniform(0, 1))
[0119] def predict(self, X):
[0120] #Predict quality score. param X: input feature. return: quality score.
[0121] outputs = []
[0122] for tree, weight in zip(self.trees, self.weights):
[0123] tree_output = tree.predict(X) * weight
[0124] outputs.append(tree_output)
[0125] # Residual connection, that is, the weighted sum of all decision tree outputs
[0126] final_output = np.sum(outputs, axis=0)
[0127] return final_output
[0128] # Create and train the model
[0129] model = WaterQualityMeasurementModel(n_trees=3, max_depth=3)
[0130] model.fit(X, y)
[0131] # predict
[0132] predicted_scores = model.predict(X)
[0133] print(predicted_scores).
[0134] The WaterQualityMeasurementModel class initializes the number and maximum depth of decision trees. self.trees stores each decision tree model. self.weights stores the influence parameters of each decision tree. The predict method calculates the weighted output of each decision tree and adds them together to get the final quality score.
[0135] The fit method is used to train each decision tree and randomly generate the influence parameters of each decision tree. The training process of the water quality measurement model will be described in detail in the following embodiments and will not be repeated here.
[0136] Optionally, in this embodiment, the above steps of fusing the branch measurement scores corresponding to the branch measurement modules to obtain the quality score of the water body detection data may include:
[0137] Determine the influence parameters of the branch measurement scores corresponding to each branch measurement module;
[0138] According to the influence parameters, the branch measurement scores corresponding to each branch measurement module are weighted by influence to obtain the quality score of the water body detection data.
[0139] It should be noted that the water quality measurement model is trained by multiple labeled sample data sets. The sample data sets of this embodiment include example water body detection data and score labels corresponding to the example water body detection data, and the label refers to the expected score label corresponding to the example water body detection data; the water quality measurement model can be trained by other equipment and then sent to the water quality measurement device, or it can be trained by the water quality measurement device itself.
[0140] If the water quality measurement device performs training by itself, before using the water quality measurement model to predict the water quality of the water detection data according to the feature matrix to obtain the quality score of the water detection data, the following steps may also be included:
[0141] Obtain a sample data set, the sample data set including example water body detection data and expected score annotations corresponding to the example water body detection data;
[0142] Performing data processing on the example water body detection data to obtain a feature matrix of the example water body detection data;
[0143] Using the initial water quality measurement model, the water quality of the sample water test data is predicted according to the characteristic matrix, and the first quality score of the sample breeding pond suitable for breeding target aquatic products is obtained;
[0144] According to the first quality score and expected score annotation of the example water body detection data, the variables of the initial water body quality measurement model are updated to obtain the trained water body quality measurement model.
[0145] Among them, the training process is to first calculate the first quality score of the example water body detection data, and then use the back propagation algorithm to update the variables of the initial water body quality measurement model. According to the first quality score of the example water body detection data and the expected score label, the parameters of the initial water body quality measurement model are optimized so that the first quality score of the example water body detection data is close to the expected score label, and the trained water body quality measurement model is obtained.
[0146] Specifically, an expected score marked as 0 indicates that the aquaculture pond corresponding to the example water body detection data is not suitable for breeding target aquatic products, and an expected score marked as 1 indicates that the aquaculture pond corresponding to the example water body detection data is suitable for breeding target aquatic products. The expected score marking can be calibrated according to the actual breeding of the target aquatic products in the corresponding breeding pond and the survival and growth status of the target aquatic products.
[0147] In some embodiments, the method further comprises: when the quality score is greater than the first threshold parameter, performing extraction of positive measurement standards to obtain a positive measurement standard list, the positive measurement standard list comprising at least one positive measurement standard, the positive measurement standard being extracted from the water quality measurement standard of the water quality measurement model;
[0148] Determine the positive measurement standards in the positive measurement standard list that do not match the water body detection data, and the positive measurement standards that match the water body detection data;
[0149] When the number of positive measurement standards matching the water body detection data is greater than a first preset threshold, it is determined that the breeding pond is suitable for breeding target aquatic products.
[0150] The first threshold parameter and the first preset threshold value can be set according to actual conditions, and this embodiment does not limit this. In some embodiments, the breeding pond corresponding to the water body detection data whose quality score is not greater than the first threshold parameter can be determined as unsuitable for breeding target aquatic products.
[0151] The water body detection data matches the positive measurement standard, which can specifically be the conditions corresponding to the water body detection data matching the positive measurement standard list. The preset condition can be set according to the actual situation, and this embodiment does not limit this. For example, the preset condition can be the number of positive measurement standards in the water body detection data matching positive measurement standard list.
[0152] For example, the eigenvalues of some elements in the feature matrix corresponding to the water body detection data are x1=0.6, x2=0.9, and x3=0.3, respectively, and the positive measurement standards in the positive measurement standard list are x1>0.9, x2≤0.5, and x3≤0.9. Then the water body detection data only matches the positive measurement standard x3≤0.9. If the preset condition is that the feature matrix corresponding to the current detection data matches more than two positive measurement standards in the positive measurement standard list, the aquaculture pond corresponding to the water body detection data is suitable for breeding target aquatic products.
[0153] That is to say, after obtaining the quality score, the score may be higher because a certain data is particularly beneficial for breeding the target aquatic product, but in fact there may be other factors that cause the breeding pond to be unsuitable for breeding the target aquatic product. In this regard, the embodiment of the present application can further determine the number of matches between the feature matrix and the positive measurement standard to determine whether the breeding pond is truly suitable for breeding the target aquatic product.
[0154] Optionally, in response to a user's query, the positive measurement standards in the positive measurement standard list that do not match the water body detection data may also be sent to the user, so that the user may further transform the aquaculture pond.
[0155] In some embodiments, the method may further include:
[0156] When the quality score is greater than the second threshold parameter, extracting negative measurement standards to obtain a negative measurement standard list, the negative measurement standard list includes at least one negative measurement standard, and the negative measurement standard is extracted from the water quality measurement standard of the water quality measurement model;
[0157] Determine the negative measurement standards in the negative measurement standard list that do not match the water body detection data, and the negative measurement standards that match the water body detection data;
[0158] When the number of negative measurement standards matching the water body detection data is greater than a second preset threshold, it is determined that the breeding pond is not suitable for breeding target aquatic products.
[0159] Among them, the second threshold parameter and the second preset threshold value can be set according to actual conditions, and this embodiment does not limit this. Specifically, the second threshold parameter can generally be set smaller than the first threshold parameter. The first threshold parameter and the second threshold parameter are mainly divided depending on the performance of the actual effect during the model test, and it is necessary to observe the evaluation indicators such as the accuracy and recall rate of the model under different threshold value divisions.
[0160] In some embodiments, in order to ensure the accuracy of water quality measurement, the first threshold parameter and the second threshold parameter can be set to be relatively small, so that water body detection data with relatively high quality scores (i.e., the quality score exceeds the first threshold parameter or the second threshold parameter) can be re-detected to ensure the accuracy of the detection.
[0161] The water body detection data matches the negative measurement standard, which may specifically be a preset condition corresponding to the water body detection data matches the negative measurement standard list. The preset condition may be set according to actual conditions, and this embodiment does not limit this.
[0162] In some embodiments, a breeding pond corresponding to water body detection data having a quality score not greater than a first threshold parameter and not greater than a second threshold parameter may be determined as a breeding pond that is not suitable for breeding target aquatic products. For example, the first threshold parameter may be recorded as Q1, and the second threshold parameter may be recorded as Q2. Then, when the quality score of the water body detection data is not greater than min (Q1, Q2), the breeding pond corresponding to the water body detection data may be determined as a breeding pond that is not suitable for breeding target aquatic products.
[0163] Among them, the positive measurement standards and the negative measurement standards can be extracted from the water quality measurement standards used in the water quality measurement model. Specifically, the water quality measurement standards with higher call frequencies can be determined first. The call frequency represents the importance of the water quality measurement standards in the measurement of the water quality measurement model.
[0164] In some embodiments, the method may further include:
[0165] The calling frequency of each water quality measurement standard in the water quality measurement model is analyzed to obtain the calling frequency of each water quality measurement standard in the water quality measurement model;
[0166] Performing a standard filtering operation on the water quality measurement standard according to the calling frequency to obtain at least one candidate measurement standard;
[0167] The candidate measurement standards are subjected to positive measurement standard analysis to obtain positive measurement standards and negative measurement standards.
[0168] Among them, the water quality measurement standard with a call frequency greater than the preset frequency can be determined as a candidate measurement standard, and the preset frequency can be set according to actual conditions.
[0169] Specifically, each water quality measurement standard in the water quality measurement model can be recorded as Kj, and the number of times Lj of each water quality measurement standard Kj appearing in the water quality measurement model can be counted. When Lj is greater than a preset frequency, the water quality measurement standard Kj corresponding to Lj can be determined as a candidate measurement standard. Wherein, j is the marking serial number of each water quality measurement standard. If there are X water quality measurement standards in the water quality measurement model, then j is a positive integer not greater than X.
[0170] Optionally, the selection of candidate measurement standards may not be based on the calling frequency of the water quality measurement standards. This embodiment does not limit this, and other methods may be used to screen candidate measurement standards. For example, a certain proportion of water quality measurement standards that appear in the water quality measurement model may be randomly selected as candidate measurement standards, or the selection may be made by using experimental tests based on actual prediction effects.
[0171] In some embodiments, performing positive measurement standard analysis on candidate measurement standards to obtain positive measurement standards and negative measurement standards may include:
[0172] Obtaining example water body detection data of an example breeding pond and a score label corresponding to the example water body detection data, the score label being used to indicate the confidence that the example breeding pond is suitable for breeding target aquatic products;
[0173] Performing data processing on the example water body detection data to obtain a feature matrix of the example water body detection data, and determining a feature matrix corresponding to the example water body detection data under each candidate measurement standard from the feature matrix of the example water body detection data;
[0174] According to the score labels, a multivariate attribution analysis is performed on the feature matrix corresponding to each candidate measurement standard to obtain the influence parameters corresponding to each candidate measurement standard;
[0175] According to the influence parameters, the candidate measurement criteria are analyzed for positive measurement criteria to obtain positive measurement criteria and negative measurement criteria.
[0176] The score label may specifically be an expected score label of the example water body detection data, a feature matrix corresponding to the example water body detection data under the candidate measurement standard, that is, a feature matrix in the example water body detection data related to the candidate measurement standard.
[0177] For example, assume that a sample water body detection data D includes n data, for example, n water body detection data collected at different times, each sample has m features, then , each element is a dimensional vector. It is a data processing function, which includes the above-mentioned normalization, multivariate attribution analysis and other steps. It can be expressed as: ,in, It is applied to The data processing function of samples. is the feature matrix, which is composed of After applying to D, we get dimensional matrix, where is the number of features after data processing. It can be expressed as: .
[0178] For each candidate measurement standard , can be achieved by applying a specific feature extraction function Come from Extract the corresponding feature subset. This can be expressed as:
[0179] Among them, Mj is the candidate measurement standard The corresponding feature matrix is as follows. Furthermore, a feature matrix from the sample water body detection data to different measurement standards can be expressed according to the following formula:
[0180] Optionally, a regression model can be established for the candidate measurement standards, and a regression algorithm can be used to calculate the degree of influence of each candidate measurement standard on the water quality measurement results. Specifically, the regression algorithm can be used to obtain the influence parameter corresponding to each candidate measurement standard. The influence parameter represents the importance of the candidate measurement standard to the test result, and the candidate measurement standard with high importance can be selected as the output.
[0181] For example, multivariate attribution analysis can be expressed as: Where T represents the expected score annotation of the sample water body detection data, n represents the index corresponding to each candidate measurement standard, and R n represents the characteristic information corresponding to the water body detection data under the nth candidate measurement standard, w n represents the influence parameter corresponding to the nth candidate measurement standard. Among them, T and R can be based on multiple example water body detection data. n Determine the corresponding w n In some embodiments, performing positive measurement standard analysis on candidate measurement standards to obtain positive measurement standards and negative measurement standards may include:
[0182] Obtaining sample water body detection data and a score label corresponding to the sample water body detection data, wherein the score label indicates the confidence level that the sample breeding pond is suitable for breeding target aquatic products;
[0183] Performing data processing on the example water body detection data to obtain a feature matrix of the example water body detection data, and determining a feature matrix corresponding to the example water body detection data under each candidate measurement standard from the feature matrix of the example water body detection data;
[0184] Using the preset regression algorithm, a multivariate attribution analysis is performed on the feature matrix corresponding to each candidate measurement standard to obtain the influence parameters corresponding to each candidate measurement standard;
[0185] According to the influence parameters, the candidate measurement criteria are analyzed for positive measurement criteria to obtain positive measurement criteria and negative measurement criteria.
[0186] Optionally, performing a positive measurement standard analysis on the candidate measurement standards according to the influence parameter to obtain positive measurement standards and negative measurement standards may include:
[0187] Selecting a first measurement standard from the candidate measurement standards according to the mode of the influence parameter;
[0188] The first measurement standard whose influence parameter is greater than the preset segmentation threshold is determined as a positive measurement standard, and the first measurement standard whose influence parameter is less than the preset segmentation threshold is determined as a negative measurement standard.
[0189] The candidate measurement standard whose influence parameter modulus is greater than the preset influence parameter can be determined as the first measurement standard, and the preset influence parameter can be set according to actual conditions. The influence parameter of the candidate measurement standard can be positive or negative.
[0190] Among them, the preset segmentation threshold can be 0, that is, the first measurement standard with a positive influence parameter is determined as a positive measurement standard, and the first measurement standard with a negative influence parameter is determined as a negative measurement standard. It can be understood that the preset segmentation threshold can be set according to actual conditions. Specifically, the first measurement standard with a positive influence parameter vector can be determined as a valid positive measurement standard, and the positive measurement standard list can be recorded as R+; the first measurement standard with a negative influence parameter vector can be determined as a negative measurement standard, and the negative measurement standard list can be recorded as R-.
[0191] The method provided in this application can extract effective water quality measurement standards from the machine learning model (i.e., the water quality measurement model), and combine the water quality measurement model and the effective water quality measurement standards to measure the water quality of water detection data. This can not only meet the requirements of explainability, but also improve the efficiency and accuracy of measurement.
[0192] Among them, interpretability refers to explaining which specific aspects of the breeding pond are unsuitable for breeding target aquatic products. Specifically, after the water body detection data is predicted using the water body quality measurement model, the water body quality can be further measured according to the positive measurement standard list and the negative measurement standard list. The positive measurement standards in the positive measurement standard list and the negative measurement standards in the negative measurement standard list provide the interpretability of the water quality measurement. For example, if the water body detection data matches the first negative measurement standard and the second negative measurement standard, it can be determined that the breeding pond may have problems such as too low water oxygen content and too high pH value, which makes it unsuitable for breeding target aquatic products. Alternatively, if the water body detection data matches the first positive measurement standard, it can be determined that the lighting in the breeding pond is suitable for breeding the target aquatic products, and so on.
[0193] In a specific embodiment, the process of water quality detection can be as follows:
[0194] Step S301: acquiring water body detection data, and performing data processing on the water body detection data to obtain a feature matrix of the water body detection data;
[0195] Step S302: using the trained water quality measurement model to predict the quality score of the water body detection data according to the feature matrix;
[0196] Step S303: when the quality score is greater than the first threshold parameter, obtaining a positive measurement standard list, the positive measurement standard list including at least one positive measurement standard;
[0197] Step S304: determining whether the water body detection data matches the positive measurement standard, if so, determining that the breeding pond is suitable for breeding the target aquatic product; if not, determining that the breeding pond is not suitable for breeding the target aquatic product;
[0198] Step S305: when the quality score is greater than the second threshold parameter, obtaining a negative measurement standard list, the negative measurement standard list including at least one negative measurement standard;
[0199] Step S306: determining whether the water body detection data matches the negative measurement standard, if so, determining that the breeding pond is not suitable for breeding the target aquatic product; if not, determining that the breeding pond is suitable for breeding the target aquatic product;
[0200] Step S307: When the quality score is less than or equal to the smaller value of the first threshold parameter and the second threshold parameter, it is determined that the breeding pond is not suitable for breeding the target aquatic product.
[0201] As can be seen from the above, this embodiment can obtain water body detection data, perform data processing on the water body detection data, and obtain the characteristic matrix of the water body detection data; use the water body quality measurement model to predict the water body quality of the water body detection data according to the characteristic matrix, and obtain the quality score of the water body detection data. The quality score is used to indicate the confidence that the breeding pond is suitable for breeding target aquatic products. The water body quality measurement model includes at least one branch measurement module, wherein each branch measurement module corresponds to at least one water quality measurement standard; when the quality score is greater than the first threshold parameter, perform the extraction of the positive measurement standard to obtain a positive measurement standard list, the positive measurement standard list includes at least one positive measurement standard, and the positive measurement standard is extracted from the water quality measurement standard of the water body quality measurement model; when the water body detection data matches the positive measurement standard, it is determined that the breeding pond is suitable for breeding target aquatic products. This application can combine the prediction results of the water body quality measurement model and the positive measurement standard list to measure the water quality of the breeding pond to determine whether the breeding pond is suitable for breeding target aquatic products, ensure that the economic benefits of aquaculture can be guaranteed, and provide guidance for the transformation of the breeding pond.
[0202] In some embodiments, taking the execution subject of the method as a server as an example, the method may specifically include the following steps:
[0203] Step S401: the server obtains water body detection data, and performs data processing on the water body detection data to obtain a feature matrix of the water body detection data.
[0204] Step S402: The server uses a water quality measurement model to predict the water quality of the water detection data according to the characteristic matrix to obtain a quality score for the water detection data. The quality score is used to indicate the confidence that the aquaculture pond is suitable for breeding target aquatic products. The water quality measurement model includes at least one branch measurement module, wherein each branch measurement module corresponds to at least one water quality measurement standard.
[0205] Optionally, using a water quality measurement model to predict water quality of water detection data according to a feature matrix to obtain a quality score of the water detection data may include:
[0206] For each branch measurement module in the water quality measurement model, the branch measurement module is used to predict the water quality of the water detection data according to the characteristic matrix to obtain the branch measurement score of the water detection data;
[0207] The branch measurement scores corresponding to each branch measurement module are integrated to obtain the quality score of the water body detection data.
[0208] Step S403: When the quality score is greater than the first threshold parameter, the server performs extraction of positive measurement standards to obtain a positive measurement standard list, where the positive measurement standard list includes at least one positive measurement standard, which is extracted from the water quality measurement standard of the water quality measurement model; when the water body detection data matches the positive measurement standard, it is determined that the breeding pond is suitable for breeding target aquatic products.
[0209] The water body detection data matches the positive measurement standard, which may specifically be a preset condition corresponding to the water body detection data matches the positive measurement standard list.
[0210] Step S404: When the quality score is greater than the second threshold parameter, the server performs extraction of negative measurement standards to obtain a negative measurement standard list, where the negative measurement standard list includes at least one negative measurement standard, and the negative measurement standard is extracted from the water quality measurement standard of the water quality measurement model; when the water body detection data matches the negative measurement standard, it is determined that the breeding pond is not suitable for breeding target aquatic products.
[0211] Among them, the positive measurement standard and the negative measurement standard can be extracted from the water quality measurement standard used by the trained water quality measurement model by using the model parsing module. The model parsing module can parse the trained water quality measurement model to extract the positive measurement standard and the negative measurement standard. Specifically, some important water quality measurement standards can be selected from the water quality measurement standards used by the water quality measurement model as candidate measurement standards, such as selecting candidate measurement standards based on the call frequency. The obtained candidate measurement standards are used as the input of the model parser, and the model parser can perform multivariate attribution analysis on the candidate measurement standards to obtain the influence parameters corresponding to each candidate measurement standard. Then, according to the influence parameters, the positive measurement standard and the negative measurement standard are determined from the candidate measurement standards, and the positive measurement standard and the negative measurement standard can be used in the actual application stage of the method.
[0212] The training process of the water quality measurement model obtains example water body detection data and its corresponding labels, further obtains the feature matrix of the example water body detection data, uses the water quality measurement model to measure the water quality of the example water body detection data according to the feature matrix, obtains the first quality score of the example water body detection data, and trains the water quality measurement model according to the first quality score and the label.
[0213] In the model application stage, the water body detection data of the breeding pond that needs to be detected can be input, and the feature matrix obtained by data processing can be input into the trained water quality measurement model. The water quality measurement model predicts the input features and outputs a quality score. If the quality score is less than the first threshold parameter and the second threshold parameter, the breeding pond can be determined as a breeding pond that is not suitable for breeding target aquatic products. If the quality score is greater than the first threshold parameter, the positive measurement standard list can be used for judgment. If it matches the positive measurement standard in R+, the breeding pond is determined to be a breeding pond suitable for breeding target aquatic products, otherwise it is a breeding pond that is not suitable for breeding target aquatic products. If the quality score is greater than the second threshold parameter, the negative measurement standard list R- can be used for judgment.
[0214] In a specific embodiment, the method may further include:
[0215] Performing a call frequency analysis on each water quality measurement standard in the trained water quality measurement model to obtain the call frequency of each water quality measurement standard in the trained water quality measurement model, and performing a standard filtering operation on the water quality measurement standard according to the call frequency to obtain at least one candidate measurement standard;
[0216] Obtaining sample water body detection data and a score label corresponding to the sample water body detection data, the score label being used to indicate the confidence that the sample breeding pond is suitable for breeding target aquatic products;
[0217] Performing data processing on the example water body detection data to obtain a feature matrix of the example water body detection data, and determining a feature matrix corresponding to the example water body detection data under each candidate measurement standard from the feature matrix of the example water body detection data;
[0218] According to the score labels, a multivariate attribution analysis is performed on the feature matrix corresponding to each candidate measurement standard to obtain the influence parameters corresponding to each candidate measurement standard;
[0219] According to the influence parameters, the candidate measurement criteria are analyzed for positive measurement criteria to obtain positive measurement criteria and negative measurement criteria.
[0220] As can be seen from the above, in this embodiment, the server can be used to obtain water body detection data, and perform data processing on the water body detection data to obtain a feature matrix of the water body detection data; the server uses the water body quality measurement model to predict the water body quality of the water body detection data according to the feature matrix to obtain a quality score of the water body detection data, and the quality score is used to indicate the confidence that the breeding pond is suitable for breeding target aquatic products. The water body quality measurement model includes at least one branch measurement module, wherein each branch measurement module corresponds to at least one water quality measurement standard; when the quality score is greater than the first threshold parameter, the positive measurement standard is extracted to obtain a positive measurement standard list, the positive measurement standard list includes at least one positive measurement standard, and the positive measurement standard is extracted from the water quality measurement standard of the water body quality measurement model; when the water body detection data matches the positive measurement standard, it is determined that the breeding pond is suitable for breeding target aquatic products. When the quality score is greater than the second threshold parameter, the negative measurement standard is extracted to obtain a negative measurement standard list, the negative measurement standard list includes at least one negative measurement standard, and the negative measurement standard is extracted from the water quality measurement standard of the water body quality measurement model; when the water body detection data matches the negative measurement standard, it is determined that the breeding pond is not suitable for breeding target aquatic products.
[0221] In another aspect, the present invention also provides a water quality measurement system for aquaculture, the system comprising a computer device;
[0222] The computer device includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device executes part or all of the steps of the water quality measurement method for aquaculture described in the above embodiments.
[0223] In some embodiments, the system further comprises a water body detection device, which can be communicatively connected with the computer device.
[0224] The embodiment of the present invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 executes the aforementioned water quality measurement method for aquaculture. Figure 2 As shown, Figure 2 The block diagram of the computer device 100 provided in the embodiment of the present invention. The computer device 100 includes a memory 111, a processor 112 and a communication unit 113. To achieve data transmission or interaction, the memory 111, the processor 112 and the communication unit 113 are directly or indirectly electrically connected to each other. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0225] For illustrative purposes, the foregoing description is made with reference to specific embodiments. However, the above illustrative discussion is not intended to be exhaustive or to limit the present disclosure to the precise form disclosed. Numerous modifications and variations are possible in light of the above teachings. These embodiments are selected and described in order to best illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can best utilize the present disclosure and utilize various embodiments with different modifications to suit the intended intended application.
Claims
1. A method for measuring water quality for aquaculture, characterized in that: The method comprises: Using a water body detection device disposed in a breeding pond to obtain water body detection data, performing data processing on the water body detection data to obtain a feature matrix of the water body detection data, wherein the data processing includes normalization and principal component analysis, the normalization is used to compress the water body detection data to a predetermined range, and the principal component analysis is used to project the water body detection data to a new feature space to achieve data dimension reduction and feature extraction; Using a water quality measurement model, the water quality of the water detection data is predicted according to the characteristic matrix to obtain a quality score of the water detection data, wherein the quality score is used to indicate the confidence that the breeding pond is suitable for breeding target aquatic products, wherein the water quality measurement model is a decision tree model, and the water quality measurement model includes at least one branch measurement module, each of which is a decision tree, wherein each branch measurement module corresponds to at least one water quality measurement standard, and the water quality measurement standard is a rule for determining whether the breeding pond is suitable for breeding target aquatic products; The water quality measurement model is obtained by training based on a sample data set, wherein the sample data set includes example water body detection data and expected score annotations corresponding to the example water body detection data, and the expected score annotations are calculated according to the following formula: ; N is the first survival rate threshold, M is the second survival rate threshold, L is the survival rate of the target aquatic product actually cultivated in the example breeding pond corresponding to the example water body detection data, A is the first body length growth threshold, B is the second body length growth threshold, C is the average body length growth of the target aquatic product actually cultivated in the example breeding pond corresponding to the example water body detection data, W1 is the weight parameter of the survival rate for the quality score, W2 is the weight parameter of the body length for the quality score, k1 represents the normalization parameter corresponding to the survival rate, (NM)*k1=1, k2 represents the normalization parameter corresponding to the body length, (AB)*k2=1; The performing data processing on the water body detection data to obtain a feature matrix of the water body detection data includes: The water body detection data is normalized by the following method: scaler = MinMaxScaler(); normalized_data = scaler.fit_transform(data); Perform principal component analysis on the normalized data by: pca = PCA(n_components=b); principal_components = pca.fit_transform(normalized_data); Wherein, data is the water body detection data, normalized_data represents the normalized data, principal_components represents the characteristic matrix obtained after principal component analysis, MinMaxScaler() is used to scale the eigenvalues of the data to the range of zero to one, fit_transform() represents scaling the elements in the corresponding data according to the maximum and minimum values of the element values in the data, PCA(n_components=b) represents selecting b principal components for projection, and b is greater than or equal to 2; The method of using the water quality measurement model to predict the water quality of the water detection data according to the feature matrix to obtain the quality score of the water detection data includes: For each branch measurement module in the water quality measurement model, using the branch measurement module to predict the water quality of the water detection data according to the characteristic matrix to obtain a branch measurement score of the water detection data; The branch measurement scores corresponding to each branch measurement module are integrated to obtain the quality score of the water body detection data; The branch measurement scores corresponding to each branch measurement module are integrated to obtain the quality score of the water body detection data, including: Determine the influence value of the branch measurement score corresponding to each branch measurement module; According to the influence value, the branch measurement scores corresponding to each branch measurement module are weighted by influence to obtain the quality score of the water body detection data; Wherein, the quality score is expressed as ; wi is used to represent the influence value corresponding to the i-th branch measurement score, X represents the feature matrix, and Yi(X) represents the branch measurement score of the i-th decision tree for the input feature matrix X.
2. The method according to claim 1, characterized in that The method further comprises: When the quality score is greater than a first threshold parameter, extracting positive measurement standards to obtain a positive measurement standard list, wherein the positive measurement standard list includes at least one positive measurement standard extracted from a water quality measurement standard of the water quality measurement model; Determining the positive measurement standards in the positive measurement standard list that do not match the water body detection data, and the positive measurement standards that match the water body detection data; When the number of the positive measurement standards matching the water body detection data is greater than a first preset threshold, it is determined that the breeding pond is suitable for breeding the target aquatic product.
3. The method according to claim 2, characterized in that The method further comprises: When the quality score is greater than a second threshold parameter, extracting negative measurement standards to obtain a negative measurement standard list, wherein the negative measurement standard list includes at least one negative measurement standard extracted from the water quality measurement standard of the water quality measurement model; Determine the negative measurement standards in the negative measurement standard list that do not match the water body detection data, and the negative measurement standards that match the water body detection data; When the number of the negative measurement standards matching the water body detection data is greater than a second preset threshold, it is determined that the breeding pond is not suitable for breeding the target aquatic product.
4. The method according to claim 3, characterized in that The method further comprises: Performing a call frequency analysis on each water quality measurement standard in the water quality measurement model to obtain the call frequency of each water quality measurement standard in the water quality measurement model; According to the calling frequency, performing a standard filtering operation on the water quality measurement standard to obtain at least one candidate measurement standard; A positive measurement standard analysis is performed on the candidate measurement standards to obtain positive measurement standards and negative measurement standards.
5. The method according to claim 4, characterized in that The performing positive measurement standard analysis on the candidate measurement standard to obtain a positive measurement standard and a negative measurement standard includes: Acquire sample water body detection data of a sample breeding pond and an expected score label corresponding to the sample water body detection data, wherein the expected score label is used to indicate the confidence that the sample breeding pond is suitable for breeding the target aquatic product; Performing data processing on the example water body detection data to obtain a feature matrix of the example water body detection data, and determining a feature matrix corresponding to the example water body detection data under each candidate measurement standard from the feature matrix of the example water body detection data; According to the expected score annotation, a multivariate attribution analysis is performed on the feature matrix corresponding to each candidate measurement standard to obtain the influence parameter corresponding to each candidate measurement standard; According to the influence parameter, performing a positive measurement standard analysis on the candidate measurement standard to obtain a positive measurement standard and a negative measurement standard; Wherein, the multivariate attribution analysis is expressed as: , T represents the expected score annotation of the example water body detection data, n represents the index corresponding to each of the candidate measurement standards, R n represents the characteristic information corresponding to the example water body detection data under the nth candidate measurement standard, w n represents the influence parameter corresponding to the nth candidate measurement standard, and the w n is based on the T and R of multiple water body detection data of the example n Sure.
6. The method according to claim 5, characterized in that The step of performing a positive measurement standard analysis on the candidate measurement standard according to the influence parameter to obtain a positive measurement standard and a negative measurement standard includes: selecting a first measurement standard from the candidate measurement standards according to the mode of the influence parameter; The first measurement standard whose influence parameter is greater than the preset segmentation threshold is determined as a positive measurement standard, and the first measurement standard whose influence parameter is less than the preset segmentation threshold is determined as a negative measurement standard.
7. The method according to claim 1, characterized in that Before the water quality measurement model is used to predict the water quality of the water detection data according to the feature matrix to obtain the quality score of the water detection data, the method further includes: Acquire the sample data set, wherein the sample data set includes example water body detection data and expected score annotations corresponding to the example water body detection data; Performing data processing on the example water body detection data to obtain a feature matrix of the example water body detection data; Using the initial water quality measurement model, the water quality of the example water detection data is predicted according to the characteristic matrix to obtain a first quality score of the example breeding pond being suitable for breeding the target aquatic product; According to the first quality score and expected score annotation of the example water body detection data, the variables of the initial water body quality measurement model are updated to obtain a trained water body quality measurement model.
8. A water quality measurement system for aquaculture, characterized in that: The system includes a computer device; The computer device includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device executes the water quality measurement method for aquaculture according to any one of claims 1 to 7.
Citation Information
Patent Citations
Early warning method and device for water quality of aquaculture and storage medium
CN108376297A
Water environment supervision method and scheduling operation system based on cloud computing
CN116629550A