Red tide prediction model acquisition method, red tide prediction method, device, terminal and computer storage medium

By removing outliers from chlorophyll-related data and reconstructing the data, and constructing training and test sets, the problem of low accuracy of remote sensing data was solved and the accuracy of the red tide prediction model was improved.

CN120316489BActive Publication Date: 2025-10-03SECOND INST OF OCEANOGRAPHY MNR
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510787292.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-10-03
Estimated Expiration
2045-06-13

AI Technical Summary

Technical Problem

The accuracy of red tide prediction based on remote sensing data in existing technologies is low, mainly because the influence of marine environment and atmospheric conditions leads to reduced accuracy of remote sensing data, which in turn affects the prediction accuracy of the model.

Method used

By obtaining chlorophyll-related data, eliminating outliers, reconstructing data, building training sets and test sets, training red tide prediction models, and processing data using wavelet transform and inverse wavelet transform, the continuity and accuracy of the data can be improved.

Benefits of technology

The accuracy of the red tide prediction model was improved, the impact of missing data on model training was reduced, and a higher red tide prediction accuracy was achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316489B_ABST
    Figure CN120316489B_ABST
Patent Text Reader

Abstract

The present application provides a method for obtaining a red tide prediction model, a red tide prediction method, a device, a terminal, and a computer storage medium. The method comprises: obtaining chlorophyll-related data within a preset time period; removing outliers from the chlorophyll-related data using a preset data processing strategy, and synthesizing the removed chlorophyll-related data into data to be processed; decomposing and reconstructing the data to be processed based on the temporal variation characteristics of the data to be processed to obtain reconstructed data; constructing a training set and a test set based on the reconstructed data; training a preset red tide prediction initial model based on the training set, and testing the trained red tide prediction initial model based on the test set to obtain a red tide prediction model. By removing outliers from the chlorophyll-related data and reconstructing the data to obtain data for training the model, the prediction accuracy of the red tide prediction model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of ocean monitoring and relates to a red tide prediction technology, and in particular to a red tide prediction model acquisition method, a red tide prediction method, a device, a terminal and a computer storage medium. Background Art

[0002] Red tides are ecological phenomena characterized by the explosive growth or accumulation of plankton in the ocean. It's important to note that the massive growth of plankton during a red tide depletes dissolved oxygen in the water, suffocating marine life and disrupting the balance of the marine ecosystem, impacting coastal aquaculture and tourism. Therefore, accurate prediction of red tides is crucial in ocean monitoring.

[0003] In existing technologies, red tide predictions are typically based on remote sensing data of the marine environment related to chlorophyll concentration, such as chlorophyll concentration, seawater pH, dissolved oxygen content, seawater turbidity, salinity, wind speed, Ekman component, and precipitation. These data are used to predict changes in chlorophyll concentration to reflect the probability of a red tide. However, due to the complexity and variability of the marine environment, waves, foam, and sea ice covering the sea surface can affect the acquisition of remote sensing signals, thereby affecting the accuracy of remote sensing data. Furthermore, atmospheric conditions, such as cloud cover, atmospheric scattering, and absorption, can also cause deviations between the collected remote sensing data and the actual marine environment. This reduces the accuracy of the collected remote sensing data, leading to lower accuracy in red tide predictions.

[0004] Therefore, how to achieve high-accuracy red tide prediction is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide a red tide prediction model acquisition method, red tide prediction method, device, terminal and computer storage medium, which are used to solve the problem in the existing technology that the accuracy of chlorophyll-related data is poor, which leads to poor accuracy of the trained model and further leads to low accuracy of red tide prediction.

[0006] In the first aspect, the present application provides a method for obtaining a red tide prediction model, comprising: obtaining chlorophyll-related data within a preset time period; the chlorophyll-related data is a set of chlorophyll-related time values ​​corresponding to each chlorophyll-related factor at each hour within the preset time period; through a preset data processing strategy, outliers in the chlorophyll-related data are eliminated, and the chlorophyll-related data after elimination are integrated into data to be processed, and the data to be processed is a set of chlorophyll-related daily values ​​corresponding to each chlorophyll-related factor at each day within the preset time period; based on the time series variation characteristics of the data to be processed, the data to be processed is decomposed and reconstructed to obtain reconstructed data that characterizes the continuity of each chlorophyll-related factor in the time series distribution; based on the reconstructed data, a training set and a test set are constructed; based on the training set, a preset red tide prediction initial model is trained, and based on the test set, the trained red tide prediction initial model is tested, so that the red tide prediction initial model that passes the test is used as the red tide prediction model.

[0007] In one embodiment of the present application, the data to be processed is decomposed and reconstructed based on the time series variation characteristics of the data to be processed to obtain reconstructed data that characterizes the continuity of each chlorophyll-related factor in the time series distribution, including: based on a preset number of decomposition layers, an iterative method is used to perform a wavelet transform on the data to be processed to obtain approximate coefficients in the data to be processed; based on the approximate coefficients, an inverse wavelet transform is performed to obtain the reconstructed data.

[0008] In one embodiment of the present application, the wavelet transform is performed on the data to be processed in an iterative manner. When executing a single iteration, it includes: obtaining the current decomposition layer number and the current data to be processed; convolving the current data to be processed based on a preset low-pass filter to obtain the corresponding low-frequency component coefficient; if the current decomposition layer number is the preset decomposition layer number, the low-frequency component coefficient is used as the approximate coefficient; otherwise, new current data to be processed is obtained based on the low-frequency component coefficient, and an incremental operation is performed on the current decomposition layer number to obtain a new current decomposition layer number, so as to re-obtain new low-frequency component coefficients based on the new current data to be processed and the current decomposition layer number.

[0009] In one embodiment of the present application, constructing a training set and a test set based on the reconstructed data includes: dividing the preset time period into a training time period and a test time period based on the test data division method; based on the training time period, using a sliding window method, extracting a number of training sub-data from the reconstructed data, and using the set of each training sub-data as the training set; based on the test time period, using a sliding window method, extracting a number of test sub-data from the reconstructed data, and using the set of each test sub-data as the test set.

[0010] In one embodiment of the present application, the abnormal values ​​in the chlorophyll-related data are eliminated through a preset data processing strategy, including: for each day within the preset time period, obtaining the number of the chlorophyll-related time values ​​within the day, if the number is less than the preset number, deleting the corresponding chlorophyll-related time values ​​within the day; and / or, for each chlorophyll-related time value, based on a preset numerical range, deleting each chlorophyll-related time value outside the numerical range; and / or, for any chlorophyll-related time value, obtaining each chlorophyll-related time value within several hours before and after, all as comparison values; if the chlorophyll-related time value is greater than each comparison value, and the difference with each comparison value is greater than a preset difference threshold, deleting the chlorophyll-related time value.

[0011] In one embodiment of the present application, the number of the red tide prediction initial models can also be multiple; after the trained red tide prediction initial model is tested based on the test set to use the red tide prediction initial model that has passed the test as the red tide prediction model, it also includes: for any of the red tide prediction models, based on the test set, obtaining each prediction data corresponding to each test data in the test set; obtaining the chlorophyll-related data of the corresponding time of each prediction data, and obtaining actual data based on the chlorophyll-related data; obtaining the prediction error of the red tide prediction model based on the prediction data and actual data at each corresponding time; and extracting the red tide prediction model with the smallest prediction error among the red tide prediction models as the final red tide prediction model.

[0012] In one embodiment of the present application, the trained red tide prediction initial model is tested based on the test set to use the tested red tide prediction initial model as the red tide prediction model, including: based on the test set, prediction is performed by the trained red tide prediction initial model to obtain each prediction data; chlorophyll-related data of the corresponding time of each prediction data is obtained, and actual data is obtained based on the chlorophyll-related data; based on the prediction data and the actual data at each corresponding time, the mean square error and R square are obtained; if the mean square error is within the preset mean square error range, and the R square is within the preset R square range, then the trained red tide prediction initial model passes the test and is used as the red tide prediction model.

[0013] In a second aspect, the present application provides a red tide prediction method, comprising: obtaining chlorophyll-related data for the current time period, and obtaining a red tide prediction result for the time to be predicted through a red tide prediction model; wherein the red tide prediction model is a model obtained based on the red tide prediction model acquisition method as described above.

[0014] In the third aspect, the present application provides a method including a data acquisition module, a preprocessing module, a data reconstruction module and a model training module; the data acquisition module is used to acquire chlorophyll-related data within a preset time period; the chlorophyll-related data is a collection of chlorophyll-related time values ​​corresponding to each chlorophyll-related factor in each hour within the preset time period; the preprocessing module is used to eliminate abnormal values ​​in the chlorophyll-related data through a preset data processing strategy, and integrate the eliminated chlorophyll-related data into data to be processed, and the data to be processed is the chlorophyll-related time value of each chlorophyll-related factor in the preset time period. A set of chlorophyll correlation daily values ​​corresponding to the correlation factors on each day; the data reconstruction module is used to decompose and reconstruct the data to be processed based on the time series change characteristics of the data to be processed, so as to obtain reconstructed data that characterizes the continuity of each chlorophyll correlation factor in the time series distribution; the model training module is used to construct a training set and a test set based on the reconstructed data; the preset red tide prediction initial model is trained based on the training set, and the trained red tide prediction initial model is tested based on the test set, so that the red tide prediction initial model that passes the test is used as the red tide prediction model.

[0015] In a fourth aspect, the present application provides a terminal comprising: a processor and a memory, wherein the memory is communicatively connected to the processor; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes the red tide prediction model acquisition method as described above or the red tide prediction method as described above.

[0016] In a fifth aspect, the present application provides a computer storage medium storing a computer program, which, when executed by a processor, implements the red tide prediction model acquisition method and the red tide prediction method as described above.

[0017] As described above, the present application provides a red tide prediction model acquisition method, red tide prediction method, device, terminal and computer storage medium, which eliminates outliers in chlorophyll-related data through a data processing strategy, and reconstructs the data based on the data after eliminating the outliers to obtain data for training the model. While avoiding the influence of outliers in the data on the accuracy of the model, it reduces the impact of data missing on the model training process, thereby obtaining a red tide prediction model with high accuracy and good prediction effect, and predicts red tide conditions based on the red tide prediction model, effectively improving the accuracy of red tide prediction, and thus achieving better ocean monitoring effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Shown is a flow chart of a method for obtaining a red tide prediction model described in an embodiment of the present application.

[0019] Figure 2 Shown is a flow chart of a method for screening and eliminating chlorophyll-related data according to an embodiment of the present application.

[0020] Figure 3 Shown is a schematic diagram of a process of decomposing and reconstructing data to be processed according to an embodiment of the present application.

[0021] Figure 4 Shown is a flowchart of a single iteration execution in a process of obtaining an approximate coefficient according to an embodiment of the present application.

[0022] Figure 5 Shown is a flow chart of a method for obtaining a training set and a test set as described in an embodiment of the present application.

[0023] Figure 6 Shown is a flow chart of a method for testing an initial model for red tide prediction as described in an embodiment of the present application.

[0024] Figure 7 Shown is a flow chart of a method for selecting a red tide prediction model described in an embodiment of the present application.

[0025] Figure 8 Shown is a structural schematic diagram of a red tide prediction model acquisition device described in an embodiment of the present application.

[0026] Figure 9 Shown is a structural schematic diagram of a terminal described in an embodiment of the present application.

[0027] Description of Reference Numerals

[0028] 51: Data acquisition module; 52: Preprocessing module; 53: Data reconstruction module; 54: Model training module; 60: Terminal; 61: Processor; 62: Memory; 621: Operating system; 622: Application; 63: User interface; 64: Network interface; 65: Bus system. DETAILED DESCRIPTION

[0029] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0030] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. Therefore, the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0031] Existing red tide prediction methods often use remote sensing data to predict changes in chlorophyll concentration to reflect the probability of a red tide. However, the remote sensing data used to train big data models is susceptible to changes in ocean and atmospheric conditions, resulting in low accuracy in remote sensing data. Consequently, the prediction results from the trained big data models are also inaccurate, making them unable to meet the practical application requirements of red tide prediction.

[0032] In response to the technical problems existing in the prior art, the following embodiments of the present application provide a red tide prediction model acquisition method, a red tide prediction method, a device, a terminal and a computer storage medium. Through a preset data processing strategy, outliers in chlorophyll-related data are eliminated, data to be processed is obtained, and the data to be processed is reconstructed to serve as the data required for model training. Since the reconstructed data has eliminated outliers, the data accuracy is high, thereby making the training and acquisition of the red tide prediction model more accurate, thereby achieving a good red tide prediction effect.

[0033] The following embodiments of the present application provide a red tide prediction model acquisition method, red tide prediction method, device, terminal and computer storage medium, including but not limited to the prediction of the probability of red tide occurrence in the ocean. The following will be described using the example of training a model based on remote sensing data.

[0034] The technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings in the embodiments of the present application.

[0035] like Figure 1 As shown, this embodiment provides a red tide prediction method, including:

[0036] S100: Acquire chlorophyll-related data within a preset time period.

[0037] The chlorophyll association data is a collection of chlorophyll association time values ​​corresponding to each chlorophyll association factor in each hour within the preset time period, and each chlorophyll association factor is a factor associated with the proliferation or decrease of marine plankton within one hour.

[0038] Specifically, the value of each factor corresponding to a specific time point within the hour is used as the hour value corresponding to the hour. Exemplarily, the specific time point is the middle moment of the hour.

[0039] The chlorophyll-related data within the preset time period is the chlorophyll-related data within a time range set based on actual needs. For example, the chlorophyll-related data within the preset time period is the chlorophyll-related data within 10 years prior to the current time point. It should be noted that the chlorophyll-related data includes data related to different dominant algae species to meet the predicted demand for different dominant algae species.

[0040] The model is trained based on these data so that the model can extract the law of chlorophyll concentration changes, thereby obtaining a red tide prediction model and realizing red tide prediction.

[0041] Exemplarily, the chlorophyll-associated factor includes chlorophyll concentration, or each of the chlorophyll-associated factors includes chlorophyll concentration, seawater pH, seawater dissolved oxygen content, seawater turbidity, salinity, wind speed, Ekman component, and precipitation. Preferably, in this embodiment, each of the chlorophyll-associated factors includes chlorophyll concentration data, seawater pH data, seawater dissolved oxygen content data, seawater turbidity data, and salinity data. Training the model with multiple data avoids misjudgment of the model due to changes in chlorophyll concentration due to factors such as seasonal fluctuations, thereby improving the accuracy of the trained model.

[0042] It should be noted that the chlorophyll-related data can be directly obtained from satellite observation data of various domestic observatories without complex calculations, so as to reduce the amount of calculation, improve efficiency, and be conducive to the domestic application of the red tide prediction method provided in this embodiment.

[0043] S200 , removing abnormal values ​​from the chlorophyll-related data through a preset data processing strategy, and integrating the chlorophyll-related data after removal into data to be processed.

[0044] The data to be processed is a set of chlorophyll-related daily values ​​corresponding to each chlorophyll-related factor on each day within the preset time period.

[0045] Exemplarily, the chlorophyll-associated daily value is the average value of the chlorophyll-associated time values ​​within the same day. Specifically, based on the chlorophyll-associated time values ​​within a day, the corresponding average value within the day is obtained as the data to be processed.

[0046] It should be noted that since the number of marine plankton fluctuates within a day, and this fluctuation has nothing to do with whether a red tide occurs, the subsequent steps are performed by correlating the chlorophyll daily value to avoid the fluctuation of the number of marine plankton within a day from affecting the training results of the model, thereby improving the accuracy of the obtained red tide prediction model.

[0047] Furthermore, since changes in the ocean environment and atmospheric conditions will affect the accuracy of the chlorophyll-related data, and the data corresponding to certain time points are missing, in order to avoid the impact of abnormal data on subsequent model training, in this embodiment, outliers are eliminated through the preset data processing strategy.

[0048] The data processing strategy is a data screening and elimination method based on natural laws or experience.

[0049] For example, Figure 2 As shown, the screening and elimination methods of the chlorophyll-related data include:

[0050] S210 , for each day within the preset time period, obtaining the number of the chlorophyll-associated time values ​​within the day; if the number is less than a preset number, deleting each chlorophyll-associated time value within the day.

[0051] It should be noted that when there is a lot of missing data in a day, it is difficult to obtain complete data within the unit time period based on the remaining hourly values, and due to the fluctuation of the number of marine plankton within a day, the daily value obtained based on the remaining hourly values ​​may be wrong in the deviation. Based on this, in order to ensure the accuracy of the data to be processed, all the chlorophyll-related time values ​​within the day are eliminated.

[0052] Exemplarily, the preset number is 19, that is, the number of missing chlorophyll-associated time values ​​per day cannot exceed 5, otherwise all the chlorophyll-associated time values ​​of that day will be deleted.

[0053] S220 , for each of the chlorophyll-associated time values, based on a preset numerical range, deleting each of the chlorophyll-associated time values ​​outside the numerical range.

[0054] The numerical range is the range of the chlorophyll-associated time value under normal circumstances, set based on experience or natural laws. For example, taking the chlorophyll concentration data as an example, the hourly value of the chlorophyll concentration data should normally be a positive number not exceeding 5000 μg / L. Based on this, the numerical range corresponding to the chlorophyll concentration data is set to (0, 5000 μg / L).

[0055] It should be noted that the numerical range corresponding to the chlorophyll concentration data is given above only as an example. Those skilled in the art should be aware of the setting method of the numerical range corresponding to each chlorophyll-related data, and this embodiment will not be specifically described or listed here.

[0056] S230, for any of the chlorophyll-associated time values, obtain the chlorophyll-associated time values ​​within several hours before and after, and use them as comparison values; if the chlorophyll-associated time value is greater than the comparison values, and the difference between the chlorophyll-associated time value and the comparison values ​​is greater than the preset difference threshold, delete the chlorophyll-associated time value.

[0057] Exemplarily, the chlorophyll-related time values ​​within two hours before and after are respectively obtained and used as comparison values.

[0058] The difference threshold is the maximum value of the difference between the chlorophyll associated time value and the chlorophyll associated time values ​​within several hours before and after under normal circumstances. For example, taking the chlorophyll concentration data as an example, the corresponding difference threshold is 40ug / L.

[0059] Based on this, taking the chlorophyll concentration data as an example, for any chlorophyll concentration hourly value, the chlorophyll concentration hourly values ​​within the two hours before and after are obtained respectively, that is, the first two chlorophyll concentration hourly values ​​of the chlorophyll concentration hourly value, and the last two chlorophyll concentration hourly values ​​of the chlorophyll concentration hourly value, as comparison values. If the chlorophyll concentration hourly value is greater than each comparison value, and the difference between the chlorophyll concentration hourly value and each comparison value is greater than 40ug / L, the chlorophyll concentration hourly value is deleted.

[0060] It is worth noting that the above only gives the difference threshold corresponding to the chlorophyll concentration data as an example. Those skilled in the art should know how to set the difference threshold corresponding to each chlorophyll-related data, and this embodiment will not be specifically described or listed here.

[0061] It should be noted that the chlorophyll-related data is actually continuously changing data. That is, each chlorophyll-related time value and the hourly values ​​within a period of time before and after it generally change relatively slowly. Based on this, if the chlorophyll-related time value shows a significant change compared to the chlorophyll-related time values ​​within several hours before and after it, the chlorophyll-related time value is actually an abnormally high value and the hourly value should be deleted. In other words, if the difference between the chlorophyll-related time value and each of the comparison values ​​is greater than a preset difference threshold, the chlorophyll-related time value is an abnormally high value and should be deleted.

[0062] It should be noted that the above steps S210-S230 are numbered only for ease of understanding and do not limit the actual execution order of the process of eliminating outliers in this embodiment.

[0063] S300 , based on the time series variation characteristics of the data to be processed, decompose and reconstruct the data to be processed to obtain reconstructed data.

[0064] The time series variation characteristics of the data to be processed are used to characterize the overall variation of the data over a long period of time, and the reconstructed data are used to characterize the continuous variation of the chlorophyll-related factor in the time series distribution.

[0065] When a red tide occurs, chlorophyll concentration fluctuates from low to high over a long period of time. When a red tide subsides, chlorophyll concentration fluctuates from high to low over a long period of time. Based on this, obtaining the changing trend of the data to be processed and reconstructing the data based on this trend helps deepen the correlation between the obtained reconstructed data and red tide, reduce data noise, and thus improve the trained model's prediction accuracy for red tide.

[0066] In some optional embodiments, such as Figure 3 As shown, the method of decomposing and reconstructing the data to be processed includes:

[0067] S310 , performing wavelet transform on the data to be processed in an iterative manner based on a preset number of decomposition layers to obtain approximate coefficients in the data to be processed.

[0068] The wavelet transform is to decompose and transform data into frequency domain information of different frequencies. For example, this embodiment adopts discrete wavelet transform.

[0069] The number of decomposition layers is the number of times the data to be processed is decomposed into different frequency components during the wavelet transform process of the data to be processed.

[0070] The approximation coefficient is used to characterize the low-frequency part of the data to be processed. Since the low-frequency component is usually used to characterize the overall change trend of the data, based on this, obtaining the approximation coefficient of the data to be processed can obtain the change trend of the data to be processed.

[0071] S320: Perform inverse wavelet transform based on the approximation coefficients to obtain the reconstructed data.

[0072] The inverse wavelet transform is the inverse process of the wavelet transform, that is, it restores the frequency domain information to the form of the original data. In this embodiment, the inverse wavelet transform is performed based on the approximate coefficients, and the approximate coefficients represent the changing trend of the data to be processed. Based on this, the data reconstructed by the inverse wavelet transform can highlight the overall changing trend of the data, thereby facilitating the acquisition of a model with higher prediction accuracy based on the reconstructed data.

[0073] For example, Figure 4 As shown, the process of obtaining the approximate coefficients, when performing a single iteration, includes:

[0074] S311, obtaining the current decomposition layer number and the current data to be processed; performing convolution on the current data to be processed based on a preset low-pass filter to obtain corresponding low-frequency component coefficients.

[0075] The low-pass filter is a filter used to capture low-frequency components of data in wavelet transform.

[0076] The low-pass filter is determined by the basis function selected during the wavelet transform. For example, in this embodiment, the wavelet basis function is the db4 basis function, and the low-pass filter is the corresponding low-pass filter. It should be noted that during the wavelet transform process, each layer has a set of low-pass filters and a set of high-pass filters, and the data is actually convolved with the high-pass filter corresponding to the wavelet basis function.

[0077] The low-frequency component coefficient is used to characterize the coefficient representing the relative low-frequency part of the data obtained during the current convolution process of the data based on the low-pass filter, that is, the low-frequency component coefficient represents information about whether the data rises or falls over a long period of time.

[0078] S312, if the current decomposition layer number is the preset decomposition layer number, the low-frequency component coefficient is used as the approximate coefficient; otherwise, new current data to be processed is obtained based on the low-frequency component coefficient, and an incremental operation is performed on the current decomposition layer number to obtain a new current decomposition layer number, so as to re-obtain new low-frequency component coefficients based on the new current data to be processed and the current decomposition layer number.

[0079] The current decomposition layer number refers to the sequence number of the current data decomposition process, that is, the total number of times the current data is decomposed.

[0080] The approximate coefficient is the coefficient corresponding to the low-frequency part after filtering with the highest decomposition layer. Based on this, if the decomposition layer number is the preset decomposition layer number, the low-frequency component coefficient obtained after convolution of the current data to be processed with the low-pass filter is obtained as the approximate coefficient. Otherwise, new current data to be processed is obtained based on the low-frequency component coefficient to re-execute steps S311-S312.

[0081] It should be noted that after removing outliers through the data processing strategy described above, this embodiment obtains the data to be processed. Due to the large amount of missing data, the accuracy of the resulting model is relatively poor when training the model based on the data to be processed. Based on this, this embodiment also decomposes and reconstructs the data to be processed to obtain the reconstructed data, thereby ensuring a sufficient amount of data for training and improving the accuracy of the resulting model. Furthermore, this embodiment decomposes and reconstructs the data based on its changing trend, which helps to deepen the correlation between the obtained reconstructed data and red tides and reduce data noise, thereby further improving the accuracy of the trained model in predicting red tides.

[0082] S400, constructing a training set and a test set based on the reconstructed data; training a preset red tide prediction initial model based on the training set, and testing the trained red tide prediction initial model based on the test set, so as to use the red tide prediction initial model that passes the test as the red tide prediction model.

[0083] Specifically, based on the reconstructed data, a sliding window is used to select each data set to obtain the training set and the test set for model training.

[0084] In some optional embodiments, such as Figure 5 As shown, the method for obtaining the training set and the test set includes:

[0085] S411: Divide the preset time period into a training time period and a test time period based on a test data division method.

[0086] Exemplarily, the test time period is one year before the current time point, and the training time period is the time outside the preset time period except the test time period.

[0087] S412 , based on the training time period, a sliding window method is adopted to extract a plurality of training sub-data from the reconstructed data, and a set of the training sub-data is used as the training set.

[0088] S413 , based on the test time period, a sliding window method is adopted to extract a plurality of test sub-data from the reconstructed data, and a set of the test sub-data is used as the test set.

[0089] Furthermore, a preset red tide prediction initial model is trained based on the training set. It should be noted that those skilled in the art should be aware of the specific training method of the red tide prediction initial model, which will not be specifically explained in this embodiment.

[0090] It should be noted that the execution method of obtaining each sub-data by using a sliding window is actually to obtain a window of a preset first time length, extract several time ranges by sliding, and obtain corresponding sub-data based on these time ranges to construct the training set and the test set.

[0091] Furthermore, the trained initial red tide prediction model is tested, so that the initial red tide prediction model that passes the test is used as the red tide prediction model.

[0092] In some optional embodiments, such as Figure 6 As shown, the testing method of the trained red tide prediction initial model includes:

[0093] S421, based on the test set, prediction is performed using the trained red tide prediction initial model to obtain various prediction data.

[0094] Specifically, each of the sub-data in the test set is input into the trained initial model for red tide prediction, and the initial model for red tide prediction performs inference to generate each of the prediction data.

[0095] Optionally, each of the predicted data is characterized by chlorophyll concentration. For example, if the predicted data is 2 ug / L, the chlorophyll concentration at the corresponding time is predicted to be 2 ug / L. It should be noted that when the predicted data is between 0-5 ug / L, it indicates that a red tide will not occur. When the predicted data is between 5-7 ug / L, it indicates that a red tide may occur and an early warning is required. When the predicted data is between 7-10 ug / L, it indicates that the probability of a red tide is very high and an alarm is required so that relevant personnel can handle it as soon as possible. Through the predicted data, the predicted situation of the red tide can be intuitively obtained, so that relevant personnel can take corresponding measures based on the predicted data.

[0096] S422, obtaining chlorophyll-related data at a time corresponding to each predicted data, and obtaining actual data based on the chlorophyll-related data; obtaining a mean square error and R-square based on the predicted data and the actual data at each corresponding time.

[0097] The actual data is used to represent the actual ocean conditions at the same time as the corresponding predicted data, and the expression form of the actual data corresponds to the predicted data, that is, if the predicted data is represented by chlorophyll concentration, the actual data is also chlorophyll concentration.

[0098] Based on this, the chlorophyll-related data corresponding to the time of each predicted data is obtained, namely the chlorophyll concentration, seawater pH value, seawater dissolved oxygen content, seawater turbidity, salinity, wind speed, Ekman component and precipitation data, so as to obtain whether a red tide occurs in the ocean at the corresponding time, that is, the actual data.

[0099] Furthermore, based on the corresponding predicted data and actual data, the mean square error and R square are calculated.

[0100] Exemplarily, the mean square error is calculated as follows:

[0101]

[0102]

[0103] in, is the mean square error, is the residual sum of squares, represents the number of predicted data, represents each of the predicted data, Indicates the actual data of each.

[0104] The R-squared is calculated as follows:

[0105]

[0106]

[0107] in, represents the total sum of squares, It represents the average value of each actual data.

[0108] The overall training status of the model is obtained through the mean square error, and the relative fitting status of the model is obtained through the R square, so as to obtain the comprehensive status of the model training and obtain a better model.

[0109] S423, if the mean square error is within the preset mean square error range, and the R square is within the preset R square range, then the trained red tide prediction initial model passes the test and serves as the red tide prediction model.

[0110] Among them, the mean square error range and the R-square range are both used to characterize the accuracy of the trained red tide prediction initial model. Specifically, the mean square error range and the R-square range are both numerical ranges set based on the model accuracy of actual needs.

[0111] Exemplarily, the mean square error range is [0.001-0.01], and the R-square range is [0.8-1].

[0112] Based on this, this embodiment can obtain a red tide prediction model with high accuracy for use in predicting marine red tides, thereby achieving better marine monitoring effects.

[0113] In some optional embodiments, in order to further improve the prediction accuracy of the red tide prediction model, in this embodiment, multiple red tide prediction initial models are trained simultaneously. For example, the preset red tide prediction initial models are four models, namely LSTM, LSTM-KAN, GRU, and GRU-KAN. The corresponding red tide prediction models are obtained based on the training set and the test set, and the best one among these red tide prediction models is selected as the final red tide prediction model.

[0114] Specifically, if Figure 7 As shown, the final red tide prediction model is selected in the following manner:

[0115] S431 , for any of the red tide prediction models, based on the test set, obtaining prediction data corresponding to the test data in the test set.

[0116] Specifically, referring to step S421, each sub-data in the test set is input into the trained initial red tide prediction model, and the initial red tide prediction model performs inference to generate each prediction data. The prediction data represents the probability of a red tide occurrence or the risk level of a red tide occurrence.

[0117] S432, obtaining chlorophyll-related data at the time corresponding to each of the predicted data, and obtaining actual data based on the chlorophyll-related data; and obtaining a prediction error of the red tide prediction model based on the predicted data and actual data at each corresponding time.

[0118] Wherein, please refer to the content of step S422, the actual data is used to represent the actual ocean conditions at the same time as the corresponding predicted data, and the expression form of the actual data corresponds to the predicted data.

[0119] Exemplarily, the prediction error is a root mean square error (RMS), which is calculated based on the corresponding predicted data and the actual data. Specifically, the RMS corresponding to the red tide prediction model is first obtained (see step S322 for details, which is not specifically limited in this embodiment); then, the RMS is calculated based on the RMS.

[0120] Exemplarily, the root mean square error is calculated as follows:

[0121]

[0122] in, is the root mean square error.

[0123] S433 , extracting the red tide prediction model with the smallest prediction error from among the red tide prediction models as the final red tide prediction model.

[0124] Obtain the root mean square error of each red tide prediction model. For example, when the preset red tide prediction initial models are LSTM, LSTM-KAN, GRU, and GRU-KAN, respectively, obtain the root mean square errors of the corresponding four red tide prediction models.

[0125] If the prediction error is a root mean square error, compare the root mean square errors, select the smallest root mean square error, and use the red tide prediction model corresponding to the root mean square error as the final red tide prediction model for performing subsequent red tide prediction steps.

[0126] On the other hand, this embodiment further provides a red tide prediction method, specifically including: obtaining chlorophyll-related data of a current time period, and obtaining a red tide prediction result of a time to be predicted through a red tide prediction model.

[0127] The red tide prediction model is a model obtained based on the red tide prediction model acquisition method as described above. Please refer to the above content for details, and this embodiment will not be described in detail here.

[0128] The red tide prediction result is actually the chlorophyll concentration at the predicted time. If the red tide prediction result is between 0-5 ug / L, it indicates that a red tide will not occur. If the red tide prediction result is between 5-7 ug / L, it indicates that a red tide may occur and an early warning is required. If the red tide prediction result is between 7-10 ug / L, it indicates that the probability of a red tide is high and an alarm is required so that relevant personnel can deal with it as soon as possible. Through the red tide prediction result, the prediction of the red tide can be intuitively obtained, so that relevant personnel can take corresponding measures based on the prediction data.

[0129] It should be noted that the length of the current time period corresponds to the predicted red tide prediction result. For example, if the red tide situation is predicted within the next day, the current time period is the current day; if the red tide situation is predicted within the next two days, the current time period is the current two days, and so on.

[0130] Based on this, this embodiment uses the red tide prediction model to predict red tides, which is simple to operate, convenient and efficient, and has a high accuracy in predicting red tides.

[0131] like Figure 8 As shown, a red tide prediction model acquisition device provided by this embodiment includes a data acquisition module 51, a preprocessing module 52, a data reconstruction module 53 and a model training module 54.

[0132] The data acquisition module 51 is used to acquire chlorophyll-related data within a preset time period; the chlorophyll-related data is a set of chlorophyll-related time values ​​corresponding to each hour within the preset time period;

[0133] The pre-processing module 52 is used to remove abnormal values ​​from the chlorophyll-related data through a preset data processing strategy, and integrate the chlorophyll-related data after removal into data to be processed, wherein the data to be processed is a collection of chlorophyll-related daily values ​​corresponding to each day within the preset time period;

[0134] The data reconstruction module 53 is used to decompose and reconstruct the data to be processed based on the time series change characteristics of the data to be processed, so as to obtain reconstructed data representing the continuous change of the chlorophyll association factor within the preset time period;

[0135] The model training module 54 is used to construct a training set and a test set based on the reconstructed data; train the preset red tide prediction initial model based on the training set, and test the trained red tide prediction initial model based on the test set, so as to use the red tide prediction initial model that passes the test as the red tide prediction model.

[0136] Based on the same technical concept, the red tide prediction method provided by the embodiment of the present invention can be implemented on the terminal side or the server side.

[0137] like Figure 9 FIG2 shows an optional hardware structure diagram of a terminal provided in an embodiment of the present invention. The terminal 60 can be a mobile phone, a computer, a tablet device, a personal digital assistant, a factory backend processing device, or the like. The terminal 60 includes at least one processor 61, a memory 62, at least one network interface 64, and a user interface 63. The various components in the device are coupled together via a bus system 65. It will be appreciated that the bus system 65 is used to enable communication between these components. In addition to a data bus, the bus system 65 also includes a power bus, a control bus, and a status signal bus.

[0138] The user interface 63 may include a display, a keyboard, a mouse, a trackball, a click gun, keys, buttons, a touch pad or a touch screen.

[0139] It will be appreciated that the memory 62 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM) or a programmable read-only memory (PROM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memory featured in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0140] The memory 62 in the embodiment of the present invention is used to store various categories of data to support the operation of the terminal. Examples of these data include: any executable program for operating on the terminal 60, such as an operating system 621 and an application 622; the operating system 621 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application 622 can include various applications, such as a media player (MediaPlayer), a browser (Browser), etc., for implementing various application services. The red tide prediction method provided by the embodiment of the present invention can be included in the application 622.

[0141] The method disclosed in the above embodiment of the present invention can be applied to the processor 61 or implemented by the processor 61. The processor 61 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the hardware integrated logic circuit in the processor 61 or by instructions in the form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 61 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The processor 61 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory. The processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0142] In an exemplary embodiment, the terminal 60 may be configured to execute the aforementioned method using one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs).

[0143] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when called by a processor, implements the red tide prediction method provided by the present invention.

[0144] Among them, a computer-readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. The computer-readable storage medium can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, and a mechanical encoding device.

[0145] The computer-readable program characterized herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0146] To sum up, this application eliminates outliers in chlorophyll-related data to avoid outliers affecting the accuracy of the trained model. It also reconstructs the data after eliminating outliers as the data required for model training to avoid excessive data missing and resulting in poor model training results, thereby obtaining a red tide prediction model with higher accuracy and better prediction effect, thereby achieving good red tide prediction results and having high industrial application value.

[0147] The descriptions of the processes or structures corresponding to the above figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0148] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical concepts disclosed in this application shall be covered by the claims of this application.

Claims

1. A method for obtaining a red tide prediction model, comprising: Obtain chlorophyll related data within a preset time period; The chlorophyll association data is a set of chlorophyll association time values ​​corresponding to each chlorophyll association factor at each hour within the preset time period; By using a preset data processing strategy, outliers in the chlorophyll-related data are eliminated, and the chlorophyll-related data after elimination are integrated into data to be processed, wherein the data to be processed is a collection of chlorophyll-related daily values ​​corresponding to each chlorophyll-related factor on each day within the preset time period; Decomposing and reconstructing the data to be processed based on the time series variation characteristics of the data to be processed to obtain reconstructed data representing the continuity of each chlorophyll-related factor in time series distribution; Constructing a training set and a test set based on the reconstructed data; Training a preset red tide prediction initial model based on the training set, and testing the trained red tide prediction initial model based on the test set, so as to use the red tide prediction initial model that passes the test as the red tide prediction model; The method of decomposing and reconstructing the data to be processed based on the time series variation characteristics of the data to be processed to obtain reconstructed data representing the continuity of the chlorophyll-related factors in the time series distribution includes: performing a wavelet transform on the data to be processed in an iterative manner based on a preset number of decomposition levels to obtain approximate coefficients in the data to be processed; performing an inverse wavelet transform based on the approximate coefficients to obtain the reconstructed data; the approximate coefficients representing the variation trend of the data to be processed; The wavelet transform is performed on the data to be processed in an iterative manner. When executing a single iteration, the method includes: obtaining the current decomposition layer number and the current data to be processed; convolving the current data to be processed based on a preset low-pass filter to obtain the corresponding low-frequency component coefficient; if the current decomposition layer number is the preset decomposition layer number, using the low-frequency component coefficient as the approximate coefficient; otherwise, obtaining new current data to be processed based on the low-frequency component coefficient, and performing an incremental operation on the current decomposition layer number to obtain a new current decomposition layer number, so as to re-obtain new low-frequency component coefficients based on the new current data to be processed and the current decomposition layer number.

2. The method for obtaining a red tide prediction model according to claim 1, wherein: The step of constructing a training set and a test set based on the reconstructed data includes: Dividing the preset time period into a training time period and a test time period based on the test data division method; Based on the training time period, a plurality of training sub-data are extracted from the reconstructed data in a sliding window manner, and a set of the training sub-data is used as the training set; Based on the test time period, a sliding window method is adopted to extract a plurality of test sub-data from the reconstructed data, and a set of the test sub-data is used as the test set.

3. The method for obtaining a red tide prediction model according to claim 1, wherein: The method of removing abnormal values ​​from the chlorophyll-related data by using a preset data processing strategy includes: For each day within the preset time period, obtaining the number of the chlorophyll-associated time values ​​within the day, and if the number is less than the preset number, deleting each of the chlorophyll-associated time values ​​within the day; and / or, for each of the chlorophyll-associated time values, based on a preset numerical range, deleting each of the chlorophyll-associated time values ​​outside the numerical range; And / or, for any of the chlorophyll-associated time values, obtain the chlorophyll-associated time values ​​within several hours before and after, and use them as comparison values; if the chlorophyll-associated time value is greater than the comparison values, and the difference with the comparison values ​​is greater than a preset difference threshold, delete the chlorophyll-associated time value.

4. The method for obtaining a red tide prediction model according to claim 1, wherein: There are multiple red tide prediction initial models; after testing the trained red tide prediction initial model based on the test set to use the red tide prediction initial model that has passed the test as the red tide prediction model, the method further includes: For any of the red tide prediction models, based on the test set, obtaining prediction data corresponding to each test data in the test set; Obtaining chlorophyll-related data at a time corresponding to each of the predicted data, and obtaining actual data based on the chlorophyll-related data; obtaining a prediction error of the red tide prediction model based on the predicted data and actual data at each corresponding time; Among the red tide prediction models, the red tide prediction model with the smallest prediction error is extracted as the final red tide prediction model.

5. The method for obtaining a red tide prediction model according to any one of claims 1 or 4, wherein: The step of testing the trained initial red tide prediction model based on the test set to use the tested initial red tide prediction model as the red tide prediction model includes: Based on the test set, prediction is performed using the trained red tide prediction initial model to obtain various prediction data; Obtaining chlorophyll-related data at a time corresponding to each predicted data, and obtaining actual data based on the chlorophyll-related data; obtaining a mean square error and R-square based on the predicted data and the actual data at each corresponding time; If the mean square error is within the preset mean square error range, and the R square is within the preset R square range, the trained red tide prediction initial model passes the test and serves as the red tide prediction model.

6. A red tide prediction method comprising: Obtain chlorophyll-related data for the current time period, and obtain the red tide prediction results for the time to be predicted through the red tide prediction model; The red tide prediction model is a model obtained based on the red tide prediction model acquisition method according to any one of claims 1 to 5.

7. A red tide prediction model acquisition device, characterized in that: Includes data acquisition module, preprocessing module, data reconstruction module and model training module; The data acquisition module is used to acquire chlorophyll-related data within a preset time period; the chlorophyll-related data is a collection of chlorophyll-related time values ​​corresponding to each chlorophyll-related factor at each hour within the preset time period; The preprocessing module is used to remove abnormal values ​​from the chlorophyll-related data through a preset data processing strategy, and integrate the chlorophyll-related data after removal into data to be processed, wherein the data to be processed is a collection of chlorophyll-related daily values ​​corresponding to each chlorophyll-related factor on each day within the preset time period; The data reconstruction module is configured to decompose and reconstruct the data to be processed based on the time series variation characteristics of the data to be processed, so as to obtain reconstructed data representing the continuity of each chlorophyll-related factor in time series distribution; The model training module is used to construct a training set and a test set based on the reconstructed data; Training a preset red tide prediction initial model based on the training set, and testing the trained red tide prediction initial model based on the test set, so as to use the red tide prediction initial model that passes the test as the red tide prediction model; The method of decomposing and reconstructing the data to be processed based on the time series variation characteristics of the data to be processed to obtain reconstructed data representing the continuity of the chlorophyll-related factors in the time series distribution includes: performing a wavelet transform on the data to be processed in an iterative manner based on a preset number of decomposition levels to obtain approximate coefficients in the data to be processed; performing an inverse wavelet transform based on the approximate coefficients to obtain the reconstructed data; the approximate coefficients representing the variation trend of the data to be processed; The wavelet transform is performed on the data to be processed in an iterative manner. When executing a single iteration, the method includes: obtaining the current decomposition layer number and the current data to be processed; convolving the current data to be processed based on a preset low-pass filter to obtain the corresponding low-frequency component coefficient; if the current decomposition layer number is the preset decomposition layer number, using the low-frequency component coefficient as the approximate coefficient; otherwise, obtaining new current data to be processed based on the low-frequency component coefficient, and performing an incremental operation on the current decomposition layer number to obtain a new current decomposition layer number, so as to re-obtain new low-frequency component coefficients based on the new current data to be processed and the current decomposition layer number.

8. A terminal, characterized in that: include: a processor and a memory, wherein the memory is communicatively connected to the processor; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes the red tide prediction model acquisition method according to any one of claims 1 to 5 or the red tide prediction method according to claim 6.

9. A computer storage medium storing a computer program, wherein: When the computer program is executed by a processor, the red tide prediction model acquisition method according to any one of claims 1 to 5 and the red tide prediction method according to claim 6 are implemented.

Citation Information

Patent Citations

  • Red tide early warning method

    CN109002888A

  • Internet of Things big data fusion processing platform

    CN119967037A