Shale map adaptive window clustering method based on fuzzy neural network
By employing an adaptive window clustering method based on fuzzy neural networks, the problems of multi-scale micro-features and boundary uncertainties in shale MAPs are solved, improving the characterization accuracy and clustering efficiency of microstructures and providing technical support for the development of shale gas reservoirs.
Patent Information
- Application Number
- CN202610362617.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-26
Smart Images

Figure CN122289745A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of oil and gas development and image segmentation, specifically to an adaptive window clustering method for shale MAPs based on fuzzy neural networks. Background Technology
[0002] The multi-scale microstructure and mineral composition of shale gas reservoirs together constitute a multi-scale reservoir-permeability system with complex microscopic features. The spatial distribution of these microscopic features directly controls the occurrence and migration of shale gas. Shale map images (MAPs), as important image carriers reflecting microscopic features, are characterized by high resolution, large scale span, and complex grayscale distribution. Different types of microscopic features have different characteristics in morphology, scale, and grayscale. Without effective microscopic feature clustering methods, it is difficult to accurately distinguish organic matter and different types of shale matrix minerals, thus affecting the extraction of microscopic feature parameters of shale gas reservoirs and the reliability of subsequent flow simulations.
[0003] Traditional clustering methods based on full-map or fixed-window clustering are difficult to take into account the coexistence of multi-scale features in MAPs, which can easily lead to feature aliasing or structural fragmentation, reducing the accuracy of microstructure representation.
[0004] Existing clustering methods for microscopic features of shale MAPs have the following characteristics: (1) Hard clustering methods based on K-means or GMM: Hard clustering methods based on K-means or GMM divide micro-features into several non-overlapping categories based on the similarity between micro-features. These methods are simple in structure, computationally efficient, and easy to implement. However, their "single-category" hard clustering strategy makes it difficult to characterize the grayscale and structural similarity of micro-features in MAPs, resulting in ambiguous sample boundaries. Furthermore, these methods are sensitive to the scale of micro-features, and under fixed window conditions, different micro-features may be mixed in the same cluster, or a single micro-structure may be irrationally segmented, limiting their applicability in the microstructural analysis of complex, multi-scale shale MAPs.
[0005] (2) Soft clustering methods based on FCM and its improved algorithms: Soft clustering methods based on FCM and its improved algorithms introduce fuzzy membership functions, allowing microscopic features to simultaneously belong to multiple clusters. This allows them to reflect, to some extent, the boundary uncertainties and gray-level similarities of microscopic feature samples in MAP images. Compared to hard clustering methods, FCM has advantages in handling sample transition regions, noise interference, and gray-level fluctuations, thus finding widespread application in rock microscopic images and MAP segmentation. However, these methods typically lack adaptive modeling capabilities for multi-scale microstructures. Furthermore, traditional FCM is a shallow model, primarily based on Euclidean distance or simple similarity measures, making it difficult to automatically learn discriminative features from complex MAP data. It is also sensitive to window scale and image noise, limiting its application in the accurate clustering and transfer of complex microscopic features in shale MAPs.
[0006] Therefore, there is a need for an adaptive window clustering method for shale MAPs based on fuzzy neural networks that can take into account the multi-scale micro-features and boundary uncertainties in shale MAPs. Summary of the Invention
[0007] The main objective of this invention is to provide an adaptive window clustering method for shale MAPs based on fuzzy neural networks, in order to solve the problem that existing technologies cannot simultaneously take into account the multi-scale micro-features and boundary uncertainties in shale MAPs.
[0008] To achieve the above objectives, this invention provides an adaptive window clustering method for shale MAPs based on fuzzy neural networks, specifically including the following steps: S1 performs domain decomposition, nonlocal mean filtering, and gray value normalization on shale MAPs.
[0009] S2, dynamically adjusts the sliding window based on local gray-level variance.
[0010] S3 uses gray-level co-occurrence matrix and structural parameters to characterize the microscopic features of shale within the sliding window, which are divided into gray-level features and structural features.
[0011] S4 combines grayscale features and structural features as feature vectors and inputs them into a fuzzy neural network (FNN) for micro-feature clustering.
[0012] Furthermore, step S1 specifically includes the following steps: S1.1, perform domain decomposition on the shale MAPs, and read the shale MAPs into the Python program. The pixel size of the shale MAPs is... , and They are respectively and The number of pixels in the direction, the size and stride of the domain decomposition sub-images are all set to 1. Then the domain decomposition is expressed as a step size in both the horizontal and vertical directions. Perform trimming to generate several sides with a length of Sub-images.
[0013] S1.2, For the sub-images obtained from domain decomposition, nonlocal mean (NLM) filtering is performed iteratively; first, the search block in the NLM algorithm is defined. and similar blocks The size, at any position in the subimage Centered on the pixel of the point, in Extract multiple within the range ; then calculate and The grayscale difference between them is analyzed, and a weight function is constructed based on the magnitude of the difference to determine the weight. A weighted average of all pixels within the range is used to obtain the filtered result. The filtering process is performed on each pixel in the sub-image, and the filtering of the current sub-image is completed after all pixels have been filtered.
[0014] S1.3, normalize the grayscale values of all filtered sub-images. The normalization interval is [0, 255]. The formula for grayscale value normalization is: ; ; in, and The positions of the grayscale values before and after normalization are respectively: The grayscale value of the pixel; and These are the lowest and highest gray values of MAPs before gray value normalization, respectively. , For location.
[0015] Furthermore, step S2 specifically includes the following steps: S2.1, based on the grayscale mean Calculate the grayscale variance : ; ; in, For sliding windows The average gray level; for Number of pixels within, for Index; for The gray variance.
[0016] S2.2, dynamically adjust the sliding window based on the grayscale variance.
[0017] Furthermore, step S2.2 specifically includes the following steps: S2.2.1, Set a first-level sliding window The side length is ,when gray variance Greater than the set grayscale variance threshold At that time, Further subdivision.
[0018] S2.2.2, Set the new sliding window side length to Soon Split into 4 sliding windows of the same size ; Loop calculation gray variance If there exists a value greater than The gray variance, then for values greater than 0. The sliding window corresponding to the grayscale variance is further subdivided until the side length of the smallest sliding window reaches the set value. .
[0019] Furthermore, step S3 specifically includes the following steps: S3.1, Obtain the gray-level feature parameters related to the Gray-Level Co-occurrence Matrix (GLCM), including: energy. ,entropy Contrast Correlation and inverse variance : ; ; ; ; ; in, Grayscale value For gray-level co-occurrence matrix (GLCM), and for exist and Mean gray value in direction; and for exist and Standard deviation of gray level in direction.
[0020] S3.2, the normalized central moments of the image are: .
[0021] First invariant moment Second invariant moment The expressions are as follows: ; ; in, for The central moment; for Normalized central moments; The normalized index; and They are respectively and The order of moments in the direction; , , They represent direction, direction, Mixed normalized central moments.
[0022] Furthermore, step S4 specifically includes the following steps: S4.1, Eigenvectors The combination of grayscale features and structural features is represented as: .
[0023] S4.2 Construct a fuzzy neural network (FNN), including: an input layer, a fuzzification layer, a rule layer, a normalization layer, and an output layer.
[0024] S4.3 Initialize the fuzzy neural network FNN.
[0025] S4.4, train the fuzzy neural network FNN, and evaluate the results under different numbers of clusters by combining the clustering effectiveness index XB.
[0026] Further, the blurring layer in step S4.2 will blur the input... Transforming numerical features into a fuzzy semantic space: ; in, For the first Class in The center on a feature; for The One characteristic, For the blurred width; The initial membership degree, It is a natural exponential function.
[0027] Nonlinear judgments of grayscale and structural features are performed at the rule layer, with the specific expression as follows: ; in, For the first The degree of matching of the class on the current sample. for Dimensions It is a series product.
[0028] The normalization layer measures the matching degree of different classes. By reducing the interval to [0, 1], we can obtain the membership degrees of the micro-features of different classes. The normalization method is as follows: ; in, This represents the total number of categories.
[0029] Further, step S4.3 specifically involves: using the fuzzy c-means clustering algorithm (FCM) to cluster the feature vectors. Perform initial clustering; based on the cluster centers and membership distributions output by FCM, assign each cluster center as... The initial values are determined and initialized based on the degree of dispersion of features within the class. This provides an initial fuzzy partition for the FNN.
[0030] Furthermore, the specific steps for training the fuzzy neural network (FNN) in step S4.4 are as follows: Under unsupervised conditions, to minimize The objective is to target the error across each category and update iteratively. and During each iteration, calculate based on the current parameters. The normalized membership degree of each class is calculated, and the parameters of the fuzzy neural network are adjusted until the clustering results converge.
[0031] Furthermore, in step S4.4, the results under different numbers of clusters are evaluated using the clustering effectiveness index XB. The XB index is defined as: ; in, The total number of samples, for Index; The maximum number of clusters is preset; , , The index of the cluster number. ; For the first The seven feature vectors of each sample; For the first The center of the class; This represents the normalized membership degree.
[0032] The present invention has the following beneficial effects: Shale map images (MAPs) contain numerous microstructures, making direct image preprocessing based on MAPs inefficient. This invention utilizes domain decomposition to segment MAPs into numerous sub-images with overlapping edges, enabling parallel preprocessing of MAPs, including grayscale normalization and image filtering.
[0033] Existing MAP clustering methods rely on fixed window sizes, which fail to distinguish multi-scale features in shale MAPs. This often results in a single window containing multiple micro-features or a window segmenting large-scale micro-features. This invention dynamically adjusts the window size using the grayscale variance of the image, avoiding the problems associated with fixed windows.
[0034] Fuzzy clustering is a type of soft clustering. Compared to hard clustering, soft clustering introduces the concept of membership, giving it an advantage in boundary identification. The fuzzy neural network proposed in this invention combines the advantages of soft clustering and neural networks, improving the efficiency of distinguishing cluster boundaries for different types of micro-features and enabling transferability to different MAP applications. Attached Figure Description
[0035] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 A flowchart of an adaptive window clustering method for shale MAPs based on a fuzzy neural network according to the present invention is shown.
[0036] Figure 2 Images of shale MAPs from an embodiment of the present invention are shown.
[0037] Figure 3 A diagram of the fuzzy neural network (FNN) architecture of the present invention is shown.
[0038] Figure 4 The diagram shows the distribution of different categories obtained by adaptive window MAPs micro-feature clustering using the method provided in this invention.
[0039] Figure 5The diagrams show different categories of microscopic feature maps obtained using the method provided by this invention. Detailed Implementation
[0040] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] like Figure 1 The adaptive window clustering method for shale MAPs based on fuzzy neural networks shown includes the following steps: S1 performs domain decomposition, nonlocal mean filtering, and gray value normalization on shale MAPs.
[0042] S2, dynamically adjusts the sliding window based on local gray-level variance.
[0043] S3, utilizing the gray-level co-occurrence matrix (GLCM) and structural parameters ( The characteristics of shale within a sliding window are represented by grayscale features and structural features.
[0044] S4 combines grayscale features and structural features as feature vectors and inputs them into a fuzzy neural network (FNN) for micro-feature clustering.
[0045] This invention provides an adaptive window clustering method for shale MAPs based on fuzzy neural networks. Through image domain decomposition preprocessing and grayscale normalization, it creates conditions for the transfer and application of different MAPs. Utilizing grayscale variance to dynamically adjust the sliding window size adapts to the multi-scale characteristics of minerals in shale MAPs. By employing fuzzy neural networks, the clustering of shale microscopic images can better identify class boundaries and dynamically adjust the number of clusters, thereby achieving adaptive clustering of shale MAPs. This yields the proportion of microscopic features in different categories, clarifies the development status of microscopic features, and provides technical support for the development of shale oil and gas reservoirs.
[0046] Specifically, step S1 includes the following steps: S1.1, perform domain decomposition on the shale MAPs, and read the shale MAPs into the Python program. The pixel size of the shale MAPs is... , and They are respectively and The number of pixels in the direction, the size and stride of the domain decomposition sub-images are all set to 1. Then the domain decomposition is expressed as a step size in both the horizontal and vertical directions. Perform trimming to generate several sides with a length of Sub-images.
[0047] The MAPs are read into the Python program. The pixel size of the MAPs is 26624×38912. The size and stride of the domain decomposition sub-images are set to 1024 pixels. Then the domain decomposition can be represented as cropping in the horizontal and vertical directions with a stride of 1204 pixels, thereby generating several sub-images with a side length of 1024 pixels.
[0048] Domain decomposition methods can transform large MAPs that are difficult to process directly into a set of small-scale sub-images with uniform size and computability.
[0049] S1.2, For the sub-images obtained from domain decomposition, nonlocal mean (NLM) filtering is performed iteratively; first, the search block in the NLM algorithm is defined. and similar blocks The size, at any position in the subimage Centered on the pixel of the point, in Extract multiple within the range ; then calculate and The grayscale difference between them is analyzed, and a weight function is constructed based on the magnitude of the difference to determine the weight. A weighted average of all pixels within the range is used to obtain the filtered result. The filtering process is performed on each pixel in the sub-image, and the filtering of the current sub-image is completed after all pixels have been filtered.
[0050] The `denoise_nl_means` function from the `skimage` extension library in Python is used to implement NLM filtering for sub-images, with default parameters, achieving good filtering results. Furthermore, a self-written Python loop program is used to perform NLM filtering on all sub-images, keeping the filtering parameters constant across all sub-images to ensure consistent processing results.
[0051] S1.3, normalize the gray values of all filtered sub-images in the range of [0, 255] to ensure the stability of the program. This is because each MAP is affected by factors such as device power and ambient temperature, resulting in differences in gray values. Gray value normalization eliminates the differences in gray value distribution and provides the possibility of migration between different MAPs.
[0052] The formula for grayscale value normalization is: ; ; in, and The positions of the grayscale values before and after normalization are respectively: The grayscale value of a pixel, without units; and These are the lowest and highest gray values of MAPs before gray value normalization, respectively, without units.
[0053] Image storage: An empty array of size 26624×38912 is created using the Python NumPy library. The filtered and grayscale-normalized sub-images are then sequentially filled into the array to obtain complete preprocessed MAPs. The domain-decomposed and filtered MAPs are saved using the OpenCV library in Python for subsequent cluster analysis.
[0054] Specifically, step S2 includes the following steps: S2.1, Obtain the local grayscale variance: The grayscale variance is used to characterize local regions of the image (i.e., square sliding windows). The greater the value, the more drastic the change in grayscale within the area. The more complex the internal microstructure, the better. The gray-level variance is related to the gray-level mean; both are statistical scalars. Based on the gray-level mean... Calculate the grayscale variance : ; ; in, For sliding windows The grayscale mean value, without units; for Number of pixels within, for The index has no unit; for The gray variance is dimensionless.
[0055] The overall grayscale variance of MAPs was calculated to be 1366 using a Python program, which was used as the judgment value for subsequent dynamic windows.
[0056] S2.2, dynamically adjust the sliding window based on the grayscale variance.
[0057] Specifically, step S2.2 includes the following steps: S2.2.1, Set a first-level sliding window The side length is ,when gray variance Greater than the set grayscale variance threshold When, it indicates It contains a sufficient number of dramatically changing microstructures, for Subdivide; S2.2.2, Set the new sliding window side length to Soon Split into 4 sliding windows of the same size ; Loop calculation gray variance If there exists a value greater than The gray variance, then for values greater than 0. The sliding window corresponding to the grayscale variance is further subdivided until the side length of the smallest sliding window reaches the set value. This is to prevent the sliding window from becoming too small due to infinite program iteration, which would compromise the integrity of microscopic features.
[0058] The initial size of the sliding window is set to 512 pixels. The MAPs are traversed along the X and Y directions to obtain 3952 sub-images of 52×76 pixels. The gray-scale variance of each sub-image is calculated in a loop using a Python program.
[0059] like Figure 2 As shown, the pixel size of shale MAPs is 26624×38912 pixels. A Python program was used to write a loop for all sliding window decisions. When the gray-level variance of a sub-image is greater than 1366, it indicates that the gray-level features within that sub-image change drastically, requiring further subdivision of the corresponding sliding window. Each subdivision halves the initial size; after one reduction, the sliding window size becomes 256 pixels. The sub-image is then divided into four smaller sub-images. These four sub-images are used to calculate the gray-level variance and make decisions. The minimum window size is set to 128 pixels. When the minimum window size is reached, even if the gray-level variance within the corresponding sub-image is greater than 1366, the sliding window is no longer subdivided to ensure that the sub-images have sufficient pixels to describe the geologically significant micro-features and guarantee the practical significance of clustering. For example, Figure 2 Adaptive window 1 in the diagram does not need to be subdivided; adaptive window 2 continues to be subdivided.
[0060] GLCM is an important method for image feature analysis and extraction, with significant applications in texture analysis, feature classification, and image quality assessment. A GLCM of an image can reflect comprehensive information about its grayscale values in terms of direction, adjacent spacing, and magnitude of variation, forming the basis for analyzing local patterns and arrangement rules within an image.
[0061] GLCM is defined as follows: given a direction and distance (direction of 0 degrees, 45 degrees, 90 degrees, etc., and distance d), the grayscale value is... The pixels and grayscale are The probability of pixels appearing at the same time All grayscale pairs The probability statistics constitute GLCM.
[0062] Specifically, step S3 includes the following steps: Because of the large amount of data in GLCM, it is generally not used directly to distinguish grayscale features. Instead, the parameters constructed based on it are used as the basis for grayscale feature classification.
[0063] S3.1, the sub-images acquired based on the dynamic sliding window require the extraction of different features for clustering. The features contained in the sub-images are divided into gray-level features and structural features, which are respectively clustered using the gray-level co-occurrence matrix (GLCM) related parameters and structural parameters (…). It is characterized by a rectangle.
[0064] Because of the large amount of data in GLCM, it is generally not used directly to distinguish grayscale features. Instead, the parameters constructed based on it are used as the basis for grayscale feature classification.
[0065] Obtain gray-level feature parameters related to the Gray-Level Co-occurrence Matrix (GLCM), including: energy. ,entropy Contrast Correlation and inverse variance : ; ; ; ; ; in, Grayscale value For gray-level co-occurrence matrix (GLCM), and for exist and Mean grayscale value in direction, unitless; and for exist and The standard deviation of grayscale in the direction, without units.
[0066] The `feature.graycomatrix` function from the Python extension library `skimage` is used to calculate the GLCM of each sub-image, with the default input parameters. Then, the `feature.graycoprops` function from the same Python extension library `skimage` is used to obtain the five GLCM-based grayscale feature parameters, again with the default input parameters.
[0067] S3.2, The moments are calculated from the second and third center moments, resulting in seven invariant moments. These moments are invariant to rotation, translation, and scaling, thus making them suitable for images with multi-scale features. Moments have wide applications. However, in practice, only the invariance of the first two invariant moments is well preserved. From Using features composed of moments to identify images has the advantage of fast processing speed and is suitable for large-scale data.
[0068] The normalized central moments of the image are: .
[0069] Obtain the first invariant moments using the HuMoments function from the Python extension library OpenCV. Second invariant moment The expressions are as follows: ; ; in, for The central moment of , which has no unit; for The normalized central moments are dimensionless. It is a normalization exponent that can offset scale variations in features and has no unit. and They are respectively and The order of moments in the direction, dimensionless; , , They represent direction, direction, Mixed normalized central moments.
[0070] Five statistics based on GLCM and The first and second invariant moments are normalized to avoid a single feature dominating due to large differences in magnitude, which could lead to inaccurate clustering.
[0071] The normalized grayscale features and structural features of 10 sub-images are shown in Table 1.
[0072] Table 1. Normalized grayscale features and structural features of the 10 sub-images Specifically, step S4 includes the following steps: S4.1, Eigenvectors The combination of grayscale features and structural features is represented as: ; Dimensions It is 7. for The One characteristic, For the sub-image with serial number 1 in Table 1, its feature vector is [0.01801, 0.79030, 0.08442, 0.79184, 0.16832, 0.04529, 0.00535].
[0073] S4.2, as Figure 3 As shown, a fuzzy neural network (FNN) is constructed, comprising: an input layer, a fuzzification layer, a rule layer, a normalization layer, and an output layer; the input layer serves only as a feature vector. The input interface; the output layer serves only as the membership degree of micro-features. The output interface is only used as an interface for input and output; it does not perform data transformation or processing.
[0074] S4.3 Initialize the fuzzy neural network FNN.
[0075] S4.4, train the fuzzy neural network FNN, and evaluate the results under different numbers of clusters by combining the clustering effectiveness index XB.
[0076] Specifically, the blurring layer in step S4.2 will blur the input... The method for transforming numerical features into a fuzzy semantic space is as follows: ; in, For the first Class in The center of a feature has no unit; for The One characteristic, The width is indistinct and has no unit. This represents the initial membership degree, which has no unit. It is a natural exponential function.
[0077] The rule layer is the core of the FNN, where non-linear judgments are made on gray-level features and structural features. The specific expression is as follows: ; in, For the first The degree of matching of the class on the current sample. for Since the matching degree between different classes cannot be directly compared, it is necessary to consider the dimension of [the matching degree]. Normalize, It is a series product.
[0078] The normalization layer measures the matching degree of different classes. By reducing the interval to [0, 1], we can obtain the membership degrees of the micro-features of different classes. The normalization method is as follows: ; in, This represents the total number of categories.
[0079] The obtained micro-feature membership degree These are the output parameters of the FNN, indicating that MAPs clustering is complete.
[0080] Specifically, step S4.3 involves: to avoid instability caused by random parameter initialization, firstly, the `fuzz.cluster.cmeans` function (FCM algorithm) of the Python extension library `skfuzzy` is used, that is, the fuzzy c-means clustering algorithm `FCM` is used to analyze the feature vector. Perform initial clustering; based on the cluster centers and membership distributions output by FCM, assign each cluster center as... The initial values are determined and initialized based on the degree of dispersion of features within the class. This provides an initial fuzzy partition for the FNN.
[0081] Specifically, the training of the fuzzy neural network FNN in step S4.4 is as follows: Under unsupervised conditions, to minimize The objective is to target the error across each category and update iteratively. and During each iteration, calculate based on the current parameters. The normalized membership degree of each class is calculated, and the parameters of the fuzzy neural network are adjusted until the clustering results converge.
[0082] Specifically, in step S4.4, the results under different numbers of clusters are evaluated using the clustering effectiveness index XB, as follows: In the training process of FNN, clustering effectiveness metrics are used to evaluate the results at different numbers of clusters. The XB index is a commonly used clustering effectiveness metric. The XB index is defined as: ; in, This represents the total number of samples, i.e., the total number of samples obtained by dividing a MAP using a sliding window. for The index has no unit; This is the preset maximum number of clusters, without units. , , The index of the cluster number. No unit; For the first The sample has 7 feature vectors, which are unitless; For the first The center of the class, without units; This represents the normalized membership degree.
[0083] The XB index has a numerator consisting of weights and intra-class distance, representing the degree to which a sample deviates from its class, and a denominator consisting of inter-class distance, representing the degree of separation between different classes. The XB index compares intra-class compactness and inter-class separability; a smaller XB index indicates better clustering. The optimal number of clusters is automatically determined based on a set range, achieving adaptive clustering of micro-features.
[0084] The XB index has a numerator consisting of weights and intra-class distance, representing the degree to which a sample deviates from its class, and a denominator consisting of inter-class distance, representing the degree of separation between different classes. The XB index is calculated using a Python program to compare intra-class compactness and inter-class separability; a smaller XB index indicates better clustering performance. With the number of clusters set to a range of 3-6, the optimal number of clusters for the MAPs implementation was determined to be 5 based on the XB index, as shown below. Figure 4 The clustering images shown and such Figure 5 The microscopic features shown can be statistically analyzed by calculating the proportion of each type to clarify the development of shale microscopic features and provide a data and image basis for microscopic flow simulation.
[0085] This invention addresses the heterogeneity and scale variability of shale MAPs by establishing a micro-feature clustering method that can adapt to local differences. By extracting the grayscale and structural parameters of micro-features within a dynamic window and performing clustering based on a fuzzy neural network, the method can effectively improve the identification accuracy and stability of different micro-features in shale gas reservoirs, providing a reliable foundation for quantitative characterization of pore structure and flow mechanism research in shale gas reservoirs.
[0086] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. An adaptive window clustering method for shale MAPs based on fuzzy neural networks, characterized in that, Specifically, the steps include the following: S1, performing domain decomposition, nonlocal mean filtering, and gray value normalization on shale MAPs; S2, dynamically adjusts the sliding window based on local gray-level variance; S3, using gray-level co-occurrence matrix and structural parameters to characterize the micro-features of shale within the sliding window, is divided into gray-level features and structural features; S4 combines grayscale features and structural features as feature vectors and inputs them into a fuzzy neural network (FNN) for micro-feature clustering.
2. The adaptive window clustering method for shale MAPs based on fuzzy neural networks according to claim 1, characterized in that, Step S1 specifically includes the following steps: S1.1, perform domain decomposition on the shale MAPs, and read the shale MAPs into the Python program. The pixel size of the shale MAPs is... , and They are respectively and The number of pixels in the direction, the size and stride of the domain decomposition sub-images are all set to 1. Then the domain decomposition is expressed as a step size in both the horizontal and vertical directions. Perform trimming to generate several sides with a length of Sub-images; S1.2, For the sub-images obtained from domain decomposition, nonlocal mean (NLM) filtering is performed iteratively; first, the search block in the NLM algorithm is defined. and similar blocks The size, at any position in the subimage Centered on the pixel of the point, in Extract multiple within the range ; then calculate and The grayscale difference between them is analyzed, and a weight function is constructed based on the magnitude of the difference to determine the weight. A weighted average of all pixels within the range is used to obtain the filtered result. Pixel values; the filtering process is performed on each of the remaining pixels in the sub-image one by one. After all pixels have been filtered, the filtering of the current sub-image is completed. S1.3, normalize the grayscale values of all filtered sub-images. The normalization interval is [0, 255]. The formula for grayscale value normalization is: ; ; in, and The positions of the grayscale values before and after normalization are respectively: The grayscale value of the pixel; and These are the lowest and highest gray values of MAPs before gray value normalization, respectively. , For location.
3. The adaptive window clustering method for shale MAPs based on fuzzy neural networks according to claim 1, characterized in that, Step S2 specifically includes the following steps: S2.1, based on the grayscale mean Calculate the grayscale variance : ; ; in, For sliding windows The average gray level; for Number of pixels within, for Index; for The grayscale variance; S2.2, dynamically adjust the sliding window based on the grayscale variance.
4. The adaptive window clustering method for shale MAPs based on fuzzy neural networks according to claim 3, characterized in that, Step S2.2 specifically includes the following steps: S2.2.1, Set a first-level sliding window The side length is ,when gray variance Greater than the set grayscale variance threshold At that time, Subdivide; S2.2.2, Set the new sliding window side length to Soon Split into 4 sliding windows of the same size ; Loop calculation gray variance If there exists a value greater than The gray variance, then for values greater than 0. The sliding window corresponding to the grayscale variance is further subdivided until the side length of the smallest sliding window reaches the set value. .
5. The adaptive window clustering method for shale MAPs based on fuzzy neural networks according to claim 1, characterized in that, Step S3 specifically includes the following steps: S3.1, Obtain the gray-level feature parameters related to the Gray-Level Co-occurrence Matrix (GLCM), including: energy. ,entropy Contrast Correlation and inverse variance : ; ; ; ; ; in, Grayscale value For gray-level co-occurrence matrix (GLCM), and for exist and Mean gray value in direction; and for exist and Standard deviation of gray level in direction; S3.2, the normalized central moments of the image are: ; First invariant moment Second invariant moment The expressions are as follows: ; ; in, for The central moment; for Normalized central moments; The normalized index; and They are respectively and The order of moments in the direction; , , They represent direction, direction, Mixed normalized central moments.
6. The adaptive window clustering method for shale MAPs based on fuzzy neural networks according to claim 1, characterized in that, Step S4 specifically includes the following steps: S4.1, Eigenvectors The combination of grayscale features and structural features is represented as: ; S4.2, Construct a fuzzy neural network (FNN), including: an input layer, a fuzzification layer, a rule layer, a normalization layer, and an output layer; S4.3, Initialize the fuzzy neural network FNN; S4.4, train the fuzzy neural network FNN, and evaluate the results under different numbers of clusters by combining the clustering effectiveness index XB.
7. The adaptive window clustering method for shale MAPs based on fuzzy neural networks according to claim 6, characterized in that, The blurring layer in step S4.2 will blur the input Transforming numerical features into a fuzzy semantic space: ; in, For the first Class in The center on a feature; for The One characteristic, For the blurred width; The initial membership degree, It is a natural exponential function; Nonlinear judgments of grayscale and structural features are performed at the rule layer, with the specific expression as follows: ; in, For the first The degree of matching of the class on the current sample. for Dimensions For multiplication; The normalization layer measures the matching degree of different classes. By reducing the interval to [0, 1], we can obtain the membership degrees of the micro-features of different classes. The normalization method is as follows: ; in, This represents the total number of categories.
8. The adaptive window clustering method for shale MAPs based on fuzzy neural networks according to claim 6, characterized in that, Step S4.3 specifically involves: using the fuzzy c-means clustering algorithm (FCM) to cluster the feature vectors. Perform initial clustering; based on the cluster centers and membership distributions output by FCM, assign each cluster center as... The initial values are determined and initialized based on the degree of dispersion of features within the class. This provides an initial fuzzy partition for the FNN.
9. The adaptive window clustering method for shale MAPs based on fuzzy neural networks according to claim 6, characterized in that, Step S4.4, training the fuzzy neural network FNN, specifically involves: Under unsupervised conditions, to minimize The objective is to target the error across each category and update iteratively. and ; In each iteration, calculate based on the current parameters. The normalized membership degree of each class is calculated, and the parameters of the fuzzy neural network are adjusted until the clustering results converge.
10. The adaptive window clustering method for shale MAPs based on fuzzy neural networks according to claim 6, characterized in that, In step S4.4, the results under different numbers of clusters are evaluated using the clustering effectiveness index XB. The XB index is defined as: ; in, The total number of samples, for Index; The maximum number of clusters is preset; , , The index of the cluster number. ; For the first The seven feature vectors of each sample; For the first The center of the class; This represents the normalized membership degree.