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

By preprocessing remote sensing data to remove outliers and reconstructing it using wavelet transforms, the method enhances the accuracy of red tide predictions, addressing the inaccuracies caused by environmental interference.

CN120316489AActive Publication Date: 2025-07-15SECOND INST OF OCEANOGRAPHY MNR
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the accuracy of red tide prediction based on remote sensing data is low, which mainly reduces the accuracy of remote sensing data due to the influence of marine environment and atmospheric conditions, which in turn affects the accuracy of red tide prediction.

Method used

By obtaining chlorophyll-related data, eliminating outliers, data reconstruction, building training sets and test sets, training red tide prediction model, and after eliminating outliers, wavelet transform and inverse wavelet transform are performed to obtain reconstructed data, improving the accuracy of data and reducing the impact of data loss on model training.

Benefits of technology

The accuracy of the red tide prediction model is improved, the higher red tide prediction effect is achieved, and the accuracy of ocean monitoring is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316489A_ABST
    Figure CN120316489A_ABST
Patent Text Reader

Abstract

The invention provides a red tide prediction model acquisition method and device, a red tide prediction method and device, a terminal and a computer storage medium, and the red tide prediction model acquisition method comprises the steps: obtaining chlorophyll associated data in a preset time period; eliminating abnormal values in the chlorophyll associated data through a preset data processing strategy, and synthesizing the chlorophyll associated data after elimination into to-be-processed data; based on the time sequence change characteristics of the to-be-processed data, decomposing and reconstructing the to-be-processed data to obtain reconstructed data; constructing a training set and a test set based on the reconstruction data; and 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. The abnormal values in the chlorophyll associated data are removed and reconstructed to obtain the data for training the model, so that 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] This application belongs to the field of ocean monitoring, and relates to a red tide prediction technology, in particular to a method for obtaining a red tide prediction model, a red tide prediction method, a device, a terminal, and a computer storage medium. Background Art

[0002] A red tide is an ecological phenomenon in which plankton in the ocean multiply or aggregate explosively. It should be noted that the massive reproduction of plankton during a red tide consumes the dissolved oxygen in the water body, leading to the asphyxiation death of marine organisms, disrupting the balance of the marine ecosystem, and affecting the coastal aquaculture and tourism industries. Based on this, accurate prediction of red tides is a crucial link in ocean monitoring.

[0003] In the prior art, the prediction of red tides is usually based on remote sensing data of the ocean environment related to chlorophyll concentration, such as chlorophyll concentration, seawater pH value, seawater dissolved oxygen content, seawater turbidity, salinity, wind speed, Ekman component, and precipitation, etc., to predict the change of chlorophyll concentration to reflect the probability of red tide occurrence. However, due to the complex and changeable ocean environment, the sea surface is covered by sea waves, foam, and sea ice, which will affect the acquisition of remote sensing signals, thereby affecting the accuracy of remote sensing data. Moreover, atmospheric conditions, such as cloud cover, scattering, and absorption of the atmosphere, will also cause the remote sensing data collected to deviate from the real ocean environment, that is, the accuracy of the remote sensing data collected is reduced, and further the prediction accuracy of red tides is relatively low.

[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 method for obtaining a red tide prediction model, a red tide prediction method, a device, a terminal, and a computer storage medium, which are used to solve the problem that the accuracy of chlorophyll-related data in the prior art is poor, resulting in poor accuracy of the trained model, and further leading to relatively low prediction accuracy of red tides.

[0006] In a first aspect, the present application provides a method for obtaining a red tide prediction model, including: obtaining chlorophyll-related data within a preset time period; the chlorophyll-related data is a set of chlorophyll-related time values corresponding to each hour of each chlorophyll-related factor within the preset time period; by means of a preset data processing strategy, removing outliers from the chlorophyll-related data, and synthesizing the removed chlorophyll-related data into data to be processed, the data to be processed is a set of chlorophyll-related daily values corresponding to each day of each chlorophyll-related factor within the preset time period; based on the temporal variation characteristics of the data to be processed, decomposing and reconstructing the data to be processed to obtain reconstructed data representing the continuity of each chlorophyll-related factor in the temporal distribution; based on the reconstructed data, constructing a training set and a test set; training a preset initial red tide prediction model based on the training set, and testing the trained initial red tide prediction model based on the test set, so as to use the initial red tide prediction model that passes the test as the red tide prediction model.

[0007] In an embodiment of the present application, the decomposing and reconstructing the data to be processed based on the temporal variation characteristics of the data to be processed to obtain reconstructed data representing the continuity of each chlorophyll-related factor in the temporal distribution includes: performing wavelet transform on the data to be processed in an iterative manner based on a preset decomposition level to obtain approximation coefficients in the data to be processed; performing inverse wavelet transform based on the approximation coefficients to obtain the reconstructed data.

[0008] In an embodiment of the present application, when performing wavelet transform on the data to be processed in an iterative manner, in a single iteration, it includes: obtaining the current decomposition level 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; if the current decomposition level is the preset decomposition level, taking the low-frequency component coefficients as the approximation coefficients; otherwise, obtaining new current data to be processed based on the low-frequency component coefficients, and performing an increment operation on the current decomposition level to obtain a new current decomposition level, so as to re-obtain new low-frequency component coefficients based on the new current data to be processed and the current decomposition level.

[0009] In an embodiment of the present application, the 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 a test data division method; based on the training time period, extracting a number of training sub-data from the reconstructed data in a sliding window manner, and taking the set of each training sub-data as the training set; based on the test time period, extracting a number of test sub-data from the reconstructed data in a sliding window manner, and taking the set of each test sub-data as the test set.

[0010] In an embodiment of the present application, removing outliers from the chlorophyll-related data through a preset data processing strategy includes: for each day within the preset time period, obtaining the number of the chlorophyll-related time values on that day, and if the number is less than a preset number, deleting each of the chlorophyll-related time values corresponding to that day; and / or, for each of the chlorophyll-related time values, based on a preset numerical range, deleting each of the chlorophyll-related time values outside the numerical range; and / or, for any one of the chlorophyll-related time values, respectively obtaining each of the chlorophyll-related time values within a certain number of hours before and after, and all of them are used as comparison values; if the chlorophyll-related time value is greater than each of the comparison values and the differences from each of the comparison values are all greater than a preset difference threshold, deleting the chlorophyll-related time value.

[0011] In an embodiment of the present application, the number of the initial red tide prediction models may also be multiple; after testing the trained initial red tide prediction models based on the test set and using the initial red tide prediction models that pass the test as red tide prediction models, it further includes: for any one 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 corresponding to the time of each prediction data, and obtaining the actual data based on the chlorophyll-related data; based on the prediction data and the actual data at each corresponding time, obtaining the prediction error of the red tide prediction model; among all the red tide prediction models, extracting the red tide prediction model with the smallest prediction error as the final red tide prediction model.

[0012] In an embodiment of the present application, testing the trained initial red tide prediction models based on the test set and using the initial red tide prediction models that pass the test as red tide prediction models includes: based on the test set, making predictions through the trained initial red tide prediction models to obtain each prediction data; obtaining the chlorophyll-related data corresponding to the time of each prediction data, and obtaining the actual data based on the chlorophyll-related data; based on the prediction data and the actual data at each corresponding time, obtaining the mean square error and R-squared; if the mean square error is within a preset mean square error range and the R-squared is within a preset R-squared range, then the trained initial red tide prediction 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, including: 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 at 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 each chlorophyll-related factor within 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 variation 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 as to use the red tide prediction initial model that passes the test 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, a red tide prediction method, an apparatus, a terminal and a computer storage medium. The outliers in the chlorophyll-related data are eliminated through a data processing strategy, and the data is reconstructed based on the data after the outliers are eliminated to obtain data for training the model. While avoiding the outliers in the data from affecting the accuracy of the model, the impact of data missing on the model training process is reduced, thereby obtaining a red tide prediction model with high accuracy and good prediction effect, and predicting the red tide situation based on the red tide prediction model, effectively improving the accuracy of the red tide prediction, and thus achieving better ocean monitoring effect. 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 It shows a schematic flow chart of a method for screening and eliminating chlorophyll-related data described in the embodiments of the present application.

[0020] Figure 3 It shows a schematic flow chart of a method for decomposing and reconstructing data to be processed described in the embodiments of the present application.

[0021] Figure 4 It shows a schematic flow chart of a single iteration execution in the process of obtaining an approximation coefficient described in the embodiments of the present application.

[0022] Figure 5 It shows a schematic flow chart of a method for obtaining a training set and a test set described in the embodiments of the present application.

[0023] Figure 6 It shows a schematic flow chart of a method for testing an initial red tide prediction model described in the embodiments of the present application.

[0024] Figure 7 It shows a schematic flow chart of a method for selecting a red tide prediction model described in the embodiments of the present application.

[0025] Figure 8 It shows a schematic structural diagram of a device for obtaining a red tide prediction model described in the embodiments of the present application.

[0026] Figure 9 It shows a schematic structural diagram of a terminal described in the embodiments of the present application.

[0027] Explanation 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 program; 63: User interface; 64: Network interface; 65: Bus system. Detailed implementation manners

[0029] The following uses specific specific examples to illustrate the implementation manners of the present application. 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 implementation manners. Various 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, without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[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, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0031] Existing red tide prediction methods often predict the change in chlorophyll concentration based on the acquired remote sensing data to reflect the probability of red tide occurrence. However, since the remote sensing data used to train the big data model is easily affected by the marine environment or atmospheric conditions, the accuracy of the remote sensing data is low, which in turn leads to the low accuracy of the prediction results of the trained big data model, which cannot meet the actual application needs 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, an apparatus, 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 data required for model training. Since the reconstructed data has eliminated outliers, the data accuracy is high, so that the accuracy of the red tide prediction model obtained by training is high, thereby achieving a good red tide prediction effect.

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

[0034] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the 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, obtaining 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 at 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 an hour.

[0038] Specifically, the value of each factor corresponding to a specific time point in 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 the time range set based on actual needs. Exemplarily, the chlorophyll-related data within the preset time period is the chlorophyll-related data within 10 years before the current time point. It should be noted that the chlorophyll-related data includes data related to different dominant algae species, so as to cope with the predicted needs of 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 association factor includes chlorophyll concentration, or each of the chlorophyll association factors includes chlorophyll concentration, seawater pH value, seawater dissolved oxygen content, seawater turbidity, salinity, wind speed, Ekman component and precipitation. Preferably, in this embodiment, each of the chlorophyll association factors includes chlorophyll concentration data, seawater pH value data, seawater dissolved oxygen content data, seawater turbidity data and salinity data, and the model is trained by multiple data to avoid misjudgment of the model due to changes in chlorophyll concentration due to seasonal fluctuations and other factors, 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 facilitate 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-associated daily values corresponding to each chlorophyll-associated factor on each day within the preset time period.

[0045] Exemplarily, the chlorophyll-associated day value is the average value of each chlorophyll-associated time value in the same day. Specifically, based on each chlorophyll-associated time value in a day, the corresponding average value in 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 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, obtain the number of the chlorophyll-associated time values within the day, and if the number is less than the preset number, delete the chlorophyll-associated time values within the corresponding day.

[0051] It should be noted that when there are more missing data in a day, it is difficult to obtain the complete data situation in the unit time period based on the remaining hourly values, and due to the fluctuation of the number of marine plankton in a day, the daily value obtained based on the remaining hourly values may be wrong. Based on this, in order to ensure the accuracy of the data to be processed, all the chlorophyll-related time values in that 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 are deleted.

[0053] S220: For each of the chlorophyll associated time values, based on a preset numerical range, delete 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 by experience or natural laws. For example, taking the chlorophyll concentration data as an example, the hourly value of the chlorophyll concentration data should be a positive number not exceeding 5000ug / L under normal circumstances. Based on this, the numerical range corresponding to the chlorophyll concentration data is set to (0, 5000ug / 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-related time values, obtain each of the chlorophyll-related time values within several hours before and after respectively, and all of them are used as comparison values. If the chlorophyll-related time value is greater than each of the comparison values, and the differences from each of the comparison values are all greater than a preset difference threshold, delete the chlorophyll-related time value.

[0057] Exemplarily, obtain each of the chlorophyll-related time values within two hours before and after respectively, and all of them are used as comparison values.

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

[0059] Based on this, taking the chlorophyll concentration data as an example, for any chlorophyll concentration hourly value, obtain the chlorophyll concentration hourly values within two hours before and after it respectively, that is, the first two chlorophyll concentration hourly values before this chlorophyll concentration hourly value, and the last two chlorophyll concentration hourly values after it, as comparison values. If this chlorophyll concentration hourly value is greater than each comparison value, and the differences from each comparison value are all greater than 40 ug / L, then delete this chlorophyll concentration hourly value.

[0060] It should be noted that only the difference threshold corresponding to the chlorophyll concentration data is given above exemplarily. Those skilled in the art should know the setting method of the difference threshold corresponding to each chlorophyll-related data, and this embodiment does not make specific explanations and listings here.

[0061] It should be noted that the chlorophyll-related data is actually continuously changing data, that is, each of the chlorophyll-related time values and the hourly values within a period of time before and after it usually changes relatively smoothly. Based on this, if the chlorophyll-related time value has a large change compared with each of the chlorophyll-related time values within several hours before and after it, then this chlorophyll-related time value is actually an abnormally high value, and this hourly value should be deleted, that is, if the differences between this chlorophyll-related time value and each of the comparison values are all greater than the preset difference threshold, this chlorophyll-related time value is an abnormally high value, and delete this chlorophyll-related time value.

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

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

[0064] Among them, the temporal 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 is used to characterize the continuous variation of the chlorophyll-related factors in the temporal distribution.

[0065] When a red tide occurs, the chlorophyll concentration changes from low to high over a relatively long period of time, and when the red tide disappears, the chlorophyll concentration changes from high to low over a relatively long period of time. Based on this, obtaining the change trend of the data to be processed and reconstructing the data based on this change trend are beneficial to deepening the correlation between the obtained reconstructed data and the red tide, and reducing data noise, thereby improving the prediction accuracy of the trained model for the red tide.

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

[0067] S310. Based on a preset decomposition level, perform wavelet transform on the data to be processed in an iterative manner to obtain the approximation coefficients in the data to be processed.

[0068] Among them, the wavelet transform decomposes and transforms the data into frequency domain information of different frequencies. Exemplarily, the discrete wavelet transform is used in this embodiment.

[0069] The decomposition level is the number of times the data to be processed is decomposed into different frequency components during the wavelet transform of the data to be processed. Exemplarily, the decomposition level is 4.

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

[0071] S320. Based on the approximation coefficients, perform inverse wavelet transform to obtain the reconstructed data.

[0072] Among them, the inverse wavelet transform is the inverse process of the wavelet transform, that is, restoring the frequency domain information to the form of the original data. In this embodiment, the inverse wavelet transform is performed based on the approximation coefficients, and the approximation coefficients characterize the change trend of the data to be processed. Based on this, the data reconstructed by the inverse wavelet transform can highlight the overall change trend of the data, thereby facilitating obtaining a model with higher prediction accuracy based on the reconstructed data.

[0073] Exemplarily, such as Figure 4 shown, in the process of obtaining the approximation coefficients, when performing a single iteration, it includes:

[0074] S311. Obtain the current decomposition level and the current data to be processed; perform convolution on the current data to be processed based on a preset low-pass filter to obtain the corresponding low-frequency component coefficients.

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

[0076] The low-pass filter is determined by the basis function selected during wavelet transform. Exemplarily, 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, there is a set of low-pass filters and a set of high-pass filters at each layer, and the data is actually also convolved with the high-pass filter corresponding to the wavelet basis function.

[0077] The low-frequency component coefficients are used to characterize the current convolution process of data based on the low-pass filter, and the coefficients obtained to represent the relatively low-frequency part of the data, that is, the low-frequency component coefficients represent the information of the data rising or falling over a long period of time.

[0078] S312. If the current decomposition level is the preset decomposition level, use the low-frequency component coefficients as the approximation coefficients; otherwise, obtain new current data to be processed based on the low-frequency component coefficients, and perform an increment operation on the current decomposition level to obtain a new current decomposition level, so as to re-obtain new low-frequency component coefficients based on the new current data to be processed and the current decomposition level.

[0079] Among them, the current decomposition level refers to the serial number of the current data decomposition process, that is, the total number of current data decompositions.

[0080] The approximation coefficients are the coefficients corresponding to the low-frequency part after filtering at the highest decomposition level. Based on this, when the decomposition level is the preset decomposition level, the low-frequency component coefficients obtained after convolving the current data to be processed with the low-pass filter are used as the approximation coefficients; otherwise, new current data to be processed is obtained based on the low-frequency component coefficients to re-execute steps S311 - S312.

[0081] It should be noted that in this embodiment, after removing outliers through the data processing strategy, the data to be processed is obtained. Due to a large amount of data missing, when training a model based on the data to be processed, the accuracy of the obtained model is poor. Based on this, in this embodiment, the data to be processed is also decomposed and reconstructed to obtain the reconstructed data, so as to ensure sufficient data volume for training, thereby improving the accuracy of the obtained model. Further, in this embodiment, decomposing and reconstructing based on the change trend of the data to be processed is beneficial to deepening the correlation between the obtained reconstructed data and red tides, and reducing data noise, thereby further improving the prediction accuracy of the trained model for red tides.

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

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

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

[0085] S411. Based on the test data division method, divide the preset time period into a training time period and a test time period.

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

[0087] S412. Based on the training time period, use a sliding window method to extract several training sub-data from the reconstructed data, and use the set of each training sub-data as the training set.

[0088] S413. Based on the test time period, use a sliding window method to extract several test sub-data from the reconstructed data, and use the set of each test sub-data as the test set.

[0089] Furthermore, train a preset initial red tide prediction model based on the training set. It should be noted that those skilled in the art should know the specific training method of the initial red tide prediction model, and this embodiment does not make a specific explanation here.

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

[0091] Even further, test the trained initial red tide prediction model, so as to use the initial red tide prediction model that passes the test as the red tide prediction model.

[0092] In some alternative embodiments, such as Figure 6 shown, the test method for the trained initial red tide prediction model includes:

[0093] S421. Based on the test set, use the trained initial red tide prediction model to make predictions and obtain various prediction data.

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

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

[0096] S422. Obtain the chlorophyll-related data corresponding to the time of each of the prediction data, and obtain the actual data based on the chlorophyll-related data; based on the prediction data and the actual data at each corresponding time, obtain the mean square error and R-squared.

[0097] Among them, the actual data is used to represent the actual situation of the ocean at the same time as the corresponding prediction data, and the form of the actual data corresponds to that of the prediction data. That is, if the prediction data is characterized as chlorophyll concentration, then the actual data is also chlorophyll concentration.

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

[0099] Furthermore, calculate the mean square error and R-squared based on each of the corresponding prediction data and each of the actual data.

[0100] Exemplarily, the calculation method of the mean square error is:

[0101]

[0102]

[0103] Among them, is the mean square error, is the sum of squared residuals, Represents the quantity of the predicted data, Represents each of the predicted data, Represents each of the actual data.

[0104] The calculation method of the R-squared is as follows:

[0105]

[0106]

[0107] Wherein, Represents the total sum of squares, Represents the average value of each of the actual data.

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

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

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

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

[0112] Based on this, this embodiment can obtain a red tide prediction model with high accuracy for predicting marine red tides, thus having a good marine monitoring effect.

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

[0114] Specifically, as Figure 7 shown, the selection method of the final red tide prediction model includes:

[0115] S431. For any of the above red tide prediction models, based on the test set, obtain the prediction data corresponding to each test data in the test set.

[0116] Specifically, refer to the content of step S421. Input each sub-data in the test set into the trained initial red tide prediction model, and let the initial red tide prediction model perform inference to generate each prediction data. The prediction data is characterized as the probability of red tide occurrence or the risk level of red tide occurrence.

[0117] S432. Obtain the chlorophyll correlation data corresponding to the time of each prediction data, and obtain the actual data based on the chlorophyll correlation data; based on the prediction data and the actual data at each corresponding time, obtain the prediction error of this red tide prediction model.

[0118] Among them, refer to the content of step S422. The actual data is used to characterize the actual situation of the ocean at the same time as the corresponding prediction data, and the form of the actual data corresponds to that of the prediction data.

[0119] Exemplarily, the prediction error is the root mean square error. Calculate the root mean square error based on each corresponding prediction data and each actual data. Specifically, first obtain the mean square error corresponding to this red tide prediction model. For details, please refer to the content of step S322. This embodiment does not make specific limitations here; then, calculate the root mean square error based on the mean square error.

[0120] Exemplarily, the calculation method of the root mean square error is:

[0121]

[0122] Where is the root mean square error.

[0123] S433. Among all the red tide prediction models, extract the red tide prediction model with the smallest prediction error as the final red tide prediction model.

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

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

[0126] On the other hand, the present embodiment further provides a red tide prediction method, specifically comprising: 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] Among them, 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 aforementioned 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 time to be predicted. 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 very high and an alarm is required so that relevant personnel can handle 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 the prediction accuracy of red tides is high.

[0131] like Figure 8 As shown, a red tide prediction model acquisition device provided in 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 preprocessing module 52 is used to remove abnormal values in the chlorophyll-related data through a preset data processing strategy, and integrate the chlorophyll-related data after removal into data to be processed, and the data to be processed is a collection of chlorophyll-related daily values corresponding to each day in 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 variation characteristics of the data to be processed, so as to obtain reconstructed data representing the continuous variation 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 a preset initial red tide prediction model based on the training set, and test the trained initial red tide prediction model based on the test set, so as to use the initial red tide prediction 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 embodiments of the present invention can be implemented on the terminal side or the server side.

[0137] As Figure 9 shown, it is a schematic diagram of an optional hardware structure of a terminal provided by an embodiment of the present invention. The terminal 60 may be a mobile phone, a computer device, a tablet device, a personal digital processing device, a factory background processing device, etc. The terminal 60 includes: at least one processor 61, a memory 62, at least one network interface 64, and a user interface 63. Each component in the device is coupled together through a bus system 65. It can be understood that the bus system 65 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 65 also includes a power bus, a control bus, and a status signal bus.

[0138] Among them, the user interface 63 may include a display, a keyboard, a mouse, a trackball, a click gun, a key, a button, a touchpad, or a touch screen, etc.

[0139] It can be understood that the memory 62 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM, Static Random Access Memory), synchronous static random access memory (SSRAM, Synchronous Static Random Access Memory). The memory characterized by the embodiments of the present invention is intended to include but not be limited to these and any other suitable categories of memory.

[0140] The memory 62 in the embodiments of the present invention is used to store various types of data to support the operation of the terminal. Examples of such data include: any executable programs for operating on the terminal 60, such as the operating system 621 and application programs 622; the operating system 621 contains 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 programs 622 may include various application programs, such as a Media Player, a Browser, etc., for implementing various application services. Implementing the red tide prediction method provided by the embodiments of the present invention may be included in the application programs 622.

[0141] The method disclosed in the above embodiments of the present invention may 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, the steps of the above method may be completed by the integrated logic circuit in hardware in the processor 61 or instructions in software form. 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 may implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The processor 61 may be a microprocessor or any conventional processor, etc. Combining the steps of the accessory optimization method provided by the embodiments of the present invention may be directly embodied as being completed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, and this storage medium is located in the memory. The processor reads the information in the memory and combines its hardware to complete the steps of the foregoing method.

[0142] In an exemplary embodiment, the terminal 60 may be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs) for executing the foregoing method.

[0143] The embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, and when the program is called by a processor, it implements the red tide prediction method provided by the present invention.

[0144] Among them, a computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, (but is 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 of the above. More specific examples (a non-exhaustive list) of a computer-readable storage medium 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 disk 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 programs characterized herein can be downloaded from the computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or an external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. A network adapter or a 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 the computer-readable storage medium in each computing / processing device.

[0146] In summary, by removing outliers from the chlorophyll-related data, the present application avoids the influence of outliers on the accuracy of the trained model. Also, by reconstructing the data after removing outliers to be used as the data required for model training, it avoids poor model training effects caused by excessive data loss, thereby obtaining a red tide prediction model with relatively high accuracy and good prediction effects, and further achieving good red tide prediction effects, having relatively high industrial application value.

[0147] The descriptions of the processes or structures corresponding to the above respective drawings each have their own focuses. For parts not detailed in a certain process or structure, reference may be made to the relevant descriptions of other processes or structures.

[0148] The above embodiments merely illustrate the principles and effects of the present application and are not used to limit the present application. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present application should still be covered by the claims of the present application.

Claims

1. 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, removing outliers from the chlorophyll-related data, and synthesizing the chlorophyll-related data after removal into data to be processed. 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; Based on the temporal variation characteristics of the data to be processed, decomposing and reconstructing the data to be processed to obtain reconstructed data representing the continuity of each chlorophyll-related factor in the temporal distribution; Based on the reconstructed data, constructing a training set and a test set; Training a preset initial red tide prediction model based on the training set, and testing the trained initial red tide prediction model based on the test set, so as to use the initial red tide prediction model that passes the test as the red tide prediction model.

2. The method according to claim 1, characterized in that, The decomposing and reconstructing the data to be processed based on the temporal variation characteristics of the data to be processed to obtain reconstructed data representing the continuity of each chlorophyll-related factor in the temporal distribution includes: Based on a preset decomposition level, performing wavelet transform on the data to be processed in an iterative manner to obtain approximation coefficients in the data to be processed; Based on the approximation coefficients, performing inverse wavelet transform to obtain the reconstructed data.

3. The method according to claim 2, wherein When performing wavelet transform on the data to be processed in an iterative manner, in a single iteration, it includes: Obtaining the current decomposition level and the current data to be processed; Convolving the current data to be processed based on a preset low-pass filter to obtain corresponding low-frequency component coefficients; If the current decomposition level is the preset decomposition level, taking the low-frequency component coefficients as the approximation coefficients; otherwise, obtaining new current data to be processed based on the low-frequency component coefficients, and performing an increment operation on the current decomposition level to obtain a new current decomposition level, so as to re-obtain new low-frequency component coefficients based on the new current data to be processed and the current decomposition level.

4. The method according to claim 1, characterized in that The constructing a training set and a test set based on the reconstructed data includes: Based on a test data division method, dividing the preset time period into a training time period and a test time period; Based on the training time period, in a sliding window manner, extracting a number of training sub-data from the reconstructed data, and taking the set of each training sub-data as the training set; Based on the test time period, in a sliding window manner, extracting a number of test sub-data from the reconstructed data, and taking the set of each test sub-data as the test set.

5. The method according to claim 1, wherein The removing outliers from the chlorophyll-related data through a preset data processing strategy includes: For each day within the preset time period, obtaining the number of chlorophyll-related time values on that day. If the number is less than a preset number, deleting each chlorophyll-related time value corresponding to that 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 respectively, 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.

6. The method according to claim 1, characterized in that The number of the red tide prediction initial models may 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, the method further 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; Acquire chlorophyll-related data at the time corresponding to each of the predicted data, and acquire actual data based on the chlorophyll-related data; acquire the 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.

7. The method according to any one of claims 1 or 6, characterized in that The step of testing the trained initial red tide prediction model based on the test set to use the initial red tide prediction model that has passed the test as the red tide prediction model comprises: Based on the test set, prediction is performed using the trained red tide prediction initial model to obtain various prediction data; Acquire chlorophyll-related data at the time corresponding to each of the predicted data, and acquire actual data based on the chlorophyll-related data; acquire 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-squares are within the preset R-square range, the trained red tide prediction initial model passes the test and serves as the red tide prediction model.

8. A red tide prediction method, comprising: Obtain the chlorophyll-related data of the current time period, and obtain the red tide prediction result of the time to be predicted through the red tide prediction model; Wherein, 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 7.

9. An apparatus for obtaining a red tide prediction model, characterized in that It 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 in 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 used 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 that each chlorophyll association factor is continuous in time series distribution; The model training module is used to construct a training set and a test set based on the reconstructed data; Based on the training set, train a preset initial red tide prediction model, and based on the test set, test the trained initial red tide prediction model, so as to use the initial red tide prediction model that passes the test as the red tide prediction model.

10. A terminal, characterized in that, It includes: A processor and a memory, which are communicatively connected between the memory and 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 described in any one of claims 1 to 7 or the red tide prediction method described in claim 8.

11. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it realizes the red tide prediction model acquisition method described in any one of claims 1 to 7 or the red tide prediction method described in claim 8.

Citation Information

Patent Citations

  • Red tide early warning method

    CN109002888A

  • Red tide prediction method and system based on sea-air dynamic field data and medium

    CN117131365A

  • Wind turbine generator abnormal state identification method and device based on neural network

    CN117194905A

  • Red tide early warning method and system based on buoy data

    CN119150164A

  • Internet of Things big data fusion processing platform

    CN119967037A