Marine pollution monitoring method and device, electronic equipment and storage medium
Through the combination of decision tree and LSTM neural network model, marine pollution data are obtained for prediction, which solves the shortcomings of marine pollution monitoring and prediction in the existing technology, and improves the accuracy and effectiveness of pollution prediction.
Patent Information
- Application Number
- CN202510535614.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-27
AI Technical Summary
The existing technology is difficult to effectively monitor and predict marine pollution, resulting in pollutants spreading around the world through ecological circulation, threatening marine ecosystems and human health.
By obtaining marine pollution data, using at least one decision tree to predict the data, identify the first pollution factor, and obtain the target pollution factor based on these factors. At the same time, the LSTM neural network model is used to predict the concentration trend of marine pollution data to improve the accuracy of pollution prediction.
Through the combination of multiple decision trees, the error rate of pollution prediction is reduced and the accuracy of marine pollution prediction is improved, so as to more effectively monitor and prevent marine pollution.
Smart Images

Figure CN120045555A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data monitoring technology, and belongs to ocean data monitoring technology, and specifically to an ocean pollution monitoring method, device, electronic equipment and storage medium. Background Art
[0002] With the continuous expansion of human activities, the problem of marine pollution has become increasingly prominent, and its impact is becoming increasingly far-reaching. This pollution not only threatens the biodiversity of the ocean and destroys the balance of the marine ecosystem, but also poses a potential hazard to human health. Marine pollution mainly comes from industrial wastewater, agricultural pollutants and urban garbage. According to statistics, a large amount of pollutants are discharged into the ocean every year. These pollutants not only destroy the balance of the marine ecosystem, but also threaten the living environment of marine life, leading to a decrease in biodiversity, which in turn affects the income of fishermen. What is more worrying is that these pollutants will spread around the world through ecological cycles, posing far-reaching health risks to humans. Summary of the invention
[0003] In response to at least one of the above technical problems, an object of the present invention is to provide a marine pollution monitoring method, device, electronic device and storage medium.
[0004] In one aspect, an embodiment of the present invention includes a method for monitoring marine pollution, the method comprising: Obtaining marine pollution data; Performing pollution prediction on the marine pollution data by using at least one decision tree to obtain first pollution factors corresponding to the at least one decision tree; A target pollution factor is obtained according to the first pollution factors respectively corresponding to the at least one decision tree.
[0005] Furthermore, after obtaining the marine pollution data, the method further includes: Obtaining raw marine pollution data; The original ocean pollution data is cleaned to obtain the ocean pollution data.
[0006] Furthermore, the performing pollution prediction on the marine pollution data by using at least one decision tree to obtain the first pollution factors corresponding to the at least one decision tree respectively includes: The marine pollution data is classified by a first decision tree, and a first pollution factor corresponding to the first decision tree is determined according to the classification of the first decision tree; the first decision tree is any one of the at least one decision tree.
[0007] Furthermore, the first decision tree leaf nodes and non-leaf nodes; classifying the marine pollution data by the first decision tree, and determining the first pollution factor corresponding to the first decision tree according to the classification of the first decision tree, includes: Classifying the marine pollution data according to the classification condition corresponding to the 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, reclassifying the marine pollution data according to the classification condition corresponding to the next non-leaf node; If the classification result corresponding to the first non-leaf node is a leaf node, the first pollution factor is determined according to the leaf node.
[0008] Furthermore, 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 corresponding to the at least one decision tree, the first pollution factor with the largest number of occurrences is selected as the target pollution factor.
[0009] Furthermore, obtaining the target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree includes: The average value of the first pollution factor corresponding to each of the at least one decision tree is calculated, and the target pollution factor is obtained according to the average value.
[0010] Furthermore, the method further comprises: The LSTM neural network model trained with the historical marine pollution data set performs concentration trend prediction on the marine pollution data to obtain pollution trend information within the target time period.
[0011] In another aspect, an embodiment of the present invention includes a marine pollution monitoring device, the device comprising: A data acquisition module, used to acquire marine pollution data; A pollution prediction module, used to 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; The target determination module is used to obtain the target pollution factor according to the first pollution factors respectively corresponding to the at least one decision tree.
[0012] On the other hand, an embodiment of the present invention also includes an electronic device, including a memory and a processor, wherein 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 in the embodiment.
[0013] On the other hand, an embodiment of the present invention further includes a storage medium storing a program executable by a processor, wherein the program executable by the processor is used to execute the marine pollution monitoring method in the embodiment when executed by the processor.
[0014] Compared with the related art, the embodiments of the present application have the following beneficial effects: The embodiments of the present application provide a method, device, electronic device and storage medium for monitoring marine pollution, which obtain marine pollution data; perform 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; and obtain the target pollution factor according to the first pollution factors corresponding to 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 the first pollution factors corresponding to at least one decision tree, and the target pollution factor is determined according to at least one first pollution factor. 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
[0015] Figure 1 This is an application scenario diagram of a marine pollution monitoring method disclosed in an embodiment of the present application; Figure 2 It is a flow chart of a method for monitoring marine pollution disclosed in an embodiment of the present application; Figure 3 is a schematic diagram of a process flow of marine pollution data processing disclosed in an embodiment; Figure 4 is a schematic diagram of the structure of various modules of marine pollution data processing disclosed in an embodiment; Figure 5 It is a schematic diagram of another process of marine pollution monitoring disclosed in an embodiment of the present application; Figure 6 is a schematic diagram of the structure of a decision tree in an embodiment; Figure 7 is a flowchart of decision tree training in an embodiment; Figure 8 It is a flow chart of another marine pollution monitoring method disclosed in an embodiment of the present application; Fig. 9 It is a structural schematic diagram of an ocean pollution monitoring device disclosed in an embodiment of the present application; Fig.10 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0017] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0018] With the advancement of science and technology, people's requirements for the environment are getting higher and higher. The ocean is the birthplace of life on Earth, so 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.
[0019] Marine pollution can damage marine ecosystems and lead to a reduction in biodiversity. Pollutants such as plastics, chemicals, and oils can directly harm marine life, affecting their survival and reproduction. Marine pollutants accumulate through the food chain and may eventually affect humans. For example, microplastics and toxic chemicals can enter the human body through seafood after being ingested by marine life, posing a threat to health. Marine pollution also has a negative impact on industries that rely on marine resources, such as fisheries and tourism. A polluted marine environment can reduce fish stocks, damage beaches and coral reefs, and affect tourism appeal. The ocean plays an important role in regulating the global climate. Pollution can affect the health of the ocean, which in turn affects its ability to absorb carbon dioxide and regulate the climate, exacerbating global warming. Therefore, designing a method that can effectively monitor marine pollution is extremely important for protecting the marine environment.
[0020] The embodiments of the present application disclose a method, device, electronic device and storage medium for monitoring marine pollution, which can improve the accuracy of marine pollution prediction.
[0021] See also Figure 1 , Figure 1This is an application scenario diagram of a marine pollution monitoring method disclosed in an embodiment of the present application. The marine pollution monitoring method is applicable to an electronic device 101, which may include but is not limited to a mobile phone, a tablet computer, a wearable device, a laptop computer, a PC (Personal Computer), etc. The electronic device 101 can be connected to communicate with various sensors that collect marine pollution data to obtain the 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 the first pollution factors corresponding to at least one decision tree, and obtain the target pollution factor based on the first pollution factors corresponding to at least one decision tree.
[0022] Figure 2 : is a flow chart of a method for monitoring marine pollution disclosed in an embodiment of the present application. Figure 2 The marine pollution monitoring method described is applicable to the above-mentioned electronic devices. Figure 2 As shown, the marine pollution monitoring method may include the following steps: Step S201, obtaining marine pollution data.
[0023] In one embodiment, the marine pollution data can be used to describe the degree of marine pollution in a certain area within a certain time period. The marine pollution data can include multiple data used to describe various pollution sources. For example, the marine pollution data can include seawater temperature data, seawater salinity data, marine acid-base data, phytoplankton data, and pollutant concentration data, but are not limited to this. Among them, the seawater temperature data can be used to describe the temperature of seawater in the ocean; the marine salinity data can be used to describe the ratio of all dissolved solids in seawater to the weight of seawater; the marine acid-base data can be used to describe the acid-base situation in seawater. The marine acid-base data is usually related to the carbon dioxide concentration in seawater. Therefore, the concentration of carbon dioxide in seawater can be roughly inferred based on the marine acid-base data. The phytoplankton data can be used to describe the types or concentrations of phytoplankton in seawater; the pollutant concentration data can be used to describe the concentration of pollutants in seawater.
[0024] Optionally, the electronic device can control various sensors to respectively collect data describing various pollution sources contained in the marine pollution data. Specifically, the electronic device can obtain seawater temperature data collected by the temperature sensor, obtain seawater salinity data and seawater acid-base data collected by the acid-base sensor, obtain phytoplankton data and pollutant concentration data collected by the water quality sensor, thereby obtaining marine pollution data.
[0025] In some embodiments, electronic devices can control various sensors to transmit the collected marine pollution data to electronic devices through Internet of Things technology to obtain marine pollution data. Specifically, the marine pollution data collected by various sensors can be transmitted to electronic devices through narrowband Internet of Things (NB-IoT) technology. Among them, narrowband Internet of Things technology supports two-way communication, can meet the communication needs between IoT devices and base stations, has a longer signal coverage range and a higher number of channels. In marine pollution monitoring, the marine pollution data collected by various sensors are transmitted through narrowband Internet of Things technology, which can be suitable for low-power, low-rate data transmission scenarios, thereby reducing the transmission power of marine pollution data while ensuring the transmission efficiency of marine pollution data.
[0026] In some embodiments, before obtaining the marine pollution data, the electronic device may obtain the original marine pollution data, perform data cleaning on the original marine pollution data, and obtain the marine pollution data. Further, the electronic device may perform data cleaning and preprocessing on the original marine pollution data to remove abnormal values, missing values, and noise, thereby improving the quality and accuracy of the data.
[0027] Furthermore, the electronic device can perform missing value deletion, missing value filling, duplicate value detection, deduplication, standardization, normalization and data encoding on the original marine pollution data to obtain marine pollution data, but is not limited to this. Among them, the deletion of missing value processing can be when the proportion of missing values in the original marine pollution data set is high, the records containing missing values can be directly deleted. For example, in an original marine pollution monitoring data set, the pollutant concentration data of heavy metal gallium is missing, and the other data of the record is also incomplete, then the record can be deleted. Filling missing value processing can be for the case where there are fewer missing values in the original marine pollution data, and the filling method can be used for processing. Common filling methods include filling with statistics such as mean, median, mode, etc. For example, in a water quality monitoring data set, the warm sea water density data of a certain area is missing, and the mean of all temperature data in the original marine pollution data set can be used to fill. Detection of duplicate value processing can be to compare the records in the original marine pollution data set to find records that are exactly the same or have the same fields. For example, in a raw marine pollution data set, each raw marine pollution data also contains data such as the longitude and latitude of the monitoring point and the monitoring time. The electronic device can detect duplicate values of the raw marine pollution data by comparing the longitude and latitude of the monitoring point, the monitoring time and other fields. Deduplication processing can be to delete the duplicate values detected in the raw marine pollution data set and retain only one record. For example, in a water quality monitoring data set, if there are multiple records with exactly the same information such as the monitoring point, monitoring time, and pollutant concentration, the electronic device can only retain one identical record. Standardization processing can be to convert the raw marine pollution data into a standard normal distribution with a mean of 0 and a standard deviation of 1. For example, in a raw marine pollution data set, the StandardScaler function can be used to standardize the pollutant concentration data. Normalization processing can be to scale the raw marine pollution data to a specific range, usually . For example, in a water quality monitoring data set, the MinMaxScaler function can be used to normalize data such as seawater temperature data and ocean acid-base data. Data encoding processing converts categorical data into a one-hot encoding of a binary vector. For example, in a raw marine pollution data set, the water quality levels (such as excellent, good, medium, and poor) can be converted into one-hot encoding.
[0028] Electronic equipment obtains original ocean pollution data, performs data cleaning on the original ocean pollution data, and obtains ocean pollution data, which can improve the quality and accuracy of ocean pollution data, thereby providing a technical basis for improving the prediction of target pollution factors.
[0029] Step S202: performing 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.
[0030] By using machine learning and deep learning algorithms to deeply mine and analyze marine pollution data, it is possible to discover pollution patterns, trends and laws, and realize 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 algorithm is used to establish decision tree rules based on historical marine pollution data, and a decision tree model is trained, which can be used to predict the type and degree of marine pollution, and can determine the factors that have the greatest impact on marine pollution. The electronic device predicts pollution on marine pollution data through at least one decision tree, and obtains the first pollution factor corresponding to at least one decision tree, wherein 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, and the sample marine pollution data set contains multiple sample marine pollution data and the first pollution factor corresponding to each sample marine pollution data. The electronic device inputs the acquired sample ocean pollution data set into the decision tree to be trained, and predicts the predicted first pollution factor corresponding to each sample ocean pollution data through the decision tree to be trained according to each sample ocean pollution data, and adjusts the model parameters of the decision tree according to the predicted first pollution factor corresponding to each sample ocean pollution data and the error between the first pollution factors until the error is less than the preset error threshold, thereby obtaining a trained decision tree.
[0031] The electronic device can perform pollution prediction on marine pollution data through at least one trained decision tree, obtain the first pollution factor corresponding to at least one decision tree, and can perform pollution prediction through multiple decision trees to reduce the error rate of pollution prediction.
[0032] Step S203: obtaining a target pollution factor according to the first pollution factors respectively corresponding to at least one decision tree.
[0033] In some embodiments, by constructing multiple decision trees through the random forest algorithm and synthesizing their results, a large amount of ocean data can be processed, important features can be automatically selected, and ocean pollution data can be classified and predicted, thereby improving the accuracy and stability of pollution prediction. The random forest consists of at least one decision tree, and each decision tree is obtained by training with different samples and feature subsets. In the prediction stage, each decision tree will independently predict the input ocean pollution data, and then the random forest will be integrated according to the prediction results of at least one decision tree. Specifically, the electronic device can select the first pollution factor with the most occurrences from the first pollution factors corresponding to at least one decision tree as the target pollution factor. For example, assuming that there are three decision trees in the random forest, and their prediction results for the same ocean 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 with the most occurrences 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 ocean pollution situation. By selecting the first pollution factor with the most occurrences as the target pollution factor, the error caused by the pollution prediction of a single decision tree can be reduced, thereby further improving the accuracy of pollution prediction.
[0034] As an optional implementation, the electronic device can determine the control measures corresponding to the target pollution factors according to the target pollution factors, and output the pollution report and the corresponding control measures, so that the monitoring personnel can analyze the predicted marine pollution situation and take corresponding control measures for prevention and control. Specifically, the corresponding relationship between each target pollution factor and the control measures can be stored in the electronic device in advance, so that the electronic device can find the corresponding control measures according to the target pollution factors.
[0035] Figure 3 is a schematic diagram of a process flow of marine pollution data processing disclosed in an embodiment, such 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 performs data cleaning and other pre-processing on the original marine pollution data to obtain marine pollution data, and performs 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 factor corresponding to at least one decision tree, obtain the target pollution factor according to the first pollution factor corresponding to at least one decision tree, 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 perform data visualization analysis processing on the marine pollution data and the generated pollution report. Specifically, the analysis results can be intuitively displayed in a visual form through a geographic information system and visualization tools, for example, the marine pollution data can be presented in the form of a chart, so that the monitoring personnel can more intuitively observe the changes in marine pollution.
[0036] Figure 4 is a schematic diagram of the structure of each module of the marine pollution data processing disclosed in an embodiment, such as Figure 4 As shown, the electronic device may include a data acquisition module, a data transmission module, a data preprocessing module, a data processing and analysis module, and a data visualization and analysis module. The data acquisition module may be used to collect raw marine pollution data through various sensors; the data transmission module may be used to transmit the collected raw marine pollution data to the electronic device; the data preprocessing module may be used to perform data cleaning and other preprocessing on the raw marine pollution data to obtain marine pollution data; the data processing and analysis module may be used to perform pollution prediction on the marine pollution data through at least one decision tree, thereby processing and analyzing the marine pollution data to obtain the first pollution factors corresponding to at least one decision tree, and obtain the target pollution factors according to the first pollution factors corresponding to at least one decision tree; the data visualization and analysis module performs data visualization and analysis on the marine pollution data and the generated pollution report.
[0037] In an embodiment of the present application, an electronic device obtains marine pollution data; 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; obtains a target pollution factor based on the first pollution factors corresponding to at least one decision tree; performs pollution prediction on the obtained marine pollution data through at least one decision tree to obtain first pollution factors corresponding to at least one decision tree; and determines the target pollution factor based on at least one first pollution factor. 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.
[0038] Figure 5 FIG. 1 is a flow chart of another method for monitoring marine pollution disclosed in an embodiment of the present application. Figure 5 As shown, the marine pollution monitoring method may include the following steps: Step S501, obtaining marine pollution data.
[0039] The description of step S501 may refer to the relevant description of step S201 in the above embodiment, which will not be repeated here.
[0040] Step S502, 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 of the first decision tree; the first decision tree is any one of the at least one decision tree.
[0041] In some embodiments, the electronic device 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 of the first decision tree. Specifically, the first decision tree can classify the marine pollution data multiple times, and determine the first pollution factor corresponding to the first decision tree according to the classification conditions corresponding to the multiple classifications. Further, the electronic device can classify the marine pollution data according to the classification conditions corresponding to the first non-leaf node in the first decision tree, and 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, the marine pollution data is reclassified according to the classification condition corresponding to the next non-leaf node; if the classification result corresponding to the first non-leaf node is a leaf node, the first pollution factor is determined according to the leaf node. Among them, the classification conditions corresponding to each non-leaf node can be obtained by training based on sample marine pollution data, and the classification conditions can be classified according to a certain feature of the marine pollution data. For example, assuming that the ocean pollution data contains seawater temperature characteristics, the classification condition corresponding to a non-leaf node in the decision tree may be that the seawater temperature characteristics are greater than the temperature threshold. If the seawater temperature characteristics in the ocean pollution data are greater than the temperature threshold, the ocean pollution data is classified into the first category, and the classification result corresponding to the first category may be a leaf node; if the seawater temperature characteristics in the ocean pollution data are less than or equal to the temperature threshold, the ocean pollution data is classified into the second category, and the classification result corresponding to the second category may be the next non-leaf node.
[0042] 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, obtains 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 of sample marine pollution data.
[0043] Figure 6 It is a schematic diagram of the structure of a decision tree in an embodiment. As shown in FIG6 , the decision tree includes multiple non-leaf nodes and multiple leaf nodes, wherein the non-leaf node for the first classification of the marine pollution data is the root node. The decision tree can classify the marine pollution data into different subsets according to different characteristic attributes of the classification conditions, and each subset is a leaf node corresponding to a unique first pollution factor. The electronic device inputs the marine pollution data into the decision tree, makes a decision according to the classification conditions corresponding to each non-leaf node in the decision tree, and finally classifies the marine pollution data into a leaf node, and can determine the first pollution factor according to the leaf node.
[0044] The electronic device can train the decision tree to be trained according to the sample ocean pollution data set to obtain a trained decision tree, and obtain at least one trained decision tree by training at least one decision tree. The sample ocean pollution data set includes multiple sample ocean pollution data and the first pollution factor corresponding to each sample ocean pollution data. Figure 7 is a flowchart of decision tree training in one embodiment, such as Figure 7As shown, first, from the starting position, the sample ocean pollution data set is divided into one node, namely the root node. The sample ocean pollution data set is input into the decision tree to be trained. If the sample ocean pollution data set is an empty set, the training is terminated. If the node where the sample ocean pollution data set is located at the end of the training is the root node, null is returned; if the node where the sample ocean pollution data set is located at the end of the training is not the root node, the first pollution factor that appears most in the sample ocean pollution data set at the end of the training is marked as the first pollution factor corresponding to the node. If the sample ocean pollution data in the sample ocean pollution data set all belong to the same first pollution factor, the training is terminated, and the node where each sample ocean pollution data is located at the end of the training is marked as the first pollution factor corresponding to the sample ocean pollution data. If the sample ocean pollution data in the sample ocean pollution data set do not belong to the same first pollution factor, the sample ocean pollution data of the node are divided to obtain two subsets of sample ocean pollution data, and the two subsets of sample ocean pollution data are further classified.
[0045] Step S503: obtaining a target pollution factor according to the first pollution factors respectively corresponding to at least one decision tree.
[0046] The description of step S503 may refer to the relevant description of step S203 in the above embodiment, which will not be repeated here.
[0047] In an embodiment of the present application, an electronic device obtains marine pollution data, classifies the marine pollution data through a first decision tree, and determines a first pollution factor corresponding to the first decision tree based on the classification of the first decision tree; the first decision tree is any one of at least one decision tree, and a target pollution factor is obtained based on the first pollution factors corresponding to at least one decision tree, which can improve the accuracy of marine pollution prediction.
[0048] Figure 8 FIG. 1 is a flow chart of another method for monitoring marine pollution disclosed in an embodiment of the present application. Figure 8 As shown, the marine pollution monitoring method may include the following steps: Step S801, obtaining marine pollution data.
[0049] Step S802: 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.
[0050] The description of step S801 to step S802 may refer to the relevant description of step S201 to step S202 in the above embodiment, which will not be repeated here.
[0051] Step S803, calculating the average value of the first pollution factor corresponding to at least one decision tree, and obtaining the target pollution factor according to the average value.
[0052] In one embodiment, the electronic device predicts pollution on the marine pollution data through various decision trees, obtains the first pollution factor corresponding to each decision tree, and the first pollution factor may have a corresponding value. The electronic device may calculate the average value of the values corresponding to the multiple first pollution factors, and according to the average value, find the first pollution factor corresponding to the average value, and use the first pollution factor corresponding to the average value as the target pollution factor. For example, assuming that there are two decision trees in the random forest algorithm, and the two decision trees predict pollution on the marine pollution data respectively, and the values corresponding to the first pollution factors obtained respectively are 3 and 7, then the average value of the values 3 and 7 is calculated, and the average value is 5, and the first pollution factor with a value of 5 is found, and the first pollution factor with a value of 5 is used as the target pollution factor.
[0053] In marine pollution monitoring, a random forest algorithm consisting 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 also use the random forest algorithm to predict red tide outbreaks and other pollution in the ocean, so that preventive measures can be taken in advance, which can improve the efficiency of marine pollution control.
[0054] 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 gates, forget gates, and output gates). The role of these gates can be figuratively understood as "filters". They control the way information flows and determine which information should be retained, forgotten, or output. The LSTM neural network model effectively propagates long-term information through gate mechanisms and cell states, and is suitable for various time series modeling tasks and can capture complex sequence patterns. In some embodiments, the electronic device uses the LSTM neural network model obtained by training the historical marine pollution data set to predict the concentration trend of marine pollution data and obtain the pollution trend information within the target time period. Specifically, the electronic device obtains the trained LSTM neural network model by training the input long short-term memory network, that is, the LSTM neural network model, which can be used to perform time series analysis on marine pollution data, thereby predicting the concentration change trend of pollutants in marine pollution.
[0055] Furthermore, the electronic device can obtain a historical original marine pollution data set, which can come from marine monitoring stations, satellite remote sensing, buoys, sensors and other equipment, which are not limited here. The historical original marine pollution data set contains multiple historical original marine pollution data, and the electronic device performs data cleaning and preprocessing on the historical original marine pollution data in the historical original marine pollution data set to obtain the historical marine pollution data set. The electronic device constructs the multiple historical marine pollution data in the historical marine pollution data set into an input data format suitable for the LSTM model, wherein the input required by LSTM is three-dimensional, namely, the parameter samples, the parameter timesteps and the parameter features, wherein 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 may include an LSTM layer, a fully connected layer, and the like. One or more LSTM layers are used to extract 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, and the historical marine pollution data set is divided into a training set and a test set. Usually, the historical marine pollution data set with a longer collection time is used as the training set, and the newer collection time is used as the test set. After the historical marine pollution data set is divided 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 that it can 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, phytoplankton data, and pollutant concentration data in the input historical marine pollution data, the LSTM neural network model is trained. Through experimental research, the researchers used the LSTM neural network model to analyze and model the marine water quality data collected in different time periods, and realized the prediction of future seawater quality. Compared with the traditional support vector regression (SVR) algorithm, the LSTM neural network model achieved better fitting effect, with a goodness of fit of 0.9554 and a mean absolute error of 0.0117, which can well realize all-weather prediction of seawater quality.
[0056] In addition, the oil pollution content prediction model based on the LSTM neural network model can be used to predict the oil pollution content in the sea area. Electronic equipment can use the ability of the LSTM neural network model to process time series data, combined with remote sensing data, to achieve dynamic prediction of oil leakage pollution. Similarly, the LSTM neural network model can also monitor a variety of pollutants in real time, including heavy metals, organic pollutants, nutrients and other pollutants. Among them, heavy metals can include mercury. By monitoring the mercury content in marine waters, pollution caused by industrial wastewater discharge or atmospheric deposition can be discovered in a timely manner. It can also include cadmium. Real-time monitoring of cadmium helps to understand its distribution in the ocean and prevent its accumulation in organisms. It can also include lead. Lead monitoring can reflect the impact of transportation, industry and other activities on the marine environment. Organic pollutants can include petroleum and its products, including crude oil, gasoline, diesel, etc. By monitoring the concentration of oil film and oil substances, accidents such as tanker leaks and offshore oil extraction can be discovered in time; they can also include pesticides, such as organochlorine pesticides, etc. Monitoring their residues in the ocean can assess the degree of pollution to the ocean from agricultural activities, and can also detect difficult-to-degrade organic matter, such as polychlorinated biphenyls, etc. These substances persist in the ocean and pose potential hazards to marine life and ecosystems. Nutrients can include ammonia nitrogen, and real-time monitoring of ammonia nitrogen can reflect the pollution of the ocean by domestic sewage, agricultural runoff, etc.; they can also include nitrates and nitrites, and excessive input of these nutrients can lead to eutrophication of seawater and cause ecological disasters such as red tides; they can also include phosphates, and monitoring phosphates can help assess the impact of fertilizer use and sewage treatment on the balance of marine nutrients. Other pollutants may include radioactive nuclides, such as strontium-90 and cesium-137. Monitoring their distribution in the ocean can assess the impact of nuclear industry, nuclear accidents, etc. on the marine environment. They can also include suspended matter and turbidity. By monitoring suspended matter and turbidity, we can understand the transparency and particulate matter content of marine waters, reflecting the health of the marine ecosystem. It can also be pH value. Real-time monitoring of pH value can reflect the degree of ocean acidification and assess the impact of increased atmospheric carbon dioxide, acidic wastewater discharge, etc. on the marine environment.
[0057] In an embodiment of the present application, an electronic device obtains marine pollution data, performs pollution prediction on the marine pollution data through at least one decision tree, obtains first pollution factors corresponding to the at least one decision tree, calculates the average value of the first pollution factors corresponding to the at least one decision tree, and obtains a target pollution factor based on the average value. 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.
[0058] See also Fig. 9 , Fig. 9Schematic diagram of the structure of a marine pollution monitoring device disclosed in the embodiment of the present application. The device can be applied to the above-mentioned electronic equipment. Fig. 9 As 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 .
[0059] Data acquisition module 901, used to acquire marine pollution data; The pollution prediction module 902 is used to perform pollution prediction on the marine pollution data through at least one decision tree to obtain the first pollution factor corresponding to the at least one decision tree; 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.
[0060] In one embodiment, the marine pollution monitoring device 900 further includes an original acquisition module and a data cleaning module: The original acquisition module is used to obtain the original marine pollution data; The data cleaning module is used to clean the original marine pollution data to obtain marine pollution data.
[0061] In one embodiment, the pollution prediction module 902 further includes a data classification unit: A 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 of the first decision tree; the first decision tree is any one of the at least one decision tree.
[0062] In one embodiment, the data classification unit is also 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, the marine pollution data is reclassified 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, the first pollution factor is determined according to the non-leaf node.
[0063] In one embodiment, the target determination module 903 is further configured to select, from among the first pollution factors corresponding to at least one decision tree, the first pollution factor with the largest number of occurrences as the target pollution factor.
[0064] In one embodiment, the target determination module 903 is further used to calculate the average value of the first pollution factor corresponding to at least one decision tree, and obtain the target pollution factor according to the average value.
[0065] In one embodiment, the marine pollution monitoring device 900 The concentration prediction module is used to predict the concentration trend of marine pollution data using the LSTM neural network model trained with the historical marine pollution data set to obtain pollution trend information within the target time period.
[0066] See also Fig.10 , Fig.10 Schematic diagram of the structure of an electronic device disclosed in the embodiment of the present application. Fig.10 As shown, the electronic device 101 may include: A memory 1001 storing executable program codes; A processor 1002 coupled to the memory 1001; Among them, the processor 1002 calls the executable program code stored in the memory 1001 to execute any marine pollution monitoring method disclosed in the embodiments of the present application.
[0067] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by the processor, the processor implements any one of the marine pollution monitoring methods disclosed in the embodiment of the present application.
[0068] The embodiments of the present application disclose a computer program product, including a computer program, and the computer program can be executed by a processor to implement the methods described in the above embodiments.
[0069] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.
[0070] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0071] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0072] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0073] If the above-mentioned 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 this 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, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, server or network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.
[0074] A person skilled 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 related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0075] The above is a detailed introduction to a method, device, electronic device and storage medium for monitoring marine pollution disclosed in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and 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 methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for monitoring marine pollution, characterized in that: The method comprises: Obtaining marine pollution data; Performing pollution prediction on the marine pollution data by using at least one decision tree to obtain first pollution factors 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 by using at least one decision tree to obtain the first pollution factors corresponding to the at least one decision tree respectively 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 of the first decision tree; the first decision tree is any one of the at least one decision tree; The first decision tree comprises leaf nodes and non-leaf nodes; the marine pollution data is classified by the first decision tree, and the first pollution factor corresponding to the first decision tree is determined according to the classification of the first decision tree, including: according to the classification conditions corresponding to the first non-leaf node in the first decision tree, the marine pollution data is classified 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, the marine pollution data is reclassified 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, the first pollution factor is determined according to the leaf node.
2. The marine pollution monitoring method according to claim 1, characterized in that: After obtaining the marine pollution data, the method further comprises: Obtaining raw marine pollution data; The original ocean pollution data is cleaned to obtain the ocean pollution data.
3. The marine pollution monitoring method according to claim 1, characterized in that: The obtaining of the target pollution factor according to the first pollution factor respectively corresponding to the at least one decision tree comprises: Among the first pollution factors corresponding to the at least one decision tree, the first pollution factor with the largest number of occurrences is selected as the target pollution factor.
4. The marine pollution monitoring method according to claim 1, characterized in that: The obtaining of the target pollution factor according to the first pollution factor respectively corresponding to the at least one decision tree comprises: The average value of the first pollution factor corresponding to each of the at least one decision tree is calculated, and the target pollution factor is obtained according to the average value.
5. The marine pollution monitoring method according to any one of claims 1 to 4, characterized in that: The method further comprises: The LSTM neural network model trained with the historical marine pollution data set predicts the concentration trend of the marine pollution data to obtain the pollution trend information within the target time period.
6. A marine pollution monitoring device, characterized in that: The device comprises: A data acquisition module, used to acquire marine pollution data; A pollution prediction module, used to 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; A target determination module is used to obtain a target pollution factor according to the first pollution factor 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 a first decision tree, and determine a first pollution factor corresponding to the first decision tree according to the classification of the first decision tree; the first decision tree is any one of the at least one decision tree; The data classification unit is also 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, the marine pollution data is reclassified 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, the first pollution factor is determined according to the leaf node.
7. An electronic device, characterized in that: It comprises a memory and a processor, wherein 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 to 5.
8. A storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to execute the marine pollution monitoring method described in any one of claims 1-5 when executed by the processor.
Citation Information
Patent Citations
Clustering analysis and decision tree algorithm-based truck loading work time prediction model
CN106096748A
Combined prediction system and methods
WO2021214332A1