Intelligent detection method and device for seawater pH value
By employing multi-scale difference fusion and advanced machine learning algorithms, the stability and accuracy issues of seawater pH measurement in marine environments have been resolved, achieving highly sensitive and stable seawater pH detection, which is suitable for marine scientific research and environmental protection.
Patent Information
- Application Number
- CN202510310027.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-03-17
AI Technical Summary
Existing technologies for measuring seawater pH in marine environments face challenges such as corrosion, biological contamination, and complex marine environmental factors, resulting in low measurement accuracy and difficulty in achieving stable and reliable pH detection.
A smart detection method for seawater pH is established by employing techniques such as multi-scale difference fusion, support vector regression algorithm, adaptive grid partitioning, isolated forest algorithm, time series decomposition, and long short-term memory recurrent neural network. Through data cleaning and trend prediction, the measurement accuracy and stability are improved.
It achieves highly sensitive and stable pH measurement in complex marine environments, ensuring data consistency and comparability, improving the accuracy and precision of seawater pH measurement, and is suitable for marine scientific research and environmental protection.
Smart Images

Figure CN119985658B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pH value detection technology, and in particular to an intelligent method and device for detecting seawater pH value. Background Technology
[0002] Currently, seawater pH measurement plays a crucial role in marine scientific research, environmental protection, and resource management. Potentiometric methods, as a widely used measurement technique, are based on the definite relationship between the hydrogen ion concentration in the solution and the potential difference generated between electrodes. However, achieving stable and reliable pH measurements in practical applications faces numerous challenges. Due to the complexity of the marine environment, including but not limited to variations in salinity, temperature, and pressure, these physicochemical parameters can interfere with the electrode response, thus affecting the accuracy of the final measurement results. Furthermore, the physical installation of the sensor is critical; improper placement can lead to insufficient contact between the sensing area and the seawater sample, resulting in data deviation. Long-term deployment in seawater also means that the sensor must withstand corrosion and biofouling; over time, these problems can gradually weaken the device's performance and reduce measurement accuracy. To ensure the consistency and comparability of data across different sea areas, a unified and effective calibration strategy is particularly important. However, given the significant differences in seawater characteristics across different regions, developing a universally applicable calibration scheme is not easy. Therefore, developing a pH measurement technology that can maintain high sensitivity and stability under various conditions, and establishing an accurate conversion model between potential readings and actual pH values, is of profound significance for promoting the development of marine science.
[0003] One existing technology employs a composite ion-selective electrode (ISE), which utilizes a sensitive membrane material with high selectivity for specific ions to enhance interaction with hydrogen ions, thereby accurately reflecting changes in the pH of seawater. The core component of the composite ISE electrode is its sensitive membrane, composed of a specially designed ion-exchange resin capable of identifying and responding to hydrogen ion concentrations in the water. When the electrode is immersed in seawater, one side of the sensitive membrane contacts the external seawater, while the other side is in contact with the internal electrolyte solution. Due to the difference in hydrogen ion concentration between the two solutions, a small but measurable potential difference is formed across the sensitive membrane. This potential difference is the key signal to be captured, reflecting changes in the pH of the external seawater.
[0004] However, when deployed in marine environments for extended periods, composite ISE electrodes face the dual challenges of corrosion and biofouling. Even with corrosion-resistant materials and technologies, prolonged immersion in seawater still leads to the gradual accumulation of fouling on the electrode surface, affecting the quality of its contact with seawater. Over time, this not only weakens the electrode's performance but also reduces the accuracy of measurement results. Furthermore, the constantly changing parameters in seawater, such as salinity, temperature, and pressure, significantly impact the electrode's response characteristics. In summary, existing technologies cannot cope with the complexities of marine environments and maintain measurement accuracy over long periods, resulting in low precision in seawater pH measurements. Summary of the Invention
[0005] This invention provides an intelligent method and device for detecting seawater pH value, thereby improving the accuracy of seawater pH value measurement.
[0006] Firstly, in order to solve the above-mentioned technical problems, the present invention provides an intelligent method for detecting seawater pH, comprising:
[0007] Obtain raw potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples from different sea areas;
[0008] Multi-scale difference fusion is performed based on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data;
[0009] Based on the fused potential data, a nonlinear mapping relationship between potential and pH value is established using a support vector regression algorithm to generate a preliminary pH value prediction model.
[0010] Based on the spatial distribution characteristics, adaptive grid partitioning and interpolation point selection are used to perform spatial correction on the fused potential data to obtain corrected potential data.
[0011] The isolated forest algorithm is used to identify the contamination potential data in the calibration potential data, and the contamination potential data is cleaned by interpolation error analysis and fuzzy clustering to obtain cleaned potential data.
[0012] The cleaning potential data is trend-predicted by time series decomposition and trend term extraction to obtain the potential prediction trend.
[0013] The preliminary pH prediction model is adjusted based on the cleaning potential data, the potential prediction trend, and the preset marine calibration standard to obtain the regional pH prediction model.
[0014] The target pH value is obtained by predicting the pH value of the target sea area based on the regional pH prediction model.
[0015] In one optional implementation, the step of performing multi-scale difference fusion on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data includes:
[0016] Based on the spatial distribution characteristics, the original potential data is decomposed into sub-data sets of different scales using a wavelet decomposition algorithm.
[0017] Based on the sub-data set, and combined with the corresponding temperature, pressure and composition data, the Kriging interpolation algorithm is used to perform local interpolation to obtain interpolated sub-data.
[0018] The interpolated sub-data is weighted and fused using an adaptive weight allocation method, and the fusion result is optimized using Gaussian filtering to obtain fused potential data.
[0019] In one optional implementation, the step of establishing a nonlinear mapping relationship between potential and pH value using a support vector regression algorithm based on the fused potential data to generate a preliminary pH value prediction model includes:
[0020] The fused potential data is divided into a test set, a training set, and a validation set;
[0021] We choose support vector regression as the initial model, radial basis function as the kernel function, and minimizing the loss function as the original problem.
[0022] The original problem is transformed into solving Lagrange multipliers based on radial basis functions, and the objective function, regularization parameter, and kernel function parameter are obtained by solving the dual form of the original problem.
[0023] The initial model is evaluated on the validation set using a grid search combined with cross-validation, where the performance metrics include mean squared error and mean absolute error.
[0024] When the performance index does not meet the preset performance standard, adjust the regularization parameter and the kernel function parameter, and resolve the original problem.
[0025] When the performance indicators meet the preset performance standards, a preliminary pH value prediction model for the corresponding parameters is obtained.
[0026] In one optional implementation, the step of spatially correcting the fused potential data based on the spatial distribution characteristics using adaptive grid partitioning and interpolation point selection to obtain corrected potential data includes:
[0027] Based on the spatial distribution characteristics, an adaptive network partitioning algorithm is used to divide the fused potential data into regions to obtain regional potential data.
[0028] A representative value for each region's potential data is selected using an interpolation point selection algorithm;
[0029] Based on the representative value, the pre-stored sensor position and sensor angle, the fused potential data is corrected using the inverse distance weighting method to obtain corrected potential data;
[0030] The correction potential data is calculated using the following formula:
[0031]
[0032] D i =d i +k·θ i
[0033]
[0034] Among them, (x i ,y i ,z i (x) represents the location corresponding to the potential data of the i-th region. p ,y p ,z p ) represents the position corresponding to the value, θ i This represents the angle of the potential data of the i-th region relative to the corresponding representative value, k represents the preset correction coefficient, and d i D represents the distance from the potential data of the i-th region to the corresponding representative value. i This represents the correction distance from the potential data of the i-th region to the corresponding representative value, where p represents the preset distance control parameter, and e... i This represents the potential data for the i-th region. This represents the i-th correction potential data.
[0035] In one optional implementation, the step of using the isolated forest algorithm to identify contamination potential data in the corrected potential data, and then cleaning the contamination potential data through interpolation error analysis and fuzzy clustering to obtain cleaned potential data includes:
[0036] Time series analysis was used to extract pollution features from pre-stored historical monitoring data and construct a pollution feature vector.
[0037] Based on the pollution feature vector, the isolated forest algorithm is used to identify anomalies in the correction potential data to obtain pollution potential data;
[0038] The true value of the pollution potential data is estimated using a locally weighted linear regression algorithm, and the interpolation error is calculated.
[0039] If the interpolation error does not exceed the preset error threshold, the corresponding contamination potential data is retained;
[0040] If the interpolation error exceeds the preset error threshold, the corresponding contamination potential data is determined to be data to be cleaned, and the fuzzy C-means clustering algorithm is used to clean the data to be cleaned to obtain the cleaning result.
[0041] Once the contamination potential data in the calibration potential data has been cleaned, the cleaning potential data is obtained.
[0042] In one optional implementation, the step of performing trend prediction on the cleaning potential data through time series decomposition and trend term extraction to obtain the potential prediction trend includes:
[0043] The cleaning potential data is decomposed into time series data to obtain time series data.
[0044] The moving average method is used to extract the trend from the time series data to obtain the trend term.
[0045] The trend term is input into a pre-built trend prediction model to obtain the potential prediction trend;
[0046] The trend prediction model is constructed using a long short-term memory recurrent neural network.
[0047] In one optional implementation, adjusting the preliminary pH prediction model based on the cleaning potential data, the potential prediction trend, and a preset marine calibration standard to obtain a regional pH prediction model includes:
[0048] The calibration parameters for the corresponding sea area are determined according to the aforementioned sea area calibration standards;
[0049] The interpolation function construction method of the preliminary pH prediction model is dynamically adjusted according to the calibration parameters to obtain the adjusted model;
[0050] If the predicted potential trend exceeds the preset trend rule, the cleaning potential data is invalidated, and the original potential data is collected and processed again.
[0051] If the predicted potential trend does not exceed the preset trend rule, the cleaning potential data is input into the adjustment model to obtain the predicted pH value.
[0052] Calculate the predicted pH value and the predicted actual pH value;
[0053] If the prediction deviation exceeds the preset convergence range, the construction parameters of the interpolation function are adjusted according to the prediction deviation, and the pH value is re-predicted and the prediction deviation is recalculated.
[0054] If the prediction deviation does not exceed the preset convergence range, then the regional pH prediction model is obtained.
[0055] Secondly, the present invention provides an intelligent detection device for seawater pH value, comprising:
[0056] The data acquisition module is used to acquire raw potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples from different sea areas;
[0057] The data fusion module is used to perform multi-scale difference fusion based on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data.
[0058] The model building module is used to establish a nonlinear mapping relationship between potential and pH value based on the fused potential data and a support vector regression algorithm, thereby generating a preliminary pH value prediction model.
[0059] The data correction module is used to perform spatial correction on the fused potential data according to the spatial distribution characteristics, using adaptive grid division and interpolation point selection, to obtain corrected potential data.
[0060] The data cleaning module is used to identify contamination potential data in the calibration potential data using the isolated forest algorithm, and to clean the contamination potential data by interpolation error analysis and fuzzy clustering to obtain cleaned potential data.
[0061] The trend prediction module is used to predict the trend of the cleaning potential data through time series decomposition and trend term extraction to obtain the potential prediction trend.
[0062] The model adjustment module is used to adjust the preliminary pH prediction model based on the cleaning potential data, the potential prediction trend, and the preset marine calibration standard to obtain the regional pH prediction model.
[0063] A target prediction module is used to predict the pH value of a target sea area based on the regional pH prediction model to obtain the target pH value. Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the intelligent detection method for seawater pH value described in any one of the above embodiments.
[0064] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the intelligent detection method for seawater pH value described in any one of the above-mentioned methods.
[0065] Compared with the prior art, the present invention has the following beneficial effects:
[0066] (1) This invention discloses an intelligent detection method for seawater pH value, which comprehensively considers the influence of parameters such as temperature, pressure, and composition on the potential measurement value, ensures the consistency and comparability of data between different sea areas, realizes unified and effective calibration, and achieves the ability to cope with various complex factors in the sea area and ensure measurement accuracy over a long period of time, thereby improving the accuracy of seawater pH value measurement; and accordingly, a pH measurement technology that can maintain high sensitivity and high stability under various conditions has been developed, and an accurate conversion model between potential readings and true pH values has been established, which has profound significance for promoting the development of marine science;
[0067] (2) Based on the spatial distribution characteristics, the present invention uses adaptive grid division and interpolation point selection to perform spatial correction on the fused potential data to obtain corrected potential data. Specifically, the adaptive grid division algorithm can dynamically adjust the grid size to adapt to data distributions of different densities, thereby improving the correction accuracy. In addition, by introducing the angle factor, the correction distance not only considers the actual physical distance, but also comprehensively considers the influence of the sensor installation angle, making the correction of potential data more comprehensive and accurate, and greatly ensuring the accuracy of the PH prediction model.
[0068] (3) This invention uses the isolated forest algorithm to identify the pollution potential data in the calibration potential data, and performs data cleaning on the pollution potential data through interpolation error analysis and fuzzy clustering to obtain cleaned potential data; after the pollution potential data in the calibration potential data is cleaned, the system obtains cleaned potential data, which truly reflects the changes in the seawater environment; the whole process uses advanced machine learning and statistical analysis technology, and the system can effectively identify and process abnormal data to ensure the accuracy and reliability of the final potential data, thereby ensuring measurement accuracy in the long term and improving the accuracy of seawater pH measurement;
[0069] (4) The present invention performs trend prediction on the cleaning potential data by time series decomposition and trend term extraction to obtain the potential prediction trend; the trend prediction model is based on long short-term memory recurrent neural network (LSTM), which can effectively capture long-term dependence and is particularly suitable for predicting slowly changing marine environmental parameters. It can output the potential prediction value in the future period of time, thereby revealing the long-term memory characteristics of potential changes and initially and accurately reflecting the pH trend.
[0070] (5) Based on the cleaning potential data, potential prediction trend and preset marine calibration standards, the present invention systematically adjusts the preliminary pH prediction model to obtain the regional pH prediction model; and checks whether the potential prediction trend exceeds the preset trend rule, calculates whether the prediction deviation exceeds the preset convergence range, and performs corresponding selection processing. The obtained model can accurately reflect the pH value change law in the marine environment, providing a scientific basis for subsequent environmental monitoring and protection decisions. Attached Figure Description
[0071] Figure 1 This is a schematic diagram of the intelligent detection method for seawater pH value provided in the first embodiment of the present invention;
[0072] Figure 2 This is a schematic diagram of the intelligent detection device for seawater pH value provided in the second embodiment of the present invention. Detailed Implementation
[0073] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0074] Reference Figure 1 The first embodiment of the present invention provides an intelligent detection method for seawater pH value, comprising the following steps:
[0075] S11, acquire raw potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples from different sea areas;
[0076] S12, perform multi-scale difference fusion based on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data;
[0077] S13. Based on the fused potential data, a support vector regression algorithm is used to establish a nonlinear mapping relationship between potential and pH value, and a preliminary pH value prediction model is generated.
[0078] S14. Based on the spatial distribution characteristics, adaptive grid division and interpolation point selection are used to perform spatial correction on the fused potential data to obtain corrected potential data.
[0079] S15, the isolated forest algorithm is used to identify the pollution potential data in the correction potential data, and the pollution potential data is cleaned by interpolation error analysis and fuzzy clustering to obtain cleaned potential data;
[0080] S16, the cleaning potential data is trend-predicted by time series decomposition and trend term extraction to obtain the potential prediction trend;
[0081] S17, adjust the preliminary pH prediction model according to the cleaning potential data, the potential prediction trend and the preset marine calibration standard to obtain the regional pH prediction model;
[0082] S18, predict the pH value of the target sea area according to the regional pH prediction model to obtain the target pH value.
[0083] In step S11, the raw potential data, spatial distribution characteristics of the potential data, temperature, pressure and composition data of seawater samples from different sea areas are obtained.
[0084] A monitoring network deployed across different sea areas acquires raw potential data, spatial distribution characteristics of potential data, and temperature, pressure, and composition data from seawater samples. The monitoring network consists of multiple high-precision sensor nodes distributed across different locations within the target sea area, covering varying depths from the surface to the deepest layers to ensure data comprehensiveness and representativeness. Each sensor node is equipped with a potential sensor, a temperature sensor, a pressure sensor, and a composition sensor, capable of simultaneously acquiring potential, temperature, pressure, and composition data. The potential sensor, based on the electrode method, acquires raw potential data by detecting the potential difference between the hydrogen ion concentration in seawater and the electrodes. The temperature sensor uses thermistor or thermocouple technology to measure seawater temperature changes in real time. The pressure sensor measures seawater pressure at different depths using piezoresistive or piezoelectric effects. The composition sensor uses optical or electrochemical methods to detect the concentrations of components such as salinity and dissolved oxygen in the seawater.
[0085] To describe the spatial distribution characteristics of the potential data, the system not only records the potential values at individual points but also precisely locates the position of each sensor using a three-dimensional coordinate system, analyzing the relative positional relationships between monitoring points and the overall spatial layout. The location information of the sensor nodes is obtained through GPS or an underwater positioning system to ensure the accuracy of the spatial data.
[0086] In step S12, multi-scale difference fusion is performed based on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data.
[0087] In one specific implementation, the step of performing multi-scale difference fusion on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data includes:
[0088] Based on the spatial distribution characteristics, the original potential data is decomposed into sub-data sets of different scales using a wavelet decomposition algorithm.
[0089] Based on the sub-data set, and combined with the corresponding temperature, pressure and composition data, the Kriging interpolation algorithm is used to perform local interpolation to obtain interpolated sub-data.
[0090] The interpolated sub-data is weighted and fused using an adaptive weight allocation method, and the fusion result is optimized using Gaussian filtering to obtain fused potential data.
[0091] Specifically, firstly, based on the spatial distribution characteristics, wavelet decomposition is used to decompose the original potential data into subsets of data at different scales. Wavelet decomposition is a mathematical tool that can simultaneously analyze the time and frequency characteristics of a signal and is suitable for processing non-stationary signals. Assume E(x,y,z) represents the original potential data, where x, y, and z represent the horizontal position coordinates and vertical depth, respectively. Wavelet decomposition can decompose E(x,y,z) into multiple subsets E at different scales. j (x, y, z), where each subset of the dataset corresponds to a different resolution level j. Specifically, the wavelet transform formula is as follows:
[0092]
[0093] Here, ψ j,k It is a wavelet basis function, c j,k These are the corresponding wavelet coefficients. By applying multi-scale wavelet decomposition to the original potential data, the system can capture information at different levels, from large-scale trends to local details.
[0094] Next, for each sub-data set E j Given (x,y,z), and combining the corresponding temperature T(x,y,z), pressure P(x,y,z), and composition data C(x,y,z), local interpolation is performed using the Kriging interpolation algorithm to obtain the interpolated subdata E'. j (x,y,z). Kriging interpolation is a spatial interpolation method based on statistical principles. It uses the spatial autocorrelation between known points to estimate the value of unknown points. For example, the specific interpolation formula is:
[0095]
[0096] Here, λ i Here, λ is the weighting coefficient, μ is a preset constant term, and N is the number of known points used for interpolation. To determine the weighting coefficient λ... i The system needs to solve the following matrix equations:
[0097]
[0098] The N×N matrix on the left represents the semivariogram γ(h) at different distances h. i The value at each element γ(h). i This describes the spatial autocorrelation between data points. The middle column vector contains the weighting coefficients λ. i These coefficients are used to determine the influence of each known point on the predicted value of the unknown point. The column vector on the right contains the semi-variogram γ(h0-h i h0 is the distance between the point to be predicted and the known point.
[0099] Then, an adaptive weight allocation method is used to apply the interpolated subdata E' j (x, y, z) are weighted and fused. An adaptive weight allocation method dynamically adjusts the contribution of each subset based on its importance, ensuring a more reasonable fusion result. Assume w j Let E represent the weight of the j-th scale subset, then the fused potential data... fusion (x,y,z) can be represented as:
[0100]
[0101] weight w j The calculation is based on the variance and covariance matrices of the subset dataset, ensuring that data with a high signal-to-noise ratio receive higher weights.
[0102] Finally, to further optimize the fusion results, the system uses a Gaussian filter on E. fusion (x,y,z) is smoothed. Gaussian filtering is a common image processing technique that can also be applied to 3D data smoothing. Assuming G(σ) represents the Gaussian kernel function and σ is the standard deviation parameter, the final fused potential data E after Gaussian filtering... final (x,y,z) is calculated as follows:
[0103] E final (x,y,z)=G(σ)*E fusion (x,y,z)
[0104] Here, * denotes convolution operation. Gaussian filtering effectively removes high-frequency noise, making the fused potential data smoother and more stable.
[0105] In step S13, based on the fused potential data, a support vector regression algorithm is used to establish a nonlinear mapping relationship between potential and pH value, and a preliminary pH value prediction model is generated.
[0106] In establishing the nonlinear mapping relationship between potential and pH, considering the influence of temperature, pressure, and composition on potential measurement, these influencing factors were also incorporated. Potential was used as the input variable, pH as the predicted output, and the aforementioned influencing factors as environmental parameters to establish the mapping relationship. The pH data used in establishing the nonlinear mapping relationship was obtained based on standard measurements of various seawater samples in S11.
[0107] In one specific implementation, the step of establishing a nonlinear mapping relationship between potential and pH value using a support vector regression algorithm based on the fused potential data to generate a preliminary pH value prediction model includes:
[0108] The fused potential data is divided into a test set, a training set, and a validation set;
[0109] We choose support vector regression as the initial model, radial basis function as the kernel function, and minimizing the loss function as the original problem.
[0110] The original problem is transformed into solving Lagrange multipliers based on radial basis functions, and the objective function, regularization parameter, and kernel function parameter are obtained by solving the dual form of the original problem.
[0111] The initial model is evaluated on the validation set using a grid search combined with cross-validation, where the performance metrics include mean squared error and mean absolute error.
[0112] When the performance index does not meet the preset performance standard, adjust the regularization parameter and the kernel function parameter, and resolve the original problem.
[0113] When the performance indicators meet the preset performance standards, a preliminary pH value prediction model for the corresponding parameters is obtained.
[0114] Specifically, the system first divides the fused potential data into a test set, a training set, and a validation set. This division aims to provide independent datasets for model training, tuning, and evaluation, ensuring the model has good generalization ability. The training set is used for model training, the validation set is used to tune model parameters, and the test set is used for final model performance evaluation.
[0115] Next, we choose Support Vector Regression (SVR) as the initial model and Radial Basis Function (RBF) as the kernel function. SVR is a supervised learning algorithm, particularly suitable for handling nonlinear regression problems. For example, the original optimization problem is defined as minimizing the loss function:
[0116]
[0117] Here, w represents the weight vector, b is the bias term, and ξ... i and These are the slack variables controlled by the regularization parameter C, used for the fault tolerance mechanism in the case of indivisibility, and N is the number of samples.
[0118] When the RBF kernel function is used, the primal problem is transformed into solving for Lagrange multipliers. Its dual form is:
[0119]
[0120] Here, y i x represents the target value. i and x j It is the input feature vector, α i and It corresponds to x i A pair of Lagrange multipliers, α j and It corresponds to x j A pair of Lagrange multipliers; K(x i ,x j ) is the RBF kernel function, defined as:
[0121] K(x i ,x j )=exp(-γ||x i -x j || 2 )
[0122] Here, γ is a parameter of the RBF kernel function, which determines the width of the Gaussian distribution.
[0123] To find the optimal regularization parameter C and kernel function parameter γ, the system uses a grid search combined with cross-validation to evaluate model performance. The grid search traverses a series of candidate parameter combinations, while cross-validation calculates the mean squared error (MSE) and mean absolute error (MAE) of the model by repeatedly splitting the training and validation sets, using these as performance metrics. If these performance metrics fail to meet preset standards, the values of C and γ are adjusted, and the optimization problem is solved again until the expected performance level is achieved.
[0124] Once the optimal parameter combination is determined, the system obtains the final concentricity deviation model. This model not only accurately predicts the concentricity deviation value corresponding to the gap variation value, but also has good generalization ability and is applicable to unseen data.
[0125] After training, when new fusion potential data is input into the model, the system uses the trained support vector regression model for prediction. Based on the optimal regularization parameter C and kernel function parameter γ determined during the previous optimization process, the model calculates the corresponding pH prediction result. Specifically, the system maps the input feature vector into a high-dimensional feature space and determines which class boundary it is closest to based on the position of the support vector, thereby determining the pH prediction.
[0126] In step S14, based on the spatial distribution characteristics, adaptive grid partitioning and interpolation point selection are used to perform spatial correction on the fused potential data to obtain corrected potential data. In one specific embodiment...
[0127] In one specific implementation, the step of spatially correcting the fused potential data based on the spatial distribution characteristics using adaptive grid partitioning and interpolation point selection to obtain corrected potential data includes:
[0128] Based on the spatial distribution characteristics, an adaptive network partitioning algorithm is used to divide the fused potential data into regions to obtain regional potential data.
[0129] A representative value for each region's potential data is selected using an interpolation point selection algorithm;
[0130] Based on the representative value, the pre-stored sensor position and sensor angle, the fused potential data is corrected using the inverse distance weighting method to obtain corrected potential data;
[0131] The correction potential data is calculated using the following formula:
[0132]
[0133] D i =d i +k·θ i
[0134]
[0135] Among them, (x i ,y i ,z i (x) represents the location corresponding to the potential data of the i-th region. p ,y p ,z p ) represents the position corresponding to the value, θ i This represents the angle of the potential data of the i-th region relative to the corresponding representative value, k represents the preset correction coefficient, and d i D represents the distance from the potential data of the i-th region to the corresponding representative value. iThis represents the correction distance from the potential data of the i-th region to the corresponding representative value, where p represents the preset distance control parameter, and e... i This represents the potential data for the i-th region. This represents the i-th correction potential data.
[0136] Specifically, firstly, the system uses an adaptive grid partitioning algorithm to divide the fused potential data into regions based on spatial distribution characteristics, obtaining regional potential data. The adaptive grid partitioning algorithm can dynamically adjust the grid size to adapt to data distributions of varying densities, thereby improving correction accuracy. Specifically, the algorithm automatically determines an appropriate grid cell size based on the distance and density between data points, ensuring that the number of data points within each grid cell is moderate—neither too sparse nor too dense. In this way, the system divides the entire monitoring area into multiple sub-regions, each containing a certain number of fused potential data points.
[0137] Next, the system selects representative values for the potential data of each region using an interpolation point selection algorithm. This algorithm considers the spatial distribution and numerical characteristics of the data points within the region, selecting the data points that best represent the overall characteristics of the region as representative values. For example, within a specific sub-region, the algorithm selects data points located at the center with intermediate potential values as representative values. These representative values not only reflect the average state within the region but also possess high representativeness, which is helpful for subsequent correction calculations.
[0138] Then, the system corrects the fused potential data using the inverse distance weighting (IDW) method based on representative values, pre-stored sensor positions, and sensor angles, obtaining corrected potential data. The inverse distance weighting method is a distance-based interpolation method that assumes the influence of data points decreases with increasing distance. The specific formula is as follows:
[0139]
[0140] Among them, D i This represents the correction distance from the potential data of the i-th region to the corresponding representative value, where p represents the preset distance control parameter, and e... i This represents the potential data for the i-th region. This represents the i-th correction potential data.
[0141] Correction distance D i The calculation formula is:
[0142] D i =d i +k·θ i
[0143] Where, d iIt is the actual Euclidean distance from the potential data of the i-th region to the corresponding representative value, defined as:
[0144]
[0145] Here, (x) i ,y i ,z i (x) represents the location corresponding to the potential data of the i-th region. p ,y p ,z p ) represents the position corresponding to the value, θ i This represents the angle of the potential data of the i-th region relative to the corresponding representative value, k represents the preset correction coefficient, and d i D represents the distance from the potential data of the i-th region to the corresponding representative value. i This represents the correction distance from the potential data of the i-th region to the corresponding representative value.
[0146] By introducing the angle factor θ i Correction distance D i It not only takes into account the actual physical distance, but also comprehensively considers the influence of the sensor installation angle, making the calibration more comprehensive and accurate.
[0147] In step S15, the isolated forest algorithm is used to identify the contamination potential data in the correction potential data, and the contamination potential data is cleaned by interpolation error analysis and fuzzy clustering to obtain cleaned potential data.
[0148] In one specific implementation, the step of using the isolated forest algorithm to identify contaminated potential data in the corrected potential data, and then cleaning the contaminated potential data through interpolation error analysis and fuzzy clustering to obtain cleaned potential data includes:
[0149] Time series analysis was used to extract pollution features from pre-stored historical monitoring data and construct a pollution feature vector.
[0150] Based on the pollution feature vector, the isolated forest algorithm is used to identify anomalies in the correction potential data to obtain pollution potential data;
[0151] The true value of the pollution potential data is estimated using a locally weighted linear regression algorithm, and the interpolation error is calculated.
[0152] If the interpolation error does not exceed the preset error threshold, the corresponding contamination potential data is retained;
[0153] If the interpolation error exceeds the preset error threshold, the corresponding contamination potential data is determined to be data to be cleaned, and the fuzzy C-means clustering algorithm is used to clean the data to be cleaned to obtain the cleaning result.
[0154] Once the contamination potential data in the calibration potential data has been cleaned, the cleaning potential data is obtained.
[0155] Specifically, firstly, the system employs time series analysis to extract pollution features from pre-stored historical monitoring data, constructing a pollution feature vector. Time series analysis reveals the trends and periodic patterns of data over time, thereby extracting features related to pollution events. For example, for historical potential data E(t), the system calculates its mean μ, standard deviation σ, and autocorrelation coefficient r. k This data, combined with other environmental parameters (such as temperature and pressure), forms a multidimensional pollution feature vector F = [μ, σ, r1, r2, ...]. These feature vectors are used to train the isolated forest model for subsequent identification of anomalous data.
[0156] Next, based on the constructed pollution feature vector, the system uses the Isolation Forest algorithm to identify anomalies in the corrected potential data, obtaining pollution potential data. Isolation Forest is a tree-based unsupervised learning algorithm, particularly suitable for anomaly detection in high-dimensional data. This algorithm constructs an isolation tree by randomly selecting features and split points; anomalous data typically requires fewer splits to be isolated. Specifically, for each data point x... i The isolated forest calculates its anomaly score s(x). i ), defined as:
[0157]
[0158] Here, E(h(x) i )) represents data point x i The average path length across all isolated trees, c(n), is the average path length of a binary tree containing n samples. When s(x i When the data point x exceeds the preset threshold, i It was determined to be abnormal, i.e., the pollution potential data.
[0159] Then, the system estimates the true value of the contamination potential data using the Locally Weighted Linear Regression (LWLR) algorithm and calculates the interpolation error. LWLR is a non-parametric regression method that can fit data locally, reducing the impact of global noise. Assume e' i This represents the true value e' of the i-th pollution potential data. i It can be estimated using the following formula:
[0160]
[0161] Here, w ij It is the weight matrix, defined as:
[0162]
[0163] Where k is a preset bandwidth parameter that controls the rate of weight decay. Interpolation error ∈ i Defined as:
[0164] ∈ i =|e′ i -e″ i |
[0165] If the interpolation error ∈ i If the error does not exceed the preset error threshold, the corresponding contamination potential data is retained; if the interpolation error ∈ i If the error exceeds the preset error threshold, the corresponding contamination potential data is determined to be data to be cleaned.
[0166] For the data to be cleaned, the system uses the Fuzzy C-means Clustering (FCM) algorithm. FCM is a soft clustering method that allows data points to belong to multiple clusters and assigns membership values. Assume u ij The cluster center v represents the membership degree of the i-th data point to the j-th cluster. j Update using the following formula:
[0167]
[0168] Here, m is a preset fuzziness index, controlling the smoothness of the membership degree. Membership degree u ij The update formula is:
[0169]
[0170] Where d(x) i ,v j ) is the data point x i With cluster center v j The distance between them. By iteratively updating the membership degree and cluster centers, the system can effectively separate normal data from abnormal data, thereby achieving data cleaning.
[0171] Once the contamination potential data in the calibration potential data has been cleaned, the system obtains the cleaned potential data. The entire process utilizes advanced machine learning and statistical analysis techniques, enabling the system to effectively identify and process abnormal data, ensuring the accuracy and reliability of the final potential data.
[0172] In step S16, the cleaning potential data is trend predicted by time series decomposition and trend term extraction to obtain the potential prediction trend.
[0173] In one specific implementation, the step of performing trend prediction on the cleaning potential data through time series decomposition and trend term extraction to obtain the potential prediction trend includes:
[0174] The cleaning potential data is decomposed into time series data to obtain time series data.
[0175] The moving average method is used to extract the trend from the time series data to obtain the trend term.
[0176] The trend term is input into a pre-built trend prediction model to obtain the potential prediction trend;
[0177] The trend prediction model is constructed using a long short-term memory recurrent neural network.
[0178] Specifically, firstly, the system performs time series decomposition on the cleaned potential data to separate trend, seasonality, and random components. Time series decomposition is an important tool for understanding the intrinsic structure of complex signals and helps distinguish different types of fluctuations. Specifically, assuming Q(t) represents the cleaned potential data, the time series decomposition can be expressed as:
[0179] Q(t) = T(t) + S(t) + R(t)
[0180] Here, T(t) represents the trend term, describing the long-term changes in the data; S(t) represents the seasonality term, reflecting periodic fluctuations; and R(t) represents the random term, capturing unpredictable noise. To achieve decomposition, the system employs classic time series decomposition methods, such as STL (Seasonal and Trend decomposition using Loess), which can effectively separate the various components.
[0181] Next, the system uses the moving average method to extract the trend from the time series data, obtaining the trend term T(t). Moving average is a commonly used smoothing technique that reduces the impact of short-term fluctuations and highlights long-term trends. For a given time window, the trend term T(t) processed by the moving average is calculated as follows:
[0182]
[0183] Here, Q(i) is the value of the cleaning potential data at time point i, and v is the width of the preset time window. By adjusting the size of the time window, the system can achieve a balance between smoothing effect and response speed. After moving average processing, the system obtains a relatively smooth trend term T(t), which provides a basis for further trend prediction.
[0184] The system then inputs the trend term T(t) into a pre-built trend prediction model to obtain the potential prediction trend. This trend prediction model is based on a Long Short-Term Memory Recurrent Neural Network (LSTM), a deep learning architecture specifically designed for processing time-series data. By introducing memory units and gating mechanisms, LSTM can effectively capture long-term dependencies, making it particularly suitable for predicting slowly changing environmental parameters. Specifically, the calculation formula for the LSTM model is as follows:
[0185] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0186] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0187]
[0188] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0189] h t =o t ⊙tanh(C t )
[0190] Here, f t i t o t These are the activation values for the forget gate, input gate, and output gate, respectively. and C t These represent the states of candidate memory units and the current memory unit, respectively, h. t The hidden state is σ, tanh is the activation function, and W is the hidden state. f W i W C W o It is the weight matrix, b f b i b C b o It is the bias vector, and ⊙ represents element-wise multiplication.
[0191] By training an LSTM model, the system can learn the long-term dependencies implicit in the trend term T(t). When new trend term data is input into the model, the LSTM can predict future potential change trends. For example, given a set of past time series data, the model can output potential predictions for a future period, thus revealing the long-term memory characteristics of potential changes.
[0192] In step S17, the preliminary pH prediction model is adjusted based on the cleaning potential data, the potential prediction trend, and the preset marine calibration standard to obtain the regional pH prediction model.
[0193] In one specific embodiment, adjusting the preliminary pH prediction model based on the cleaning potential data, the potential prediction trend, and a preset marine calibration standard to obtain a regional pH prediction model includes:
[0194] The calibration parameters for the corresponding sea area are determined according to the aforementioned sea area calibration standards;
[0195] The interpolation function construction method of the preliminary pH prediction model is dynamically adjusted according to the calibration parameters to obtain the adjusted model;
[0196] If the predicted potential trend exceeds the preset trend rule, the cleaning potential data is invalidated, and the original potential data is collected and processed again.
[0197] If the predicted potential trend does not exceed the preset trend rule, the cleaning potential data is input into the adjustment model to obtain the predicted pH value.
[0198] Calculate the predicted pH value and the predicted actual pH value;
[0199] If the prediction deviation exceeds the preset convergence range, the construction parameters of the interpolation function are adjusted according to the prediction deviation, and the pH value is re-predicted and the prediction deviation is recalculated.
[0200] If the prediction deviation does not exceed the preset convergence range, then the regional pH prediction model is obtained.
[0201] Specifically, firstly, the system determines the calibration parameters for the corresponding sea area based on the sea area calibration standards. Different sea areas require different calibration standards due to their unique geographical and chemical characteristics. For example, in a certain sea area, the calibration parameters might include a pH correction factor k within a specific temperature range. T Pressure correction factor k P and component correction factor k C These parameters are predetermined using results from laboratory analysis and field sampling, and are used to adjust the initial pH prediction model.
[0202] Next, the interpolation function of the initial pH prediction model is dynamically adjusted based on the calibration parameters to obtain the adjusted model. Assuming the initial pH prediction model uses Support Vector Regression (SVR), its interpolation function is:
[0203]
[0204] Here, K(x,x) i ) is the radial basis function (RBF) kernel function, defined as:
[0205]
[0206] Where γ is a parameter of the RBF kernel function, determining the width of the Gaussian distribution, and α... i and It corresponds to x i A pair of Lagrange multipliers, x and x i γ is the input feature vector, and N represents the number of feature vectors. To adapt to the characteristics of a specific sea area, the system adjusts γ and the bias term b according to the calibration parameters to optimize model performance. Specifically, the adjusted interpolation function can be expressed as:
[0207]
[0208] here, γ' and b' are based on calibration parameter k T k P and k C Dynamic adjustment.
[0209] The system then checks whether the potential prediction trend exceeds the preset trend rules. If the potential prediction trend exceeds the preset rules, the current cleaning potential data is considered unreliable, and the system discards this data and re-collects and processes the original potential data. The potential prediction trend rules can be set based on historical data and expert experience; for example, if the potential change rate exceeds 0.1 units per hour, it is judged as abnormal.
[0210] If the potential prediction trend does not exceed the preset rules, the cleaning potential data will be input into the adjustment model to obtain the predicted pH value.
[0211] Next, the system calculates the prediction deviation between the predicted pH value and the pre-stored actual pH value.
[0212] If the prediction bias exceeds the preset convergence range, the construction parameters of the interpolation function are adjusted based on the prediction bias, and the pH value is re-predicted and the prediction bias is recalculated. The parameter adjustment can be achieved through grid search combined with cross-validation to find the optimal parameter combination that minimizes the prediction bias. For example, the values of γ' and b' are adjusted, the model is retrained, and its performance is evaluated until the prediction bias converges to the preset range.
[0213] If the prediction deviation does not exceed the preset convergence range, the system confirms that a regional pH prediction model has been obtained. This model not only adapts to the characteristics of specific sea areas but also has good generalization ability, making it applicable to unseen data. The final regional pH prediction model accurately reflects the pH variation patterns in the marine environment, providing a scientific basis for subsequent environmental monitoring and protection decisions.
[0214] In step S18, the pH value of the target sea area is predicted according to the regional pH prediction model to obtain the target pH value.
[0215] Specifically, firstly, the system inputs the current potential data of the target sea area into the regional pH prediction model. It is assumed that this model is built based on Support Vector Regression (SVR) and has been dynamically adjusted to adapt to the characteristics of the specific sea area.
[0216] Next, the system uses an interpolation function to calculate the target pH value. Specifically, for the potential data at each time point, the system calculates the predicted pH value based on the corresponding environmental parameters.
[0217] The following describes the working process of this invention using a common scenario as an example. For specific embodiments of this invention, please refer to... Figure 1 A smart method for detecting seawater pH includes the following steps:
[0218] During a smart pH monitoring operation in a specific area of the South China Sea, the system demonstrated its high efficiency and accuracy. The area covered approximately 100 square kilometers, with depths ranging from the surface to 1000 meters. To ensure the comprehensiveness and accuracy of the data, the research team set up multiple monitoring stations, each equipped with several high-precision potential sensors, covering different water depth ranges.
[0219] First, the system acquired the raw potential data from each monitoring point and analyzed it in conjunction with spatial distribution characteristics. Through multi-scale wavelet decomposition and Kriging interpolation algorithms, the system successfully fused these data, generating high-precision fused potential data. Next, based on the spatial distribution characteristics, the system performed spatial correction on the fused potential data using adaptive grid partitioning and interpolation point selection. This eliminated measurement biases caused by factors such as sensor position and angle, resulting in corrected potential data.
[0220] Subsequently, the system used the Isolation Forest algorithm to identify pollution potential data and cleaned the data through interpolation error analysis and fuzzy clustering. The cleaned potential data is more reliable and accurately reflects changes in the marine environment. Furthermore, time series decomposition and trend term extraction revealed the long-term memory characteristics of potential changes, ensuring the continuity of data quality. Based on this, a trend prediction model constructed using a Long Short-Term Memory Recurrent Neural Network accurately predicted future potential change trends.
[0221] To improve the accuracy of pH prediction, the system employs voltammetric analysis to extract various linear parameters as input features, including but not limited to substrate current intensity, substrate current density, peak current intensity, peak current density, peak potential, peak potential, and half-peak and half-width potential. In particular, the system defines a new pH indication parameter, a. II This parameter, a, is used to more accurately reflect changes in pH value. II Defined as:
[0222]
[0223] Here, E F The peak potential is represented by HWHM, which indicates the half-peak-half-width potential. ΔI1 and ΔI2 represent the peak current intensities corresponding to the pH-sensitive and pH-insensitive probes, respectively, and α is the electrode constant. This parameter can effectively capture subtle changes in electrochemical signals, thereby improving the sensitivity and accuracy of pH prediction.
[0224] Finally, based on the cleaning potential data, potential prediction trends, and preset marine calibration standards, the system adjusted the initial pH prediction model to obtain a regional pH prediction model. When new potential data was input into this optimized model, the system successfully predicted the pH value of the target marine area. The results showed that within a typical monitoring period in this marine area, the predicted pH value remained stable between 7.8 and 8.2, which highly matched the actual measurement results, verifying the accuracy of the system.
[0225] Ultimately, this test achieved accurate prediction of the pH value of the target sea area.
[0226] Reference Figure 2 The second embodiment of the present invention provides an intelligent detection device for seawater pH value, comprising:
[0227] The data acquisition module is used to acquire raw potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples from different sea areas;
[0228] The data fusion module is used to perform multi-scale difference fusion based on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data.
[0229] The model building module is used to establish a nonlinear mapping relationship between potential and pH value based on the fused potential data and a support vector regression algorithm, thereby generating a preliminary pH value prediction model.
[0230] The data correction module is used to perform spatial correction on the fused potential data according to the spatial distribution characteristics, using adaptive grid division and interpolation point selection, to obtain corrected potential data.
[0231] The data cleaning module is used to identify contamination potential data in the calibration potential data using the isolated forest algorithm, and to clean the contamination potential data by interpolation error analysis and fuzzy clustering to obtain cleaned potential data.
[0232] The trend prediction module is used to predict the trend of the cleaning potential data through time series decomposition and trend term extraction to obtain the potential prediction trend.
[0233] The model adjustment module is used to adjust the preliminary pH prediction model based on the cleaning potential data, the potential prediction trend, and the preset marine calibration standard to obtain the regional pH prediction model.
[0234] The target prediction module is used to predict the pH value of the target sea area based on the regional pH prediction model, and obtain the target pH value.
[0235] It should be noted that the intelligent detection device for seawater pH provided in this embodiment of the invention is used to execute all the process steps of the intelligent detection method for seawater pH in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0236] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a smart detection program for seawater pH. When the processor executes the computer program, it implements the steps described in the various embodiments of the smart detection method for seawater pH, for example... Figure 1 The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as the intelligent detection module for seawater pH value.
[0237] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0238] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0239] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0240] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0241] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0242] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0243] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A smart method for detecting seawater pH, characterized in that, include: Obtain raw potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples from different sea areas; Multi-scale difference fusion is performed based on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data; Based on the fused potential data, a nonlinear mapping relationship between potential and pH value is established using a support vector regression algorithm to generate a preliminary pH value prediction model. Based on the spatial distribution characteristics, adaptive grid partitioning and interpolation point selection are used to perform spatial correction on the fused potential data to obtain corrected potential data. The isolated forest algorithm is used to identify the contamination potential data in the calibration potential data, and the contamination potential data is cleaned by interpolation error analysis and fuzzy clustering to obtain cleaned potential data. The cleaning potential data is trend-predicted by time series decomposition and trend term extraction to obtain the potential prediction trend. The preliminary pH prediction model is adjusted based on the cleaning potential data, the potential prediction trend, and the preset marine calibration standard to obtain the regional pH prediction model. Based on the regional pH prediction model, the pH value of the target sea area is predicted to obtain the target pH value. The step of spatially correcting the fused potential data based on the spatial distribution characteristics using adaptive grid partitioning and interpolation point selection to obtain corrected potential data includes: Based on the spatial distribution characteristics, an adaptive network partitioning algorithm is used to divide the fused potential data into regions to obtain regional potential data. A representative value for each region's potential data is selected using an interpolation point selection algorithm; Based on the representative value, the pre-stored sensor position and sensor angle, the fused potential data is corrected using the inverse distance weighting method to obtain corrected potential data; The correction potential data is calculated using the following formula: in, Indicates the first The location corresponding to the potential data of each region This indicates the position corresponding to the value. Indicates the first For each region's potential data, the angle corresponding to the representative value is... This indicates the preset correction coefficient. Indicates the first The distance from the potential data of each region to the corresponding representative value Indicates the first The correction distance from the potential data of each region to the corresponding representative value This indicates the preset distance control parameters. Indicates the first Potential data for each region, Indicates the first One correction potential data.
2. The intelligent detection method for seawater pH value according to claim 1, characterized in that, The process of performing multi-scale difference fusion on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data includes: Based on the spatial distribution characteristics, the original potential data is decomposed into sub-data sets of different scales using a wavelet decomposition algorithm. Based on the sub-data set, and combined with the corresponding temperature, pressure and composition data, the Kriging interpolation algorithm is used to perform local interpolation to obtain interpolated sub-data. The interpolated sub-data is weighted and fused using an adaptive weight allocation method, and the fusion result is optimized using Gaussian filtering to obtain fused potential data.
3. The intelligent detection method for seawater pH value according to claim 1, characterized in that, The step of establishing a nonlinear mapping relationship between potential and pH value using a support vector regression algorithm based on the fused potential data, and generating a preliminary pH value prediction model, includes: The fused potential data is divided into a test set, a training set, and a validation set; We choose support vector regression as the initial model, radial basis function as the kernel function, and minimizing the loss function as the original problem. The original problem is transformed into solving Lagrange multipliers based on radial basis functions, and the objective function, regularization parameter, and kernel function parameter are obtained by solving the dual form of the original problem. The initial model is evaluated on the validation set using a grid search combined with cross-validation, where the performance metrics include mean squared error and mean absolute error. When the performance index does not meet the preset performance standard, adjust the regularization parameter and the kernel function parameter, and resolve the original problem. When the performance indicators meet the preset performance standards, a preliminary pH value prediction model for the corresponding parameters is obtained.
4. The intelligent detection method for seawater pH value according to claim 1, characterized in that, The isolated forest algorithm is used to identify contaminated potential data in the corrected potential data, and the contaminated potential data is cleaned by interpolation error analysis and fuzzy clustering to obtain cleaned potential data, including: Time series analysis was used to extract pollution features from pre-stored historical monitoring data and construct a pollution feature vector. Based on the pollution feature vector, the isolated forest algorithm is used to identify anomalies in the correction potential data to obtain pollution potential data; The true value of the pollution potential data is estimated using a locally weighted linear regression algorithm, and the interpolation error is calculated. If the interpolation error does not exceed the preset error threshold, the corresponding contamination potential data is retained; If the interpolation error exceeds the preset error threshold, the corresponding contamination potential data is determined to be data to be cleaned, and the fuzzy C-means clustering algorithm is used to clean the data to be cleaned to obtain the cleaning result. Once the contamination potential data in the calibration potential data has been cleaned, the cleaning potential data is obtained.
5. The intelligent detection method for seawater pH value according to claim 1, characterized in that, The step of predicting the trend of the cleaning potential data through time series decomposition and trend term extraction to obtain the potential prediction trend includes: The cleaning potential data is decomposed into time series data to obtain time series data. The moving average method is used to extract the trend from the time series data to obtain the trend term. The trend term is input into a pre-built trend prediction model to obtain the potential prediction trend; The trend prediction model is constructed using a long short-term memory recurrent neural network.
6. The intelligent detection method for seawater pH value according to claim 1, characterized in that, The step of adjusting the preliminary pH prediction model based on the cleaning potential data, the potential prediction trend, and the preset marine calibration standard to obtain the regional pH prediction model includes: The calibration parameters for the corresponding sea area are determined according to the aforementioned sea area calibration standards; The interpolation function construction method of the preliminary pH prediction model is dynamically adjusted according to the calibration parameters to obtain the adjusted model; If the predicted potential trend exceeds the preset trend rule, the cleaning potential data is invalidated, and the original potential data is collected and processed again. If the predicted potential trend does not exceed the preset trend rule, the cleaning potential data is input into the adjustment model to obtain the predicted pH value. Calculate the predicted pH value and the predicted actual pH value; If the prediction deviation exceeds the preset convergence range, the construction parameters of the interpolation function are adjusted according to the prediction deviation, and the pH value is re-predicted and the prediction deviation is recalculated. If the prediction deviation does not exceed the preset convergence range, then the regional pH prediction model is obtained.
7. A smart detection device for seawater pH value, characterized in that, A method for intelligently detecting seawater pH as described in any one of claims 1 to 6, comprising: The data acquisition module is used to acquire raw potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples from different sea areas; The data fusion module is used to perform multi-scale difference fusion based on the original potential data, the spatial distribution characteristics, the temperature, the pressure, and the composition data to obtain fused potential data. The model building module is used to establish a nonlinear mapping relationship between potential and pH value based on the fused potential data and a support vector regression algorithm, thereby generating a preliminary pH value prediction model. The data correction module is used to perform spatial correction on the fused potential data according to the spatial distribution characteristics, using adaptive grid division and interpolation point selection, to obtain corrected potential data. The data cleaning module is used to identify contamination potential data in the calibration potential data using the isolated forest algorithm, and to clean the contamination potential data by interpolation error analysis and fuzzy clustering to obtain cleaned potential data. The trend prediction module is used to predict the trend of the cleaning potential data through time series decomposition and trend term extraction to obtain the potential prediction trend. The model adjustment module is used to adjust the preliminary pH prediction model based on the cleaning potential data, the potential prediction trend, and the preset marine calibration standard to obtain the regional pH prediction model. The target prediction module is used to predict the pH value of the target sea area based on the regional pH prediction model, and obtain the target pH value.
8. An electronic device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the intelligent detection method for seawater pH as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the intelligent detection method for seawater pH as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Real-time data integration method and system based on ground observation data
CN119203022A
DIGITAL pH SENSOR AND MEASURING METHOD OF A DIGITAL pH SENSOR
US20210123885A1