Method, device and apparatus for determining a fluid front in a porous medium

By preprocessing and extracting edge points from porous media fluid images, and combining this with spline fitting of the porous media fluid physical model, the problem of low accuracy and reliability in porous media fluid front detection is solved, achieving efficient and low-cost fluid front determination.

CN120976250BActive Publication Date: 2026-02-03CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511502473.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2026-02-03
Estimated Expiration
2045-10-21

AI Technical Summary

Technical Problem

Existing methods for detecting the fluid front of porous media have low accuracy and reliability, and cannot achieve efficient, real-time and high-precision detection.

Method used

By acquiring an initial fluid image within a porous medium, preprocessing it, and then extracting edge points, the process is combined with a porous medium fluid physics model for spline fitting. Finally, an adaptive nodal spline fitting and optimization algorithm is used to generate the target fluid front of the porous medium.

Benefits of technology

It achieves efficient and low-cost fluid leading edge determination, improves detection accuracy, and can output continuous and reliable target fluid leading edges in complex porous media fluid conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976250B_ABST
    Figure CN120976250B_ABST
Patent Text Reader

Abstract

The application discloses a method, device and equipment for determining a fluid front of a porous medium, and the method comprises the following steps: acquiring an initial fluid image in the porous medium; preprocessing the initial fluid image to obtain a fluid contour image; detecting the fluid front of the fluid contour image, extracting a plurality of target pixel points in the fluid contour image as edge points to form an edge point set; performing spline fitting based on a fluid physical model of the porous medium and the edge point set to obtain a target fluid front of the porous medium. Through the above method, the fluid front can be determined efficiently and at low cost. Moreover, the influence of noise interference can be effectively inhibited, and a continuous and reliable target fluid front can still be output under the condition of complex porous medium fluid, the real-time processing of image data is realized, and the accuracy of the porous medium fluid front identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a method, device and equipment for determining fluid front in porous media. BACKGROUND

[0002] Fluid front detection in porous media has a profound impact on key areas such as resource exploitation optimization, environmental management, and energy technology development. In the exploitation of oil, natural gas, and geothermal resources, accurately tracking fluid fronts (such as oil displacement water fronts or CO2 diffusion fronts) can optimize displacement strategies, improve recovery efficiency and reduce resource waste, while avoiding fingering or ineffective displacement phenomena; in the fields of carbon capture and storage (CCUS) and energy technology (such as fuel cells and shale gas exploitation), front detection is directly related to storage efficiency, energy conversion performance, and fracturing safety.

[0003] Currently, fluid front detection experiments in porous media mainly include the following: (1) relying on manual observation or destructive sampling, observing the core section under a microscope or by naked eye, and recording the change of front position over time, this method is high in cost, low in efficiency, strong in subjectivity, and has large differences in measurement results between different operators, and can only obtain data at discrete time points, and cannot be continuously monitored; (2) resistivity / CT scanning method, this method is high in cost and cannot process data in real time; (3) image processing method, threshold segmentation or edge detection is used to process porous media fluid images, but this method has high miss rate in low contrast environment because the front is similar in grayscale to the core; and it is sensitive to bubbles and pore noise, and false edges are easily generated, and it cannot process non-uniform fronts. It can be seen that the current fluid front detection method in porous media has low accuracy and reliability.

[0004] In view of the low accuracy and reliability of the fluid front detection method in porous media, no effective solution has been proposed so far. SUMMARY

[0005] The purpose of the embodiments of the present application is to provide a method, device and equipment for determining fluid front in porous media to solve the problem of low accuracy and reliability of the fluid front detection method in porous media.

[0006] To solve the above technical problems, the first aspect of the present specification provides a method for determining fluid front in porous media, comprising:

[0007] obtaining an initial fluid image in a porous medium;

[0008] preprocessing the initial fluid image to obtain a fluid contour image;

[0009] detecting the fluid front in the fluid contour image, and extracting a plurality of target pixel points in the fluid contour image as edge points to form an edge point set.

[0010] performing spline fitting based on a porous medium fluid physics model and the edge point set to obtain a target fluid front of the porous medium.

[0011] In some embodiments of the present disclosure, performing spline fitting based on a porous medium fluid physics model and the edge point set to obtain a target fluid front of the porous medium comprises:

[0012] sampling the edge point set multiple times based on a preset sampling strategy, and determining an inner point set corresponding to the edge point set based on the multiple sampling results;

[0013] performing adaptive node spline fitting based on the inner point set and a preset energy function to generate a plurality of control points and obtain a fitting curve, wherein the preset energy function comprises a constraint term representing fluid surface tension and a fitting term;

[0014] optimizing coordinates of the plurality of control points based on the inner point set, the plurality of control points, and a preset optimization algorithm to optimize the fitting curve corresponding to each candidate point set, and obtaining the target fluid front.

[0015] In some embodiments of the present disclosure, sampling the edge point set multiple times based on a preset sampling strategy, and determining an inner point set corresponding to the edge point set based on the multiple sampling results comprises:

[0016] calculating curvature changes of each edge point in the edge point set;

[0017] sorting a plurality of edge points based on the curvature changes of each edge point;

[0018] sampling the plurality of edge points multiple times based on the sorting result, performing front fitting for each sampling result, and determining an inner point corresponding to each sampling result based on a preset dynamic residual threshold;

[0019] determining an inner point set corresponding to the edge point set based on the inner point corresponding to each sampling result and the front fitting result.

[0020] In some embodiments of the present disclosure, performing adaptive node spline fitting based on the inner point set and a preset energy function to generate a plurality of control points and obtain a fitting curve comprises:

[0021] constructing a fitting term representing a relationship between each inner point and a parameter corresponding to each inner point, and a constraint term representing fluid surface tension;

[0022] constructing the preset energy function based on the constraint term and the fitting term;

[0023] parameterizing the inner point set to determine a parameter corresponding to each inner point in the inner point set;

[0024] solving a plurality of control points based on the preset energy function, actual coordinates of each of the inner points and parameters corresponding to each of the inner points;

[0025] performing spline fitting based on the plurality of control points to obtain the fitting curve.

[0026] In some embodiments of the present specification, the preset energy function is represented by the following formula:

[0027]

[0028] wherein E fit represents a fitting term, E tension represents a constraint term, y i represents actual coordinates of the i-th inner point, B(p, s i represents coordinates of the fitting curve at the control point p corresponding to the parameter s i , N represents the number of inner points in the inner point set, k(s) represents local curvature of the fitting curve at the parameter s, k0 represents equilibrium curvature, ε represents a weight coefficient, and L represents total arc length of the fitting curve.

[0029] In some embodiments of the present specification, after optimizing the coordinates of the plurality of control points based on the inner point set, the plurality of control points and the preset optimization algorithm, the method further comprises:

[0030] based on a preset window width, smoothing the curvature abrupt change region of the optimized fitting curve by using a moving average filter, and performing flow rate verification on the smoothed fitting curve by using a fluid percolation model, removing the region of the smoothed fitting curve in which the flow rate satisfies a preset condition, to obtain the target fluid front.

[0031] In some embodiments of the present specification, the fluid contour image is subjected to front detection, and a plurality of target pixel points in the fluid contour image are extracted as edge points to form an edge point set, comprising:

[0032] performing phase consistency detection on the fluid contour image to obtain an initial front of the fluid in the porous medium;

[0033] performing morphological main front extraction on the initial front to screen a maximum edge region as a main front candidate region;

[0034] performing adaptive threshold Canny edge detection on the main front candidate region to extract a plurality of target pixel points as edge points to form an edge point set.

[0035] In some embodiments of the present specification, the initial fluid image comprises fluid images of the porous medium at multiple time points; the target fluid front of the porous medium is obtained by spline fitting based on a porous medium fluid physical model and the edge point set, comprising:

[0036] determining the fluid front length in each fluid image;

[0037] determining the target node number corresponding to each edge point set based on the fluid front length corresponding to each fluid image;

[0038] determining the target fluid front of the porous medium at each time point based on the porous medium fluid physical model, each edge point set and the target node number corresponding to each edge point set.

[0039] The second aspect of the present specification provides a determination device of a porous medium fluid front, comprising:

[0040] an acquisition module configured to acquire an initial fluid image in a porous medium;

[0041] a processing module configured to pre-process the initial fluid image to obtain a fluid contour image;

[0042] an extraction module configured to perform front detection on the fluid contour image, and extract a plurality of target pixel points in the fluid contour image as edge points to form an edge point set;

[0043] a fitting module configured to perform spline fitting based on a porous medium fluid physical model and the edge point set to obtain a target fluid front of the porous medium.

[0044] The third aspect of the present specification provides an electronic device, comprising a memory and a processor, the processor and the memory are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to realize the steps of the method of any one of the first aspect.

[0045] Based on the method, apparatus, and device for determining the fluid leading edge in porous media provided in the embodiments of this specification, the following steps are taken: An initial fluid image within the porous medium is acquired; the initial fluid image is preprocessed to obtain a fluid contour image; leading edge detection is performed on the fluid contour image, and multiple target pixels in the fluid contour image are extracted as edge points to form an edge point set; spline fitting is performed based on the porous medium fluid physical model and the edge point set to obtain the target fluid leading edge of the porous medium. This method of obtaining the fluid leading edge through image processing achieves efficient and low-cost fluid leading edge determination. Furthermore, preprocessing the initial fluid image before edge point extraction improves the edge information in the image, providing a foundation for subsequent high-precision edge point extraction. Further, by performing edge point extraction on the fluid contour image and spline fitting based on the porous medium fluid physical model, the influence of noise interference can be effectively suppressed, ensuring that a continuous and reliable target fluid leading edge can still be output even in complex porous medium fluid conditions, improving the accuracy of porous medium fluid leading edge recognition while processing image data in real time. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0047] Figure 1 The diagram shown is a schematic representation of a method for determining the fluid front of a porous medium provided in an embodiment of this specification.

[0048] Figure 2 The diagram shown is a schematic representation of the edge point set extraction process provided in an embodiment of this specification.

[0049] Figure 3 The diagram shown is a schematic representation of the spline fitting process provided in the embodiments of this specification.

[0050] Figure 4 The diagram shown is a schematic of a porous media fluid front provided in an embodiment of this specification;

[0051] Figure 5 The diagram shown is a schematic of a device for determining the fluid front of a porous medium provided in an embodiment of this specification.

[0052] Figure 6 The diagram shown is a schematic of an electronic device provided in an embodiment of this specification. Detailed Implementation

[0053] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0054] It should be noted that the information and data related to users involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by the relevant parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with relevant laws, regulations, and standards, and necessary confidentiality measures have been taken. They do not violate public order and good morals, and corresponding operation entry points are provided for users or relevant parties to choose to authorize or refuse.

[0055] It should also be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0056] The method for determining the fluid front of porous media provided in the embodiments of this specification will be described below with reference to the accompanying drawings.

[0057] Figure 1 The diagram illustrates a method for determining the fluid front of a porous medium according to an embodiment of this specification. While this specification provides method operation steps or apparatus structures as shown in the following embodiments or figures, the method or apparatus may include more or fewer operation steps or module units, either combined or without inventive effort, based on conventional methods or without inventive effort. In steps or structures where there is no logically necessary causal relationship, the execution order of these steps or the module structure of the apparatus is not limited to the execution order or module structure shown in the embodiments or figures of this specification. When the method or module structure is applied in actual devices, servers, or terminal products, it can be executed sequentially or in parallel according to the method or module structure shown in the embodiments or figures (e.g., in a parallel processor or multi-threaded processing environment, or even in a distributed processing or server cluster implementation environment). Figure 1 As shown, it may include:

[0058] S101: Acquire the initial fluid image within the porous medium.

[0059] It is understandable that the porous medium can be the reservoir core, and the initial fluid image can be an image representing the fluid distribution within the acquired reservoir core. The fluid can be an oil-phase fluid or an aqueous-phase fluid.

[0060] S102: Preprocess the initial fluid image to obtain a fluid contour image.

[0061] It is understandable that the initial fluid image obtained may have problems such as low contrast, sensitivity to bubble and pore noise, and the presence of false edges and non-uniform edges. By preprocessing the initial fluid image, a fluid contour image can be obtained, which provides a basis for subsequent edge point extraction and spline fitting.

[0062] In some embodiments of this specification, the preprocessing of the initial fluid image may include at least one or more of image equalization, interpolation, filtering, and thresholding.

[0063] In some embodiments of this specification, the image equalization processing method may include contrast-limited adaptive histogram equalization, the interpolation processing method may include bilinear interpolation, the filtering processing method may include guided filtering, and the threshold segmentation processing method may include adaptive threshold segmentation, such as adaptive threshold segmentation based on the Otsu algorithm. Furthermore, preprocessing the initial fluid image may include: processing the initial fluid image using contrast-limited adaptive histogram equalization based on a preset contrast limit threshold and block size to obtain a first intermediate image; processing the first intermediate image using a preset block processing strategy combined with bilinear interpolation to obtain a second intermediate image; using the initial fluid image as a guide image, setting the filtering radius and regularization parameters, and processing the second intermediate image using guided filtering to obtain a third intermediate image; and processing the third intermediate image using adaptive threshold segmentation to extract the fluid leading edge contour to obtain a fluid contour image.

[0064] In the embodiments of this specification, limiting contrast adaptive histogram equalization can improve the grayscale difference between the leading edge and the background in the initial fluid image, solving the problem of low image contrast. By combining the bilinear interpolation method with the block processing strategy to process the image, smooth transition between blocks can be ensured while interpolating the image, avoiding local over-enhancement. By introducing the initial fluid image as a guide image through guided filtering, the leading edge sharpness can be preserved through edge preservation characteristics while smoothing core pore noise. Furthermore, based on the adaptive threshold segmentation method to process the equalized, interpolated, and filtered images, accurate extraction can be achieved, laying a reliable foundation for subsequent edge point extraction and spline fitting.

[0065] S103: Perform leading edge detection on the fluid contour image and extract multiple target pixels in the fluid contour image as edge points to form an edge point set.

[0066] It is understandable that by performing leading edge detection on the preprocessed fluid contour image and selecting multiple target pixels in the image as edge points, and then performing spline fitting based on these, a more accurate and reliable target fluid leading edge can be obtained.

[0067] In some embodiments of this specification, in order to improve the accuracy of edge point extraction, a multi-level edge detection algorithm can be used. Based on the edge detection algorithm that focuses on different leading edge features within each level, multi-level fluid leading edge identification can be performed on the fluid contour image, which can obtain a more accurate and reliable set of edge points, providing a data foundation for subsequent high-precision spline fitting.

[0068] Furthermore, a multi-level edge detection algorithm can include at least: a phase consistency coarse detection algorithm, a morphological leading edge extraction algorithm, and an adaptive threshold edge detection algorithm. The outputs of multiple levels of algorithms interact to suppress interference from different factors on leading edge detection, resulting in a more accurate and reliable set of edge points.

[0069] refer to Figure 2 As shown, in some embodiments of this specification, performing leading edge detection on the fluid contour image and extracting multiple target pixels from the fluid contour image as edge points to form an edge point set may include:

[0070] S201: Perform phase consistency detection on the fluid profile image to obtain the initial leading edge of the fluid in the porous medium.

[0071] Specifically, phase consistency coarse detection can be performed on fluid contour images. That is, a phase consistency edge detection algorithm is used, which calculates phase consistency features based on a constructed multi-scale Log-Gabor filter bank, and then suppresses background interference through noise compensation. At the same time, the frequency domain response of the Log-Gabor filter bank is combined to enhance the blurred leading edge. Compared with the traditional Canny algorithm, this can effectively avoid the problem of missed detection under contrast.

[0072] For example, the phase consistency detection process may specifically include: constructing a multi-scale Log-Gabor filter bank, defining filter parameters, and configuring multi-scale parameters. Calculating the filtered response of the fluid contour image at each scale and direction, the filtered response may include both real and imaginary parts. Calculating phase consistency features at each scale based on the multi-scale filtered response calculation results, and performing noise compensation based on the obtained phase consistency features. The phase consistency features may include local energy and amplitude sums. Combining the multi-scale noise compensation results, a phase consistency image is obtained; edge enhancement and detection are performed on the phase consistency image, such as non-maximum suppression and thresholding, to obtain the initial leading edge.

[0073] S202: Perform morphological main leading edge extraction on the initial leading edge, and select the largest edge region as the candidate region for the main leading edge.

[0074] Specifically, morphological closing operations can be used to connect the broken edges using elliptical structuring elements, which can preserve the curvilinear characteristics of the fluid leading edge. Then, connected component analysis can be performed on the fluid leading edge after the operation to identify and separate different edge regions. Based on the area, the largest edge region can be selected as the candidate region for the main leading edge, which can eliminate secondary interference. The obtained candidate region for the main leading edge can also be refined to optimize the edge quality and obtain a single-pixel wide main leading edge.

[0075] S203: Perform adaptive threshold Canny edge detection on the main leading edge candidate region and extract multiple target pixels as edge points to form an edge point set.

[0076] Specifically, dynamic threshold local optimization can be implemented in the candidate region of the main leading edge. That is, adaptive threshold Canny detection can be applied in the candidate region of the main leading edge. For example, the threshold range can be 10-30, which can be dynamically adjusted according to the local gradient. Combined with Gaussian smoothing and non-maximum suppression, sub-pixel level edge localization can be achieved, resulting in an edge point set composed of multiple edge points with an accuracy of 0.1 pixels.

[0077] For example, the processing in step S203 may include: performing Gaussian smoothing in the candidate region of the main leading edge; using the Sobel operator to calculate the gradient magnitude and direction; non-maximum suppression; determining a dynamic threshold based on the local gradient and performing double threshold detection; using gradient magnitude quadratic interpolation based on the detection results to perform sub-pixel level edge localization, and extracting multiple target pixels as edge points to form an edge point set.

[0078] S104: Based on the porous medium fluid physics model and the edge point set, spline fitting is performed to obtain the target fluid front of the porous medium.

[0079] It is understandable that porous media fluid physics models can characterize fluid physical properties such as seepage laws and surface forces in porous media. Spline fitting based on porous media fluid physics models that characterize fluid physical features can effectively suppress physical inconsistencies, so as to obtain continuous and reliable target fluid leading edges even in complex porous media fluid conditions, thereby improving the accuracy of fluid leading edge identification.

[0080] In some embodiments of this specification, the porous media fluid physics model may include at least a fluid surface tension sub-model and a fluid seepage sub-model.

[0081] In the embodiments of this specification, the method for obtaining the fluid leading edge through image processing described above can achieve efficient and low-cost fluid leading edge determination. Furthermore, preprocessing the initial fluid image before edge point extraction can improve edge information in the image, providing a foundation for subsequent high-precision edge point extraction. Further, by performing edge point extraction on the fluid contour image and spline fitting based on a porous media fluid physical model, the influence of noise interference can be effectively suppressed, ensuring that a continuous and reliable target fluid leading edge can still be output even in complex porous media fluid conditions. This improves the accuracy of porous media fluid leading edge recognition while processing image data in real time.

[0082] It is understood that the methods provided in this application can be applied to electronic devices, which can refer to electronic devices with data computing, processing, and storage capabilities. These electronic devices can be terminals such as PCs (Personal Computers), tablets, smartphones, wearable devices, and intelligent robots; they can also be servers. A server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0083] refer to Figure 3 As shown, in some embodiments of this specification, spline fitting based on a porous medium fluid physics model and the edge point set to obtain the target fluid front of the porous medium may include:

[0084] S301: The edge point set is sampled multiple times based on a preset sampling strategy, and the interior point set corresponding to the edge point set is determined based on the results of the multiple samplings.

[0085] In some embodiments of this specification, before sampling the edge point set multiple times based on a preset sampling strategy, the method may further include: preprocessing the edge point set to construct a spatial identifier corresponding to each edge point.

[0086] Specifically, spatial identifiers can serve as spatial indexes. For multiple edge points in an edge point set, a KD-Tree spatial index can be constructed based on their locations to accelerate nearest neighbor search and improve subsequent computational efficiency.

[0087] In some embodiments of this specification, sampling the edge point set multiple times based on a preset sampling strategy and determining the interior point set corresponding to the edge point set based on the multiple sampling results may include: calculating the curvature change of each edge point in the edge point set; sorting multiple edge points based on the curvature change of each edge point; sampling the multiple edge points multiple times based on the sorting results, performing leading edge fitting for each sampling result, and determining the interior point corresponding to each sampling result based on a preset dynamic residual threshold; and determining the interior point set corresponding to the edge point set based on the interior point corresponding to each sampling result and the leading edge fitting result.

[0088] It is understandable that the preset sampling strategy can be an information entropy-based sampling strategy. It can calculate the curvature of each edge point by fitting the curve locally, and then calculate the curvature change in the neighborhood of each edge point as the information entropy. Points with large curvature changes have large information entropy and can be selected first.

[0089] In some embodiments of this specification, the edge point set can be input into an improved progressive consistent sampling regressor, and the number of nodes, dynamic residual threshold, and sampling strategy (i.e., preset sampling strategy) of the regressor can be set to perform multiple sampling processes on the edge point set using the improved progressive consistent sampling regressor to determine the inner point set, thereby eliminating outliers such as bubbles and pore noise, and providing a basis for subsequent high-precision spline fitting.

[0090] In the embodiments of this specification, by setting a dynamic residual threshold, the convergence speed can be improved while ensuring robustness, thereby improving the identification efficiency of the fluid leading edge.

[0091] S302: Based on the set of interior points and the preset energy function, perform adaptive nodal spline fitting to generate multiple control points and obtain a fitting curve, wherein the preset energy function includes constraint terms and fitting terms characterizing the surface tension of the fluid.

[0092] For example, adaptive node spline fitting can be adaptive node cubic B-spline fitting.

[0093] In some embodiments of this specification, adaptive nodal spline fitting is performed based on the interior point set and a preset energy function to generate multiple control points and obtain a fitted curve, which may include:

[0094] S1. Construct fitting terms that characterize the relationship between each interior point and the parameters corresponding to each interior point, as well as constraint terms that characterize the fluid surface tension. Specifically, the constraint terms corresponding to the fluid surface tension can be characterized by the bending energy, that is, the square integral of the second derivative of the curvature.

[0095] S2. Construct the preset energy function based on the constraint terms and the fitting terms.

[0096] S3. Parameterize the set of interior points to determine the parameters corresponding to each interior point in the set.

[0097] It's understandable that parameterizing the inlier set maps spatial points to the parameter domain, providing a foundation for subsequent spline fitting. Specifically, during inlier set parameterization, the inlier points can be sorted based on their spatial identifiers, and the parameters corresponding to each inlier point in the sorted set can be calculated and normalized. Parameterization can preserve the curve's velocity and reduce parameter distortion. For example, the parameterized parameters can be arc length parameters.

[0098] S4. Based on the preset energy function, the actual coordinates of each interior point, and the parameters corresponding to each interior point, multiple control points are obtained.

[0099] It is understandable that control points can be points on the curve obtained during spline fitting, rather than points in the edge point set.

[0100] S5. Perform spline fitting based on the multiple control points to obtain the fitted curve.

[0101] Specifically, when performing spline fitting based on control points, adaptive node placement can be used to improve the accuracy of the fitted curve. This can be achieved by combining curvature and the density of interior points, such as placing control points densely in areas of high curvature and sparsely in areas of gentle curvature.

[0102] In some embodiments of this specification, the preset energy function can be expressed by the following formula:

[0103] Formula (1)

[0104] Among them, E fit It can represent the fitting term, E tension It can represent a constraint term, y i B(p,s) can represent the actual coordinates of the i-th interior point. i ) can represent the parameter s corresponding to the fitted curve at control point p. iThe coordinates at the point are given. N can represent the number of interior points in the interior point set, k(s) can represent the local curvature of the fitted curve at parameter s, k0 can represent the equilibrium curvature, ε can represent the weighting coefficient, and L can represent the total arc length of the fitted curve.

[0105] In some embodiments of this specification, the local curvature k(s) of the fitted curve at parameter s can be determined by the following formula:

[0106] Formula (2)

[0107] Here, t′(s) can represent the unit tangent vector of the fitted curve at parameter s, and r′(s) can represent the parametric equation of the curve.

[0108] S303: Based on the set of interior points, multiple control points, and a preset optimization algorithm, the coordinates of multiple control points are optimized to optimize the fitting curves corresponding to each candidate point set, thereby obtaining the target fluid leading edge.

[0109] Specifically, the control point coordinates can be optimized by calculating the mean square error between the control point and its corresponding interior point, and then based on a preset fitting error. For example, the L-BFGS optimization algorithm can be used to optimize the control point coordinates.

[0110] In some embodiments of this specification, after optimizing the coordinates of multiple control points based on an interior point set, multiple control points, and a preset optimization algorithm, the process may further include: smoothing the curvature abrupt change region of the optimized fitted curve using a moving average filter based on a preset window width; verifying the flow velocity of the smoothed fitted curve using a fluid seepage model; and removing regions in the smoothed fitted curve where the flow velocity meets a preset condition to obtain the target fluid leading edge. For example, the fluid seepage model can be Darcy's law, which characterizes the linear relationship between the fluid seepage velocity and the hydraulic gradient. The preset condition can be a flow velocity exceeding twice the standard deviation. Through the fluid seepage model, physically unreasonable fingering artifacts can be effectively suppressed, ultimately outputting a high-precision target fluid leading edge for porous media.

[0111] In some embodiments of this specification, the initial fluid image includes fluid images of the porous medium at multiple time points; obtaining the target fluid leading edge of the porous medium by performing spline fitting based on the porous medium fluid physics model and the edge point set may include: determining the fluid leading edge length in each fluid image; determining the number of target nodes corresponding to the edge point set of each fluid image based on the fluid leading edge length corresponding to each fluid image; and determining the target fluid leading edge of the porous medium at each time point by performing spline fitting based on the porous medium fluid physics model, each edge point set, and the number of target nodes corresponding to each edge point set.

[0112] It is understandable that the fluid within a porous medium changes at every moment. Initial fluid images at each moment can be acquired in real time, and the aforementioned method for determining the fluid leading edge in porous media can be used to process these initial fluid images in real time to obtain the fluid leading edge at each moment. Furthermore, since the length of the fluid leading edge changes at each moment, to improve fitting accuracy, the number of nodes used in the fitting process can be adjusted according to the fluid leading edge length, resulting in a dynamic number of nodes. For example, the target number of nodes n_knots at each moment can be dynamically determined based on the fluid leading edge length L using the formula n_knots = [L / 50] + 3.

[0113] In the embodiments described in this specification, an edge detection algorithm based on multi-level image processing and dynamic optimization, combined with adaptive RANSAC spline fitting, enables pixel-level recognition of the leading edge of porous media fluids under low contrast and high noise conditions, significantly improving the recognition accuracy compared to traditional methods (such as the single Canny algorithm). Furthermore, by using improved progressive consistent sampling combined with surface tension constraints, the influence of noise interference can be effectively suppressed, ensuring continuous and reliable leading edge data output even in complex porous media fluid conditions, thus significantly improving the accuracy of porous media fluid leading edge recognition.

[0114] The following is combined with Figure 4 The method for determining the fluid front of porous media provided in this specification will be further described using a specific implementation. It is understood that this embodiment uses a water permeation experiment of a sandstone core as an example for illustration. The method may include:

[0115] S1. The original image is enhanced using Contrast Limiting Adaptive Histogram Equalization (CLAHE). The contrast limit threshold is set to 3.0, and the block size is 16×16 pixels. Block artifacts are eliminated by bilinear interpolation, increasing the grayscale difference between the leading edge and the background from 10% to 25%. Then, guided filtering is performed using the enhanced image as input and the original image as the guide image. A filter radius of 10 pixels and a regularization parameter of 0.02 are selected. This effectively suppresses pore noise with a particle size of less than 5 pixels while maintaining more than 90% of the leading edge gradient intensity. Finally, adaptive threshold segmentation is performed based on the Otsu algorithm, supplemented by morphological opening operation with a 3×3 circular kernel to eliminate isolated noise points, achieving accurate extraction of the leading edge contour. This provides a high-quality image foundation for subsequent dynamic analysis of the leading edge of porous media fluids.

[0116] S2. Establish a multi-level edge detection algorithm. Specifically, the first stage implements coarse phase consistency detection, using a 4-scale, 6-directional Log-Gabor filter bank (center frequency 0.3-0.7). Phase consistency features were calculated using cycles / pixel (bandwidth 0.55), and a noise compensation coefficient T=0.03 was set to effectively enhance the low-contrast (approximately 15% grayscale difference) leading edge features while suppressing background noise. In the second stage, morphological leading edge extraction was performed. Specifically, elliptical structural elements with a major axis of 15 pixels and a minor axis of 10 pixels were used to perform morphological closing operations to fill the leading edge gaps (average filling length 5-8 pixels). Leading edge regions with an area greater than 500 pixels² were screened through 8-neighbor connected component analysis. In the third stage, dynamic threshold local optimization was implemented. Dynamic Canny detection was performed within the leading edge ROI (with a 20-pixel buffer zone extending outward from the boundary). After smoothing with a 7×7 Gaussian kernel (σ=1.2), dual threshold detection was performed with the top 30% of the gradient magnitude as the high threshold and the top 10% as the low threshold. Combined with 3×3 neighborhood nonmaximum suppression and B-spline fitting (control point spacing 8 pixels), a continuous leading edge contour with sub-pixel accuracy (RMSE=0.08 pixels) was finally obtained.

[0117] S3. Perform adaptive RANSAC spline fitting. Specifically, a KD-Tree index (leaf_size=15) is established for the approximately 2000 edge points extracted in step S2; the edge points are input into the improved PROSAC algorithm for iterative sampling (maximum number of iterations 1000), where the initial residual threshold is set to 3.0 pixels and decays exponentially with the number of iterations (decay coefficient 0.95); then, feature points in the top 20% of the curvature standard deviation are selected using a priority sampling strategy based on local curvature entropy, while automatically excluding |Δκ|>0.1 px. - ¹Outliers; then, for the set of interior points after RANSAC screening (retaining about 85% of the effective points), an adaptive nodal cubic B-spline based on the surface tension constraint term of fluid physics is used for fitting, where the number of B-spline nodes (18-25) is calculated based on the actual length of the leading edge (typical value 800-1200 pixels) according to the relationship between the number of nodes and the length of the leading edge. Set parameters k0=0, ε=0.2, and then construct the energy function (i.e. the above formula (1) and formula (2)) to optimize the curve fitting of the porous medium fluid leading edge. The coordinates of the control points are solved by the L-BFGS optimization algorithm (maximum iteration 50 times, gradient tolerance 1e-5) so that the root mean square error of the fitting is controlled within the range of 0.6-0.8 pixels; after the initial fitting, the curvature change region is smoothed by a moving average filter with a window width of 7 points (threshold |κ|=0.05 px). - ¹), then substitute Darcy's law After verification and elimination of abnormal sections with flow velocities > 2σ_v, the average fitting error of the final generated porous medium fluid front curve is 0.72 pixels, the curvature continuity is improved by 40% compared with the previous version, and the false fingering phenomenon caused by pore interference is effectively eliminated (reduction rate of 92%).

[0118] In this embodiment, the fluid leading edge obtained at each moment can be as follows: Figure 4 As shown, Figure 4 The different curves in the figure correspond to different times, and the horizontal and vertical coordinates in the figure represent the X-axis and Y-axis, respectively.

[0119] Based on the above-described method for determining the fluid front of porous media, one or more embodiments of this specification also provide a device for determining the fluid front of porous media. The device may include an apparatus (including a distributed system), software (application), module, plug-in, server, client, etc., using the method described in the embodiments of this specification, combined with necessary implementation hardware. Based on the same innovative concept, the devices in one or more embodiments provided in this specification are as described in the following embodiments. Since the implementation schemes and methods for solving the problem are similar, the implementation of specific devices in the embodiments of this specification can refer to the implementation of the foregoing method, and repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated. Figure 5 The diagram shown is a schematic representation of a device for determining the fluid front of a porous medium provided in an embodiment of this specification. Figure 5 As shown, the apparatus 500 for determining the porous medium fluid front may include:

[0120] Acquisition module 501 is used to acquire an initial fluid image within the porous medium;

[0121] Processing module 502 is used to preprocess the initial fluid image to obtain a fluid contour image;

[0122] Extraction module 503 is used to perform leading edge detection on the fluid contour image and extract multiple target pixels in the fluid contour image as edge points to form an edge point set;

[0123] The fitting module 504 is used to perform spline fitting based on the porous medium fluid physics model and the edge point set to obtain the target fluid front of the porous medium.

[0124] In some embodiments of this specification, the fitting module 504 may specifically be used for:

[0125] The edge point set is sampled multiple times based on a preset sampling strategy, and the interior point set corresponding to the edge point set is determined based on the multiple sampling results. Based on the interior point set and a preset energy function, adaptive nodal spline fitting is performed to generate multiple control points and obtain a fitting curve. The preset energy function includes a constraint term and a fitting term characterizing the surface tension of the fluid. Based on the interior point set, multiple control points, and a preset optimization algorithm, the coordinates of multiple control points are optimized to optimize the fitting curve corresponding to each candidate point set, thereby obtaining the target fluid leading edge.

[0126] In some embodiments of this specification, the fitting module 504, when performing multiple samplings on the edge point set based on a preset sampling strategy and determining the interior point set corresponding to the edge point set based on the multiple sampling results, may specifically be used to: calculate the curvature change of each edge point in the edge point set; sort multiple edge points based on the curvature change of each edge point; perform multiple samplings on the multiple edge points based on the sorting results, perform leading edge fitting for each sampling result, and determine the interior point corresponding to each sampling result based on a preset dynamic residual threshold; and determine the interior point set corresponding to the edge point set based on the interior point corresponding to each sampling result and the leading edge fitting result.

[0127] In some embodiments of this specification, when the fitting module 504 performs adaptive nodal spline fitting based on the interior point set and a preset energy function to generate multiple control points and obtain a fitted curve, it can specifically be used to: construct a fitting term characterizing the relationship between each interior point and the parameters corresponding to each interior point, and a constraint term characterizing the surface tension of the fluid; construct the preset energy function based on the constraint term and the fitting term; parameterize the interior point set to determine the parameters corresponding to each interior point in the interior point set; solve for multiple control points based on the preset energy function, the actual coordinates of each interior point, and the parameters corresponding to each interior point; and perform spline fitting based on the multiple control points to obtain the fitted curve.

[0128] In some embodiments of this specification, the preset energy function can be expressed by the following formula:

[0129] ;

[0130] Among them, E fit It can represent the fitting term, E tension It can represent a constraint term, y i B(p,s) can represent the actual coordinates of the i-th interior point. i ) can represent the parameter s corresponding to the fitted curve at control point p. i The coordinates at the point are given. N can represent the number of interior points in the interior point set, k(s) can represent the local curvature of the fitted curve at parameter s, k0 can represent the equilibrium curvature, ε can represent the weighting coefficient, and L can represent the total arc length of the fitted curve.

[0131] In some embodiments of this specification, the fitting module 504 may also be used to: smooth the curvature abrupt change region of the optimized fitting curve using a moving average filter based on a preset window width, and perform flow velocity verification on the smoothed fitting curve using a fluid seepage model, and remove the region in the smoothed fitting curve where the flow velocity meets the preset condition, thereby obtaining the target fluid leading edge.

[0132] In some embodiments of this specification, the extraction module 503 may be specifically used to: perform phase consistency detection on the fluid contour image to obtain the initial leading edge of the fluid in the porous medium; perform morphological main leading edge extraction on the initial leading edge and select the largest edge region as the main leading edge candidate region; perform adaptive threshold Canny edge detection on the main leading edge candidate region and extract multiple target pixels as edge points to form an edge point set.

[0133] In some embodiments of this specification, the initial fluid image includes fluid images of the porous medium at multiple times; the fitting module 504 can be specifically used to: determine the fluid leading edge length in each fluid image; determine the number of target nodes corresponding to the edge point set of each fluid image based on the fluid leading edge length corresponding to each fluid image; and perform spline fitting based on the porous medium fluid physics model, each edge point set, and the number of target nodes corresponding to each edge point set to determine the target fluid leading edge of the porous medium at each time.

[0134] The descriptions and functions of the above modules can be understood by referring to the section on methods for determining the fluid front of porous media, and will not be repeated here.

[0135] This application also provides an electronic device, such as... Figure 6 As shown, the electronic device may include a processor 601 and a memory 602, wherein the processor 601 and the memory 602 may be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.

[0136] Processor 601 may be a central processing unit (CPU). Processor 601 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof.

[0137] Memory 602, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the method for determining the porous medium fluid front in this embodiment of the invention (e.g., Figure 5 The acquisition module 501, processing module 502, extraction module 503, and fitting module 504 are shown. The processor 601 executes various functional applications and data processing by running non-transient software programs, instructions, and modules stored in the memory 602, thereby realizing the method for determining the porous medium fluid front in the above method embodiment.

[0138] The memory 602 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 601, etc. Furthermore, the memory 602 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 602 may optionally include memory remotely located relative to the processor 601, and these remote memories may be connected to the processor 601 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0139] The one or more modules are stored in the memory 602, and when executed by the processor 601, the following method for determining the porous medium fluid front is performed:

[0140] An initial fluid image within a porous medium is acquired; the initial fluid image is preprocessed to obtain a fluid contour image; leading edge detection is performed on the fluid contour image, and multiple target pixels in the fluid contour image are extracted as edge points to form an edge point set; spline fitting is performed based on the porous medium fluid physics model and the edge point set to obtain the target fluid leading edge of the porous medium.

[0141] The specific details of the aforementioned electronic device can be understood by referring to the relevant descriptions and effects in the above method embodiments, and will not be repeated here.

[0142] This specification also provides a computer storage medium storing computer program instructions that, when executed, implement the steps of the method for determining the fluid front of the porous medium described above.

[0143] This specification also provides a computer program product comprising a computer program that, when executed, implements the steps of the method for determining the fluid front of the porous medium described above.

[0144] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.

[0145] The various embodiments in this specification are described in a progressive manner. For the same or similar parts between the various embodiments, please refer to each other. The focus of each embodiment is to describe the differences from other embodiments.

[0146] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions.

[0147] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0148] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute certain parts of the methods of various embodiments of this application.

[0149] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.

[0150] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0151] Although this application has been described through embodiments, those skilled in the art will know that this application has many modifications and variations without departing from the spirit of this application, and it is intended that the appended claims cover such modifications and variations without departing from the spirit of this application.

Claims

1. A method for determining the fluid front of a porous medium, characterized in that, include: Acquire initial fluid images within porous media; The initial fluid image is preprocessed to obtain a fluid contour image; Leading edge detection is performed on the fluid contour image, and multiple target pixels in the fluid contour image are extracted as edge points to form an edge point set; Based on the porous medium fluid physics model and the edge point set, spline fitting is performed to obtain the target fluid front of the porous medium; Based on the porous medium fluid physics model and the edge point set, spline fitting is performed to obtain the target fluid front of the porous medium, including: The edge point set is sampled multiple times based on a preset sampling strategy, and the inner point set corresponding to the edge point set is determined based on the results of the multiple samplings. Based on the inlier set and the preset energy function, adaptive nodal spline fitting is performed to generate multiple control points and obtain a fitting curve. The preset energy function includes constraint terms and fitting terms characterizing the surface tension of the fluid. Based on the set of interior points, multiple control points, and a preset optimization algorithm, the coordinates of multiple control points are optimized to optimize the fitting curves corresponding to each candidate point set, thereby obtaining the target fluid leading edge.

2. The method for determining the fluid front of a porous medium according to claim 1, characterized in that, The edge point set is sampled multiple times based on a preset sampling strategy, and the corresponding interior point set is determined based on the results of the multiple samplings, including: Calculate the curvature change of each edge point in the edge point set; Multiple edge points are sorted based on the curvature changes of each edge point; Based on the sorting results, the multiple edge points are sampled multiple times. For each sampling result, the leading edge is fitted, and the interior points corresponding to each sampling result are determined based on the preset dynamic residual threshold. Based on the inlier points corresponding to each sampling result and the leading edge fitting result, the inlier point set corresponding to the edge point set is determined.

3. The method for determining the fluid front of a porous medium according to claim 1, characterized in that, Based on the inlier set and a preset energy function, adaptive nodal spline fitting is performed to generate multiple control points and obtain a fitted curve, including: Construct fitting terms that characterize the relationship between each interior point and the parameters corresponding to each interior point, as well as constraint terms that characterize the surface tension of the fluid; The preset energy function is constructed based on the constraint terms and the fitting terms; The interior point set is parameterized to determine the parameters corresponding to each interior point in the interior point set; Based on the preset energy function, the actual coordinates of each interior point and the parameters corresponding to each interior point, multiple control points are obtained by solving the problem. Based on the multiple control points, spline fitting is performed to obtain the fitted curve.

4. The method for determining the fluid front of a porous medium according to claim 1 or 3, characterized in that, The preset energy function is expressed by the following formula: in, E fit Represents the fitted term, E tension Indicates constraint terms. y i Indicates the first i The actual coordinates of each interior point B ( p , s i () indicates that the fitted curve is at the control point p Corresponding parameters s i The coordinates of the point, where N represents the number of interior points in the interior point set. k ( s ) indicates that the fitted curve is within the parameters s The local curvature at that point k 0 Indicates equilibrium curvature. ε represents the weighting coefficient, and L represents the total arc length of the fitted curve.

5. The method for determining the fluid front of a porous medium according to claim 1, characterized in that, Based on the interior point set, multiple control points, and a preset optimization algorithm, after optimizing the coordinates of the multiple control points, the following steps are also included: Based on a preset window width, a moving average filter is used to smooth the curvature abrupt change region of the optimized fitting curve, and the flow velocity of the smoothed fitting curve is verified by a fluid seepage model. Regions in the smoothed fitting curve whose flow velocity meets the preset conditions are removed to obtain the target fluid leading edge.

6. The method for determining the fluid front of a porous medium according to claim 1, characterized in that, Leading edge detection is performed on the fluid contour image, and multiple target pixels in the fluid contour image are extracted as edge points to form an edge point set, including: Phase consistency detection is performed on the fluid profile image to obtain the initial leading edge of the fluid within the porous medium; Morphological main leading edge extraction is performed on the initial leading edge, and the largest edge region is selected as the candidate region for the main leading edge. Adaptive threshold Canny edge detection is performed on the main leading edge candidate region to extract multiple target pixels as edge points to form an edge point set.

7. The method for determining the fluid front of a porous medium according to claim 1, characterized in that, The initial fluid image includes fluid images of the porous medium at multiple time points; Based on the porous medium fluid physics model and the edge point set, spline fitting is performed to obtain the target fluid front of the porous medium, including: Determine the fluid leading edge length in each fluid image; The number of target nodes corresponding to the edge point set of each fluid image is determined based on the fluid leading edge length of each fluid image. Spline fitting is performed based on the porous medium fluid physics model, each edge point set, and the number of target nodes corresponding to each edge point set to determine the target fluid leading edge of the porous medium at each time.

8. A device for determining the fluid front of a porous medium, characterized in that, include: The acquisition module is used to acquire initial fluid images within the porous medium; The processing module is used to preprocess the initial fluid image to obtain a fluid contour image; The extraction module is used to perform leading edge detection on the fluid contour image and extract multiple target pixels in the fluid contour image as edge points to form an edge point set; The fitting module is used to perform spline fitting based on the porous medium fluid physics model and the edge point set to obtain the target fluid front of the porous medium. The fitting module is specifically used for: The edge point set is sampled multiple times based on a preset sampling strategy, and the inner point set corresponding to the edge point set is determined based on the results of the multiple samplings. Based on the inlier set and the preset energy function, adaptive nodal spline fitting is performed to generate multiple control points and obtain a fitting curve. The preset energy function includes constraint terms and fitting terms characterizing the surface tension of the fluid. Based on the set of interior points, multiple control points, and a preset optimization algorithm, the coordinates of multiple control points are optimized to optimize the fitting curves corresponding to each candidate point set, thereby obtaining the target fluid leading edge.

9. An electronic device, characterized in that, include: A memory and a processor, the processor and the memory being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Thermal fluid image processing method and system, terminal and medium

    CN113689455A

  • Geological parameter inversion method and device, electronic equipment and storage medium

    CN116309897A