Aquaculture environment monitoring method based on Internet of Things technology

By analyzing the extreme point segmentation and mutation point of the sequence of water quality detection data, the cavity value of the rotating door algorithm is corrected, and adaptive data compression is achieved, and the data compression efficiency caused by fixed door limit is low and the abnormal situation is difficult to find. The problem improves the analysis efficiency of water quality detection data and the accuracy of environmental monitoring.

CN119149981BActive Publication Date: 2025-01-28HUBEI ZHENJIANG WUSAN INVESTMENT ALLIANCE AGRICULTURAL DEVELOPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411649934.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-01-28
Estimated Expiration
2044-11-19

Smart Images

  • Figure CN119149981B_ABST
    Figure CN119149981B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and specifically to an aquaculture environment monitoring method based on the Internet of Things technology, the method comprising: obtaining a water quality detection data sequence at multiple sampling points in a reservoir, and dividing it into multiple subsequences; obtaining mutation points according to the fluctuation characteristics of the subsequences; obtaining a first retention degree of the fluctuation range according to the distribution characteristics and distance characteristics of the mutation points; obtaining a discrete degree characterization value according to the position characteristics of the mutation points, and obtaining a regularity evaluation coefficient according to the length characteristics of the decomposed residual sequence and the stable characteristics of the data fluctuations. A correction coefficient for a preset threshold value is obtained according to the first retention degree, the discrete degree characterization value, and the regularity evaluation coefficient, and the water quality detection data sequence is compressed according to the correction coefficient and the revolving door algorithm. The present application adaptively determines the threshold value according to the analysis results of the data fluctuation characteristics in the water quality detection data sequence, and improves the data retention degree reflecting abnormal conditions while ensuring the overall compression efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and specifically to an aquaculture environment monitoring method based on Internet of Things technology. Background Art

[0002] The monitoring of aquaculture environment is of great significance to water resource management and environmental pollution monitoring. High-precision sensors are used to conduct regular multi-point detection of aquaculture water samples. Aquaculture water quality detection refers to a comprehensive work of regularly sampling water samples from reservoirs to detect the physical, chemical and biological characteristics, so as to obtain aquaculture water quality information. The detection of collected water samples includes temperature, dissolved oxygen, pH value and ammonia nitrogen content. However, for each comprehensive detection of aquaculture water quality, a large number of sampling points need to be set up and multiple water samples need to be collected for detection, which leads to redundancy of detection data and makes it difficult to quickly obtain the evaluation results of aquaculture water quality based on the detection data, so as to determine the monitoring results of the aquaculture environment. Therefore, it is necessary to optimize the collection of a large amount of detection data of extracted water samples and improve the analysis efficiency of detection data to improve the efficiency of environmental monitoring.

[0003] At present, methods to eliminate data redundancy include data dimensionality reduction and data compression. Water samples extracted for aquaculture water quality are usually recorded with corresponding labels, and the corresponding test data also needs to be stored. Therefore, when reducing the redundancy of test data for optimized collection, data compression is usually used to eliminate redundancy.

[0004] The revolving door algorithm is an existing commonly used data sequence compression method. Its principle is to construct a series of highly fixed parallelograms to select data based on the data. When the data point cannot be selected, the previous data point is stored, otherwise it is compressed. The threshold value in the algorithm is used to adjust the size of the parallelogram. Different threshold values ​​represent different compression levels. The threshold value of the algorithm is fixed during the compression process, and the compression level of the overall data sequence is fixed; when testing the aquaculture water quality, it is more necessary to pay attention to the data fluctuations in the test data and understand the water quality conditions at different sampling points, that is, in different areas of the reservoir. When a fixed medium threshold value compresses a large amount of test data, a larger threshold value easily compresses the local fluctuation data and makes it difficult to find abnormal situations; a smaller threshold value affects the compression efficiency and has a large amount of data redundancy; it affects the results of the optimized collection of aquaculture water quality test data. Summary of the invention

[0005] In order to solve the technical problem that the fixed threshold value in the above-mentioned revolving door algorithm affects the optimized collection results of aquaculture water quality detection data, the purpose of this application is to provide an aquaculture environment monitoring method based on Internet of Things technology. The technical solutions adopted are as follows:

[0006] Collect water samples at each sampling point in the reservoir, obtain a water quality detection data sequence of the collected water samples, and divide the water quality detection data sequence into multiple subsequences according to extreme value points in the water quality detection data sequence;

[0007] Determine the mutation point in the subsequence based on the difference in the increase and decrease trends between adjacent data points in the subsequence, determine the fluctuation range of the subsequence based on the overlap of the mutation points within the window range taken by the mutation points; obtain the first retention degree of the fluctuation range based on the distance characteristics between the mutation points within the fluctuation range;

[0008] Determine the discrete degree characterization value of each fluctuation range based on the position distance characteristics of the mutation point in each fluctuation range on the fitting curve of the data points in each fluctuation range;

[0009] Determine the regularity evaluation coefficient of each fluctuation range based on the number of data points in the longest residual subsequence obtained by data decomposition within each fluctuation range and the regularity of changes between adjacent data points, and use the sum of the discrete degree characterization value and the regularity evaluation coefficient as the second retention degree for determining each fluctuation range; and use the sum of the first retention degree and the second retention degree of each fluctuation range as the correction coefficient of each fluctuation range;

[0010] The preset threshold value of the revolving door algorithm is corrected according to the correction coefficient to obtain an adaptive threshold value, and the revolving door algorithm is used to compress the water quality detection data sequence based on the adaptive threshold value to obtain an optimized collection result;

[0011] Determine the environmental monitoring results based on the optimized collection results of the water quality detection data sequence.

[0012] Preferably, the step of dividing the water quality detection data sequence into a plurality of subsequences according to the extreme value points in the water quality detection data sequence comprises:

[0013] Performing curve fitting on the data points in each water quality detection data sequence to obtain a first fitting curve;

[0014] The extreme value points on the first fitting curve are used as segmentation points; and each water quality detection data sequence is segmented according to the segmentation points to obtain multiple subsequences of each water quality detection data sequence.

[0015] Preferably, the step of determining the mutation point in the subsequence based on the difference in the increase and decrease trends between adjacent data points in the subsequence, and determining the fluctuation range of the subsequence based on the overlap of the mutation points within the window range taken by the mutation points comprises:

[0016] Calculating the numerical difference between each data point in the subsequence and the previous adjacent data point to obtain the previous adjacent difference of each data point; calculating the numerical difference between the data point in the subsequence and the next adjacent data point to obtain the next adjacent difference of each data point; calculating the ratio of the previous adjacent difference to the next adjacent difference as the fluctuation characterization value of each data point; when the fluctuation characterization value is greater than 0, taking the corresponding data point as a mutation point;

[0017] For any mutation point in the subsequence, for any mutation point in the subsequence, each mutation point and other mutation points within a preset neighborhood range form a fluctuation subinterval;

[0018] Obtain all fluctuation sub-intervals in the subsequence, merge any two fluctuation sub-intervals containing the same mutation point, until there is no mutation point that is the same as other fluctuation sub-intervals in the fused fluctuation range; obtain the moments corresponding to the two endpoints in each fluctuation sub-interval containing the same mutation point, and use the two moments that determine the longest time interval among all the moments as the starting moment and the ending moment, and use the interval determined by the data points corresponding to the starting moment and the ending moment as the endpoints as the fluctuation interval.

[0019] Preferably, the step of obtaining the first retention degree of the fluctuation range based on the distance characteristics between the mutation points within the fluctuation range comprises:

[0020] Taking the positive correlation mapping result of the quantity value of the data points within each fluctuation range as the range characterization value of each fluctuation range, and calculating the product of the range characterization value and the preset first weight to obtain the range weight;

[0021] Calculate the average value of the number of data points between two adjacent mutation points in each fluctuation range and perform positive correlation mapping to obtain a spacing characterization value for each fluctuation range, and calculate the product of the spacing characterization value and a preset second weight to obtain a spacing weight;

[0022] The sum of the range weight and the interval weight is taken as the first retention degree of each fluctuation range.

[0023] Preferably, the step of determining the discrete degree characterization value of each fluctuation range based on the position distance characteristics of the mutation point in each fluctuation range on the fitting curve of the data points in each fluctuation range includes:

[0024] Perform curve fitting on the data points within each fluctuation range to obtain a second fitting curve;

[0025] Calculate the absolute value of the difference between the abscissas of all adjacent single wave peaks in the second fitting curve to obtain the peak spacing value; calculate the absolute value of the difference between the ordinates of the peak and the trough of each single wave in the second fitting curve to obtain the waveform amplitude value;

[0026] The sum of the standard deviation of all the wave peak spacing values ​​and the standard deviation of all the waveform amplitude values ​​in the second fitting curve is calculated as a fluctuation discrete value, and negative correlation mapping is performed on the fluctuation discrete value to obtain a discrete degree characterization value of the fluctuation range.

[0027] Preferably, the step of determining the regularity evaluation coefficient of each fluctuation range based on the number of data points in the longest residual subsequence obtained by decomposing the data within each fluctuation range and the regularity of changes between adjacent data points comprises:

[0028] The data sequence within the fluctuation range is decomposed by the STL algorithm to obtain the residual sequence. The data points in the residual sequence are used as input, and the AP clustering algorithm is used to divide the data points in the residual sequence into different clusters. The data points in the cluster with the largest number of data points are arranged according to time to obtain the longest residual subsequence.

[0029] The regular evaluation coefficient of the fluctuation range is obtained according to the length characteristics and change characteristics of the longest residual subsequence.

[0030] Preferably, the step of obtaining a regularity evaluation coefficient of a fluctuation range according to the length characteristics and variation characteristics of the longest residual subsequence comprises:

[0031] Calculate the slope between each data point and other adjacent data points in the longest residual subsequence as the slope representation value of each data point;

[0032] The cumulative sum of the absolute values ​​of the slope representation values ​​of all data points in the longest residual subsequence is taken as the overall slope representation value of the longest residual subsequence;

[0033] Calculate the absolute values ​​of the differences in the slope representation values ​​between all adjacent data points in the longest residual subsequence and add them up to obtain the adjacent slope difference values ​​of the longest residual subsequence;

[0034] Calculating the sum of the overall slope representation value and the adjacent slope difference values ​​to obtain the deviation degree of the longest residual subsequence, and using the negative correlation mapping result of the deviation degree as the flatness value of the longest residual subsequence;

[0035] Positive correlation mapping is performed on the quantity values ​​of the data points in the longest residual subsequence, and the sum of the mapping result of the positive correlation mapping and the flatness value is used as a regularity evaluation coefficient of the fluctuation range.

[0036] Preferably, the step of correcting the preset threshold value of the revolving door algorithm according to the correction coefficient to obtain the adaptive threshold value includes:

[0037] The ratio of the preset threshold value to the correction coefficient of the fluctuation range of each fluctuation range is used as the adaptive threshold value of each fluctuation range.

[0038] Preferably, the step of compressing the water quality detection data sequence using a revolving door algorithm based on an adaptive threshold value includes:

[0039] Calculate the adaptive threshold value of each fluctuation range in each subsequence in each water quality detection data sequence respectively; take all subsequences divided by each water quality detection data sequence as input;

[0040] For data corresponding to a fluctuation range whose correction coefficient is greater than a preset correction threshold, the preset threshold value is replaced with an adaptive threshold value of the fluctuation range for compression;

[0041] For data corresponding to the fluctuation range where the correction coefficient is less than or equal to the preset correction threshold, the revolving door algorithm is used to compress the data based on the preset threshold value;

[0042] For the detection data in the subsequence that are not within the fluctuation range, they are arranged in chronological order to obtain a compressed sequence, and compressed based on a preset threshold value using a revolving door algorithm.

[0043] Preferably, the step of determining the environmental monitoring result based on the optimized collection result of the water quality detection data sequence comprises:

[0044] Taking the optimized collection results of each water quality detection data sequence of each sampling point as input of the anomaly detection algorithm, and using the anomaly detection algorithm to output the abnormal points in the optimized collection results;

[0045] All abnormal points in the same water quality detection data sequence at each sampling point are counted, and all the abnormal points are compared with the standard interval of each water quality detection. The ratio of the number of abnormal points not in the standard interval to the number of all abnormal points is taken as the unqualified rate of aquaculture environment reflected by each water quality at each sampling point.

[0046] The present application has the following beneficial effects: in the present application, firstly, the water quality detection data sequence is divided into a plurality of subsequences according to the extreme value points in the water quality detection data sequence, so as to facilitate the subsequent determination of the fluctuation range and improve the final adaptive compression effect; secondly, the mutation points in the subsequence are determined based on the difference in the increase and decrease trends between adjacent data points in the subsequence, and the fluctuation range of the subsequence is determined based on the coincidence of the mutation points within the window range taken by the mutation points, and the noise points can be preliminarily eliminated according to the fluctuation range; then, the first retention degree of the fluctuation range is obtained based on the distance characteristics between the mutation points within the fluctuation range, which can reflect whether the data within the fluctuation range should be retained during the compression process; then, the retention degree of each fluctuation range is determined based on the position distance characteristics of the mutation points within each fluctuation range on the fitting curve of the data points within each fluctuation range. The discrete degree characterization value of the range can reflect the similarity of the change characteristics between the mutation points within the fluctuation range, and then determine whether it is noise data; then, based on the number of data points in the longest residual subsequence obtained by decomposing the data in each fluctuation range and the regularity of the changes between adjacent data points, the regularity evaluation coefficient of each fluctuation range is determined, and the regularity evaluation coefficient can be calculated to judge the regularity within the fluctuation range according to the distribution characteristics of the residual sequence, which is used to analyze the possibility that the data fluctuation is caused by abnormal conditions related to water quality; finally, based on the first retention degree and the second retention degree of each fluctuation range, the correction coefficient of each fluctuation range is determined; according to the correction coefficient, the preset threshold value of the revolving door algorithm is corrected to obtain an adaptive threshold value, which can realize the adaptive adjustment of the compression degree according to the characteristics of the fluctuation range. Finally, while ensuring the overall compression efficiency, the data retention reflecting abnormal conditions is improved to ensure the accuracy of the results of aquaculture environment monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are 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.

[0048] Figure 1 This is an implementation flow chart of an aquaculture environment monitoring method based on Internet of Things technology provided in one embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of the aquaculture environment monitoring method based on the Internet of Things technology proposed in the present application, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0050] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0051] The specific scheme of the aquaculture environment monitoring method based on Internet of Things technology provided by this application is described in detail below with reference to the accompanying drawings.

[0052] See also Figure 1 , which shows an implementation flow chart of an aquaculture environment monitoring method based on Internet of Things technology provided by an embodiment of the present application, the method comprising the following steps:

[0053] Step S1, obtaining water quality detection data sequences of different sampling points in the reservoir and performing segmentation processing.

[0054] In the embodiment of the present application, the implementation scenario is the compressed and optimized collection of the water quality detection data sequence of the collected water samples obtained from different sampling points in the reservoir. The implementation purpose is to improve the efficiency while ensuring the accuracy of the aquaculture environment monitoring results. By using the data distribution in the water quality detection data and optimizing the compression algorithm in the compression process of the water quality detection data sequence, the removal of redundant data in a large amount of water quality detection data is achieved.

[0055] Preferably, in one embodiment of the present application, a large number of sampling points are set in the reservoir, each sampling point acquires water samples at the same sampling frequency, and the interval between adjacent sampling points is within the straight-line distance range of [30 meters, 70 meters], so that sampling points at different locations can obtain the results of water quality detection in different areas of the reservoir.

[0056] Secondly, when the water samples collected from the reservoir are tested for water quality in this application, the test data include but are not limited to dissolved oxygen, temperature, pH value, ammonia nitrogen content and turbidity. For any kind of test data, the test data of all the water samples collected at each sampling point are arranged in chronological order, and the arrangement result is used as the water quality test data sequence of each test data at each sampling point.

[0057] It should be noted that the straight-line distance range between sampling points, the type of detection data and the sampling frequency can all be set by the implementer according to the size of the reservoir, and this application does not impose any special restrictions.

[0058] Furthermore, the detection data in the area where each sampling point in the reservoir is located in different time periods will show a trend of gradual increase or decrease. The rising or falling characteristics of the water quality detection data sequence are caused by the temperature change of the day or the different living habits of underwater animals in the reservoir at different time periods. If you only need to observe the overall data rise and fall trend, you can use the existing revolving door algorithm to compress it, but if there are slight fluctuations of varying degrees during the rise or fall of the data, the slight fluctuation may be due to the noise in the collection process or the abnormal situation caused by the initial diffusion of the surface pollution source. Such abnormal conditions are crucial to the assessment of aquaculture water quality and should be retained as much as possible during the compression process of the water quality detection data sequence so that water quality analysts can further analyze the water quality. However, the threshold value in the existing revolving door algorithm is fixed. If the preset threshold value is large for the case of slight fluctuations in the data, it may cause compression, making it difficult to detect the above abnormal conditions in time, resulting in losses; and the preset threshold value is small, resulting in low compression, slow compression process, and difficulty in reducing data redundancy, which is not convenient for observation and analysis of the data. Therefore, it is necessary to improve the revolving door compression algorithm so that it can adaptively adjust the compression degree based on the fluctuation characteristics of the data and analyze the noise possibility of data fluctuations to avoid the noise being retained during the compression process.

[0059] Specifically, because the water quality detection data sequence of the sampling points in the reservoir shows an upward and downward trend in different time periods, in order to improve the accuracy of compression and the analysis of fluctuations, it is first necessary to determine the different change stages of the water quality detection data sequence; therefore, the water quality detection data sequence is subjected to extreme point detection to obtain segmentation points, and the water quality detection data sequence is segmented according to the segmentation points to obtain subsequences.

[0060] Preferably, in one embodiment of the present application, the step of obtaining a subsequence of the water quality detection data sequence includes:

[0061] First, curve fitting is performed on the water quality detection data sequence to obtain a first fitting curve, and the extreme value point of the first fitting curve is used as a segmentation point; the position of the segmentation point reflects the starting and ending position points of the rise or fall of the first fitting curve, and thus can characterize the overall rising and falling trend change points of the water quality detection data sequence; wherein, the curve fitting method includes but is not limited to the polynomial fitting method and the least squares fitting method; curve fitting and extreme value point detection are both commonly used techniques in the field of data processing, and the specific process will not be repeated here.

[0062] Secondly, the water quality detection data sequence is segmented according to the segmentation points to obtain different subsequences. Each subsequence after segmentation shows an upward or downward trend, and each subsequence includes segmentation points at both ends.

[0063] Step S2: Obtain mutation points according to the fluctuation characteristics of data points in the subsequence, obtain the fluctuation range of the subsequence according to the distribution characteristics of the mutation points in the subsequence; and obtain the first retention degree of the fluctuation range according to the distance characteristics between the mutation points in the fluctuation range.

[0064] Step S1 explains that different data fluctuations in the subsequence may be abnormal conditions caused by noise or the initial diffusion process of the water surface pollution source. Therefore, it is necessary to first determine the range of the fluctuation characteristics. The fluctuation characteristics of the sequence represent that the value of a certain data point is higher or lower than that of other adjacent data points on the left and right. In a subsequence that is obviously rising or falling, there is a data point whose change trend is opposite to the change trend of the overall subsequence; therefore, it is determined that there is a mutation point of this feature, and then the fluctuation range is determined based on this type of mutation point; therefore, the mutation point is obtained based on the fluctuation characteristics of the data point in the subsequence of the water quality detection data sequence, and the fluctuation range of the subsequence is obtained based on the distribution characteristics of the mutation point in the subsequence.

[0065] Preferably, in one embodiment of the present application, for any subsequence of each water quality detection data sequence, the specific steps of obtaining the mutation point and fluctuation range of each subsequence include:

[0066] First, the numerical difference between the data point in the subsequence and the previous adjacent data point is calculated to obtain the previous adjacent difference of the data point; this value reflects the numerical difference between the data point and the previous data point. When the value is positive, it means that the data shows an upward trend, otherwise it shows a downward trend.

[0067] Secondly, calculate the numerical difference between the data point and the next adjacent data point in the subsequence to obtain the next adjacent difference of the data point; when the value is positive, it means that the data shows a downward trend, otherwise it shows an upward trend. Calculate the ratio of the previous adjacent difference and the next adjacent difference of the data point to obtain the fluctuation characterization value of the data point; when the fluctuation characterization value is positive, it means that the positive and negative relationship between the previous adjacent difference and the next adjacent difference in the ratio is the same, then the data change trends at both ends of the data point are opposite. Therefore, when the fluctuation characterization value exceeds 0, the data point is regarded as a mutation point in the subsequence; when the value exceeds zero, it means that the data change trends at both ends of the data point are opposite, and the data point is opposite to the overall change trend of the subsequence, so the point is a mutation point that causes fluctuations; otherwise, if the value does not exceed 0, it means that the data point has the same overall change trend as the subsequence and does not cause fluctuations.

[0068] Furthermore, for any mutation point in the subsequence, each mutation point and other mutation points in a preset neighborhood range are combined into a fluctuation sub-interval, because the situation where there is only one mutation point in a range is very likely to be an isolated noise point, and when multiple mutation points appear in a range, it may be an abnormal situation; in the embodiment of the present application, the preset neighborhood range is centered on each mutation point, and 3 data points are taken on the left and right sides of the mutation point respectively, forming a window range of a total of 7 data points. If the mutation point does not meet the rule at the edge of the subsequence, the window closest to the center of the mutation point is taken as the preset neighborhood range, and the local interval determined by the two adjacent mutation points in the window range is taken as a fluctuation sub-interval, and the two adjacent mutation points are the two endpoints of the fluctuation sub-interval.

[0069] It should be noted that the size of the window range can be determined by the implementer according to the implementation scenario, and this application does not make any special restrictions on this.

[0070] Further, all fluctuation sub-intervals in the subsequence are obtained, and the fluctuation sub-intervals containing the same mutation point are merged to obtain the fluctuation interval. If the same mutation point exists in the merged interval and other fluctuation sub-intervals, the fusion is continued until there is no mutation point that is the same as other fluctuation sub-intervals in the fluctuation range after fusion; for example, if three fluctuation sub-intervals all contain the same mutation point, the three fluctuation sub-intervals are merged, which means that the three fluctuation sub-intervals are close to each other, and the fluctuations may be caused by the same situation, and can be regarded as a fluctuation range. When the number of mutation points in the fluctuation interval exceeds the preset first value, it is used as a different fluctuation range of the subsequence. The fusion of the fluctuation sub-intervals refers to the fusion on the time scale, that is, the moments corresponding to the two endpoints in each fluctuation sub-interval containing the same mutation point are obtained, and the two moments that determine the longest time interval among all the moments are used as the starting moment and the end moment, and the data points corresponding to the starting moment and the end moment are used as the endpoints to obtain the fluctuation interval.

[0071] It should be noted that the purpose of presetting the first numerical value is to avoid the situation where a smaller fluctuation range may be isolated noise, and to eliminate such situations. In the implementation of this application, the first numerical value is preset to 3, and the implementer can determine it according to the implementation scenario. This application does not impose any special restrictions on this.

[0072] Furthermore, after obtaining different fluctuation ranges in the subsequence, it is necessary to further determine the possibility that the fluctuation range is random noise or an abnormal situation, and determine whether it needs to be retained based on the possibility. Therefore, the first retention degree of the fluctuation range is obtained based on the distance characteristics between mutation points in the fluctuation range.

[0073] Preferably, in one embodiment of the present application, the specific steps of obtaining the first retention level include:

[0074] First, the number of data points in each fluctuation range is calculated and positively correlated to obtain a range characterization value; this value represents the size of the fluctuation range. The more data points there are, the longer the distance between the first and last mutation points of the fluctuation range is, and the smaller the possibility that the fluctuation range is random noise.

[0075] Secondly, the average value of the number of data points between two adjacent mutation points in each fluctuation range is calculated and positively correlated to obtain a spacing characterization value. The two adjacent mutation points refer to the calculation of each mutation point and its next adjacent mutation point. It should be noted that in the process of calculating the difference characteristics between all adjacent data in the embodiments of the present application, the boundary data points that do not meet the calculation conditions do not participate in the calculation; the larger the spacing characterization value, the longer the interval between the two mutation points, the more likely it is that the fluctuation is caused by an abnormal situation, and the smaller the possibility that the fluctuation range is random noise.

[0076] Afterwards, the product of the range characterization value and the preset first weight is calculated to obtain the range weight; the product of the spacing characterization value and the preset second weight is calculated to obtain the spacing weight; the sum of the range weight and the spacing weight is calculated to obtain the first retention degree of the fluctuation range; wherein the purpose of the preset first weight and the preset second weight is to assign the importance of different features, which are respectively set to 0.5 in the embodiment of the present application, and the implementer can determine it according to the implementation scenario. The greater the first retention degree, the greater the possibility that the fluctuation range is caused by abnormal conditions in aquaculture, and the smaller the possibility that the fluctuation is noise.

[0077] It should be noted that a positive mapping means that as an independent variable grows, the mapping result also grows. The independent variable and the mapping result change in the same direction. When the independent variable changes from large to small or from small to large, the mapping result also changes from large to small or from small to large. The specific calculation relationship is determined by the actual application and this application does not impose any special restrictions.

[0078] Preferably, in one embodiment of the present application, the specific formula for obtaining the first retention degree is:

[0079]

[0080] In the formula, Indicates the first retention degree of the first fluctuation range, and The first weight and the second weight are preset respectively, represents the hyperbolic tangent function, the purpose is to perform positive correlation mapping, Indicates the range characterization value, Indicates the spacing characterization value; represents the range weight, Represents the spacing weight.

[0081] Step S3, obtaining a discrete degree characterization value of the fluctuation range according to the position characteristics of the mutation point in the fluctuation range; decomposing the data sequence within the fluctuation range to obtain a residual sequence, and clustering to obtain the longest residual subsequence; obtaining a regularity evaluation coefficient of the fluctuation range according to the length characteristics and change characteristics of the longest residual subsequence.

[0082] When calculating the first retention degree of each fluctuation range, there may be special cases that are mistaken for noise, resulting in a low first retention degree, affecting the accuracy of subsequent data compression. For example, when a water sample is extracted from a sampling point, if ripples occur on the nearby water surface, it will also cause data fluctuations in the water quality test data sequence of the collected water sample. Correspondingly, there may be a short fluctuation range and a short but regular interval between mutation points in the fluctuation range. Therefore, it is necessary to perform more fine-grained data analysis on the fluctuations within such fluctuation ranges.

[0083] Specifically, when the water quality test data of a nearby sampling point is affected by ripples on the surface of a reservoir within a fluctuation range, resulting in a low first retention level, the change characteristics of the data fluctuation within the fluctuation range at the mutation point are relatively similar. This is because when ripples occur on the surface of a reservoir, the fluctuation of the water surface is not continuous, but occurs at intervals on the water surface, resulting in intermittent interference when extracting and collecting water samples. Therefore, it is considered to obtain the discrete degree characterization value of the fluctuation range based on the position characteristics of the mutation point in the fluctuation range, and further analyze the fluctuation situation.

[0084] Preferably, in one embodiment of the present application, the specific steps of obtaining the discrete degree characterization value include:

[0085] Firstly, the data points of the water quality detection data sequence within the fluctuation range are placed in a plane rectangular coordinate system and fitted to obtain a second fitting curve. The horizontal axis is the different collection times of the data points, and the vertical axis is the numerical value of the data points. The purpose of obtaining the second fitting curve is to analyze the waveform in the curve according to the fluctuation characteristics of the mutation point and judge the discrete degree characterization value of the fluctuation range.

[0086] Secondly, calculate the absolute value of the difference between the horizontal coordinates of the peaks of all adjacent single waves in the second fitting curve, and calculate in the same way as the peak and the next adjacent peak to obtain the peak spacing value; this value can reflect the distance between two adjacent single waves. Calculate the absolute value of the difference between the vertical coordinates of the peak and the trough of each single wave in the second fitting curve to obtain the waveform amplitude value; this value can reflect the change amplitude of different single waves. A single wave refers to a different convex waveform in the second fitting curve caused by a mutation point; the peak is the highest point of a single wave, and the trough is the lowest point of a single wave.

[0087] After that, the standard deviation of all peak spacing values ​​and the standard deviation of all waveform amplitude values ​​in the second fitting curve are calculated respectively, and the above two standard deviations are summed to obtain the fluctuation dispersion value. When the value is smaller, it means that the peak spacing values ​​between different single waves are more similar, and the fluctuation amplitude values ​​of each single peak are more similar; which means that the fluctuation range changes more regularly and the dispersion is lower. The fluctuation dispersion value is negatively correlated to obtain the dispersion degree representation value of the fluctuation range; the larger the dispersion degree representation value, the smaller the dispersion degree of the fluctuation range and the more regular the fluctuation.

[0088] It should be noted that negative mapping means that when an independent variable increases, the mapping result decreases accordingly, and the independent variable and the mapping result change in opposite directions. When the independent variable changes from large to small or from small to large, the mapping result changes from small to large or from large to small. The specific calculation relationship is determined by the actual application and this application does not impose any special restrictions.

[0089] Preferably, in one embodiment of the present application, the formula for obtaining the discrete degree characterization value includes:

[0090]

[0091] In the formula, The discrete degree characterization value that represents the fluctuation range, represents the standard deviation of the peak spacing values, Indicates the standard deviation of the waveform amplitude values, The fluctuation discrete value representing the fluctuation range; Represents an exponential function with a natural constant as its base.

[0092] Furthermore, the fluctuation range may also have different change characteristics of mutation points, but the appearance characteristics of mutation points are regular. For example, a mutation point with a high degree of smoothness may be followed by a mutation point with a low degree of fluctuation, and so on. Such situations may be data anomalies related to aquaculture water quality. During the compression process, such data needs to be retained as much as possible. Therefore, the data sequence within the fluctuation range can be decomposed to obtain a residual sequence, and the residual sequence can be analyzed.

[0093] Preferably, in one embodiment of the present application, the specific process of obtaining the residual sequence is: decomposing the data sequence within the fluctuation range by the STL algorithm to obtain the residual sequence. It should be noted that the STL algorithm is an existing data decomposition algorithm, and the specific steps are not repeated here, and the data sequence can be decomposed into a trend sequence, a periodic sequence and a residual sequence. And the data points in the residual sequence are used as input, and the AP clustering (Affinity Propagation clustering) algorithm is used to divide the data points in the residual sequence into different clustering clusters, and the data points in the cluster with the largest number of data points are arranged according to time to obtain the longest residual subsequence. Among them, AP clustering is a commonly used technology in the field of data processing, and the specific process is not repeated here.

[0094] It should be noted that the purpose of clustering to obtain the longest residual subsequence is because the more data points there are in the cluster, the more representative the overall data analysis of the residual sequence is, and the data features in the same cluster are relatively close.

[0095] Furthermore, after obtaining the longest residual subsequence, the regular characteristics of the occurrence of the mutation point can be analyzed according to the longest residual subsequence, and the regular evaluation coefficient of the fluctuation range can be obtained according to the length characteristics and change characteristics of the longest residual subsequence.

[0096] Preferably, in one embodiment of the present application, the specific steps of obtaining the regularity evaluation coefficient include:

[0097] First, the slope between each data point in the longest residual subsequence and other adjacent data points is calculated, and the slope between each data point and the previous data point is calculated as the slope representation value of each data point; this value can reflect the level of change of the residual. The smaller the value, the stronger the regularity of the data and the lower the degree of smoothness; the slope representation value of the first data point in the longest residual subsequence is set to 0.

[0098] Secondly, the absolute values ​​of the slope representation values ​​of the data points in the longest residual subsequence are calculated and summed up to obtain the overall slope representation value of the longest residual subsequence. The smaller the value, the smoother the overall change of the longest residual subsequence, the lower the smoothness of the corresponding fluctuation range, and the stronger the regularity.

[0099] Afterwards, the absolute values ​​of the differences in the slope characterization values ​​between all adjacent data points in the longest residual subsequence are calculated and accumulated to obtain the adjacent slope difference values ​​of the longest residual subsequence; this value can reflect the degree of change between the residuals. When the value is larger, it means that the overall residual change is more obvious and the fluctuation of the fluctuation range is more irregular. The sum of the overall slope characterization value of the longest residual subsequence and the adjacent slope difference values ​​is calculated to obtain the deviation degree of the longest residual subsequence, and the deviation degree is negatively correlated to obtain the flatness value of the longest residual subsequence; the larger the flatness value, the closer the data points in the longest residual subsequence are to the residual center axis, and the flatter the change, and the flatter and more regular the fluctuation within the fluctuation range.

[0100] Finally, the mapping result of the positive correlation mapping of the number of data points in the longest residual subsequence is calculated, and the sum of the mapping result and the flatness value is calculated to obtain the regularity evaluation coefficient of the fluctuation range. The more data points there are in the longest residual subsequence, the more data points with similar data features in the cluster cluster, which can better reflect the overall consistency of the change of the fluctuation range. The larger the regularity evaluation coefficient, the more regular the change of the fluctuation range, and the more the fluctuation range should be retained in the subsequent compression process.

[0101] Preferably, in one embodiment of the present application, the formula for obtaining the regularity evaluation coefficient includes:

[0102]

[0103] In the formula, The regularity evaluation coefficient representing the fluctuation range, Represents the number of data points in the longest residual subsequence, represents the overall slope representation value of the longest residual subsequence, represents the difference between the adjacent slopes of the longest residual subsequence, Indicates the degree of deviation of the longest residual subsequence, Indicates the flatness value of the longest residual subsequence, represents an exponential function with a natural constant as base, represents the hyperbolic tangent function.

[0104] Step S4, obtaining a second retention degree according to the discrete degree characterization value of the fluctuation range and the regularity evaluation coefficient; obtaining a correction coefficient of the fluctuation range in combination with the first retention degree; correcting the preset threshold value based on the correction coefficient, and compressing the water quality detection data sequence using the revolving door algorithm and the adaptive threshold value.

[0105] Preferably, in one embodiment of the present application, the process of obtaining the second retention degree of the fluctuation range according to the discrete degree characterization value and the regularity evaluation coefficient of the fluctuation range includes: calculating the sum of the discrete degree characterization value and the regularity evaluation coefficient of the fluctuation range to obtain the second retention degree of the fluctuation range; because both the discrete degree characterization value and the regularity evaluation coefficient can reflect the regular characteristics of the change of the fluctuation range, the larger the values ​​of the two are, the greater the second retention degree is; which means that the possibility that the data fluctuation within the fluctuation range is caused by noise is smaller, and the data in the fluctuation range should be retained.

[0106] Furthermore, a correction coefficient of the fluctuation range is obtained according to the first retention degree and the second retention degree, specifically including: calculating the sum of the first retention degree and the second retention degree to obtain the correction coefficient of the fluctuation range; when the first retention degree and the second retention degree of the fluctuation range are larger, it means that the possibility that the data sequence within the fluctuation range is the data that fluctuates due to noise is smaller, and the possibility that the data sequence within the fluctuation range is the data that fluctuates due to abnormal conditions caused by factors related to aquaculture water quality is greater, the data within the fluctuation range should be retained, and the larger the correction coefficient is, the higher the degree of adjustment of the preset threshold value is.

[0107] After obtaining the correction coefficient, the preset threshold value of the revolving door algorithm can be corrected according to the correction coefficient to obtain the adaptive threshold value. The water quality detection data sequence is compressed by the revolving door algorithm and the adaptive threshold value to complete the optimized collection. The specific process includes:

[0108] First, the ratio of the preset threshold value and the correction coefficient of the fluctuation range is calculated to obtain the adaptive threshold value of the fluctuation range.

[0109] Secondly, for each water quality detection data sequence, the adaptive threshold value of each fluctuation range in each subsequence in each water quality detection data sequence is calculated respectively; all subsequences divided by each water quality detection data sequence are used as input, and the revolving door algorithm is used for data compression. Among them, for the data corresponding to the fluctuation range whose correction coefficient is greater than the preset correction threshold, the preset threshold value is replaced by the adaptive threshold value of the fluctuation range for compression.

[0110] At the same time, for the data corresponding to the fluctuation range whose correction coefficient is less than or equal to the preset correction threshold, the revolving door algorithm is used to compress the data based on the preset threshold value; for the detection data in the subsequence that is not within the fluctuation range, the data is arranged in chronological order to obtain a compressed sequence, which is also compressed based on the preset threshold value using the revolving door algorithm.

[0111] Afterwards, the compression results of all subsequences in each water quality detection data sequence are used as the optimized collection results of each water quality detection data sequence, and are saved together with the collected water samples corresponding to each water quality detection data sequence.

[0112] In the embodiment of the present application, the preset threshold value is set to 1, and the preset correction threshold value is 2. The implementer can determine it according to the implementation scenario. When the preset correction threshold value is exceeded, it means that the preset threshold value of the fluctuation range needs to be corrected, and the adaptive threshold value is used for compression. Because the smaller the threshold value, the more compressed retained data, the ratio of the preset threshold value and the correction coefficient is used as the adaptive threshold value. For the case where the data is less than the preset correction threshold value, the preset threshold value is used for compression, and finally the data sequence is compressed through different adaptive threshold values, while ensuring the overall compression efficiency, the data retention degree reflecting the abnormal situation is improved.

[0113] Step S5, determining the environmental monitoring result at the sampling point based on the optimized collection result of each water quality detection data sequence at the sampling point.

[0114] Furthermore, an anomaly detection algorithm is used to perform anomaly detection on the optimized collection results of each water quality detection data sequence. Based on the anomaly detection results, it is analyzed whether the aquaculture environment meets the standards and the results of environmental monitoring are determined. In this way, it can not only ensure that the environmental monitoring results are consistent with the actual situation, but also improve the detection efficiency of water quality detection data sequences of multiple sampling points through data compression.

[0115] Specifically, the optimized collection results of each water quality detection data sequence of each sampling point are used as the input of the anomaly detection algorithm, and the anomaly detection algorithm is used to output the abnormal points in the optimized collection results, and all abnormal points in the same water quality detection data sequence in each sampling point are counted, and all abnormal points are compared with each water quality detection standard interval, and the ratio of the number of abnormal points that are not located in the standard interval to the number of all abnormal points is used as the unqualified breeding environment reflected by each water quality at each sampling point. Among them, the anomaly detection algorithm is a commonly used technology for data processing, including but not limited to the outlier factor detection LOF algorithm, the probabilistic suffix tree PST algorithm, and the statistical-based abnormal data detection method. Preferably, in the embodiment of the present application, the LOF algorithm is used to obtain the abnormal points in the optimized collection results.

[0116] It should be noted that the above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

[0117] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for monitoring aquaculture environment based on Internet of Things technology, characterized in that: The method comprises the following steps: Collect water samples at each sampling point in the reservoir, obtain a water quality detection data sequence of the collected water samples, and divide the water quality detection data sequence into multiple subsequences according to extreme value points in the water quality detection data sequence; Determine the mutation point in the subsequence based on the difference in the increase and decrease trends between adjacent data points in the subsequence, determine the fluctuation range of the subsequence based on the overlap of the mutation points within the window range taken by the mutation points; obtain the first retention degree of the fluctuation range based on the distance characteristics between the mutation points within the fluctuation range; Determine the discrete degree characterization value of each fluctuation range based on the position distance characteristics of the mutation point within each fluctuation range on the fitting curve of the data points within each fluctuation range; Determine the regularity evaluation coefficient of each fluctuation range based on the number of data points in the longest residual subsequence obtained by data decomposition within each fluctuation range and the regularity of changes between adjacent data points, and use the sum of the discrete degree characterization value and the regularity evaluation coefficient as the second retention degree for determining each fluctuation range; and use the sum of the first retention degree and the second retention degree of each fluctuation range as the correction coefficient of each fluctuation range; The preset threshold value of the revolving door algorithm is corrected according to the correction coefficient to obtain an adaptive threshold value, and the revolving door algorithm is used to compress the water quality detection data sequence based on the adaptive threshold value to obtain an optimized collection result; Determine environmental monitoring results based on optimized collection results of water quality test data series; The step of obtaining a first preservation degree of the fluctuation range based on the distance feature between mutation points within the fluctuation range comprises: Taking the positive correlation mapping result of the quantity value of the data points within each fluctuation range as the range characterization value of each fluctuation range, and calculating the product of the range characterization value and the preset first weight to obtain the range weight; Calculate the average value of the number of data points between two adjacent mutation points in each fluctuation range and perform positive correlation mapping to obtain a spacing characterization value for each fluctuation range, and calculate the product of the spacing characterization value and a preset second weight to obtain a spacing weight; Taking the sum of the range weight and the spacing weight as the first retention degree of each fluctuation range; The step of determining the discrete degree characterization value of each fluctuation range based on the position distance characteristics of the mutation point in each fluctuation range on the fitting curve of the data points in each fluctuation range comprises: Perform curve fitting on the data points within each fluctuation range to obtain a second fitting curve; Calculate the absolute value of the difference between the abscissas of all adjacent single wave peaks in the second fitting curve to obtain the peak spacing value; calculate the absolute value of the difference between the ordinates of the peak and the trough of each single wave in the second fitting curve to obtain the waveform amplitude value; Calculating the sum of the standard deviation of all the wave peak spacing values ​​and the standard deviation of all the waveform amplitude values ​​in the second fitting curve as a fluctuation discrete value, performing negative correlation mapping on the fluctuation discrete value, and obtaining a discrete degree characterization value of the fluctuation range; The step of determining the regularity evaluation coefficient of each fluctuation range based on the number of data points in the longest residual subsequence obtained by decomposing the data within each fluctuation range and the regularity of changes between adjacent data points comprises: The data sequence within the fluctuation range is decomposed by the STL algorithm to obtain the residual sequence. The data points in the residual sequence are used as input, and the AP clustering algorithm is used to divide the data points in the residual sequence into different clusters. The data points in the cluster with the largest number of data points are arranged according to time to obtain the longest residual subsequence. Obtain the regular evaluation coefficient of the fluctuation range based on the length characteristics and change characteristics of the longest residual subsequence; The step of obtaining a regularity evaluation coefficient of a fluctuation range according to the length characteristics and variation characteristics of the longest residual subsequence comprises: Calculate the slope between each data point and other adjacent data points in the longest residual subsequence as the slope representation value of each data point; The cumulative sum of the absolute values ​​of the slope representation values ​​of all data points in the longest residual subsequence is taken as the overall slope representation value of the longest residual subsequence; Calculate the absolute values ​​of the differences in the slope representation values ​​between all adjacent data points in the longest residual subsequence and add them up to obtain the adjacent slope difference values ​​of the longest residual subsequence; Calculating the sum of the overall slope representation value and the adjacent slope difference values ​​to obtain the deviation degree of the longest residual subsequence, and using the negative correlation mapping result of the deviation degree as the flatness value of the longest residual subsequence; Positive correlation mapping is performed on the quantity values ​​of the data points in the longest residual subsequence, and the sum of the mapping result of the positive correlation mapping and the flatness value is used as a regularity evaluation coefficient of the fluctuation range.

2. The aquaculture environment monitoring method based on Internet of Things technology according to claim 1 is characterized in that: The step of dividing the water quality detection data sequence into a plurality of subsequences according to the extreme value points in the water quality detection data sequence comprises: Performing curve fitting on the data points in each water quality detection data sequence to obtain a first fitting curve; The extreme value points on the first fitting curve are used as segmentation points; and each water quality detection data sequence is segmented according to the segmentation points to obtain multiple subsequences of each water quality detection data sequence.

3. The aquaculture environment monitoring method based on Internet of Things technology according to claim 1 is characterized in that: The steps of determining the mutation point in the subsequence based on the difference in the increase and decrease trends between adjacent data points in the subsequence, and determining the fluctuation range of the subsequence based on the overlap of the mutation points within the window range taken by the mutation points include: Calculating the numerical difference between each data point in the subsequence and the previous adjacent data point to obtain the previous adjacent difference of each data point; calculating the numerical difference between the data point in the subsequence and the next adjacent data point to obtain the next adjacent difference of each data point; calculating the ratio of the previous adjacent difference to the next adjacent difference as the fluctuation characterization value of each data point; when the fluctuation characterization value is greater than 0, taking the corresponding data point as a mutation point; For any mutation point in the subsequence, for any mutation point in the subsequence, each mutation point and other mutation points within a preset neighborhood range form a fluctuation subinterval; Obtain all fluctuation sub-intervals in the subsequence, merge any two fluctuation sub-intervals containing the same mutation point, until there is no mutation point that is the same as other fluctuation sub-intervals in the fused fluctuation range; obtain the moments corresponding to the two endpoints in each fluctuation sub-interval containing the same mutation point, and use the two moments that determine the longest time interval among all the moments as the starting moment and the ending moment, and use the interval determined by the data points corresponding to the starting moment and the ending moment as the endpoints as the fluctuation interval.

4. The aquaculture environment monitoring method based on Internet of Things technology according to claim 1 is characterized in that: The step of correcting the preset threshold value of the revolving door algorithm according to the correction coefficient to obtain an adaptive threshold value comprises: The ratio of the preset threshold value to the correction coefficient of the fluctuation range of each fluctuation range is used as the adaptive threshold value of each fluctuation range.

5. The aquaculture environment monitoring method based on Internet of Things technology according to claim 1 is characterized in that: The step of compressing the water quality detection data sequence using the revolving door algorithm based on the adaptive threshold value includes: Calculate the adaptive threshold value of each fluctuation range in each subsequence in each water quality detection data sequence respectively; take all subsequences divided by each water quality detection data sequence as input; For data corresponding to a fluctuation range whose correction coefficient is greater than a preset correction threshold, the preset threshold value is replaced with an adaptive threshold value of the fluctuation range for compression; For data corresponding to the fluctuation range where the correction coefficient is less than or equal to the preset correction threshold, the revolving door algorithm is used to compress the data based on the preset threshold value; For the detection data in the subsequence that are not within the fluctuation range, they are arranged in chronological order to obtain a compressed sequence, and compressed based on a preset threshold value using a revolving door algorithm.

6. The aquaculture environment monitoring method based on Internet of Things technology according to claim 1 is characterized in that: The step of determining the environmental monitoring result based on the optimized collection result of the water quality detection data sequence comprises: Taking the optimized collection results of each water quality detection data sequence of each sampling point as input of the anomaly detection algorithm, and using the anomaly detection algorithm to output the abnormal points in the optimized collection results; All abnormal points in the same water quality detection data sequence at each sampling point are counted, and all the abnormal points are compared with the standard interval of each water quality detection. The ratio of the number of abnormal points not in the standard interval to the number of all abnormal points is taken as the unqualified rate of aquaculture environment reflected by each water quality at each sampling point.

Citation Information

Patent Citations

  • User behavior prediction method based on smart kitchen multi-source data fusion

    CN118134539A

  • Aquaculture water quality monitoring method and system based on big data

    CN118169351A