Intelligent detection method and device for pH value of seawater

Through intelligent detection methods, combined with technical means such as multi-scale difference fusion, support vector regression and adaptive mesh division, the problem of low accuracy in seawater pH measurement in marine environments is solved, and accurate prediction and high stability measurement of seawater pH are achieved.

CN119985658AActive Publication Date: 2025-05-13BIOLOGY INST OF SHANDONG ACAD OF SCI

Patent Information

Application Number
CN202510310027.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-05-13
Estimated Expiration
2045-03-17

AI Technical Summary

Technical Problem

When conducting seawater pH measurement in the marine environment, the existing technology faces complex problems such as interference from marine environmental factors, sensor corrosion and biological pollution, resulting in low measurement accuracy.

Method used

By using intelligent detection methods, multi-scale difference fusion is carried out by obtaining the original potential data, spatial distribution characteristics, temperature, pressure and component data of seawater samples, establishing a nonlinear mapping relationship between potential and pH of the support vector regression algorithm, combining adaptive grid division, isolated forest algorithm and time series decomposition, data correction and trend prediction are carried out, and the pH prediction model is adjusted to achieve accurate prediction of seawater pH.

Benefits of technology

It improves the accuracy and stability of seawater pH measurement, can maintain high sensitivity and high stability in different sea areas and complex environments, and provides reliable data support for marine scientific research and environmental protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119985658A_ABST
    Figure CN119985658A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent detection method and device for the pH value of seawater. The method comprises the following steps: acquiring original potential data of seawater samples in different sea areas, and spatial distribution characteristics, temperature, pressure and component data of the potential data; and integrating all the obtained data through a multi-scale difference value fusion technology to generate fused potential data, and establishing a nonlinear mapping relationship between the potential and the pH value by using a support vector regression algorithm. Next, spatial correction is carried out by applying adaptive grid division and interpolation point selection, and polluted data points are identified and cleaned; performing time sequence decomposition on the cleaned data, and extracting trend terms; and finally, adjusting the initial pH value prediction model according to the cleaning data, the prediction trend and a preset standard, and constructing a regional pH value prediction model for predicting the pH value of the target sea area. The method improves the measurement precision of the seawater pH value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pH value detection, and in particular to an intelligent detection method and device for the pH value of seawater. Background Art

[0002] At present, the detection of seawater pH occupies an important position in marine scientific research, environmental protection and resource management. As a widely used measurement method, the principle of potentiometric method is based on the definite relationship between the concentration of hydrogen ions in the solution and the potential difference generated between the electrodes. However, in practical applications, there are many challenges to achieving stable and reliable pH measurement. Due to the complexity of the marine environment itself, including but not limited to changes in salinity, temperature and pressure, these physical and chemical parameters will interfere with the electrode response, thereby affecting the accuracy of the final measurement results. In addition, the physical installation of the sensor is also crucial; incorrect arrangement results in the sensing area not being able to fully contact the seawater sample, resulting in data deviation. Long-term deployment in seawater also means that the sensor must resist corrosion and the effects of biological contamination. Over time, these problems will gradually weaken the performance of the equipment and reduce the measurement accuracy. In order to ensure the consistency and comparability of data between different sea areas, a unified and effective calibration strategy is particularly important. However, given the significant differences in seawater characteristics in different places, it is not easy to develop a universal calibration scheme. Therefore, developing a pH measurement technology that can maintain high sensitivity and high stability under various conditions and establishing an accurate conversion model between potential readings and true pH values ​​are of far-reaching significance for promoting the development of marine science.

[0003] In one prior art, a composite ion selective electrode (ISE) is used, which utilizes a sensitive membrane material with high selectivity for specific ions, aiming to enhance the interaction with hydrogen ions, so as to accurately reflect the changes in pH in seawater. The core part of the composite ISE electrode is its sensitive membrane, which is composed of specially designed ion exchange resins that can identify and respond to hydrogen ion concentrations in water. When the electrode is immersed in seawater, one side of the sensitive membrane contacts the external seawater, and the other side is connected to the internal electrolyte solution. Due to the difference in hydrogen ion concentration between the two solutions, a small but measurable potential difference is formed on both sides of the sensitive membrane. This potential difference is the key signal that needs to be captured, which reflects the changes in the pH of the external seawater.

[0004] However, when deployed in the marine environment for a long time, the composite ISE electrode faces the dual challenges of corrosion and biological contamination. Even if anti-corrosion materials and technologies are used, long-term immersion in seawater will still cause dirt to gradually accumulate on the electrode surface, affecting the quality of its contact with seawater. Over time, this will not only weaken the working performance of the electrode, but also reduce the accuracy of the measurement results. In addition, due to the constant changes in parameters such as salinity, temperature and pressure in seawater, these factors will have a significant impact on the response characteristics of the electrode. In summary, the existing technology is unable to cope with the various complex factors in the sea area and guarantee the measurement accuracy for a long time, resulting in low accuracy in the measurement of seawater pH. Summary of the invention

[0005] The invention provides an intelligent detection method and device for the pH value of seawater, so as to improve the measurement accuracy of the pH value of seawater.

[0006] In the first aspect, in order to solve the above technical problems, the present invention provides an intelligent detection method for the pH value of seawater, comprising:

[0007] Obtain the original potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples in different sea areas;

[0008] Perform multi-scale difference fusion according to 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 fusion 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] According to the spatial distribution characteristics, the fused potential data is spatially corrected by using adaptive grid division and interpolation point selection to obtain corrected potential data;

[0011] Isolation 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;

[0012] Perform trend prediction on the cleaning potential data by time series decomposition and trend item extraction to obtain a potential prediction trend;

[0013] Adjusting the preliminary pH value prediction model according to the cleaning potential data, the potential prediction trend and a preset sea area calibration standard to obtain a regional pH value prediction model;

[0014] The pH value of the target sea area is predicted according to the regional pH value prediction model to obtain a target pH value.

[0015] In an optional implementation, 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] According to the spatial distribution characteristics, the original potential data is decomposed into sub-data sets of different scales using a wavelet decomposition algorithm;

[0017] According to the sub-data set, in combination with the corresponding temperature, pressure and composition data, a Kriging interpolation algorithm is used to perform local interpolation to obtain interpolation sub-data;

[0018] The interpolation sub-data are weightedly fused by using an adaptive weight allocation method, and the fusion result is optimized by using Gaussian filtering to obtain fused potential data.

[0019] In an optional embodiment, the nonlinear mapping relationship between potential and pH value is established based on the fusion potential data using a support vector regression algorithm to generate a preliminary pH value prediction model, including:

[0020] Dividing the fusion potential data into a test set, a training set and a validation set;

[0021] Select support vector regression as the initial model, radial basis function as the kernel function, and minimize the loss function as the original problem;

[0022] The original problem is converted into solving Lagrange multipliers according to the radial basis function, and the minimized objective function, regularization parameter and kernel function parameter are obtained by solving the dual form of the original problem;

[0023] Using a grid search combined with a cross-validation method to evaluate the performance indicators of the initial model on the validation set, wherein the performance indicators include mean square error and mean absolute error;

[0024] When the performance indicator does not meet the preset performance standard, adjusting the regularization parameter and the kernel function parameter, and resolving the original problem;

[0025] When the performance index meets the preset performance standard, a preliminary pH value prediction model of the corresponding parameter is obtained.

[0026] In an optional implementation, the method of performing spatial correction on the fused potential data by using adaptive grid division and interpolation point selection according to the spatial distribution characteristics to obtain corrected potential data includes:

[0027] According to the spatial distribution characteristics, an adaptive network partitioning algorithm is used to perform regional partitioning on the fused potential data to obtain regional potential data;

[0028] Selecting a representative value of each of the regional potential data by an interpolation point selection algorithm;

[0029] According to the representative value, the pre-stored sensor position and the sensor angle, the fused potential data is corrected by an inverse distance weighting method to obtain corrected potential data;

[0030] Among them, the correction potential data is calculated by the following formula:

[0031]

[0032] D i =d i +k·θ i

[0033]

[0034] Among them, (x i ,y i ,z i ) represents the position corresponding to the potential data of the ith region, (x p ,y p ,z p ) represents the position corresponding to the representative value, θ i represents the angle of the potential data of the ith region to the corresponding representative value, k represents the preset correction coefficient, d i represents the distance from the potential data of the ith region to the corresponding representative value, D i represents the correction distance from the potential data of the ith region to the corresponding representative value, p represents the preset distance control parameter, and e i represents the potential data of the ith region, Indicates the i-th correction potential data.

[0035] In an optional implementation, the method of using an isolation forest algorithm to identify the contaminated potential data in the corrected potential data, and performing data cleaning on the contaminated potential data through interpolation error analysis and fuzzy clustering to obtain cleaned potential data includes:

[0036] Use time series analysis to extract pollution features from pre-stored historical monitoring data and construct pollution feature vectors;

[0037] According to the pollution feature vector, an isolation forest algorithm is used to identify abnormalities in the corrected potential data to obtain pollution potential data;

[0038] estimating the true value of the pollution potential data by a local weighted linear regression algorithm and calculating the interpolation error;

[0039] If the interpolation error does not exceed a preset error threshold, the corresponding pollution potential data is retained;

[0040] If the interpolation error exceeds a preset error threshold, the corresponding pollution potential data is determined to be data to be cleaned, and the data to be cleaned is cleaned using a fuzzy C-means clustering algorithm to obtain a cleaning result;

[0041] When the contaminated potential data in the corrected potential data is cleaned, cleaned potential data is obtained.

[0042] In an optional implementation, the performing trend prediction on the cleaning potential data by time series decomposition and trend item extraction to obtain the potential prediction trend includes:

[0043] Performing time series decomposition according to the cleaning potential data to obtain time series data;

[0044] Using a moving average method to extract trends from the time series data to obtain trend items;

[0045] Inputting the trend item into a pre-built trend prediction model to obtain a potential prediction trend;

[0046] Wherein, the trend prediction model is constructed by a long short-term memory recursive neural network.

[0047] In an optional embodiment, the preliminary pH value prediction model is adjusted according to the cleaning potential data, the potential prediction trend and the preset sea area calibration standard to obtain a regional pH value prediction model, including:

[0048] Determining calibration parameters corresponding to the sea area according to the sea area calibration standard;

[0049] Dynamically adjusting the interpolation function construction method of the preliminary pH value prediction model according to the calibration parameters to obtain an adjusted model;

[0050] If the potential prediction 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 potential prediction trend does not exceed the preset trend rule, the cleaning potential data is input into the adjustment model to obtain a predicted pH value;

[0052] Calculating a predicted deviation between the predicted pH value and a pre-stored actual pH value;

[0053] If the prediction deviation exceeds a preset convergence range, adjusting the construction parameters of the interpolation function according to the prediction deviation, and re-predicting the pH value and calculating the prediction deviation;

[0054] If the prediction deviation does not exceed the preset convergence range, a regional pH value prediction model is obtained.

[0055] In a second aspect, the present invention provides an intelligent detection device for pH value of seawater, comprising:

[0056] Data acquisition module, used to obtain the original potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples in different sea areas;

[0057] A data fusion module, used for performing multi-scale difference fusion according to the original potential data, the spatial distribution characteristics, the temperature, the pressure and the component data to obtain fused potential data;

[0058] A model building module, used to establish a nonlinear mapping relationship between potential and pH value using a support vector regression algorithm based on the fusion potential data, and generate a preliminary pH value prediction model;

[0059] A data correction module, used to perform spatial correction on the fused potential data according to the spatial distribution characteristics by using adaptive grid division and interpolation point selection to obtain corrected potential data;

[0060] A data cleaning module, used for identifying the contaminated potential data in the corrected potential data by using an isolation forest algorithm, and performing data cleaning on the contaminated potential data by interpolation error analysis and fuzzy clustering to obtain cleaned potential data;

[0061] A trend prediction module, used for performing trend prediction on the cleaning potential data by time series decomposition and trend item extraction to obtain a potential prediction trend;

[0062] A model adjustment module, used to adjust the preliminary pH value prediction model according to the cleaning potential data, the potential prediction trend and a preset sea area calibration standard to obtain a regional pH value prediction model;

[0063] The target prediction module is used to predict the pH value of the target sea area according to the regional pH value prediction model to obtain the target pH value. In a third aspect, 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 implements any of the above-mentioned intelligent detection methods for the pH value of seawater when executing the computer program.

[0064] In a fourth aspect, the present invention further provides a computer-readable storage medium, the computer-readable storage medium comprising a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned intelligent detection methods for the pH value of seawater.

[0065] Compared with the prior art, the present invention has the following beneficial effects:

[0066] (1) The present invention discloses an intelligent detection method for the pH value of seawater, 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, realizes coping with various complex factors in the sea area and long-term guarantee of measurement accuracy, and improves the measurement accuracy of the pH value of seawater; and accordingly develops a pH measurement technology that can maintain high sensitivity and high stability under various conditions, and establishes an accurate conversion model between potential readings and true pH values, which has far-reaching significance for promoting the development of marine science;

[0067] (2) The present invention uses adaptive grid division and interpolation point selection according to the spatial distribution characteristics 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 the potential data more comprehensive and accurate, greatly ensuring the accuracy of the pH prediction model;

[0068] (3) The present invention adopts an isolation forest algorithm to identify the contaminated potential data in the corrected potential data, and cleans the contaminated potential data through interpolation error analysis and fuzzy clustering to obtain cleaned potential data; after the cleaning of the contaminated potential data in the corrected potential data is completed, the system obtains the cleaned potential data, which truly reflects the changes in the seawater environment; the advanced machine learning and statistical analysis technology in the whole process enables the system to effectively identify and process abnormal data, ensure the accuracy and reliability of the final potential data, thereby ensuring the measurement accuracy for a long time and improving the measurement accuracy of the pH value of seawater;

[0069] (4) The present invention performs trend prediction on the cleaning potential data by time series decomposition and trend item extraction to obtain a potential prediction trend; the trend prediction model is based on a long short-term memory recursive neural network (LSTM), which can effectively capture long-term dependencies and is particularly suitable for predicting slowly changing marine environmental parameters. It can output a potential prediction value within a period of time in the future, thereby revealing the long-term memory characteristics of potential changes and preliminarily accurately reflecting the pH trend;

[0070] (5) According to the cleaning potential data, the potential prediction trend and the preset sea area calibration standard, the present invention systematically adjusts the preliminary pH value prediction model to obtain the regional pH value 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 changing law of pH value in the marine environment, providing a scientific basis for subsequent environmental monitoring and protection decisions. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 It is a schematic flow chart of the intelligent detection method for pH value of seawater provided by the first embodiment of the present invention;

[0072] Figure 2 It is a schematic diagram of the structure of an intelligent detection device for pH value of seawater provided by the second embodiment of the present invention. DETAILED DESCRIPTION

[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work 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 pH value of seawater, comprising the following steps:

[0075] S11, obtaining the original potential data, spatial distribution characteristics of the potential data, temperature, pressure and composition data of seawater samples in different sea areas;

[0076] S12, performing multi-scale difference fusion according to 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 fusion potential data, using a support vector regression algorithm to establish a nonlinear mapping relationship between potential and pH value, and generating a preliminary pH value prediction model;

[0078] S14, performing spatial correction on the fused potential data by using adaptive grid division and interpolation point selection according to the spatial distribution characteristics to obtain corrected potential data;

[0079] S15, using an isolation forest algorithm to identify contaminated potential data in the corrected potential data, and performing data cleaning on the contaminated potential data through interpolation error analysis and fuzzy clustering to obtain cleaned potential data;

[0080] S16, performing trend prediction on the cleaning potential data by time series decomposition and trend item extraction to obtain a potential prediction trend;

[0081] S17, adjusting the preliminary pH value prediction model according to the cleaning potential data, the potential prediction trend and the preset sea area calibration standard to obtain a regional pH value prediction model;

[0082] S18, predicting the pH value of the target sea area according to the regional pH value prediction model to obtain a target pH value.

[0083] In step S11, the original potential data, spatial distribution characteristics of the potential data, temperature, pressure and composition data of seawater samples from different sea areas are obtained.

[0084] The original potential data of seawater samples, the spatial distribution characteristics of potential data, and temperature, pressure and composition data are obtained through monitoring networks deployed in different sea areas. The monitoring network consists of multiple high-precision sensor nodes, which are distributed in different locations in the target sea area, covering different water depths from the surface to the deep layer to ensure the comprehensiveness and representativeness of the data. Each sensor node is equipped with a potential sensor, a temperature sensor, a pressure sensor and a composition sensor, which can simultaneously collect potential, temperature, pressure and composition data. The potential sensor is based on the electrode measurement principle and obtains the original potential data by detecting the hydrogen ion concentration in seawater and the potential difference generated between the electrodes. The temperature sensor uses thermistor or thermocouple technology to measure the temperature change of seawater in real time. The pressure sensor measures the seawater pressure at different depths through piezoresistance or piezoelectric effect. The composition sensor uses optical or electrochemical methods to detect the concentration of components such as salinity and dissolved oxygen in seawater.

[0085] In order to describe the spatial distribution characteristics of potential data, the system not only records the potential value of a single point, but also accurately locates the position of each sensor through a three-dimensional coordinate system, and analyzes the relative position relationship between each monitoring point and the overall spatial layout. The location information of the sensor node is obtained through GPS or underwater positioning system to ensure the accuracy of 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 a specific implementation, the 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] According to the spatial distribution characteristics, the original potential data is decomposed into sub-data sets of different scales using a wavelet decomposition algorithm;

[0089] According to the sub-data set, in combination with the corresponding temperature, pressure and composition data, a Kriging interpolation algorithm is used to perform local interpolation to obtain interpolation sub-data;

[0090] The interpolation sub-data are weightedly fused by using an adaptive weight allocation method, and the fusion result is optimized by using Gaussian filtering to obtain fused potential data.

[0091] Specifically, first, according to the spatial distribution characteristics, the wavelet decomposition algorithm is used to decompose the original potential data into sub-data sets of 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 that 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 sub-data sets E of different scales. j (x, y, z), each sub-dataset corresponds to a different resolution level jj. Specifically, the wavelet transform formula is as follows:

[0092]

[0093] Here, ψ j,k is the wavelet basis function, c j,k are the corresponding wavelet coefficients. By applying multi-scale wavelet decomposition to the raw potential data, the system is able to capture different levels of information, from large-scale trends to local details.

[0094] Next, for each subset E j (x, y, z), combined with the corresponding temperature T(x, y, z), pressure P(x, y, z) and composition data C(x, y, z), the Kriging interpolation algorithm is used for local interpolation to obtain the interpolation sub-data E' j (x, y, z). Kriging interpolation is a spatial interpolation method based on statistical principles, which 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 is the weight coefficient, μ is a preset constant term, and N is the number of known points used for interpolation. In order to determine the weight coefficient λ i , the system needs to solve the following matrix equation:

[0097]

[0098] The N×N square matrix on the left represents the semivariogram function γ(h) at different distances h. i The value at each element γ(h i ) describes the spatial autocorrelation between data points. The middle column vector contains the weight 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 semivariogram function γ(h 0 -h i ), h 0 is the distance between the point to be predicted and the known point.

[0099] Then, an adaptive weight allocation method is used to interpolate the sub-data E' j (x, y, z) for weighted fusion. The adaptive weight allocation method dynamically adjusts the contribution of each sub-dataset according to its importance to ensure a more reasonable fusion result. Assume that w j represents the weight of the j-th scale sub-dataset, then the fused potential data E fusion (x,y,z) can be expressed as:

[0100]

[0101] Weight w j The calculation of is based on the variance and covariance matrices of the sub-datasets, ensuring that data with a high signal-to-noise ratio receive higher weights.

[0102] Finally, in order to further optimize the fusion results, the system uses Gaussian filtering to fusion (x, y, z) is smoothed. Gaussian filtering is a common image processing technique and can also be applied to three-dimensional data smoothing. Assuming G(σ) represents the Gaussian kernel function and σ is the standard deviation parameter, the final fused potential data E after Gaussian filtering is final (x,y,z) is calculated as follows:

[0103] E final (x,y,z)=G(σ)*E fusion (x,y,z)

[0104] Here, * indicates convolution operation. Gaussian filtering effectively removes high-frequency noise, making the fused potential data smoother and more stable.

[0105] In step S13, a nonlinear mapping relationship between potential and pH value is established based on the fusion potential data using a support vector regression algorithm to generate a preliminary pH value prediction model.

[0106] Among them, considering the influence of temperature, pressure and composition on potential measurement, the establishment of the nonlinear mapping relationship between potential and pH value also incorporates the above-mentioned influencing factors, taking potential as the input variable, pH value as the prediction object to be output, and the above-mentioned influencing factors as environmental parameters, thereby establishing the mapping relationship. Among them, the pH data used in establishing the nonlinear mapping relationship is obtained based on the corresponding standard measurement of each seawater sample in S11.

[0107] In a specific embodiment, the nonlinear mapping relationship between potential and pH value is established based on the fusion potential data using a support vector regression algorithm to generate a preliminary pH value prediction model, including:

[0108] Dividing the fusion potential data into a test set, a training set and a validation set;

[0109] Select support vector regression as the initial model, radial basis function as the kernel function, and minimize the loss function as the original problem;

[0110] The original problem is converted into solving Lagrange multipliers according to the radial basis function, and the minimized objective function, regularization parameter and kernel function parameter are obtained by solving the dual form of the original problem;

[0111] Using a grid search combined with a cross-validation method to evaluate the performance indicators of the initial model on the validation set, wherein the performance indicators include mean square error and mean absolute error;

[0112] When the performance indicator does not meet the preset performance standard, adjusting the regularization parameter and the kernel function parameter, and resolving the original problem;

[0113] When the performance index meets the preset performance standard, a preliminary pH value prediction model of the corresponding parameter is obtained.

[0114] Specifically, first, the system divides the fusion potential data into a test set, a training set, and a validation set. This division method is intended to provide independent data sets for model training, tuning, and evaluation to ensure that the model has good generalization capabilities. The training set is used for model training, the validation set is used to adjust model parameters, and the test set is used to finally evaluate model performance.

[0115] Next, support vector regression (SVR) is selected as the initial model, and radial basis function (RBF) is selected as the kernel function. SVR is a supervised learning algorithm that is particularly suitable for dealing with nonlinear regression problems. Exemplarily, 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 are the slack variables controlled by the regularization parameter C, which are used to handle the fault tolerance mechanism in the inseparable case, and N is the number of samples.

[0118] When the RBF kernel function is used, the original problem is transformed into the problem of solving the Lagrange multiplier. Its dual form is:

[0119]

[0120] Here, y i represents the target value, x i and x j is the input feature vector, α i and is the corresponding x i A pair of Lagrange multipliers, α j and is the corresponding 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] Among them, γ is the parameter of the RBF kernel function, which determines the width of the Gaussian distribution.

[0123] In order to find the optimal regularization parameter C and kernel function parameter γ, the system applies a grid search combined with a cross-validation method to evaluate the model performance. The grid search traverses a series of candidate parameter combinations, and the cross-validation calculates the mean square error (MSE) and mean absolute error (MAE) of the model by dividing the training set and the validation set multiple times, which are used as performance indicators. If these performance indicators fail to meet the 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 best parameter combination is determined, the system obtains the final concentricity deviation model. This model can not only accurately predict the concentricity deviation value corresponding to the gap change value, but also has good generalization ability and is applicable to unseen data.

[0125] After training is completed, 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 in the previous optimization process, the model calculates the corresponding pH value prediction result. Specifically, the system maps the input feature vector to the high-dimensional feature space, and determines which category boundary it is closest to based on the position of the support vector, thereby determining the pH value prediction.

[0126] In step S14, according to 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.

[0127] In a specific implementation, the method of performing spatial correction on the fused potential data by using adaptive grid division and interpolation point selection according to the spatial distribution characteristics to obtain corrected potential data includes:

[0128] According to the spatial distribution characteristics, an adaptive network partitioning algorithm is used to perform regional partitioning on the fused potential data to obtain regional potential data;

[0129] Selecting a representative value of each of the regional potential data by an interpolation point selection algorithm;

[0130] According to the representative value, the pre-stored sensor position and the sensor angle, the fused potential data is corrected by an inverse distance weighting method to obtain corrected potential data;

[0131] Among them, the correction potential data is calculated by the following formula:

[0132]

[0133] D i =d i +k·θ i

[0134]

[0135] Among them, (x i ,y i ,z i ) represents the position corresponding to the potential data of the ith region, (x p ,y p ,z p ) represents the position corresponding to the representative value, θ i represents the angle of the potential data of the ith region to the corresponding representative value, k represents the preset correction coefficient, d i represents the distance from the potential data of the ith region to the corresponding representative value, D irepresents the correction distance from the potential data of the ith region to the corresponding representative value, p represents the preset distance control parameter, and e i represents the potential data of the ith region, Indicates the i-th correction potential data.

[0136] Specifically, first, the system uses an adaptive grid division algorithm to divide the fused potential data into regions according to the spatial distribution characteristics to obtain regional potential data. The adaptive grid division algorithm can dynamically adjust the grid size to adapt to data distributions of different densities, thereby improving the correction accuracy. Specifically, the algorithm automatically determines the appropriate grid unit size based on the distance and density between data points to ensure that the number of data points in each grid unit is moderate, neither too sparse nor too dense. In this way, the system divides the entire monitoring area into multiple sub-regions, each of which contains a certain number of fused potential data points.

[0137] Next, the system selects representative values ​​for each regional potential data through an interpolation point selection algorithm. The interpolation point selection algorithm takes into account the spatial distribution and numerical characteristics of the data points in the region, and selects the data points that best represent the overall characteristics of the region as representative values. For example, in a specific sub-region, the algorithm selects the data point located in the center and with an intermediate potential value as the representative value. These representative values ​​not only reflect the average state in the region, but also have a high degree of representativeness, which is helpful for subsequent correction calculations.

[0138] Then, the system corrects the fused potential data by using the inverse distance weighting (IDW) method based on the representative value, the pre-stored sensor position, and the sensor angle to obtain the corrected potential data. The inverse distance weighting method is a distance-based interpolation method that assumes that the influence of a data point decreases as the distance increases. The specific formula is as follows:

[0139]

[0140] Among them, D i represents the correction distance from the potential data of the ith region to the corresponding representative value, p represents the preset distance control parameter, and e i represents the potential data of the ith region, Indicates the i-th correction potential data.

[0141] Correction distance D i The calculation formula is:

[0142] D i =d i +k·θ i

[0143] Among them, d iis the actual Euclidean distance from the potential data of the ith region to the corresponding representative value, defined as:

[0144]

[0145] Here, (x i ,y i ,z i ) represents the position corresponding to the potential data of the ith region, (x p ,y p ,z p ) represents the position corresponding to the representative value, θ i represents the angle of the potential data of the ith region to the corresponding representative value, k represents the preset correction coefficient, d i represents the distance from the potential data of the ith region to the corresponding representative value, D i Indicates the correction distance from the potential data of the ith region to the corresponding representative value.

[0146] By introducing the angle factor θ i , correction distance D i Not only the actual physical distance is taken into account, but also the influence of the sensor installation angle is comprehensively considered, making the correction more comprehensive and accurate.

[0147] In step S15, an isolation 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.

[0148] In a specific implementation, the use of the isolation forest algorithm to identify the contaminated potential data in the corrected potential data, and the data cleaning of the contaminated potential data by interpolation error analysis and fuzzy clustering to obtain the cleaned potential data includes:

[0149] Use time series analysis to extract pollution features from pre-stored historical monitoring data and construct pollution feature vectors;

[0150] According to the pollution feature vector, an isolation forest algorithm is used to identify abnormalities in the corrected potential data to obtain pollution potential data;

[0151] estimating the true value of the pollution potential data by a local weighted linear regression algorithm and calculating the interpolation error;

[0152] If the interpolation error does not exceed a preset error threshold, the corresponding pollution potential data is retained;

[0153] If the interpolation error exceeds a preset error threshold, the corresponding pollution potential data is determined to be data to be cleaned, and the data to be cleaned is cleaned using a fuzzy C-means clustering algorithm to obtain a cleaning result;

[0154] When the contaminated potential data in the corrected potential data is cleaned, cleaned potential data is obtained.

[0155] Specifically, first, the system uses time series analysis to extract pollution features from pre-stored historical monitoring data and construct pollution feature vectors. Time series analysis can reveal the changing 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 σ, autocorrelation coefficient r k , and combined with other environmental parameters (such as temperature and pressure) to form a multi-dimensional pollution feature vector F = [μ, σ, r 1 ,r 2 ,…]. These feature vectors are used to train the isolation forest model for subsequent identification of abnormal data.

[0156] Next, based on the constructed contamination feature vector, the system uses the isolation forest algorithm to identify anomalies in the corrected potential data and obtain the contamination potential data. Isolation forest is an unsupervised learning algorithm based on a tree structure, which is particularly suitable for anomaly detection in high-dimensional data. The algorithm constructs an isolation tree by randomly selecting features and split points. Abnormal data usually requires fewer splits to be isolated. Specifically, for each data point x i , the isolation forest calculates its anomaly score s(x i ), defined as:

[0157]

[0158] Here, E(h(x i )) represents the data point x i The average path length in all isolated trees, c(n) is the average path length of a binary tree containing n samples. i ) exceeds the preset threshold, the data point x i It is judged to be abnormal, that is, the contaminated potential data.

[0159] Then, the system estimates the true value of the pollution potential data through the local weighted linear regression (LWLR) algorithm and calculates the interpolation error. LWLR is a non-parametric regression method that can fit the data in a local range and reduce the influence of global noise. Assume that e' i Represents the i-th pollution potential data, and its true value e' i ' can be estimated by the following formula:

[0160]

[0161] Here, w ij is the weight matrix, defined as:

[0162]

[0163] Where k is the preset bandwidth parameter, which controls the speed of weight decay. 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 pollution potential data is retained; if the interpolation error ∈ i If the error exceeds a preset threshold, the corresponding pollution 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 for cleaning. FCM is a soft clustering method that allows data points to belong to multiple clusters and assign membership values. Assume u ij Indicates the membership of the i-th data point to the j-th cluster, and the cluster center v j Updated by the following formula:

[0167]

[0168] Here, m is the preset fuzzy index, which controls the smoothness of the membership. ij The update formula is:

[0169]

[0170] Among them, d(x i ,v j ) is the data point x i With cluster center v j By iteratively updating the membership degree and cluster center multiple times, the system can effectively separate normal data from abnormal data, thereby achieving data cleaning.

[0171] When the contaminated potential data in the correction potential data is cleaned, the system obtains the cleaned potential data. With advanced machine learning and statistical analysis technology throughout the process, the system can effectively identify and process abnormal data to ensure the accuracy and reliability of the final potential data.

[0172] In step S16, trend prediction is performed on the cleaning potential data by time series decomposition and trend item extraction to obtain a potential prediction trend.

[0173] In a specific embodiment, the trend prediction of the cleaning potential data is performed by time series decomposition and trend item extraction to obtain the potential prediction trend, including:

[0174] Performing time series decomposition according to the cleaning potential data to obtain time series data;

[0175] Using a moving average method to extract trends from the time series data to obtain trend items;

[0176] Inputting the trend item into a pre-built trend prediction model to obtain a potential prediction trend;

[0177] Wherein, the trend prediction model is constructed by a long short-term memory recursive neural network.

[0178] Specifically, first, the system performs time series decomposition based on the cleaned potential data to separate the trend, seasonality, and random components. Time series decomposition is an important tool for understanding the intrinsic structure of complex signals and helps to distinguish different types of fluctuations. Specifically, assuming that 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, which describes the long-term changes in the data; S(t) represents the seasonal term, which reflects the periodic fluctuations; and R(t) represents the random term, which captures the unpredictable noise. In order to achieve decomposition, the system uses 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 trends from time series data and obtain the trend term T(t). Moving average is a commonly used smoothing technique that can reduce the impact of short-term fluctuations and highlight long-term trends. For a given time window, the trend term T(t) processed by 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 time window size, the system can strike a balance between smoothing effect and response speed. After moving average processing, the system obtains a smoother trend term T(t), which provides a basis for further trend prediction.

[0184] The system then inputs the trend term T(t) into the pre-built trend prediction model to obtain the potential prediction trend. The trend prediction model is based on the long short-term memory recurrent neural network (LSTM), a deep learning architecture specifically designed for processing time series data. LSTM can effectively capture long-term dependencies by introducing memory units and gating mechanisms, and is particularly suitable for predicting slowly changing environmental parameters. Specifically, the calculation formula of 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 are the activation values ​​of the forget gate, input gate, and output gate, respectively. and C t are the states of the candidate memory unit and the current memory unit, respectively, h t is the hidden state, σ and tanh are activation functions, W f , W i , W C , W o is the weight matrix, b f , b i , b C , b o is the bias vector and ⊙ represents element-wise multiplication.

[0191] By training the 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, LSTM can predict the future trend of potential changes. For example, given a set of past time series data, the model can output the predicted value of potential in the future, thereby revealing the long-term memory characteristics of potential changes.

[0192] In step S17, the preliminary pH value prediction model is adjusted according to the cleaning potential data, the potential prediction trend and the preset sea area calibration standard to obtain a regional pH value prediction model.

[0193] In a specific embodiment, the preliminary pH value prediction model is adjusted according to the cleaning potential data, the potential prediction trend and the preset sea area calibration standard to obtain a regional pH value prediction model, including:

[0194] Determining calibration parameters corresponding to the sea area according to the sea area calibration standard;

[0195] Dynamically adjusting the interpolation function construction method of the preliminary pH value prediction model according to the calibration parameters to obtain an adjusted model;

[0196] If the potential prediction 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 potential prediction trend does not exceed the preset trend rule, the cleaning potential data is input into the adjustment model to obtain a predicted pH value;

[0198] Calculating a predicted deviation between the predicted pH value and a pre-stored actual pH value;

[0199] If the prediction deviation exceeds a preset convergence range, adjusting the construction parameters of the interpolation function according to the prediction deviation, and re-predicting the pH value and calculating the prediction deviation;

[0200] If the prediction deviation does not exceed the preset convergence range, a regional pH value prediction model is obtained.

[0201] Specifically, first, the system determines the calibration parameters for the corresponding sea area based on the sea area calibration standard. 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 may include the pH correction factor k within a specific temperature range. T , pressure correction factor k P and composition correction factor k C These parameters were predetermined through results from laboratory analysis and field sampling and were used to adjust the preliminary pH prediction model.

[0202] Next, the interpolation function construction method of the preliminary pH value prediction model is dynamically adjusted according to the calibration parameters to obtain an adjusted model. Assume that the preliminary pH value prediction model adopts support vector regression (SVR), and its interpolation function is:

[0203]

[0204] Here, K(x,x i ) is the radial basis function (RBF) kernel function, defined as:

[0205]

[0206] Among them, γ is the parameter of the RBF kernel function, which determines the width of the Gaussian distribution, α i and is the corresponding x i A pair of Lagrange multipliers, x and x i is the input feature vector, and N represents the number of feature vectors. In order 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 the model performance. Specifically, the adjusted interpolation function can be expressed as:

[0207]

[0208] here, γ' and b' are calculated based on the calibration parameter k T , k P and k C Dynamic adjustment.

[0209] Then, the system 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 invalidates these 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 rule, the cleaning potential data is input into the adjustment model to obtain the predicted pH value.

[0211] Next, the system calculates the predicted deviation between the predicted pH value and the pre-stored actual pH value.

[0212] 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 calculated. The method of adjusting the parameters can be implemented by grid search combined with cross-validation to find the optimal parameter combination that minimizes the prediction deviation. For example, adjust the values ​​of γ' and b', retrain the model and evaluate its performance until the prediction deviation converges to the preset range.

[0213] If the prediction deviation does not exceed the preset convergence range, the system confirms that the regional pH value prediction model has been obtained. This model can not only adapt to the characteristics of a specific sea area, but also has good generalization ability and is applicable to unseen data. The final regional pH value prediction model can accurately reflect the changing law of pH value 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 value prediction model to obtain a target pH value.

[0215] Specifically, first, the system inputs the current potential data of the target sea area into the regional pH value prediction model. It is assumed that the model is built based on support vector regression (SVR) and has been adapted to the characteristics of the specific sea area through dynamic adjustment.

[0216] Next, the system uses an interpolation function to calculate the target pH value. Specifically, for each time point of potential data, the system calculates the predicted pH value based on its corresponding environmental parameters.

[0217] The following describes the working process of the present invention using a relatively common scenario as an example. Figure 1 , an intelligent detection method for pH value of seawater, comprising the following steps:

[0218] The system demonstrated its high efficiency and accuracy in an intelligent detection of pH values ​​in a specific area of ​​the South China Sea. The area of ​​the area is about 100 square kilometers, and the depth ranges from the surface to 1,000 meters. In order 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 depths.

[0219] First, the system acquired the original potential data of each monitoring point and analyzed it in combination with the spatial distribution characteristics. Through multi-scale wavelet decomposition and Kriging interpolation algorithm, the system successfully fused these data and generated high-precision fused potential data. Next, according to the spatial distribution characteristics, the system used adaptive grid division and interpolation point selection to perform spatial correction on the fused potential data, eliminating the measurement deviation caused by factors such as sensor position and angle, and obtained the corrected potential data.

[0220] Subsequently, the system used the isolation forest algorithm to identify the contaminated potential data, and cleaned the data through interpolation error analysis and fuzzy clustering methods. The cleaned potential data is more reliable and truly reflects the changes in the seawater environment. Furthermore, time series decomposition and trend term extraction reveal the long-term memory characteristics of potential changes, ensuring the continuity of data quality. Based on this, the trend prediction model constructed by the long short-term memory recursive neural network accurately predicts the future potential change trend.

[0221] In order to improve the accuracy of pH value prediction, the system uses voltammetric analysis to extract multiple linear parameters as input features, including but not limited to base current intensity, base current density, peak current intensity, peak current density, peak potential, formula potential and half-peak half-width potential. In particular, the system defines a new pH indicator parameter a II , which is used to more accurately reflect the change of pH value. II Defined as:

[0222]

[0223] Here, E F represents peak potential, HWHM represents half-width at half maximum potential, ΔI 1 and ΔI 2 are the peak current intensities corresponding to the pH sensitive probe and the pH insensitive probe, respectively, and a is the electrode constant. This parameter can effectively capture subtle changes in electrochemical signals, thereby improving the sensitivity and accuracy of pH value prediction.

[0224] Finally, based on the cleaning potential data, potential prediction trends, and the preset sea area calibration standards, the system adjusted the preliminary pH value prediction model and obtained the regional pH value prediction model. When the new potential data was input into this optimized model, the system successfully predicted the pH value of the target sea area. The results showed that during a typical monitoring cycle in the sea area, the predicted pH value was stable between 7.8 and 8.2, which was highly consistent with 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 pH value of seawater, comprising:

[0227] Data acquisition module, used to obtain the original potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples in different sea areas;

[0228] A data fusion module, used for performing multi-scale difference fusion according to the original potential data, the spatial distribution characteristics, the temperature, the pressure and the component data to obtain fused potential data;

[0229] A model building module, used to establish a nonlinear mapping relationship between potential and pH value using a support vector regression algorithm based on the fusion potential data, and generate a preliminary pH value prediction model;

[0230] A data correction module, used to perform spatial correction on the fused potential data according to the spatial distribution characteristics by using adaptive grid division and interpolation point selection to obtain corrected potential data;

[0231] A data cleaning module, used for identifying the contaminated potential data in the corrected potential data by using an isolation forest algorithm, and performing data cleaning on the contaminated potential data by interpolation error analysis and fuzzy clustering to obtain cleaned potential data;

[0232] A trend prediction module, used for performing trend prediction on the cleaning potential data by time series decomposition and trend item extraction to obtain a potential prediction trend;

[0233] A model adjustment module, used to adjust the preliminary pH value prediction model according to the cleaning potential data, the potential prediction trend and a preset sea area calibration standard to obtain a regional pH value prediction model;

[0234] The target prediction module is used to predict the pH value of the target sea area according to the regional pH value prediction model to obtain the target pH value.

[0235] It should be noted that the intelligent detection device for the pH value of seawater provided in the embodiment of the present invention is used to execute all the process steps of the intelligent detection method for the pH value of seawater in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be described in detail.

[0236] The embodiment of the present invention further 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 an intelligent detection program for the pH value of seawater. When the processor executes the computer program, the steps in the above-mentioned intelligent detection method for the pH value of seawater are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as the intelligent detection module for pH value of seawater.

[0237] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0238] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0239] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0240] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0241] Wherein, if the module / unit integrated in the electronic device 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-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased 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 electric carrier signals and telecommunication signals.

[0242] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0243] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. An intelligent detection method for pH value of seawater, characterized in that: include: Obtain the original potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples in different sea areas; Perform multi-scale difference fusion according to the original potential data, the spatial distribution characteristics, the temperature, the pressure and the composition data to obtain fused potential data; Based on the fusion 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; According to the spatial distribution characteristics, the fused potential data is spatially corrected by using adaptive grid division and interpolation point selection to obtain corrected potential data; Identifying the contaminated potential data in the corrected potential data using an isolation forest algorithm, and cleaning the contaminated potential data using interpolation error analysis and fuzzy clustering to obtain cleaned potential data; Perform trend prediction on the cleaning potential data by time series decomposition and trend item extraction to obtain a potential prediction trend; Adjusting the preliminary pH value prediction model according to the cleaning potential data, the potential prediction trend and a preset sea area calibration standard to obtain a regional pH value prediction model; The pH value of the target sea area is predicted according to the regional pH value prediction model to obtain a target pH value.

2. The intelligent detection method for seawater pH value according to claim 1, characterized in that: The 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: According to the spatial distribution characteristics, the original potential data is decomposed into sub-data sets of different scales using a wavelet decomposition algorithm; According to the sub-data set, in combination with the corresponding temperature, pressure and composition data, a Kriging interpolation algorithm is used to perform local interpolation to obtain interpolation sub-data; The interpolation sub-data are weightedly fused by using an adaptive weight allocation method, and the fusion result is optimized by using Gaussian filtering to obtain fused potential data.

3. The intelligent detection method of seawater pH value according to claim 1, characterized in that: The method of using a support vector regression algorithm to establish a nonlinear mapping relationship between potential and pH value based on the fusion potential data to generate a preliminary pH value prediction model includes: Dividing the fusion potential data into a test set, a training set and a validation set; Select support vector regression as the initial model, radial basis function as the kernel function, and minimize the loss function as the original problem; The original problem is converted into solving Lagrange multipliers according to the radial basis function, and the minimized objective function, regularization parameter and kernel function parameter are obtained by solving the dual form of the original problem; Using a grid search combined with a cross-validation method to evaluate the performance indicators of the initial model on the validation set, wherein the performance indicators include mean square error and mean absolute error; When the performance indicator does not meet the preset performance standard, adjusting the regularization parameter and the kernel function parameter, and resolving the original problem; When the performance index meets the preset performance standard, a preliminary pH value prediction model of the corresponding parameter is obtained.

4. The intelligent detection method of seawater pH value according to claim 1, characterized in that: The method of performing spatial correction on the fused potential data by using adaptive grid division and interpolation point selection according to the spatial distribution characteristics to obtain corrected potential data includes: According to the spatial distribution characteristics, an adaptive network partitioning algorithm is used to perform regional partitioning on the fused potential data to obtain regional potential data; Selecting a representative value of each of the regional potential data by an interpolation point selection algorithm; According to the representative value, the pre-stored sensor position and the sensor angle, the fused potential data is corrected by an inverse distance weighting method to obtain corrected potential data; Among them, the correction potential data is calculated by the following formula: Among them, (x i ,y i ,z i ) represents the position corresponding to the potential data of the ith region, (x p ,y p ,z p ) represents the position corresponding to the representative value, θ i represents the angle of the potential data of the ith region to the corresponding representative value, k represents the preset correction coefficient, d i represents the distance from the potential data of the ith region to the corresponding representative value, D i represents the correction distance from the potential data of the ith region to the corresponding representative value, p represents the preset distance control parameter, and e i represents the potential data of the ith region, Indicates the i-th correction potential data.

5. The intelligent detection method of seawater pH value according to claim 1, characterized in that: The method of using the isolation forest algorithm to identify the contaminated potential data in the corrected potential data, and performing data cleaning on the contaminated potential data through interpolation error analysis and fuzzy clustering to obtain cleaned potential data includes: Use time series analysis to extract pollution features from pre-stored historical monitoring data and construct pollution feature vectors; According to the pollution feature vector, an isolation forest algorithm is used to identify abnormalities in the corrected potential data to obtain pollution potential data; estimating the true value of the pollution potential data by a local weighted linear regression algorithm and calculating the interpolation error; If the interpolation error does not exceed a preset error threshold, the corresponding pollution potential data is retained; If the interpolation error exceeds a preset error threshold, the corresponding pollution potential data is determined to be data to be cleaned, and the data to be cleaned is cleaned using a fuzzy C-means clustering algorithm to obtain a cleaning result; When the contaminated potential data in the corrected potential data is cleaned, cleaned potential data is obtained.

6. The intelligent detection method of seawater pH value according to claim 1, characterized in that: The method of performing trend prediction on the cleaning potential data by time series decomposition and trend item extraction to obtain a potential prediction trend includes: Performing time series decomposition according to the cleaning potential data to obtain time series data; Using a moving average method to extract trends from the time series data to obtain trend items; Inputting the trend item into a pre-built trend prediction model to obtain a potential prediction trend; Wherein, the trend prediction model is constructed by a long short-term memory recursive neural network.

7. The intelligent detection method of seawater pH value according to claim 1, characterized in that: The step of adjusting the preliminary pH value prediction model according to the cleaning potential data, the potential prediction trend and the preset sea area calibration standard to obtain a regional pH value prediction model includes: Determining calibration parameters corresponding to the sea area according to the sea area calibration standard; Dynamically adjusting the interpolation function construction method of the preliminary pH value prediction model according to the calibration parameters to obtain an adjusted model; If the potential prediction trend exceeds the preset trend rule, the cleaning potential data is invalidated, and the original potential data is collected and processed again; If the potential prediction trend does not exceed the preset trend rule, the cleaning potential data is input into the adjustment model to obtain a predicted pH value; Calculating a predicted deviation between the predicted pH value and a pre-stored actual pH value; If the prediction deviation exceeds a preset convergence range, adjusting the construction parameters of the interpolation function according to the prediction deviation, and re-predicting the pH value and calculating the prediction deviation; If the prediction deviation does not exceed the preset convergence range, a regional pH value prediction model is obtained.

8. An intelligent detection device for pH value of seawater, characterized in that: include: Data acquisition module, used to obtain the original potential data, spatial distribution characteristics of potential data, temperature, pressure and composition data of seawater samples in different sea areas; A data fusion module, used for performing multi-scale difference fusion according to the original potential data, the spatial distribution characteristics, the temperature, the pressure and the component data to obtain fused potential data; A model building module, used to establish a nonlinear mapping relationship between potential and pH value using a support vector regression algorithm based on the fusion potential data, and generate a preliminary pH value prediction model; A data correction module, used to perform spatial correction on the fused potential data according to the spatial distribution characteristics by using adaptive grid division and interpolation point selection to obtain corrected potential data; A data cleaning module, used for identifying the contaminated potential data in the corrected potential data by using an isolation forest algorithm, and performing data cleaning on the contaminated potential data by interpolation error analysis and fuzzy clustering to obtain cleaned potential data; A trend prediction module, used for performing trend prediction on the cleaning potential data by time series decomposition and trend item extraction to obtain a potential prediction trend; A model adjustment module, used to adjust the preliminary pH value prediction model according to the cleaning potential data, the potential prediction trend and a preset sea area calibration standard to obtain a regional pH value prediction model; The target prediction module is used to predict the pH value of the target sea area according to the regional pH value prediction model to obtain the target pH value.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the intelligent detection method for the pH value of seawater according to any one of claims 1 to 7 when executing the computer program.

10. 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, the device where the computer-readable storage medium is located is controlled to execute the intelligent detection method for the pH value of seawater according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Power load index prediction method, system, equipment and medium

    CN116865254A

  • Real-time data integration method and system based on ground observation data

    CN119203022A

  • Multi-source water environment data processing method and system based on intelligent internet of things

    CN119474077A

  • Method for evaluating ocean water quality using artificial intelligence

    KR102764329B1

  • DIGITAL pH SENSOR AND MEASURING METHOD OF A DIGITAL pH SENSOR

    US20210123885A1

Cited By

  • Automatic calibration method and system for starting electrode of intelligent water station

    CN120721822A

  • Self-adaptive control method and system for offshore wind power potentiostat

    CN121348758A