Oil-water interface detection method and device based on manifold learning
Through manifold learning-based methods, conductivity numerical data are processed, dimensionality reduction and cluster identification of oil-water interfaces, the problems of low positioning accuracy and pseudo-turning point phenomena of traditional capacitive sensors are solved, and the oil-water interface detection is achieved with higher accuracy.
Patent Information
- Application Number
- CN202311555958.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-05-23
AI Technical Summary
When traditional capacitive sensors detect oil and water interfaces, they are limited by the small number of detection points, and the positioning accuracy is not high, and there is a pseudo-turning point phenomenon in the inflection point method, resulting in large errors in the positioning result from the actual situation.
A manifold learning-based method is adopted to obtain the electrical conductivity value data set for preprocessing and cubic polynomial interpolation to construct a high-dimensional data set, and a local linear embedding algorithm is used to reduce the dimensions to obtain a low-dimensional feature set. Finally, the K-means clustering algorithm is used to identify the relative positions of oil, water, and emulsification zones.
It improves the accuracy and robustness of oil-water interface detection, avoids the pseudo-turning point phenomenon, and ensures the accuracy and stability of the detection results.
Smart Images

Figure CN120030318A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil-water interface detection in oilfield stations and depots, and in particular to an oil-water interface detection method and device based on manifold learning. Background Art
[0002] Accurately detecting the height of the oil-water interface in the crude oil storage tank at the oilfield joint station and oil transfer station is the key to ensure oil-water separation. In practical applications, the oil-water interface detection is difficult, and usually the change in the capacitance value of the solution is measured, and the position of the oil-water interface and the width of the emulsified zone are estimated based on the workers' experience.
[0003] Oil-water interface measuring instruments can be divided into contact and non-contact types according to different measurement methods. Common contact detection methods include capacitance method, float method and differential pressure method, while non-contact methods include ultrasonic, radio frequency admittance, short wave absorption and ray method. At present, the main research direction of oil-water interface detectors is focused on the improvement of hardware such as sensors, and there is less analysis and processing of collected data. Due to the complexity of the on-site environment, the randomness and hysteresis of the emulsion state change and other influencing factors, judging the oil-water interface only based on the conductivity of each layer of mixed liquid has the problems of low accuracy and poor stability.
[0004] When the capacitive sensor detects the oil-water interface, the positioning accuracy of the oil-water interface is not high due to the limitation of too few sensor detection points. In addition, when the inflection point method is used to locate the oil-water interface, there is a problem of uneven collection points, and the phenomenon of false inflection points often occurs, resulting in a large error between the positioning result and the actual result. Summary of the invention
[0005] The present invention proposes an oil-water interface detection method and device based on manifold learning to solve the problem that when a traditional capacitive sensor detects the oil-water interface, the positioning accuracy of the oil-water interface is not high due to the limitation of too few sensor detection points; and when the inflection point method is used to locate the oil-water interface, there is a problem of uneven collection points, and the phenomenon of false inflection points often occurs, resulting in a large error between the positioning result and the actual result.
[0006] According to one aspect of the present invention, there is provided an oil-water interface detection method based on manifold learning, comprising:
[0007] Acquire a data set formed by the conductance values detected by each capacitive sensor in the container, and pre-process the data in the data set to eliminate noise and redundant information;
[0008] Performing cubic polynomial interpolation on the data in the preprocessed data set to obtain a constructed high-dimensional data set;
[0009] Using a local linear embedding algorithm to reduce the dimension of the high-dimensional data set to obtain a low-dimensional feature set of the sample;
[0010] According to the low-dimensional feature set of the sample, the K-means clustering algorithm is used to identify the relative positions of oil, water and emulsified zones, and complete the oil-water interface detection.
[0011] Preferably, the method of reducing the dimension of the high-dimensional data set by using a local linear embedding algorithm to obtain a low-dimensional feature set of the sample includes:
[0012] Divide each data sample in the high-dimensional data set into a sample neighborhood, linearly reconstruct the sample through the sample neighborhood, and determine the reconstruction weight corresponding to each sample neighborhood by minimizing the reconstruction error;
[0013] According to the reconstruction weights, determining to minimize the linear reconstruction error of the low-dimensional space;
[0014] According to the minimization of the linear reconstruction error of the low-dimensional space, the low-dimensional feature set is obtained by using the multiplier method.
[0015] Preferably, the formula for minimizing the reconstruction error includes:
[0016]
[0017]
[0018] Where N i is a sample g in a high-dimensional dataset i Neighborhood, w ij For sample g i With g j The reconstruction weight between When W ij =0.
[0019] Preferably, the formula for minimizing the linear reconstruction error in the low-dimensional space includes:
[0020]
[0021] Where, M = (IW)(IW) T ;
[0022] In the formula, I i , W i are the i-th column vectors of I and W respectively, T is the transpose, n is the number of samples in the high-dimensional dataset G, and tr is the trace of the matrix.
[0023] Preferably, the method of identifying the relative positions of oil, water and emulsified zones by using a K-means clustering algorithm based on the low-dimensional feature set of the sample comprises:
[0024] Step S41: randomly selecting a sample from the low-dimensional feature set of the sample as an initial clustering center;
[0025] Step S42: determining the cosine distance between each sample in the low-dimensional feature set of the sample and the initial cluster center by using a cosine distance formula;
[0026] Step S43: Select the maximum value among all the cosine distances as a new cluster center;
[0027] Step S44: Repeat steps S41 to S43 until a predetermined number of new cluster centers are selected, and identify the relative positions of the oil, water, and emulsified zones based on the new cluster centers.
[0028] Preferably, the cosine distance formula includes:
[0029]
[0030] In the formula, Dist(y i ,c 1 ) is the cosine distance, c 1 is the initial cluster center, y i is a sample in the low-dimensional feature set Y.
[0031] Preferably, the method for identifying the relative positions of oil, water and emulsified zones according to the new cluster center comprises:
[0032] Step S44.1: Determine the Euclidean distance from each sample in the low-dimensional feature set to each of the new cluster centers, and divide the corresponding sample with the smallest Euclidean distance to the new cluster center into the cluster corresponding to the new cluster center;
[0033] Step S044.2: Update the cluster center for each cluster;
[0034] Step S044.3: Repeat steps S44.1 and S44.2 until the cluster center does not change;
[0035] Step S044.4: Determine the relative positions of the oil, water, and emulsified zones according to the number of samples corresponding to the cluster center of each cluster.
[0036] Preferably, the method for updating the cluster center for each cluster comprises:
[0037] The centroid of the samples in the cluster is calculated using formula (8), and the centroid is the updated cluster center;
[0038]
[0039] In the formula, c i is the updated cluster center, and Y is the low-dimensional feature set of the sample.
[0040] According to one aspect of the present invention, there is provided an oil-water interface detection device based on manifold learning, comprising:
[0041] An acquisition unit, used to acquire a data set formed according to the conductance values detected by each capacitive sensor in the container, and perform preprocessing on the data in the data set to eliminate noise and redundant information;
[0042] A high-dimensional data set construction unit, used for performing cubic polynomial interpolation on the data in the preprocessed data set to obtain a constructed high-dimensional data set;
[0043] A low-dimensional data generation unit, used to reduce the dimension of the high-dimensional data set by using a local linear embedding algorithm to obtain a low-dimensional feature set of the sample;
[0044] The interface position determination unit is used to identify the relative positions of oil, water and emulsified zone according to the low-dimensional feature set of the sample and to complete the oil-water interface detection by using K-means clustering algorithm.
[0045] The present invention has at least the following beneficial effects:
[0046] The present invention proposes a method and device for oil-water interface detection based on manifold learning, which increases data points, expands data dimensions, and improves measurement accuracy by performing cubic polynomial interpolation on the conductivity data detected by the conductivity sensor. A local linear embedding algorithm is used to reduce the dimension of high-dimensional data, and the popular structure of high-dimensional data is mined to maintain its essential characteristics in low-dimensional space. The low-dimensional features are identified by the K-means clustering algorithm to realize the detection of the oil-water interface. In this way, the robustness and accuracy of the oil-water interface detection are improved while ensuring a fast convergence speed of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present invention and, together with the specification, are used to explain the technical solutions of the present invention.
[0048] Figure 1 A flow chart of an oil-water interface detection method based on manifold learning according to an embodiment of the present invention is shown;
[0049] Figure 2 A schematic diagram of the structure of an interface detection system in a settling tank according to an embodiment of the present invention is shown;
[0050] Figure 3 A clustering effect diagram according to an embodiment of the present invention is shown.
[0051] In the figure, 1-capacitive sensor, 2-sedimentation tank. DETAILED DESCRIPTION
[0052] Various exemplary embodiments, features and aspects of the present invention will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0053] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0054] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0055] In addition, in order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present invention can be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.
[0056] Figure 1 A flow chart of an oil-water interface detection method based on manifold learning according to an embodiment of the present invention is shown; Figure 2 A schematic diagram of the structure of an interface detection system in a settling tank according to an embodiment of the present invention is shown; Figure 3 FIG. 4 shows a clustering effect diagram according to an embodiment of the present invention. Figure 1-3 As shown, a method for detecting an oil-water interface based on manifold learning includes: step S10: obtaining a data set formed according to the conductance values detected by each capacitive sensor in a container, and preprocessing the data in the data set to eliminate noise and redundant information; step S20: performing cubic polynomial interpolation on the data in the preprocessed data set to obtain a constructed high-dimensional data set; step S30: using a local linear embedding algorithm to reduce the dimension of the high-dimensional data set to obtain a low-dimensional feature set of the sample; step S40: using a K-means clustering algorithm based on the low-dimensional feature set of the sample to identify the relative positions of oil, water, and emulsified zone to complete the oil-water interface detection.
[0057] The oil-water interface detection method based on manifold learning provided by the embodiment of the present invention specifically includes the following steps:
[0058] Step S10: obtaining a data set formed according to the conductance values detected by each capacitive sensor in the container, and performing preprocessing on the data in the data set to eliminate noise and redundant information.
[0059] In the embodiments of the present invention and Figure 1 In the embodiment, a capacitive sensor (1) is installed in a sedimentation tank (2) where the oil-water interface is to be determined. A plurality of capacitive sensors (1) are evenly arranged longitudinally in the sedimentation tank (2), and the distance between two adjacent capacitive sensors (1) is 2 cm. The conductivity values obtained are values collected by a plurality of capacitive sensors installed in the sedimentation tank over a period of time. The capacitive sensor transmits data to a computer through an acquisition system for processing, thereby forming a data set X = {x 1 , x 2 , x 3 .....x n}; Preprocess the data in the data set to eliminate noise and redundant information. i It is D-dimensional.
[0060] Step S20: performing cubic polynomial interpolation on the data in the preprocessed data set to obtain a constructed high-dimensional data set.
[0061] In an embodiment of the present invention, a method for performing cubic polynomial interpolation on data includes:
[0062] Suppose any interval [x i ,x i+1 ], i = 1, 2, 3...n, construct a polynomial equation on each interval, and use formula (1) to obtain the interpolated data set s(x), that is, the constructed high-dimensional data set:
[0063] s(x)=a i x 3 +b i x 2 +c i x+d i , i∈N + (1);
[0064] In the formula, a i 、b i 、c i d i are polynomial parameters, where the polynomial parameters in equation (1) can be solved by the following equation (2):
[0065]
[0066] Thus, the calculated value of the liquid conductivity at any point in the entire sedimentation tank can be obtained. Constructing a high-dimensional data set with G∈R D×nRepresents, where n is the number of samples.
[0067] Step S30: using a local linear embedding algorithm to reduce the dimension of the high-dimensional data set to obtain a low-dimensional feature set of the sample.
[0068] In the present invention, the method of reducing the dimension of the high-dimensional data set using a local linear embedding algorithm to obtain a low-dimensional feature set of the sample includes: dividing each data sample in the high-dimensional data set into a sample neighborhood, linearly reconstructing the sample through the sample neighborhood, and determining the reconstruction weight corresponding to each sample neighborhood by minimizing the reconstruction error; determining to minimize the linear reconstruction error of the low-dimensional space based on the reconstruction weight; and obtaining the low-dimensional feature set based on the minimization of the linear reconstruction error of the low-dimensional space using a multiplier method.
[0069] In the present invention, the formula for minimizing the reconstruction error includes:
[0070]
[0071]
[0072] Where N i is a sample g in the high-dimensional dataset G i Neighborhood, w ij For sample g i With g j The reconstruction weight between When W ij =0.
[0073] In the present invention, the formula for minimizing the linear reconstruction error in the low-dimensional space includes:
[0074]
[0075] Where, M = (IW)(IW) T ;
[0076] In the formula, I i , W i are the i-th column vectors of I and W respectively, M=(IW)(IW) T , T is the transpose, n is the number of samples in the high-dimensional data set G, and tr is the trace of the matrix.
[0077] In the embodiment of the present invention, the method for dividing the sample neighborhood is: using the K-means clustering algorithm (0<k<n), dividing the k samples closest to each sample in the high-dimensional data set obtained in step S20 into the sample neighborhood.
[0078] Calculate the local reconstruction weight W: Linearly reconstruct each sample in the sample neighborhood, that is, linearly reconstruct the sample through the sample neighborhood. By minimizing the reconstruction error, that is, formula (3), calculate the reconstruction weight W corresponding to each sample neighborhood and obtain W∈R n×n .
[0079] Calculate the low-dimensional embedding result Y: Minimize the linear reconstruction error ε(Y) of the low-dimensional space of the dataset by keeping the original reconstruction weight W structure unchanged.
[0080]
[0081]
[0082] Formula (5) is further matrixed to obtain formula (4).
[0083] According to ε(Y) obtained by formula (4), the low-dimensional feature set Y is calculated by the Lagrange multiplier method, that is, the eigenvectors corresponding to the k smallest non-zero eigenvalues of M.
[0084] The calculation formula of the Lagrange multiplier method is shown in the following formula (6):
[0085] L(Y)=tr(YMY T +λ(YY T -MI)) (6);
[0086] Where T is the transpose, tr is the trace of the matrix, and λ is the Lagrange multiplier.
[0087] The low-dimensional data set (low-dimensional feature set) finally obtained by formula (6) is represented by Y = {y 1 ,y 2 ,y 3 ...y n}express.
[0088] Step S40: Based on the low-dimensional feature set of the sample, a K-means clustering algorithm is used to identify the relative positions of oil, water, and emulsified zones to complete oil-water interface detection.
[0089] In the present invention, the method for identifying the relative positions of oil, water, and emulsified zones by using a K-means clustering algorithm based on a low-dimensional feature set of the sample comprises: step S41: randomly selecting a sample from the low-dimensional feature set of the sample as an initial cluster center; step S42: determining the cosine distance between each sample in the low-dimensional feature set of the sample and the initial cluster center through a cosine distance formula; step S43: selecting the maximum value of all the cosine distances as a new cluster center, and repeating the above steps until a predetermined number of new cluster centers are selected; step S44: identifying the relative positions of oil, water, and emulsified zones based on the new cluster centers.
[0090] In the embodiment of the present invention, step S41: from the liquid conductivity data set (low-dimensional data set) Y = {y 1 ,y 2 ,y 3 ...y n} randomly select a sample as the initial cluster center c 1 .
[0091] Step S42: For each point y in the data set Y i , by using the cosine distance formula to calculate its distance from the current cluster center (initial cluster center) c 1 The distance between them is the cosine distance Dist(y i ,c 1 ).
[0092] In the present invention, the cosine distance formula includes:
[0093]
[0094] In the formula, Dist(y i ,c 1 ) is the cosine distance, c 1 is the initial cluster center, y i is a sample in the low-dimensional feature set Y.
[0095] Step S43: Select the cosine distance Dist(y i ,c 1 )The largest sample point is taken as the new cluster center.
[0096] Step S44: Repeat steps S41 to S43 until a predetermined number of new cluster centers are selected, wherein the predetermined number is 3, corresponding to oil, water and emulsified zone respectively, and the number of cluster centers can be increased according to the type of liquid to be identified.
[0097] In the present invention, the method for identifying the relative positions of oil, water, and emulsified zones based on the new cluster center includes: step S44.1: determining the Euclidean distance from each sample in the low-dimensional feature set to each of the new cluster centers, and dividing the corresponding samples with the smallest Euclidean distance to the new cluster center into the cluster corresponding to the new cluster center; step S044.2: updating the cluster center for each cluster; step S044.3: repeating steps S44.1 and S44.2 until the cluster center no longer changes; step S044.4: determining the relative positions of the oil, water, and emulsified zones based on the number of samples corresponding to the cluster center of each cluster.
[0098] In the present invention, the method for updating the cluster center for each cluster includes:
[0099] The centroid of the samples in the cluster is calculated using formula (8), and the centroid is the updated cluster center;
[0100]
[0101] In the formula, c i is the updated cluster center, and Y is the low-dimensional feature set.
[0102] In the embodiment of the present invention, step S44.1: calculate each sample y i The Euclidean distance to the three new cluster centers, select three new cluster centers c respectively i The sample with the smallest Euclidean distance corresponding to each new cluster center is divided into the cluster corresponding to the new cluster center. After calculating the Euclidean distance each time, three samples are divided into the clusters corresponding to the three new cluster centers with the closest Euclidean distance.
[0103] Step S44.2: Each time after the samples are divided into clusters corresponding to the three cluster centers, the cluster centers in the three clusters are updated using formula (8), thereby obtaining three updated cluster centers.
[0104] Step S044.3: Repeat steps S44.1 and S44.2 until all samples in the low-dimensional data set are divided into corresponding clusters, and after each division, an updated cluster center corresponding to each cluster is obtained. After the last division, the cluster center updated using formula (8) is the final cluster center.
[0105] Step S044.4: The clustering effect diagram finally obtained according to the above steps S44.1 to S044.3 is as follows: Figure 3 As shown. Figure 3 The clustering results can be used to obtain the positions of oil, water and emulsified zone (oil-water mixture) in the sedimentation tank.
[0106] The three updated cluster centers finally obtained correspond to oil, water and emulsified zone respectively; due to the different densities of oil, water and emulsified zone in the settling tank, the positions from top to bottom are oil layer, emulsified layer and water layer respectively. According to the position of the capacitive sensor in the settling tank corresponding to the samples in each cluster, it is possible to determine which type of liquid the three clusters correspond to. Then, by multiplying the number of samples contained in the cluster corresponding to each updated cluster center by the spacing of the capacitive sensor, i.e. 2cm, the height of oil, water and emulsified zone in the settling tank can be determined, thereby obtaining the relative positions of oil, water and emulsified zone in the settling tank.
[0107] In an embodiment of the present invention, the K-means clustering algorithm (k-means) adopted is an improved k-means clustering algorithm, which is characterized in that the new cluster center is determined by the cosine distance in step S42. Compared with the original method of using the Euclidean distance, the method of the present invention has the following advantages: in high-dimensional space, the cosine distance is more effective than the Euclidean distance. The cosine distance mainly focuses on the direction of the vector rather than the size, so it can better capture the similarity of data in the high-dimensional space; at the same time, it is more applicable to data. The cosine distance is usually used to measure the similarity between samples because it can ignore the differences in sample dimensions, while the Euclidean distance will be affected by the sample dimensions.
[0108] It can be understood that the above-mentioned various method embodiments mentioned in the present invention can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present invention will not go into details.
[0109] The execution subject of the oil-water interface detection method based on manifold learning can be an oil-water interface detection device based on manifold learning. For example, the oil-water interface detection method based on manifold learning can be executed by a terminal device or a server or other processing device, wherein the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the oil-water interface detection method based on manifold learning can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0110] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0111] In June 2023, the present invention installed conductivity (conductivity) sensors according to the method of the present invention in the settling tanks of the 2# and 3# electric dehydrators of a joint station of an oil production plant, collected conductivity data in the settling tanks, and conducted oil-water interface detection tests according to the method of the present invention. The installation density (spacing) of the capacitive sensors of the on-site interface detector is 2 cm. The processor first performs denoising on the conductivity values collected corresponding to each sensor point to eliminate redundant information and other interference data, and then performs a cubic polynomial interpolation algorithm to expand the original data, improve the conductivity measurement accuracy of the detection point, and then use the local linear embedding algorithm to mine the data structure. Finally, the positions of pure oil, emulsified zone and pure water are identified through the improved k-means clustering algorithm. It has been verified that during the field operation, the results of the interface detection performed by this method are accurate and the performance is stable.
[0112] The present invention also provides an oil-water interface detection device based on manifold learning, comprising: an acquisition unit, used to acquire a data set formed according to the conductance values detected by each capacitive sensor in the container, and preprocess the data in the data set to eliminate noise and redundant information; a high-dimensional data set construction unit, used to perform cubic polynomial interpolation on the data in the preprocessed data set to obtain a constructed high-dimensional data set; a low-dimensional data generation unit, used to reduce the dimension of the high-dimensional data set using a local linear embedding algorithm to obtain a low-dimensional feature set of the sample; an interface position determination unit, used to identify the relative positions of oil, water, and emulsified zone based on the low-dimensional feature set of the sample using a K-means clustering algorithm to complete oil-water interface detection.
[0113] In some embodiments, the functions or modules and units included in the device provided by the embodiment of the present invention can be used to execute the method described in the above method embodiment. Its specific implementation can refer to the description of the above method embodiment. For the sake of brevity, it will not be repeated here.
[0114] The present invention evenly distributes conductivity sensors at a distance of 2 cm in a sedimentation tank, detects the conductivity value of each point in the container, pre-processes the conductivity data of each point, eliminates the corresponding noise and redundant data, and unifies the data type, making it easier to perform subsequent calculations. After that, a cubic polynomial is used for interpolation to obtain the liquid conductivity value of any point in the entire sedimentation tank to increase the dimension of the data. A local linear embedding algorithm is used to reduce the dimension of high-dimensional data, explore the popular structure of high-dimensional data, and maintain its essential characteristics in a low-dimensional space to achieve significant feature extraction and obtain a low-dimensional feature set of the sample. Finally, an improved k-means clustering algorithm is used to perform cluster analysis on the reduced-dimensional data, identify low-dimensional features, and then determine the accurate oil-water interface, avoiding the pseudo-inflection point phenomenon of the traditional inflection point method and the influence of over-conservatism, thereby improving the robustness and practicality of the detection system.
[0115] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for oil-water interface detection based on manifold learning, It is characterized in that include: Acquire a data set formed by the conductance values detected by each capacitive sensor in the container, and pre-process the data in the data set to eliminate noise and redundant information; Performing cubic polynomial interpolation on the data in the preprocessed data set to obtain a constructed high-dimensional data set; Using a local linear embedding algorithm to reduce the dimension of the high-dimensional data set to obtain a low-dimensional feature set of the sample; According to the low-dimensional feature set of the sample, the K-means clustering algorithm is used to identify the relative positions of oil, water and emulsified zones, and complete the oil-water interface detection.
2. The oil-water interface detection method based on manifold learning according to claim 1, It is characterized in that The method of reducing the dimension of the high-dimensional data set by using a local linear embedding algorithm to obtain a low-dimensional feature set of samples includes: Divide each data sample in the high-dimensional data set into a sample neighborhood, linearly reconstruct the sample through the sample neighborhood, and determine the reconstruction weight corresponding to each sample neighborhood by minimizing the reconstruction error; According to the reconstruction weights, determining to minimize the linear reconstruction error of the low-dimensional space; According to the minimization of the linear reconstruction error of the low-dimensional space, the low-dimensional feature set is obtained by using the multiplier method.
3. The oil-water interface detection method based on manifold learning according to claim 2, It is characterized in that The formula for minimizing the reconstruction error includes: Where N i is a sample g in a high-dimensional dataset i Neighborhood, w ij For sample g i With g j The reconstruction weight between When W ij =0.
4. The oil-water interface detection method based on manifold learning according to claim 2, It is characterized in that The formula for minimizing the linear reconstruction error in the low-dimensional space includes: Among them, M=(IW)(IW) T ; In the formula, I i , W i are the i-th column vectors of I and W respectively, T is the transpose, n is the number of samples in the high-dimensional dataset G, and tr is the trace of the matrix.
5. The oil-water interface detection method based on manifold learning according to claim 1, It is characterized in that The method for identifying the relative positions of oil, water and emulsified zones by using a K-means clustering algorithm based on the low-dimensional feature set of the sample comprises: Step S41: randomly selecting a sample from the low-dimensional feature set of the sample as an initial clustering center; Step S42: determining the cosine distance between each sample in the low-dimensional feature set of the sample and the initial cluster center by using a cosine distance formula; Step S43: selecting the maximum value among all the cosine distances as a new cluster center; Step S44: Repeat steps S41 to S43 until a predetermined number of new cluster centers are selected, and identify the relative positions of the oil, water, and emulsified zones based on the new cluster centers.
6. The oil-water interface detection method based on manifold learning according to claim 5, It is characterized in that The cosine distance formula includes: In the formula, Dist(y i ,c 1 ) is the cosine distance, c 1 is the initial cluster center, y i is a sample in the low-dimensional feature set Y.
7. The oil-water interface detection method based on manifold learning according to claim 5, It is characterized in that The method for identifying the relative positions of oil, water and emulsified zones according to the new cluster center comprises: Step S44.1: Determine the Euclidean distance from each sample in the low-dimensional feature set to each of the new cluster centers, and divide the corresponding sample with the smallest Euclidean distance to the new cluster center into the cluster corresponding to the new cluster center; Step S044.2: Update the cluster center for each cluster; Step S044.3: Repeat steps S44.1 and S44.2 until the cluster center does not change; Step S044.4: Determine the relative positions of the oil, water, and emulsified zones according to the number of samples corresponding to the cluster center of each cluster.
8. The oil-water interface detection method based on manifold learning according to claim 7, It is characterized in that The method for updating the cluster center for each cluster includes: The centroid of the samples in the cluster is calculated using formula (8), and the centroid is the updated cluster center; In the formula, c i is the updated cluster center, and Y is the low-dimensional feature set of the sample.
9. An oil-water interface detection device based on manifold learning, It is characterized in that include: An acquisition unit, used to acquire a data set formed according to the conductance values detected by each capacitive sensor in the container, and perform preprocessing on the data in the data set to eliminate noise and redundant information; A high-dimensional data set construction unit, used for performing cubic polynomial interpolation on the data in the preprocessed data set to obtain a constructed high-dimensional data set; A low-dimensional data generation unit, used to reduce the dimension of the high-dimensional data set by using a local linear embedding algorithm to obtain a low-dimensional feature set of the sample; The interface position determination unit is used to identify the relative positions of oil, water and emulsified zone according to the low-dimensional feature set of the sample and to complete the oil-water interface detection by using K-means clustering algorithm.