Marine Pollution Monitoring Method, Device, Electronic Device and Storage Medium
The method uses decision trees and LSTM networks to enhance ocean pollution monitoring and prediction accuracy, addressing the challenge of accurately assessing and managing marine pollution impacts.
Patent Information
- Application Number
- CN202510535614.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-04-27
AI Technical Summary
The existing technology is difficult to effectively monitor and predict marine pollution, resulting in low accuracy in pollution prediction and affecting marine ecosystems and human health.
The method of combining decision tree and LSTM neural network model is adopted to clean and classify ocean pollution data, pollution prediction is used to use decision tree to reduce errors, and the LSTM neural network to predict concentration trends to improve prediction accuracy.
It improves the accuracy of marine pollution prediction, can more accurately identify the main factors affecting marine pollution, provide real-time monitoring and prediction, and support effective governance measures.
Smart Images

Figure CN120045555B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of big data monitoring, belonging to the technical field of marine data monitoring. Specifically, it is a method, device, electronic device and storage medium for marine pollution monitoring. Background Art
[0002] With the continuous expansion of human activities, the problem of marine pollution has become increasingly prominent, and its impact has also become increasingly profound. This kind of pollution not only threatens the biodiversity of the ocean, destroys the balance of the marine ecosystem, but also poses potential hazards to the health of human beings themselves. Marine pollution mainly comes from industrial waste water, agricultural pollutants and urban garbage, etc. According to statistics, a large amount of pollutants are discharged into the ocean every year globally. These pollutants not only destroy the balance of the marine ecosystem, but also threaten the living environment of marine organisms, resulting in a decrease in biodiversity, and further affecting the income of fishermen. More worryingly, these pollutants will spread throughout the world through the ecological cycle, bringing profound health risks to human beings. Summary of the Invention
[0003] Aiming at the above at least one technical problem, the purpose of the present invention is to provide a method, device, electronic device and storage medium for marine pollution monitoring.
[0004] On the one hand, an embodiment of the present invention includes a method for marine pollution monitoring, and the method includes:
[0005] Obtain marine pollution data;
[0006] Perform pollution prediction on the marine pollution data through at least one decision tree to obtain first pollution factors corresponding to the at least one decision tree respectively;
[0007] Obtain a target pollution factor according to the first pollution factors corresponding to the at least one decision tree respectively.
[0008] Further, after obtaining the marine pollution data, the method further includes:
[0009] Obtain original marine pollution data;
[0010] Perform data cleaning on the original marine pollution data to obtain the marine pollution data.
[0011] Further, the performing pollution prediction on the marine pollution data through at least one decision tree to obtain first pollution factors corresponding to the at least one decision tree respectively includes:
[0012] Classify the marine pollution data through a first decision tree, and determine the first pollution factor corresponding to the first decision tree according to the classification situation of the first decision tree; the first decision tree is any one of the at least one decision tree.
[0013] Further, the first decision tree leaf nodes and non-leaf nodes; classify the marine pollution data through the first decision tree, and determine the first pollution factor corresponding to the first decision tree according to the classification situation of the first decision tree, including:
[0014] Classify the marine pollution data according to the classification conditions corresponding to the first non-leaf node in the first decision tree to obtain the classification result corresponding to the first non-leaf node; the first non-leaf node is any non-leaf node;
[0015] If the classification result corresponding to the first non-leaf node is the next non-leaf node, re-classify the marine pollution data according to the classification conditions corresponding to the next non-leaf node;
[0016] If the classification result corresponding to the first non-leaf node is a leaf node, determine the first pollution factor according to the leaf node.
[0017] Further, obtaining the target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree includes:
[0018] Among the first pollution factors respectively corresponding to the at least one decision tree, select the first pollution factor with the most occurrences as the target pollution factor.
[0019] Further, obtaining the target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree includes:
[0020] Calculate the average value of the first pollution factors respectively corresponding to the at least one decision tree, and obtain the target pollution factor according to the average value.
[0021] Further, the method further includes:
[0022] Perform concentration trend prediction on the marine pollution data through the LSTM neural network model trained by the historical marine pollution data set to obtain the pollution trend information within the target time period.
[0023] On the other hand, an embodiment of the present invention includes a marine pollution monitoring device, and the device includes:
[0024] A data acquisition module for acquiring marine pollution data;
[0025] A pollution prediction module for performing pollution prediction on the marine pollution data through at least one decision tree to obtain the first pollution factors respectively corresponding to the at least one decision tree;
[0026] A target determination module, configured to obtain a target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree.
[0027] On the other hand, an embodiment of the present invention further includes an electronic device, including a memory and a processor, where the memory is configured to store at least one computer program, and the processor is configured to load the at least one computer program to execute the marine pollution monitoring method in the embodiment.
[0028] On the other hand, an embodiment of the present invention further includes a storage medium, in which a program executable by a processor is stored, and the program executable by the processor is configured to execute the marine pollution monitoring method in the embodiment when executed by the processor.
[0029] Compared with the related art, the embodiments of the present application have the following beneficial effects:
[0030] The embodiments of the present application provide a marine pollution monitoring method, device, electronic device and storage medium, which acquire marine pollution data; perform pollution prediction on the marine pollution data through at least one decision tree to obtain first pollution factors respectively corresponding to the at least one decision tree; and obtain a target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree. By implementing the embodiments of the present application, pollution prediction is performed on the acquired marine pollution data through at least one decision tree to obtain first pollution factors respectively corresponding to the at least one decision tree, and a target pollution factor is determined according to at least one first pollution factor, so that pollution prediction can be performed through multiple decision trees to reduce the error rate of pollution prediction, thereby improving the accuracy of marine pollution prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is an application scenario diagram of a marine pollution monitoring method disclosed in an embodiment of the present application;
[0032] Figure 2 is a flowchart of a marine pollution monitoring method disclosed in an embodiment of the present application;
[0033] Figure 3 is a flowchart of marine pollution data processing disclosed in an embodiment;
[0034] Figure 4 is a structural diagram of each module of marine pollution data processing disclosed in an embodiment;
[0035] Figure 5 is another flowchart of marine pollution monitoring disclosed in an embodiment of the present application;
[0036] Figure 6 is a structural diagram of a decision tree in an embodiment;
[0037] Figure 7 It is a schematic flowchart of decision tree training in an embodiment;
[0038] Figure 8 It is a schematic flowchart of another marine pollution monitoring method disclosed in an embodiment of the present application;
[0039] Figure 9 It is a schematic structural diagram of a marine pollution monitoring device disclosed in an embodiment of the present application;
[0040] Figure 10 It is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. Detailed implementation manners
[0041] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0042] It should be noted that the terms "include" and "have" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0043] With the progress of technology, people's requirements for the environment are also getting higher and higher. The ocean is the birthplace of life on Earth. Therefore, the importance of marine pollution cannot be ignored. It not only affects the environment and biodiversity, but also directly or indirectly affects human health and economic activities.
[0044] Marine pollution can damage the marine ecosystem and lead to a reduction in biodiversity. Pollutants such as plastics, chemicals, and oils can directly harm marine life and affect their survival and reproduction. Marine pollutants accumulate through the food chain and may ultimately affect humans. For example, after microplastics and toxic chemicals are ingested by marine organisms, they may enter the human body through seafood, posing a threat to health. Moreover, marine pollution has a negative impact on industries that rely on marine resources such as fisheries and tourism. The polluted marine environment will reduce fish resources, damage beaches and coral reefs, and affect tourism attractiveness. The ocean plays an important role in regulating the global climate. Pollution can affect the health of the ocean, thereby affecting its ability to absorb carbon dioxide and regulate the climate, and exacerbating global warming. Therefore, designing an effective method for monitoring marine pollution is extremely important for protecting the marine environment.
[0045] Embodiments of this application disclose a method, device, electronic device, and storage medium for marine pollution monitoring, which can improve the accuracy of marine pollution prediction. The following will be described in detail respectively.
[0046] Please refer to Figure 1 , Figure 1 FIG. is an application scenario diagram of a method for marine pollution monitoring disclosed in an embodiment of this application. The method for marine pollution monitoring is applicable to the electronic device 101, which may include, but is not limited to, mobile phones, tablet computers, wearable devices, laptop computers, PCs (Personal Computers), etc. The electronic device 101 can be communicatively connected to various sensors that collect marine pollution data to obtain marine pollution data. The electronic device 101 can obtain marine pollution data, perform pollution prediction on the marine pollution data through at least one decision tree, obtain first pollution factors corresponding to at least one decision tree respectively, and obtain a target pollution factor according to the first pollution factors corresponding to at least one decision tree respectively.
[0047] Figure 2 FIG. is a flowchart of a method for marine pollution monitoring disclosed in an embodiment of this application. Among them, Figure 2 the described method for marine pollution monitoring is applicable to the above-mentioned electronic device. As Figure 2 shown, the method for marine pollution monitoring may include the following steps:
[0048] Step S201, obtain marine pollution data.
[0049] In one embodiment, the marine pollution data can be used to describe the degree of marine pollution in a certain area during a certain period of time. The marine pollution data may include multiple data for describing various pollution sources. For example, the marine pollution data may include seawater temperature data, seawater salinity data, marine acid-base data, phytoplankton and zooplankton data, and pollutant concentration data, etc., but not limited thereto. Among them, the seawater temperature data can be used to describe the temperature of the seawater in the ocean; the seawater salinity data can be used to describe the ratio of all dissolved solids in the seawater to the weight of the seawater; the marine acid-base data can be used to describe the acid-base situation in the seawater, and the marine acid-base data is usually related to the carbon dioxide concentration in the seawater. Therefore, the carbon dioxide concentration in the seawater can be roughly estimated according to the marine acid-base data. The phytoplankton and zooplankton data can be used to describe the types or concentrations of phytoplankton and zooplankton existing in the seawater; the pollutant concentration data can be used to describe the concentration of pollutants in the seawater.
[0050] Optionally, the electronic device can control various sensors to collect data describing various pollution sources included in the marine pollution data. Specifically, the electronic device can obtain seawater temperature data collected by a temperature sensor, seawater salinity data and seawater acidity / alkalinity data collected by an acid-base sensor, and phytoplankton and zooplankton data and pollutant concentration data collected by a water quality sensor, so as to obtain marine pollution data.
[0051] In some embodiments, the electronic device can control each sensor to transmit the collected marine pollution data to the electronic device through Internet of Things technology to obtain the marine pollution data. Specifically, the marine pollution data collected by each sensor can be transmitted to the electronic device through Narrow Band Internet of Things (NB-IoT) technology. Among them, the NB-IoT technology supports two-way communication, can meet the communication requirements between Internet of Things devices and base stations, has a relatively far signal coverage range and a higher number of channels. In marine pollution monitoring, transmitting the marine pollution data collected by each sensor through the NB-IoT technology can be applied to low-power and low-rate data transmission scenarios, so as to reduce the transmission power of transmitting marine pollution data while ensuring the transmission efficiency of marine pollution data.
[0052] In some embodiments, before obtaining the marine pollution data, the electronic device can obtain the original marine pollution data, perform data cleaning on the original marine pollution data to obtain the marine pollution data. Further, the electronic device can perform data cleaning and preprocessing on the original marine pollution data to remove outliers, missing values and noise, thereby improving the quality and accuracy of the data.
[0053] Furthermore, the electronic device can perform operations such as deleting missing values, filling in missing values, detecting duplicate values, removing duplicates, standardizing, normalizing, and data encoding on the original marine pollution data to obtain marine pollution data, but not limited to this. Among them, when dealing with deleting missing values, if the proportion of missing values in the original marine pollution dataset is relatively high, records containing missing values can be directly deleted. For example, in an original marine pollution monitoring dataset, if the pollutant concentration data of heavy metal gallium is missing and other data in this record is also incomplete, then this record can be selected for deletion. When dealing with filling in missing values, for the case where there are fewer missing values in the original marine pollution data, a filling method can be adopted. Common filling methods include using statistics such as the mean, median, and mode for filling. For example, in a water quality monitoring dataset, if the warm seawater temperature data in a certain area is missing, the mean of all temperature data in this original marine pollution dataset can be used for filling. When dealing with detecting duplicate values, by comparing the records in the original marine pollution dataset, records that are exactly the same or have some fields the same can be found. For example, in an original marine pollution dataset, each piece of original marine pollution data also includes data such as the longitude and latitude of the monitoring point and the monitoring time. The electronic device can detect duplicate values in the original marine pollution data by comparing fields such as the longitude and latitude of the monitoring point and the monitoring time. When dealing with removing duplicates, the detected duplicate values in the original marine pollution dataset can be deleted, and only one record is retained. For example, in a water quality monitoring dataset, if the information such as the monitoring point, monitoring time, and pollutant concentration of multiple records is exactly the same, the electronic device can only retain one identical record. Standardizing can be to convert the original marine pollution data into a standard normal distribution with a mean of 0 and a standard deviation of 1. For example, in an original marine pollution dataset, the StandardScaler function can be used to standardize the pollutant concentration data. Normalizing can be to scale the original marine pollution data to a specific range, usually . For example, in a water quality monitoring dataset, the MinMaxScaler function can be used to normalize data such as seawater temperature data and marine acid-base data. Data encoding processing converts categorical data into one-hot encoding of binary vectors. For example, in an original marine pollution dataset, the water quality level (such as excellent, good, medium, poor) can be converted into one-hot encoding.
[0054] The electronic device obtains the original marine pollution data, performs data cleaning on the original marine pollution data, and obtains the marine pollution data, which can improve the quality and accuracy of the marine pollution data, thereby providing a technical basis for improving the prediction of target pollution factors.
[0055] Step S202: Perform pollution prediction on the marine pollution data through at least one decision tree to obtain first pollution factors corresponding to at least one decision tree respectively.
[0056] By applying machine learning and deep learning algorithms to deeply mine and analyze the marine pollution data, it is possible to discover pollution patterns, trends, and regularities, and achieve real-time monitoring and prediction of marine pollution. The decision tree model has the advantage of strong interpretability and can screen out which factors have the greatest impact on marine pollution. In some embodiments, a decision tree rule is established based on historical marine pollution data through the decision tree algorithm, and a decision tree model is trained, which can be used to predict the type and degree of marine pollution and can also determine the factors that have the greatest impact on marine pollution. The electronic device performs pollution prediction on the marine pollution data through at least one decision tree to obtain first pollution factors corresponding to at least one decision tree respectively, where the first pollution factor can be used to describe the pollution factor predicted by the corresponding decision tree based on the marine pollution data. The electronic device can obtain a sample marine pollution data set, which includes multiple sample marine pollution data and the first pollution factor corresponding to each sample marine pollution data. The electronic device inputs the obtained sample marine pollution data set into the decision tree to be trained, and the decision tree to be trained predicts the predicted first pollution factor corresponding to each sample marine pollution data based on each sample marine pollution data. According to the error between the predicted first pollution factor corresponding to each sample marine pollution data and the first pollution factor, the model parameters of the decision tree are adjusted until the error is less than a preset error threshold, and then the trained decision tree is obtained.
[0057] The electronic device can perform pollution prediction on the marine pollution data through at least one trained decision tree to obtain first pollution factors corresponding to at least one decision tree respectively, and can perform pollution prediction through multiple decision trees to reduce the error rate of pollution prediction.
[0058] Step S203: Obtain the target pollution factor according to the first pollution factors corresponding to at least one decision tree respectively.
[0059] In some embodiments, by constructing multiple decision trees through the random forest algorithm and integrating their results, a large amount of marine data can be processed, important features can be automatically selected, and marine pollution data can be classified and predicted, thereby improving the accuracy and stability of pollution prediction. A random forest consists of at least one decision tree, and each decision tree is trained with different subsets of samples and features. In the prediction phase, each decision tree makes an independent prediction on the input marine pollution data, and then the random forest integrates according to the prediction results of at least one decision tree. Specifically, the electronic device can select the first pollution factor that appears the most times among the first pollution factors corresponding to at least one decision tree as the target pollution factor. For example, assume there are three decision trees in the random forest, and their prediction results for the same marine pollution data are the first pollution factor A, the first pollution factor B, and the first pollution factor A respectively. Then, the first pollution factor A that appears the most times is selected as the target pollution factor. At the same time, the electronic device can generate a pollution report based on the target pollution factor and output the pollution report so that the monitoring personnel can intuitively understand the current marine pollution situation. By selecting the first pollution factor that appears the most times as the target pollution factor, the error caused by pollution prediction by a single decision tree can be reduced, thereby further improving the accuracy rate of pollution prediction.
[0060] As an alternative implementation, the electronic device can determine the treatment measures corresponding to the target pollution factor based on the target pollution factor, and output the pollution report and the corresponding treatment measures so that the monitoring personnel can analyze the predicted marine pollution situation and take corresponding treatment measures for prevention and control. Specifically, the corresponding relationships between the respective target pollution factors and the treatment measures can be stored in the electronic device in advance so that the electronic device can find the corresponding treatment measures according to the target pollution factor.
[0061] Figure 3 is a schematic flowchart of the processing of marine pollution data disclosed in an embodiment, as Figure 3As shown, the electronic device can first collect the original marine pollution data through various sensors, and transmit the collected original marine pollution data to the electronic device. The electronic device preprocesses the original marine pollution data, such as data cleaning, to obtain marine pollution data, and conducts pollution prediction on the marine pollution data through at least one decision tree, so as to process and analyze the marine pollution data, obtain the first pollution factors corresponding to at least one decision tree respectively, obtain the target pollution factor according to the first pollution factors corresponding to at least one decision tree respectively, and transmit the target pollution factor, the pollution report generated by the target pollution factor, and the marine pollution data to the cloud server, so that each monitoring personnel can synchronize the marine pollution situation, and conduct data visualization analysis processing on the marine pollution data and the generated pollution report. Specifically, through a geographic information system and visualization tools, the analysis results can be intuitively displayed in a visual form. For example, the marine pollution data can be presented in the form of a chart, etc., so that the monitoring personnel can more intuitively observe the changes in marine pollution.
[0062] Figure 4 is a schematic structural diagram of each module for processing marine pollution data disclosed in an embodiment. As Figure 4 shown, the electronic device can include a data collection module, a data transmission module, a data preprocessing module, a data processing and analysis module, and a data visualization analysis module. The data collection module can be used to collect the original marine pollution data through various sensors; the data transmission module can be used to transmit the collected original marine pollution data to the electronic device; the data preprocessing module can be used to preprocess the original marine pollution data, such as data cleaning, to obtain marine pollution data, and the data processing and analysis module can be used to conduct pollution prediction on the marine pollution data through at least one decision tree, so as to process and analyze the marine pollution data, obtain the first pollution factors corresponding to at least one decision tree respectively, and obtain the target pollution factor according to the first pollution factors corresponding to at least one decision tree respectively; the data visualization analysis module conducts data visualization analysis processing on the marine pollution data and the generated pollution report.
[0063] In the embodiment of the present application, the electronic device obtains marine pollution data; conducts pollution prediction on the marine pollution data through at least one decision tree to obtain the first pollution factors corresponding to at least one decision tree respectively; obtains the target pollution factor according to the first pollution factors corresponding to at least one decision tree respectively. By conducting pollution prediction on the obtained marine pollution data through at least one decision tree, the first pollution factors corresponding to at least one decision tree respectively are obtained, and the target pollution factor is determined according to at least one first pollution factor, which can conduct pollution prediction through multiple decision trees to reduce the error rate of pollution prediction, thereby improving the accuracy of marine pollution prediction.
[0064] Figure 5 It is a schematic flowchart of another marine pollution monitoring method disclosed in the embodiments of the present application. As Figure 5 shown, the marine pollution monitoring method may include the following steps:
[0065] Step S501, obtaining marine pollution data.
[0066] For the description of step S501, reference may be made to the relevant description of step S201 in the above embodiments, which will not be elaborated here.
[0067] Step S502, classifying the marine pollution data by a first decision tree, and determining a first pollution factor corresponding to the first decision tree according to the classification result of the first decision tree; the first decision tree is any one of at least one decision tree.
[0068] In some embodiments, the electronic device classifies the marine pollution data by the first decision tree, and determines the first pollution factor corresponding to the first decision tree according to the classification result of the first decision tree. Specifically, the first decision tree may classify the marine pollution data multiple times, and determine the first pollution factor corresponding to the first decision tree according to the classification results corresponding to the multiple classifications respectively. Further, the electronic device may classify the marine pollution data according to the classification conditions corresponding to the first non-leaf node in the first decision tree to obtain the classification result corresponding to the first non-leaf node; the first non-leaf node is any non-leaf node; if the classification result corresponding to the first non-leaf node is the next non-leaf node, then re-classify the marine pollution data according to the classification conditions corresponding to the next non-leaf node; if the classification result corresponding to the first non-leaf node is a leaf node, then determine the first pollution factor according to the leaf node. Among them, the classification conditions corresponding to each non-leaf node may be obtained by training with sample marine pollution data, and the classification conditions may classify the marine pollution data according to a certain feature of the marine pollution data. For example, assuming that the marine pollution data includes the seawater temperature feature, the classification condition corresponding to a certain non-leaf node in the decision tree may be that the seawater temperature feature is greater than the temperature threshold. If the seawater temperature feature in the marine pollution data is greater than the temperature threshold, then the marine pollution data is assigned to the first category, and the classification result corresponding to the first category may be a leaf node; if the seawater temperature feature in the marine pollution data is less than or equal to the temperature threshold, then the marine pollution data is assigned to the second category, and the classification result corresponding to the second category may be the next non-leaf node.
[0069] The electronic device first inputs the marine pollution data into the root node, that is, the first non-leaf node, and classifies the marine pollution data according to the classification conditions corresponding to the root node to obtain the classification result corresponding to the root node, and determines whether the classification result belongs to a leaf node or a non-leaf node. If the classification result corresponding to the root node is the next non-leaf node, the marine pollution data can continue to be classified according to the classification conditions corresponding to the next non-leaf node until the classification result is a leaf node. If the classification result corresponding to the root node is a leaf node, the first pollution factor is determined according to the leaf node. Among them, each leaf node corresponds to a unique first pollution factor, and the corresponding relationship between each leaf node and the first pollution factor can be obtained through training with sample marine pollution data.
[0070] Figure 6 It is a schematic structural diagram of a decision tree in an embodiment, as shown in FIG. 6. The decision tree includes multiple non-leaf nodes and multiple leaf nodes. Among them, the non-leaf node for the first classification of the marine pollution data is the root node. The decision tree can divide the marine pollution data into different subsets according to different characteristic attributes as classification conditions, and each subset is a leaf node, which corresponds to a unique first pollution factor. The electronic device inputs the marine pollution data into the decision tree and makes decisions through the classification conditions corresponding to each non-leaf node in the decision tree, and finally classifies the marine pollution data into a certain leaf node, and the first pollution factor can be determined according to this leaf node.
[0071] The electronic device can train the decision tree to be trained according to the sample marine pollution data set to obtain a trained decision tree, and by training at least one decision tree, at least one trained decision tree can be obtained. Among them, the sample marine pollution data set includes multiple sample marine pollution data and the corresponding first pollution factor of each sample marine pollution data. Figure 7 It is a schematic flowchart of decision tree training in an embodiment, as Figure 7As shown in the figure, first, starting from the starting position, the sample marine pollution dataset is divided into a node, namely the root node. The sample marine pollution dataset is input into the decision tree to be trained. If the sample marine pollution dataset is an empty set, the training ends. If the node where the sample marine pollution dataset is located at the end of the training is the root node, then null is returned; if the node where the sample marine pollution dataset is located at the end of the training is not the root node, the first pollution factor that appears most frequently in the sample marine pollution dataset at the end of the training is marked as the first pollution factor corresponding to the node. If all the sample marine pollution data in the sample marine pollution dataset belong to the same first pollution factor, the training ends, and the nodes where each sample marine pollution data is located at the end of the training are marked as the first pollution factor corresponding to the sample marine pollution data. If the sample marine pollution data in the sample marine pollution dataset do not belong to the same first pollution factor, the sample marine pollution data at this node are divided to obtain two subsets of sample marine pollution data, and the classification of the two subsets of sample marine pollution data is continued.
[0072] Step S503: Obtain the target pollution factor according to the first pollution factors respectively corresponding to at least one decision tree.
[0073] For the description of step S503, reference can be made to the relevant description of step S203 in the above embodiment, which will not be elaborated here.
[0074] In the embodiment of the present application, the electronic device obtains marine pollution data, classifies the marine pollution data through the first decision tree, and determines the first pollution factor corresponding to the first decision tree according to the classification situation of the first decision tree; the first decision tree is any one of at least one decision tree. Obtaining the target pollution factor according to the first pollution factors respectively corresponding to at least one decision tree can improve the accuracy of marine pollution prediction.
[0075] Figure 8 is a schematic flowchart of another marine pollution monitoring method disclosed in the embodiment of the present application. As Figure 8 shown, the marine pollution monitoring method may include the following steps:
[0076] Step S801: Obtain marine pollution data.
[0077] Step S802: Perform pollution prediction on the marine pollution data through at least one decision tree to obtain the first pollution factors respectively corresponding to the at least one decision tree.
[0078] For the description of steps S801 to S802, reference can be made to the relevant description of steps S201 to S202 in the above embodiment, which will not be elaborated here.
[0079] Step S803: Calculate the average value of the first pollution factor corresponding to at least one decision tree, and obtain the target pollution factor based on the average value.
[0080] In one embodiment, the electronic device performs pollution prediction on the marine pollution data through each decision tree, and obtains the first pollution factor corresponding to each decision tree. The first pollution factor may have a corresponding value. The electronic device can calculate the average value of the values corresponding to multiple first pollution factors, and based on this average value, search for the first pollution factor corresponding to this average value, and use the first pollution factor corresponding to this average value as the target pollution factor. For example, assume that there are two decision trees in the random forest algorithm. The two decision trees perform pollution prediction on the marine pollution data respectively, and the values corresponding to the first pollution factors obtained are 3 and 7 respectively. Then calculate the average value of the values 3 and 7, and obtain that the average value is 5. Then search for the first pollution factor with the value of 5, and use the first pollution factor with the value of 5 as the target pollution factor.
[0081] In marine pollution monitoring, the random forest algorithm composed of at least one decision tree can process a large amount of marine data. By automatically selecting important features, it can classify and predict marine pollution data. It can predict other pollutions such as red tide outbreaks in the ocean through the use of the random forest algorithm, so as to take preventive measures in advance, and can improve the efficiency of controlling marine pollution.
[0082] The LSTM neural network model is a recurrent neural network. Its core idea is to introduce a long-term memory unit (Cell State) to store long-term information, and selectively update or delete information through a set of carefully designed gating mechanisms (including input gate, forget gate and output gate). The functions of these gates can be vividly understood as "filters", which control the way of information flow and determine which information should be retained, forgotten or output. The LSTM neural network model effectively propagates long-term information through the gating mechanism and cell state, and is applicable to various time series modeling tasks and can capture complex sequence patterns. In some embodiments, the electronic device performs concentration trend prediction on the marine pollution data through the LSTM neural network model trained by the historical marine pollution data set, and obtains the pollution trend information within the target time period. Specifically, the electronic device trains the input long short-term memory network, that is, the LSTM neural network model, to obtain the trained LSTM neural network model, which can be used for time series analysis of marine pollution data, so as to predict the change trend of the pollutant concentration of marine pollution.
[0083] Furthermore, the electronic device can obtain a historical original marine pollution dataset, which can come from devices such as marine monitoring stations, satellite remote sensing, buoys, sensors, etc., without limitation here. The historical original marine pollution dataset contains multiple historical original marine pollution data. The electronic device performs data cleaning and preprocessing on the historical original marine pollution data in the historical original marine pollution dataset to obtain a historical marine pollution dataset. The electronic device constructs the multiple historical marine pollution data in the historical marine pollution dataset into an input data format suitable for the LSTM model. Among them, the input required by the LSTM is three-dimensional, namely the parameter samples, the parameter timesteps, and the parameter features. The parameter samples is the number of samples, the parameter timesteps is the time step, and the parameter features is the number of features for each time step. The LSTM neural network model can include an LSTM layer, a fully connected layer, etc. One or more LSTM layers are used to extract the long-term dependencies in the time series, and then the prediction results are output through the fully connected layer. The hyperparameters of the LSTM neural network model (such as the number of neurons in the LSTM layer, the learning rate, etc.) are adjusted through experiments. The historical marine pollution dataset is divided into a training set and a test set. Usually, the data with an older collection time in the historical marine pollution dataset is used as the training set, and the data with a newer collection time is used as the test set. After dividing the historical marine pollution dataset into a training set and a test set, the training set data is used to train the LSTM model. During the training process, the LSTM neural network model will learn the patterns and trends in the time series data, so as to be able to predict future data in marine pollution monitoring. According to the time series data such as seawater temperature data, seawater salinity data, marine acid-base data, plankton and plant data, and pollutant concentration data in the input historical marine pollution data, an LSTM neural network model is trained. Through experimental research, it is obtained that researchers use the LSTM neural network model to analyze and model the marine water quality data collected in different time periods, and realize the prediction of future seawater quality. Compared with the traditional support vector regression (SVR) algorithm, the LSTM neural network model has achieved a better fitting effect, with a goodness of fit of 0.9554 and an average absolute error of 0.0117, and can well realize the all-weather prediction of seawater quality.
[0084] In addition, through the oil pollution content prediction model established based on the LSTM neural network model, the oil pollution content in the sea area can be predicted. By utilizing the ability of the LSTM neural network model to process time series data and combining remote sensing data, the electronic device can achieve dynamic prediction of oil spill pollution. Similarly, the LSTM neural network model can also monitor various pollutants in real time, specifically including heavy metals, organic pollutants, nutrients, and other pollutants. Among them, heavy metals can include mercury. By monitoring the mercury content in seawater, pollution caused by industrial wastewater discharge or atmospheric deposition can be detected in a timely manner. It can also include cadmium. Through real-time monitoring of cadmium, it helps to understand its distribution in the ocean and prevent its accumulation in organisms. It can also include lead. Monitoring lead can reflect the impact of activities such as transportation and industry on the marine environment. Organic pollutants can include oil and its products, specifically including crude oil, gasoline, diesel, etc. By monitoring the concentration of oil films and oil substances, accidents such as oil tanker leaks and offshore oil exploitation can be detected in a timely manner. It can also include pesticides, such as organochlorine pesticides. Monitoring their residues in the ocean can evaluate the degree of pollution of agricultural activities to the ocean. It can also include persistent organic pollutants, such as polychlorinated biphenyls. These substances persist in the ocean and pose potential hazards to marine organisms and ecosystems. Nutrients can include ammonia nitrogen. Real-time monitoring of ammonia nitrogen can reflect the pollution of domestic sewage, agricultural runoff, etc. to the ocean. It can also include nitrates and nitrites. Excessive input of these nutrients will lead to eutrophication of seawater and trigger ecological disasters such as red tides. It can also include phosphates. Monitoring phosphates helps to evaluate the impact of fertilizer use, sewage treatment, etc. on the balance of marine nutrients. Other pollutants can include radionuclides, such as strontium-90, cesium-137, etc. Monitoring their distribution in the ocean can evaluate the impact of the nuclear industry, nuclear accidents, etc. on the marine environment. It can also include suspended solids and turbidity. By monitoring suspended solids and turbidity, the transparency and particulate matter content of seawater can be understood, reflecting the health status of the marine ecosystem. It can also be the acidity (pH value). Real-time monitoring of the pH value can reflect the degree of ocean acidification and evaluate the impact of increased atmospheric carbon dioxide, acidic wastewater discharge, etc. on the marine environment.
[0085] In an embodiment of the present application, the electronic device obtains marine pollution data, performs pollution prediction on the marine pollution data through at least one decision tree, obtains the first pollution factors corresponding to the at least one decision tree respectively, calculates the average value of the first pollution factors corresponding to the at least one decision tree respectively, and obtains the target pollution factor according to the average value, which can perform pollution prediction through multiple decision trees to reduce the error rate of pollution prediction, thereby improving the accuracy of marine pollution prediction.
[0086] Please refer to Figure 9 , Figure 9It is a schematic structural diagram of a marine pollution monitoring device disclosed in an embodiment of the present application. This device can be applied to the above-mentioned electronic device. As Figure 9 shown, the marine pollution monitoring device 900 may include: a data acquisition module 901, a pollution prediction module 902, and a target determination module 903.
[0087] The data acquisition module 901 is used to acquire marine pollution data;
[0088] The pollution prediction module 902 is used to perform pollution prediction on the marine pollution data through at least one decision tree, and obtain first pollution factors respectively corresponding to at least one decision tree;
[0089] The target determination module 903 is used to obtain a target pollution factor according to the first pollution factors respectively corresponding to at least one decision tree.
[0090] In one embodiment, the marine pollution monitoring device 900 further includes an original acquisition module and a data cleaning module:
[0091] The original acquisition module is used to acquire original marine pollution data;
[0092] The data cleaning module is used to perform data cleaning on the original marine pollution data to obtain marine pollution data.
[0093] In one embodiment, the pollution prediction module 902 further includes a data classification unit:
[0094] The data classification unit is used to classify the marine pollution data through a first decision tree, and determine the first pollution factor corresponding to the first decision tree according to the classification situation of the first decision tree; the first decision tree is any one of at least one decision tree.
[0095] In one embodiment, the data classification unit is further used to classify the marine pollution data according to the classification conditions corresponding to the first leaf node in the first decision tree to obtain the classification result corresponding to the first leaf node; if the classification result corresponding to the first leaf node is the next leaf node, then re-classify the marine pollution data according to the classification conditions corresponding to the next leaf node; the first leaf node is any leaf node; if the classification result corresponding to the first leaf node is a non-leaf node, then determine the first pollution factor according to the non-leaf node.
[0096] In one embodiment, the target determination module 903 is further used to select the first pollution factor with the most occurrences among the first pollution factors respectively corresponding to at least one decision tree as the target pollution factor.
[0097] In one embodiment, the target determination module 903 is further configured to calculate the average value of the first pollution factors corresponding to at least one decision tree, and obtain the target pollution factor according to the average value.
[0098] In one embodiment, the marine pollution monitoring device 900
[0099] The concentration prediction module is configured to perform a concentration trend prediction on the marine pollution data through the LSTM neural network model trained by the historical marine pollution data set, and obtain the pollution trend information within the target time period.
[0100] Please refer to Figure 10 , Figure 10 which is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. As Figure 10 shown, the electronic device 101 may include:
[0101] A memory 1001 storing executable program code;
[0102] A processor 1002 coupled to the memory 1001;
[0103] Wherein, the processor 1002 calls the executable program code stored in the memory 1001 to execute any one of the marine pollution monitoring methods disclosed in the embodiments of the present application.
[0104] An embodiment of the present application discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by the processor, the processor is enabled to implement any one of the marine pollution monitoring methods disclosed in the embodiments of the present application.
[0105] An embodiment of the present application discloses a computer program product, including a computer program, and when the computer program is executable by a processor, it implements the methods described in the above embodiments.
[0106] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0107] In various embodiments of the present application, it should be understood that the magnitudes of the sequence numbers of the above processes do not necessarily imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0108] The units described above as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] In addition, in each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0110] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc., specifically, the processor in the computer device) to execute some or all of the steps of the above methods in the various embodiments of the present application.
[0111] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other computer-readable medium that can be used to carry or store data.
[0112] The above has introduced in detail a marine pollution monitoring method, device, electronic device and storage medium disclosed in the embodiments of the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for monitoring marine pollution, characterized in that, The method includes: Obtaining marine pollution data; Performing pollution prediction on the marine pollution data through at least one decision tree to obtain first pollution factors respectively corresponding to the at least one decision tree; Obtaining a target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree; The performing pollution prediction on the marine pollution data through at least one decision tree to obtain first pollution factors respectively corresponding to the at least one decision tree includes: Classifying the marine pollution data through a first decision tree, and determining a first pollution factor corresponding to the first decision tree according to the classification result of the first decision tree; the first decision tree is any one of the at least one decision tree; The leaf nodes and non-leaf nodes of the first decision tree; classifying the marine pollution data through the first decision tree, and determining a first pollution factor corresponding to the first decision tree according to the classification result of the first decision tree includes: classifying the marine pollution data according to a classification condition corresponding to a first non-leaf node in the first decision tree to obtain a classification result corresponding to the first non-leaf node; the first non-leaf node is any non-leaf node; if the classification result corresponding to the first non-leaf node is the next non-leaf node, re-classifying the marine pollution data according to a classification condition corresponding to the next non-leaf node; if the classification result corresponding to the first non-leaf node is a leaf node, determining the first pollution factor according to the leaf node; wherein, the corresponding relationship between each of the leaf nodes and the first pollution factor is obtained through training with a sample marine pollution data set, and the sample marine pollution data set includes a plurality of sample marine pollution data and first pollution factors respectively corresponding to the sample marine pollution data; The training step of the first decision tree includes: dividing the sample marine pollution data set into a node, that is, the root node; inputting the sample marine pollution data set into the decision tree to be trained; if the sample marine pollution data set is an empty set, end the training; if the node where the sample marine pollution data set is located when ending the training is the root node, return null; if the node where the sample marine pollution data set is located when ending the training is not the root node, mark the first pollution factor that appears the most in the sample marine pollution data set when ending the training as the first pollution factor corresponding to the node where it is located; if the sample marine pollution data in the sample marine pollution data set all belong to the same first pollution factor, end the training, and mark the nodes where each sample marine pollution data is located when ending the training as the first pollution factor corresponding to the sample marine pollution data; if the sample marine pollution data in the sample marine pollution data set do not belong to the same first pollution factor, divide the sample marine pollution data at this node to obtain two sample marine pollution data subsets, and continue to classify the two sample marine pollution data subsets.
2. The marine pollution monitoring method according to claim 1, wherein After obtaining the marine pollution data, the method further includes: Obtaining original marine pollution data; Clean the original marine pollution data to obtain the marine pollution data.
3. The marine pollution monitoring method according to claim 1, wherein Obtaining the target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree includes: Among the first pollution factors respectively corresponding to the at least one decision tree, select the first pollution factor with the most occurrences as the target pollution factor.
4. The marine pollution monitoring method according to claim 1, wherein Obtaining the target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree includes: Calculate the average value of the first pollution factors respectively corresponding to the at least one decision tree, and obtain the target pollution factor according to the average value.
5. The marine pollution monitoring method according to any one of claims 1-4, characterized in that, The method further includes: Use the LSTM neural network model trained by the historical marine pollution data set to predict the concentration trend of the marine pollution data, and obtain the pollution trend information within the target time period.
6. An ocean pollution monitoring device, characterized in that, The device includes: A data acquisition module for acquiring marine pollution data; A pollution prediction module for performing pollution prediction on the marine pollution data through at least one decision tree to obtain the first pollution factors respectively corresponding to the at least one decision tree; A target determination module for obtaining the target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree The pollution prediction module further includes a data classification unit: the data classification unit is used to classify the marine pollution data through the first decision tree, and determine the first pollution factor corresponding to the first decision tree according to the classification situation of the first decision tree; the first decision tree is any one of the at least one decision tree; The data classification unit is further used to classify the marine pollution data according to the classification conditions corresponding to the first non-leaf node in the first decision tree to obtain the classification result corresponding to the first non-leaf node; the first non-leaf node is any non-leaf node; if the classification result corresponding to the first non-leaf node is the next non-leaf node, then re-classify the marine pollution data according to the classification conditions corresponding to the next non-leaf node; if the classification result corresponding to the first non-leaf node is a leaf node, then determine the first pollution factor according to the leaf node; wherein, the corresponding relationship between each leaf node and the first pollution factor is trained by the sample marine pollution data, and the sample marine pollution data set includes multiple sample marine pollution data and the first pollution factor corresponding to each sample marine pollution data; A training module, configured to partition the sample marine pollution dataset into a node, namely the root node; input the sample marine pollution dataset into a decision tree to be trained; if the sample marine pollution dataset is an empty set, end the training; if the node where the sample marine pollution dataset is located at the end of the training is the root node, return null; if the node where the sample marine pollution dataset is located at the end of the training is not the root node, mark the first pollution factor that appears most frequently in the sample marine pollution dataset at the end of the training as the first pollution factor corresponding to the node where it is located; if all the sample marine pollution data in the sample marine pollution dataset belong to the same first pollution factor, end the training, and mark the nodes where each sample marine pollution data is located at the end of the training as the first pollution factor corresponding to the sample marine pollution data; if the sample marine pollution data in the sample marine pollution dataset do not belong to the same first pollution factor, partition the sample marine pollution data at this node to obtain two sample marine pollution data subsets, and continue to classify the two sample marine pollution data subsets.
7. An electronic device, characterized in that, It includes a memory and a processor. The memory is used to store at least one computer program, and the processor is used to load the at least one computer program to execute the marine pollution monitoring method according to any one of claims 1-5.
8. A storage medium storing a program executable by a processor, characterized in that, The program executable by the processor, when executed by the processor, is used to execute the marine pollution monitoring method according to any one of claims 1-5.
Citation Information
Patent Citations
Clustering analysis and decision tree algorithm-based truck loading work time prediction model
CN106096748A
Combined prediction system and methods
WO2021214332A1