A method for intelligent interpretation of formation pressure test data
By constructing a physical information neural network and introducing formation seepage mechanics constraints, the problems of multiple solutions and noise interference in the pure data-driven model were solved, and the accurate interpretation of formation pressure test data was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PANJIN KAI NEW ENERGY TECH CO LTD
- Filing Date
- 2026-05-29
- Publication Date
- 2026-06-30
AI Technical Summary
In existing formation pressure test data interpretation techniques, pure data-driven deep learning models lack the constraints of formation seepage mechanics and physical laws, resulting in distorted model outputs and strong ambiguity when subjected to noise interference.
A physical information neural network is constructed, which combines the residuals of the partial differential equations of formation seepage mechanics, the residuals of initial conditions, and the residuals of boundary conditions with a joint loss function. The backpropagation gradient is updated by weighted summation of the mean square error loss term and the physical penalty term, thus limiting the search space of the network parameters.
This effectively constrains the model output to conform to the physical laws of formation fluid seepage, suppresses multiple solutions, and improves the accuracy and stability of the interpretation results.
Smart Images

Figure CN122311071A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing, specifically to an intelligent interpretation method for formation pressure test data. Background Technology
[0002] Existing formation pressure test data interpretation techniques mainly include analytical methods and purely data-driven deep learning models. Analytical methods obtain formation parameters by solving seepage mechanics equations based on simplifications and assumptions, but their adaptability is limited when dealing with heterogeneous and complex formations. Purely data-driven deep learning models input pressure test signals as pure mathematical sequences into multi-layer neural networks, outputting formation interpretation parameters through feature extraction and nonlinear mapping. The network training process relies solely on backpropagation of the mean square error between the predicted output and the true label to adjust network weights, failing to incorporate the physical laws of formation fluid seepage into the constraint system of the network structure.
[0003] Purely data-driven deep learning models rely solely on data-driven mean square error during training, lacking physical constraints such as partial differential equations of formation flow mechanics, initial conditions, and boundary conditions. When test data is disturbed by noise, the search space of network parameters is not limited by physical laws, causing the formation interpretation parameters output by the model to violate the laws of mass conservation and Darcy's law, resulting in multiple solutions and distorted interpretation results. Summary of the Invention
[0004] The purpose of this invention is to provide an intelligent interpretation method for formation pressure test data, which can effectively solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for intelligent interpretation of formation pressure test data includes: acquiring formation pressure test time series and temperature test time series, and concatenating the formation pressure test time series and the temperature test time series to form a multimodal feature vector; A physical information neural network is constructed, which includes an input layer, a hidden layer and an output layer. The hidden layer includes a feature extraction subnetwork and a parameter mapping subnetwork based on an attention mechanism. The multimodal feature vector is input into the input layer, multimodal fusion features are extracted via the feature extraction subnetwork, and the multimodal fusion features are input into the parameter mapping subnetwork for mapping. A joint loss function is constructed, which is composed of a weighted sum of a data-driven mean square error loss term and a physical penalty term. The physical penalty term includes the residuals of the partial differential equations of formation seepage mechanics, the residuals of the initial conditions, and the residuals of the boundary conditions. The physical information neural network is backpropagated and its gradient is updated based on the joint loss function, so that the gradient update is simultaneously constrained by data bias and physical laws; the formation interpretation parameters are output through the output layer.
[0006] Preferably, the step of acquiring the formation pressure test time series and the temperature test time series, and concatenating the formation pressure test time series and the temperature test time series to form a multimodal feature vector includes: resampling the formation pressure test time series and the temperature test time series respectively, so that the sampling frequencies of the formation pressure test time series and the temperature test time series are consistent. The resampled formation pressure test time series and temperature test time series were normalized to eliminate dimensional differences. Calculate the cross-correlation function between the normalized formation pressure test time series and the temperature test time series, and determine the lag time step corresponding to the maximum value of the cross-correlation function; Based on the lag time step, the normalized formation pressure test time series and temperature test time series are aligned on the time axis, and the aligned formation pressure test time series and temperature test time series are spliced together to form the multimodal feature vector.
[0007] Preferably, the step of inputting the multimodal feature vector into the input layer and extracting multimodal fusion features via the feature extraction sub-network includes: the feature extraction sub-network using a local time-aware attention mechanism to split the multimodal feature vector into multiple local time window sub-sequences with overlapping time steps; For each of the local time window subsequences, calculate the self-attention weight matrix between the feature vectors of each time step within the local time window subsequence; In the calculation of the self-attention weight matrix, a timestamp relative distance decay factor is introduced. The weight values of the corresponding elements in the self-attention weight matrix are adjusted according to the timestamp relative distance decay factor, so that feature vectors closer to the current time step are assigned higher attention weights. The local time window subsequences are weighted and summed based on the adjusted self-attention weight matrix to extract local multimodal fusion features containing time decay characteristics.
[0008] Preferably, the physical penalty term includes the residual of the partial differential equation of formation seepage mechanics. The steps for constructing the residual of the partial differential equation of formation seepage mechanics include: obtaining the spatial coordinate data of the test section and the formation permeability tensor. The formation permeability tensor is calculated from the principal permeability and orientation angle output by the parameter mapping subnetwork. The spatial coordinate data, the formation permeability tensor, and the transient formation pressure value predicted by the physical information neural network are substituted into the anisotropic flow mechanics partial differential equation, which characterizes the pressure transmission process of the permeability tensor as the spatial coordinates change. The partial derivative of the transient formation pressure value with respect to the time coordinate and the gradient divergence with respect to the spatial coordinate are calculated using automatic differentiation techniques. Substituting the partial derivatives, the gradient divergence, and the formation permeability tensor into the anisotropic flow mechanics partial differential equation, the residuals of the formation flow mechanics partial differential equation are calculated.
[0009] Preferably, the physical penalty term includes boundary condition residuals, and the steps for constructing the boundary condition residuals include: obtaining the wellbore radius data, outer boundary distance data, and outer boundary type identifier of the test well; When the outer boundary type is identified as a closed boundary, the partial derivative of the transient formation pressure value predicted by the physical information neural network at the spatial coordinates corresponding to the outer boundary distance data with respect to the radial spatial coordinates is set to zero, and the first difference between the partial derivative and zero is calculated as the closed boundary residual. When the outer boundary type is identified as a constant pressure boundary, the physical information neural network calculates a second difference between the transient formation pressure value predicted at the spatial coordinates corresponding to the outer boundary distance data and the original formation pressure data, and uses the second difference as the constant pressure boundary residual. Based on the outer boundary type identifier, the corresponding closed boundary residual or the constant pressure boundary residual is selected as the boundary condition residual.
[0010] Preferably, the step of performing backpropagation gradient update on the physical information neural network based on the joint loss function includes: calculating the first gradient norm of the mean squared error loss term relative to the parameters of the physical information neural network and the second gradient norm of the physical penalty term relative to the parameters of the physical information neural network in each gradient update iteration. A gradient balancing factor is constructed based on the ratio of the first gradient norm to the second gradient norm. The gradient balancing factor is used as the dynamic adaptive weighting coefficient of the physical penalty term to update the weight value of the physical penalty term in the joint loss function; The total gradient is calculated based on the joint loss function after the weights are updated, and the network parameters of the physical information neural network are updated using the total gradient, so that the gradient magnitudes of the mean squared error loss term and the physical penalty term remain consistent during the iteration process.
[0011] Preferably, the step of calculating the cross-correlation function between the normalized formation pressure test time series and the temperature test time series, and determining the lag time step corresponding to the maximum value of the cross-correlation function, includes: performing sliding window truncation on the normalized formation pressure test time series and the temperature test time series, calculating the local cross-correlation coefficient of the pressure subsequence and the temperature subsequence within each sliding window, and generating a local cross-correlation coefficient sequence. Perform a Hilbert transform on the local cross-correlation coefficient sequence to extract the instantaneous phase and instantaneous amplitude of the local cross-correlation coefficient sequence; A local cross-correlation envelope curve is constructed based on the instantaneous amplitude, and the local cross-correlation envelope curve is smoothed and filtered to eliminate high-frequency noise disturbances; The global maximum point of the local cross-correlation envelope curve after search and smoothing is determined as the time step offset corresponding to the global maximum point.
[0012] Preferably, the step of weighted summation of the local time window subsequences based on the adjusted self-attention weight matrix to extract local multimodal fusion features containing time decay characteristics includes: setting an updatable cross-window memory vector in the feature extraction subnetwork; When calculating the self-attention weight matrix for the current local time window subsequence, the cross-window memory vector corresponding to the previous local time window subsequence is used as the key vector and value vector to participate in the calculation of the self-attention weight of the current local time window subsequence. Perform a residual connection operation between the output features of the current local time window subsequence after weighted summation and the cross-window memory vector corresponding to the previous local time window subsequence; The feature vector at a specified position in the output features after the residual connection operation is updated to the cross-window memory vector of the current local time window subsequence, which is then used for the self-attention weight calculation of the next local time window subsequence to extract local multimodal fusion features containing cross-window dependencies.
[0013] Preferably, the step of using automatic differentiation technology to calculate the partial derivative of the transient formation pressure value with respect to the time coordinate and the gradient divergence with respect to the spatial coordinate includes: obtaining the spatial coordinate position of the abrupt change interface of the formation parameters, and constructing a continuous relaxation mask function based on the spatial coordinate position, wherein the continuous relaxation mask function has a smooth transition distribution on both sides of the abrupt change interface. Multiply the continuous relaxation mask function by the formation permeability tensor to obtain a smooth-transition equivalent permeability tensor; Using the automatic differentiation technique, the partial derivative of the transient formation pressure value predicted by the physical information neural network with respect to the spatial coordinates of the equivalent permeability tensor of the smooth transition is calculated; The gradient divergence is obtained by performing an inner product operation between the equivalent permeability tensor of the smooth transition and the partial derivative of the transient formation pressure value with respect to spatial coordinates, thereby suppressing numerical oscillations at abrupt interfaces.
[0014] Preferably, the step of using the gradient balancing factor as the dynamic adaptive weighting coefficient of the physical penalty term and updating the weight value of the physical penalty term in the joint loss function includes: initializing the historical weighting coefficient of the physical penalty term to a preset constant; Calculate the current ratio of the first gradient norm to the second gradient norm in the current iteration step, and use it as the current gradient balancing factor; Calculate the natural logarithm of the current gradient balance factor to obtain the logarithmic domain gradient balance factor; Based on the exponential moving average update rule, the logarithmic domain gradient balance factor is weighted and fused with the historical logarithmic domain weighted coefficient of the previous iteration update to calculate the current logarithmic domain smoothing weighted coefficient. The current logarithmic domain smoothing weighted coefficients are restored by exponential operation to obtain the updated dynamic adaptive weighted coefficients, and the weight values of the physical penalty term in the joint loss function are updated using the dynamic adaptive weighted coefficients.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. By constructing a joint loss function that includes a mean squared error loss term and a physical penalty term, the residuals of the partial differential equations of formation seepage mechanics, the residuals of initial conditions, and the residuals of boundary conditions are introduced into the backpropagation process. This makes the gradient update subject to both data bias and physical laws, limiting the search space of network parameters, overcoming the problem of network output violating physical laws, and suppressing the multiple solutions in formation parameter inversion. By calculating the gradient norm ratio of the mean squared error loss term and the physical penalty term, a gradient balance factor is constructed and used as a dynamic adaptive weighting coefficient to update the weight value of the physical penalty term. This ensures that the gradient magnitudes of the mean squared error loss term and the physical penalty term remain consistent during iteration, preventing physical constraints from being masked in gradient updates and maintaining the stability of physical law constraints.
[0016] 2. By calculating the cross-correlation function of the formation pressure and temperature time series to determine the lag time step and aligning the time axis, the influence of the pressure and temperature propagation time difference on the temporal consistency of multimodal feature vectors is eliminated. By introducing a timestamp relative distance attenuation factor in feature extraction to adjust the self-attention weights and setting cross-window memory vectors to participate in self-attention calculation and residual connection, the long-term temporal dependence of pressure signals is preserved. When calculating the residuals of partial differential equations, a continuous relaxation mask function is introduced to obtain a smooth transition equivalent permeability tensor, which suppresses numerical oscillations at the interface of abrupt changes in formation parameters and improves the stability of automatic differential calculation. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the overall implementation process of intelligent interpretation of formation pressure test data according to the present invention. Figure 2 This is a flowchart illustrating the multimodal feature vector construction and time axis alignment of the present invention. Figure 3 This is a flowchart of the local time-aware attention multimodal feature extraction process of the present invention; Figure 4 This is a flowchart of the residual calculation of the partial differential equation of formation seepage mechanics in this invention; Figure 5 This is a flowchart of the adaptive calculation process for residuals of formation test boundary conditions in this invention. Figure 6 This is a flowchart of the dynamic adaptive weighted gradient update training process of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, 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.
[0019] Please refer to Figure 1 This embodiment provides an intelligent interpretation method for formation pressure test data. It acquires formation pressure test time series and temperature test time series, and concatenates the two time series to form a multimodal feature vector. A physical information neural network (PEN) is constructed, comprising an input layer, hidden layers, and an output layer. The hidden layer includes a feature extraction subnetwork based on an attention mechanism and a parameter mapping subnetwork. The multimodal feature vector is input to the input layer, where the feature extraction subnetwork extracts multimodal fusion features, which are then mapped by the parameter mapping subnetwork. A joint loss function is constructed, consisting of a weighted sum of a data-driven mean squared error loss term and a physical penalty term. The physical penalty term includes residuals from the partial differential equations of formation seepage mechanics, initial condition residuals, and boundary condition residuals. Backpropagation gradient updates are performed on the PSN based on the joint loss function, ensuring that the gradient updates are simultaneously constrained by data bias and physical laws. Formation interpretation parameters are output through the output layer.
[0020] Specifically, the formation pressure test time series is obtained by collecting data at preset time intervals using a downhole pressure gauge during the test. Each data point includes a timestamp and the corresponding formation pressure value. The temperature test time series is obtained synchronously by a temperature sensor on the same test string. Each data point includes a timestamp and the corresponding formation temperature value. When the two time series are spliced, the pressure and temperature values are combined into a two-dimensional feature vector according to the same timestamp order, forming a multimodal feature vector sequence.
[0021] The number of neurons in the input layer of the physical information neural network is equal to the dimension of the multimodal feature vector. The feature extraction subnetwork in the hidden layer consists of multiple stacked attention layers, each containing a multi-head self-attention mechanism and a feedforward neural network. The parameter mapping subnetwork consists of multiple fully connected layers, mapping the high-dimensional fused features output by the feature extraction subnetwork to formation interpretation parameters. The number of neurons in the output layer is equal to the number of formation interpretation parameters to be inverted, including formation permeability, porosity, compressibility, and skin coefficient.
[0022] The mathematical expression for the joint loss function is: in, The total joint loss function is... For data-driven mean squared error loss term, For physical penalty items, The weighting coefficients for the mean squared error loss term are: This is the weighting coefficient for the physical penalty term.
[0023] The mathematical expression for the mean squared error loss term is: in, The number of training samples. For physical information neural networks in time Spatial coordinates The predicted formation pressure value, This represents the formation pressure value observed at the same time and spatial coordinates.
[0024] The mathematical expression for the physical penalty term is: in, The residuals of the partial differential equations for formation seepage mechanics are... For the initial condition residual, For boundary condition residuals, , , These are the weighting coefficients for the corresponding residual terms.
[0025] The mathematical expression for the initial condition residual is: in, The number of sampling points at the initial time. For the physical information neural network at the initial time Spatial coordinates The predicted formation pressure value, Spatial coordinates at the initial time The original pressure value of the formation at that location.
[0026] During backpropagation gradient update, the gradient of the joint loss function with respect to all trainable parameters of the physical information neural network is calculated, and the network parameters are updated using the gradient descent algorithm. The mathematical expression for gradient update is: in, For the first Network parameters at the next iteration For the first The network parameters updated in the next iteration For learning rate, For the first In the next iteration, the joint loss function is relative to the network parameters. The gradient.
[0027] Formation interpretation parameters include formation permeability Porosity Formation fluid compressibility Surface coefficient Wellbore reservoir coefficient These parameters are output through the linear activation function of the output layer and directly used as the interpretation results of the formation pressure test data. The physical information neural network structure parameters are shown in Table 1.
[0028] Table 1 Configuration of Physical Information Neural Network Structure Parameters ; Table 1 shows the structural parameter configuration of the physical information neural network. The input layer receives a two-dimensional multimodal feature vector containing pressure and temperature information. Three attention layers form a feature extraction subnetwork, progressively extracting temporal dependencies and nonlinear relationships from the multimodal features. Two fully connected layers form a parameter mapping subnetwork, mapping the high-dimensional fused features to low-dimensional formation interpretation parameters. The output layer outputs five formation interpretation parameters, meeting the needs of interpreting conventional formation pressure test data.
[0029] In this embodiment, by constructing a joint loss function that includes both data-driven loss and physical constraint loss, the fundamental laws of formation seepage mechanics are integrated into the training process of the neural network. The update of network parameters is simultaneously constrained by both observational data bias and physical laws, limiting the search space of network parameters and preventing the model output from violating the laws of mass conservation and Darcy's law. The physical information neural network can automatically learn the complex nonlinear relationships in formation pressure and temperature data, while ensuring that the interpretation results conform to the fundamental physical laws of formation fluid seepage.
[0030] In a preferred embodiment, reference Figure 2 The formation pressure test time series and the temperature test time series are resampled to ensure their sampling frequencies are consistent. The resampled time series are then normalized to eliminate dimensional differences. The cross-correlation function between the normalized time series and the temperature test time series is calculated, and the lag step corresponding to the maximum value of the cross-correlation function is determined. Based on the lag step, the normalized time series and the temperature test time series are time-axis aligned, and the aligned time series are concatenated to form the multimodal feature vector.
[0031] Specifically, the resampling process employs linear interpolation. For time series with a higher sampling frequency, linear interpolation is used to calculate the values at the same time points as those in time series with a lower sampling frequency. For time series with a lower sampling frequency, linear interpolation is used to supplement missing time point data, ensuring that both time series have the same time step size and the same number of data points. The two resampled time series have corresponding timestamps, laying the foundation for subsequent timeline alignment operations.
[0032] Normalization was performed using the min-max normalization method. For the formation pressure test time series, the normalization mathematical expression is: in, This represents the original formation pressure value. This is the minimum value in the formation pressure test time series. This represents the maximum value in the formation pressure test time series. This represents the normalized formation pressure value.
[0033] For the temperature test time series, the normalized mathematical expression is: in, This is the original temperature value. This represents the minimum value in the temperature test time series. The maximum value in the temperature test time series. This is the normalized temperature value.
[0034] Normalization maps both pressure and temperature values to the [0,1] interval, eliminating dimensional differences between different physical quantities and making subsequent cross-correlation function calculations more accurate.
[0035] The mathematical expression for the cross-correlation function is: in, This is the cross-correlation function between the pressure time series and the temperature time series. For the time lag step, is the length of the time series. The cross-correlation function describes how the similarity between two time series changes with time lag. When The cross-correlation function reaches its maximum value when it equals the actual propagation time difference between the pressure signal and the temperature signal.
[0036] Search cross-correlation function exist The maximum value within the range, and the corresponding lag time step. The time difference between the pressure and temperature signals is determined. Based on this lag time step, the two time series are aligned along their time axes. If... This indicates that the temperature signal lags behind the pressure signal, so the temperature time series should be shifted to the left. One time step; if This indicates that the pressure signal lags behind the temperature signal, so the pressure time series should be shifted to the left. Each time step. Data points that exceed the time series range after shifting are discarded, and the insufficient portion is filled with boundary values.
[0037] The aligned pressure time series and temperature time series are concatenated in timestamp order, with each time step corresponding to a two-dimensional feature vector. This constitutes a multimodal feature vector sequence. This multimodal feature vector sequence simultaneously contains temporal variation information of formation pressure and temperature, providing rich input data for subsequent feature extraction and parameter mapping.
[0038] In a preferred embodiment, a sliding window is used to extract the normalized formation pressure and temperature test time series. The local cross-correlation coefficients (LCCs) of the pressure and temperature subsequences within each sliding window are calculated to generate a LCC sequence. A Hilbert transform is applied to the LCC sequence to extract its instantaneous phase and amplitude. A local cross-correlation envelope curve is constructed based on the instantaneous amplitudes, and this curve is smoothed and filtered to eliminate high-frequency noise disturbances. The global maximum point of the smoothed LCC envelope curve is searched, and the time step offset corresponding to the global maximum point is determined as the lag time step.
[0039] Specifically, during the sliding window capture process, the window length is set to... The sliding step size is 1. For each window's starting position... Extract the pressure subsequence and temperature subsequence Calculate the local cross-correlation coefficients of the two subsequences within each window, and generate a sequence of local cross-correlation coefficients. .
[0040] The mathematical expression for the local cross-correlation coefficient is: in, For the first The average value of the pressure subsequence within each window. For the first The average value of the temperature subsequence within each window.
[0041] For local cross-correlation coefficient sequences Perform a Hilbert transform to obtain the analytic signal. : in, Represents the Hilbert transform operator. It is the imaginary unit.
[0042] From analyzing signals Extracting instantaneous amplitude and instantaneous phase :
[0043] Based on instantaneous amplitude Construct a local cross-correlation envelope curve. Perform a smoothing filter on this envelope curve using a moving average filter method, with a filter window length of [value missing]. The envelope curve after smoothing filtering is as follows: Search for the envelope curve after smoothing filtering The global maximum point is identified, and the time step offset corresponding to this maximum point is determined as the lag time step. This method for determining lag time steps based on local cross-correlation and Hilbert transform can effectively suppress noise interference and improve the accuracy of time axis alignment. Table 2 shows a performance comparison of different lag time step determination methods.
[0044] Table 2 Performance Comparison of Different Lag Time Step Determination Methods ; Table 2 shows a performance comparison of three different methods for determining the lag time step. The global cross-correlation method has high computational complexity and moderate noise immunity, making it suitable for low-noise stationary signals. The local cross-correlation method calculates local correlations through a sliding window, improving noise immunity and making it suitable for moderately noisy non-stationary signals. The Hilbert transform method extracts instantaneous amplitudes to construct an envelope curve, exhibiting the strongest noise immunity and achieving sub-time step accuracy, making it suitable for high-noise complex signals. In practical applications, the appropriate lag time step determination method can be selected based on the quality and characteristics of the test data.
[0045] In this embodiment, by resampling, normalizing, performing cross-correlation analysis, and time axis alignment on the formation pressure and temperature time series, the differences in sampling frequency, dimensions, and propagation time between the two time series are eliminated. The multimodal feature vectors after time axis alignment have strict temporal consistency and can accurately reflect the intrinsic relationship between formation pressure and temperature. The lag time step determination method based on local cross-correlation and Hilbert transform can effectively suppress noise interference in the test data, improve the accuracy of time axis alignment, and provide high-quality input data for subsequent feature extraction and parameter inversion.
[0046] In a preferred embodiment, reference Figure 3 The feature extraction sub-network employs a local time-aware attention mechanism, splitting the multimodal feature vector into multiple local time window sub-sequences with overlapping time steps. For each local time window sub-sequence, a self-attention weight matrix is calculated between the feature vectors at each time step within the sub-sequence. During the calculation of the self-attention weight matrix, a timestamp relative distance decay factor is introduced. The weight values of corresponding elements in the self-attention weight matrix are adjusted according to this factor, assigning higher attention weights to feature vectors closer to the current time step. Based on the adjusted self-attention weight matrix, the local time window sub-sequences are weighted and summed to extract local multimodal fusion features containing time decay characteristics.
[0047] Specifically, during the local time window splitting process, the window length is set to... The overlap length is For a length of The number of local time window subsequences obtained by splitting the multimodal feature vector sequence is: Each local time window subsequence contains A series of time-step feature vectors, with a distance between two adjacent windows. The overlapping of time steps. This method of splitting overlapping windows can preserve the temporal continuity between adjacent windows and avoid information loss.
[0048] For each local time window subsequence ,in Given the dimension of the feature vector, calculate the self-attention weight matrix. The self-attention mechanism maps the input features to the query vector through a linear transformation. Key vector Sum value vector : in, , , Let be a trainable linear transformation matrix. To query the dimensions of the vector and key vector, is the dimension of the value vector.
[0049] The original self-attention weight matrix is calculated as follows: in, This is a scaling factor used to prevent the gradient of the softmax function from vanishing due to an excessively large dot product result.
[0050] A timestamp relative distance decay factor is introduced to adjust the original self-attention weight matrix. The mathematical expression for the timestamp relative distance decay factor is: in, and For the time step index within the local time window, The relative distance between two time steps. This is a time decay constant, which controls the rate at which the attention weight decays over time.
[0051] The adjusted self-attention weight matrix is as follows: in, This represents the Hadamard product (element-wise multiplication). In this way, feature vectors closer to the current time step are assigned higher attention weights, while feature vectors farther away are assigned lower attention weights, which is consistent with the temporal decay characteristics of formation pressure signals.
[0052] Based on the adjusted self-attention weight matrix, the value vector By performing weighted summation, the local multimodal fusion features are obtained: in, This refers to local multimodal fusion features that incorporate time decay characteristics.
[0053] In a preferred embodiment, an updatable cross-window memory vector is set in the feature extraction sub-network. When calculating the self-attention weight matrix for the current local time window subsequence, the cross-window memory vector corresponding to the previous local time window subsequence is used as the key vector and value vector in the calculation of the self-attention weight of the current local time window subsequence. The output features of the current local time window subsequence after weighted summation are joined with the cross-window memory vector corresponding to the previous local time window subsequence using a residual connection operation. The feature vector at a specified position in the output features after the residual connection operation is updated to the cross-window memory vector of the current local time window subsequence, which is then used for the calculation of the self-attention weight of the next local time window subsequence to extract local multimodal fusion features containing cross-window dependencies.
[0054] Specifically, cross-window memory vector It is an updatable vector used to store key information from the previous local time window. When processing the... When the local time window subsequence is in the nth time window, the nth Cross-window memory vector for each window key vector of the current window Sum value vector To splice: in, , It is a trainable linear transformation matrix used to map cross-window memory vectors to the same dimensional space as the key and value vectors.
[0055] Based on the concatenated key vector Sum value vector Calculate the self-attention weight matrix and output features:
[0056] in, This is the query vector for the current window. This is the time-distance decay factor matrix for the current window.
[0057] Output characteristics of the current window Cross-window memory vector with the previous window Perform residual join operation: in, is a trainable linear transformation matrix used for dimension matching.
[0058] Output features after residual concatenation The feature vector at the last time step is updated to the cross-window memory vector of the current window. : in, The length of the local time window is denoted as . This cross-window memory vector will be passed to the self-attention calculation process of the next local time window, realizing cross-window information transfer and dependency modeling. Performance comparisons of different feature extraction methods are shown in Table 3.
[0059] Table 3 Performance Comparison of Different Feature Extraction Methods ; Table 3 shows a performance comparison of four different feature extraction methods. Convolutional neural networks can only capture local temporal features, have high computational efficiency, but poor ability to capture long-distance dependencies. Recurrent neural networks can capture global temporal features, but have low computational efficiency and suffer from the gradient vanishing problem, and their ability to capture long-distance dependencies is generally poor. Standard self-attention mechanisms can capture global temporal dependencies, but have high computational complexity and are sensitive to noise. Local time-aware attention mechanisms, through overlapping window splitting and temporal distance decay factors, can effectively capture local and global temporal dependencies while maintaining high computational efficiency, and have strong noise resistance, making them suitable for feature extraction from formation pressure test data.
[0060] In this embodiment, multimodal fusion features are extracted using a local time-aware attention mechanism. A timestamp relative distance decay factor is introduced to adjust the self-attention weights, enabling the model to focus on recent pressure and temperature changes, consistent with the temporal decay characteristics of formation pressure signals. By setting cross-window memory vectors to participate in self-attention calculations and residual connections, information transfer between adjacent windows is achieved, effectively capturing the long-term temporal dependencies of pressure signals. This feature extraction method can extract rich temporal features and nonlinear relationships from multimodal time series, providing a solid foundation for subsequent formation parameter inversion.
[0061] In a preferred embodiment, reference Figure 4 The spatial coordinate data and formation permeability tensor of the test layer are obtained. The formation permeability tensor is calculated from the principal permeability and orientation angle output by the parameter mapping subnetwork. The spatial coordinate data, the formation permeability tensor, and the transient formation pressure value predicted by the physical information neural network are substituted into the anisotropic flow mechanics partial differential equation. This anisotropic flow mechanics partial differential equation characterizes the pressure transmission process as the permeability tensor changes with spatial coordinates. The partial derivative of the transient formation pressure value with respect to time coordinates and the gradient divergence with respect to spatial coordinates are calculated using automatic differentiation techniques. The partial derivative, the gradient divergence, and the formation permeability tensor are substituted into the anisotropic flow mechanics partial differential equation to calculate the residual of the formation flow mechanics partial differential equation.
[0062] Specifically, the spatial coordinate data of the test layer includes radial coordinates. and vertical coordinates For two-dimensional radial seepage problems, only the radial coordinates are considered in spatial coordinates. Formation permeability tensor Main penetration rate output by parameter mapping subnetwork , and direction angle The calculation shows that:
[0063] in, For rotation matrix:
[0064] The mathematical expression for the partial differential equation of anisotropic seepage mechanics is: in, Formation porosity, The coefficient of compressibility of the formation fluid. For formation pressure, For time, For gradient operators, For divergence operators, For the well's production, For Dirac delta function, These are the coordinates of the well's location.
[0065] For the two-dimensional planar radial seepage problem, the partial differential equations of anisotropic seepage mechanics can be simplified to: in, Radial permeability, Peripheral penetration rate Where is the radius of the wellbore.
[0066] Transient formation pressure values predicted by a physical information neural network using automatic differentiation techniques. Relative to time coordinates partial derivatives and relative to spatial coordinates First-order partial derivatives and second-order partial derivatives Automatic differentiation technology automatically calculates the derivative of the neural network output with respect to the input using the chain rule, eliminating the need for manual derivation of derivative formulas and enabling efficient and accurate calculation of the residuals of partial differential equations.
[0067] Substitute the calculated partial derivatives into the partial differential equations of anisotropic seepage mechanics, and calculate the equation residuals: in, This represents the number of calculation points for the residuals of the partial differential equation. and For the first The time and space coordinates of each calculation point.
[0068] In a preferred embodiment, the spatial coordinates of the abrupt change interface of formation parameters are obtained. A continuous relaxation mask function is constructed based on these coordinates, and the continuous relaxation mask function exhibits a smooth transition distribution on both sides of the abrupt change interface. The continuous relaxation mask function is multiplied by the formation permeability tensor to obtain a smooth transition equivalent permeability tensor. Using the automatic differentiation technique, the partial derivative of the transient formation pressure value predicted by the physical information neural network with respect to the spatial coordinates of the smooth transition equivalent permeability tensor is calculated. The gradient divergence, which suppresses numerical oscillations at the abrupt change interface, is then calculated by performing an inner product operation on the smooth transition equivalent permeability tensor and the partial derivative of the transient formation pressure value with respect to the spatial coordinates.
[0069] Specifically, a formation parameter abrupt change interface refers to a formation interface where parameters such as formation permeability and porosity undergo abrupt changes. Let the spatial coordinates of the abrupt change interface be... Construct a continuous relaxation mask function: in, The relaxation coefficient controls the transition width of the mask function at abrupt interfaces. The smaller the value, the closer the mask function is to the step function; The larger the value, the wider the transition area.
[0070] For the case involving two formation parameter regions, the permeability tensor of region 1 is: The permeability tensor of region 2 is Then the equivalent permeability tensor for a smooth transition is: The equivalent permeability tensor at the abrupt interface The distribution is smooth and gradual, avoiding discontinuous changes in permeability.
[0071] Calculating transient formation pressure values using automatic differentiation techniques Relative to spatial coordinates partial derivatives The equivalent permeability tensor With pressure gradient Perform inner product operations: in, For the viscosity of the formation fluid, The fluid seepage velocity.
[0072] seepage velocity Calculate the divergence to obtain the gradient divergence: in, The radial seepage velocity is [value missing].
[0073] Since the equivalent permeability tensor transitions smoothly at the abrupt transition interface, the calculated gradient divergence will also be smooth, thereby suppressing numerical oscillations at the abrupt transition interface of formation parameters and improving the stability of automatic differential calculation.
[0074] In a preferred embodiment, reference Figure 5 The system acquires the wellbore radius data, outer boundary distance data, and outer boundary type identifier of the test well. When the outer boundary type identifier is a closed boundary, the partial derivative of the transient formation pressure value predicted by the physical information neural network at the spatial coordinates corresponding to the outer boundary distance data with respect to the radial spatial coordinates is set to zero, and the first difference between the partial derivative and zero is calculated as the closed boundary residual. When the outer boundary type identifier is a constant pressure boundary, the second difference between the transient formation pressure value predicted by the physical information neural network at the spatial coordinates corresponding to the outer boundary distance data and the original formation pressure data is calculated, and the second difference is used as the constant pressure boundary residual. Based on the outer boundary type identifier, the corresponding closed boundary residual or constant pressure boundary residual is selected as the boundary condition residual.
[0075] Specifically, the wellbore radius of the test well outer boundary distance The outer boundary type identifier is input into the physical information neural network as prior information. An outer boundary type identifier of 0 indicates a closed boundary, and 1 indicates a constant pressure boundary.
[0076] For a closed boundary, the boundary conditions are: The mathematical expression for the closed boundary residual is: in, The number of points used to calculate the boundary condition residuals. For the first The time for each calculation point.
[0077] For a constant pressure boundary, the boundary conditions are: in, Let be the original formation pressure. The mathematical expression for the isobaric boundary residual is: Select the corresponding boundary condition residual based on the outer boundary type identifier. If the outer boundary type identifier is 0, then If the outer boundary type identifier is 1, then .
[0078] In a preferred embodiment, reference Figure 6 In each gradient update iteration, the first gradient norm of the mean squared error loss term relative to the parameters of the physical information neural network, and the second gradient norm of the physical penalty term relative to the parameters of the physical information neural network, are calculated. A gradient balancing factor is constructed based on the ratio of the first gradient norm to the second gradient norm. This gradient balancing factor is used as a dynamically adaptive weighting coefficient for the physical penalty term, updating the weight values of the physical penalty term in the joint loss function. The total gradient is calculated based on the weighted joint loss function, and the network parameters of the physical information neural network are updated using this total gradient, ensuring that the gradient magnitudes of the mean squared error loss term and the physical penalty term remain consistent throughout the iteration process.
[0079] Specifically, the first gradient norm It is the mean squared error loss term Relative to network parameters The L2 norm of the gradient. The second gradient norm. It is a physical penalty item. Relative to network parameters The L2 norm of the gradient. The mathematical expression for the gradient norm is: in, This represents the total number of network parameters. For the first Network parameters.
[0080] Gradient balance factor The mathematical expression is: This gradient balancing factor reflects the ratio of the gradient magnitude of the data-driven loss to that of the physical constraint loss.
[0081] Gradient balance factor The dynamic adaptive weighting coefficients, acting as the physical penalty term, update the joint loss function: During each iteration, the weight of the physical penalty term is dynamically adjusted based on the current gradient norm ratio to keep the gradient magnitudes of the data-driven loss and the physical constraint loss consistent.
[0082] In a preferred embodiment, the historical weighting coefficients of the physical penalty term are initialized to a preset constant. The current ratio of the first gradient norm to the second gradient norm in the current iteration step is calculated as the current gradient balancing factor. The natural logarithmic value of the current gradient balancing factor is calculated to obtain the logarithmic domain gradient balancing factor. Based on the exponential moving average update rule, the logarithmic domain gradient balancing factor is weighted and fused with the historical logarithmic domain weighting coefficients updated in the previous iteration to calculate the current logarithmic domain smooth weighting coefficients. The current logarithmic domain smooth weighting coefficients are then exponentially restored to obtain the updated dynamic adaptive weighting coefficients, and the weight values of the physical penalty term in the joint loss function are updated using the dynamic adaptive weighting coefficients.
[0083] Specifically, the historical weighting coefficients of the initial physics penalty term are initialized. This is a preset constant, usually taken as 1.0. In the... In the next iteration step, the current gradient balance factor is calculated. : Calculate the natural logarithm of the current gradient balance factor: Calculate the current logarithmic domain smoothing weighting coefficients based on the exponential moving average update rule: in, This is the smoothing coefficient for the exponential moving average, typically taken as 0.9. These are the logarithmic field smoothing weighting coefficients from the previous iteration.
[0084] The number field smoothing weighted coefficients are then restored by exponential operation to obtain the updated dynamic adaptive weighted coefficients: Using the updated dynamic adaptive weighting coefficients Update the joint loss function: The total gradient is calculated based on the updated joint loss function, and the network parameters are updated accordingly: This dynamic adaptive weighting method based on exponential moving average can smooth the fluctuations of gradient balance factors, avoid drastic changes in weights due to gradient anomalies in a single iteration, and improve the stability of network training.
[0085] In this embodiment, a physical penalty term is constructed that incorporates the residuals of the partial differential equations of formation seepage mechanics, the residuals of initial conditions, and the residuals of boundary conditions, thereby integrating the fundamental physical laws of formation fluid seepage into the training process of the neural network. A continuous relaxation mask function is introduced when calculating the residuals of the partial differential equations to obtain a smoothly transitioning equivalent permeability tensor, suppressing numerical oscillations at abrupt changes in formation parameters and improving the stability of automatic differential calculations. By dynamically and adaptively adjusting the weights of the physical penalty term, the gradient magnitudes of the data-driven loss and the physical constraint loss remain consistent during the iteration process, preventing physical constraints from being masked during gradient updates and maintaining the stability of physical law constraints. This training method enables the physical information neural network to strictly adhere to the fundamental laws of formation seepage mechanics while fitting observational data, improving the accuracy and reliability of formation parameter inversion.
Claims
1. A method for intelligent interpretation of formation pressure test data, comprising: include: Obtain formation pressure test time series and temperature test time series, and concatenate the formation pressure test time series and the temperature test time series to form a multimodal feature vector; A physical information neural network is constructed, which includes an input layer, a hidden layer and an output layer. The hidden layer includes a feature extraction subnetwork and a parameter mapping subnetwork based on an attention mechanism. The multimodal feature vector is input into the input layer, multimodal fusion features are extracted via the feature extraction subnetwork, and the multimodal fusion features are input into the parameter mapping subnetwork for mapping. A joint loss function is constructed, which is composed of a weighted sum of a data-driven mean square error loss term and a physical penalty term. The physical penalty term includes the residuals of the partial differential equations of formation seepage mechanics, the residuals of initial conditions, and the residuals of boundary conditions. The physical information neural network is backpropagated and its gradient is updated based on the joint loss function, so that the gradient update is simultaneously constrained by data bias and physical laws; the formation interpretation parameters are output through the output layer.
2. The method of claim 1, wherein, The step of acquiring the formation pressure test time series and the temperature test time series, and concatenating the formation pressure test time series and the temperature test time series to form a multimodal feature vector includes: resampling the formation pressure test time series and the temperature test time series respectively, so that the sampling frequency of the formation pressure test time series and the temperature test time series is consistent. The resampled formation pressure test time series and temperature test time series were normalized respectively. Calculate the cross-correlation function between the normalized formation pressure test time series and the temperature test time series, and determine the lag time step corresponding to the maximum value of the cross-correlation function; Based on the lag time step, the normalized formation pressure test time series and temperature test time series are aligned on the time axis, and the aligned formation pressure test time series and temperature test time series are spliced together to form the multimodal feature vector.
3. The method of claim 1, wherein, The step of inputting the multimodal feature vector into the input layer and extracting multimodal fusion features via the feature extraction sub-network includes: the feature extraction sub-network using a local time-aware attention mechanism to split the multimodal feature vector into multiple local time window sub-sequences with overlapping time steps; For each of the local time window subsequences, calculate the self-attention weight matrix between the feature vectors of each time step within the local time window subsequence; In the calculation of the self-attention weight matrix, a timestamp relative distance decay factor is introduced. The weight values of the corresponding elements in the self-attention weight matrix are adjusted according to the timestamp relative distance decay factor, so that feature vectors closer to the current time step are assigned higher attention weights. The local time window subsequences are weighted and summed based on the adjusted self-attention weight matrix to extract local multimodal fusion features containing time decay characteristics.
4. The method of claim 1, wherein, The physical penalty term includes the residual of the partial differential equation of formation seepage mechanics. The steps for constructing the residual of the partial differential equation of formation seepage mechanics include: obtaining the spatial coordinate data of the test section and the formation permeability tensor. The formation permeability tensor is calculated from the principal permeability and orientation angle output by the parameter mapping subnetwork. The spatial coordinate data, the formation permeability tensor, and the transient formation pressure value predicted by the physical information neural network are substituted into the anisotropic flow mechanics partial differential equation, which characterizes the pressure transmission process of the permeability tensor as the spatial coordinates change. The partial derivative of the transient formation pressure value with respect to the time coordinate and the gradient divergence with respect to the spatial coordinate are calculated using automatic differentiation techniques. Substituting the partial derivatives, the gradient divergence, and the formation permeability tensor into the anisotropic flow mechanics partial differential equation, the residual of the formation flow mechanics partial differential equation is calculated.
5. The intelligent interpretation method for formation pressure test data according to claim 1, characterized in that, The physical penalty term includes boundary condition residuals, and the steps for constructing the boundary condition residuals include: obtaining the wellbore radius data, outer boundary distance data, and outer boundary type identifier of the test well; When the outer boundary type is identified as a closed boundary, the partial derivative of the transient formation pressure value predicted by the physical information neural network at the spatial coordinates corresponding to the outer boundary distance data with respect to the radial spatial coordinates is set to zero, and the first difference between the partial derivative and zero is calculated as the closed boundary residual. When the outer boundary type is identified as a constant pressure boundary, the physical information neural network calculates a second difference between the transient formation pressure value predicted at the spatial coordinates corresponding to the outer boundary distance data and the original formation pressure data, and uses the second difference as the constant pressure boundary residual. The corresponding closed boundary residual or constant pressure boundary residual is selected as the boundary condition residual based on the outer boundary type identifier.
6. The intelligent interpretation method for formation pressure test data according to claim 1, characterized in that, The step of performing backpropagation gradient update on the physical information neural network based on the joint loss function includes: calculating the first gradient norm of the mean squared error loss term relative to the parameters of the physical information neural network and the second gradient norm of the physical penalty term relative to the parameters of the physical information neural network in each gradient update iteration. A gradient balancing factor is constructed based on the ratio of the first gradient norm to the second gradient norm. The gradient balancing factor is used as the dynamic adaptive weighting coefficient of the physical penalty term to update the weight value of the physical penalty term in the joint loss function; The total gradient is calculated based on the joint loss function after the weights are updated, and the network parameters of the physical information neural network are updated using the total gradient, so that the gradient magnitudes of the mean squared error loss term and the physical penalty term remain consistent during the iteration process.
7. The intelligent interpretation method for formation pressure test data according to claim 2, characterized in that, The step of calculating the cross-correlation function between the normalized formation pressure test time series and the temperature test time series, and determining the lag time step corresponding to the maximum value of the cross-correlation function, includes: performing sliding window truncation on the normalized formation pressure test time series and the temperature test time series, calculating the local cross-correlation coefficient of the pressure subsequence and the temperature subsequence within each sliding window, and generating a local cross-correlation coefficient sequence. Perform a Hilbert transform on the local cross-correlation coefficient sequence to extract the instantaneous phase and instantaneous amplitude of the local cross-correlation coefficient sequence; A local cross-correlation envelope curve is constructed based on the instantaneous amplitude, and the local cross-correlation envelope curve is then subjected to smoothing filtering. The global maximum point of the local cross-correlation envelope curve after search and smoothing is determined as the time step offset corresponding to the global maximum point.
8. The intelligent interpretation method for formation pressure test data according to claim 3, characterized in that, The step of weighted summation of the local time window subsequences based on the adjusted self-attention weight matrix to extract local multimodal fusion features containing time decay characteristics includes: setting an updatable cross-window memory vector in the feature extraction subnetwork; When calculating the self-attention weight matrix for the current local time window subsequence, the cross-window memory vector corresponding to the previous local time window subsequence is used as the key vector and value vector to participate in the calculation of the self-attention weight of the current local time window subsequence. Perform a residual connection operation between the output features of the current local time window subsequence after weighted summation and the cross-window memory vector corresponding to the previous local time window subsequence; The feature vector at a specified position in the output features after the residual connection operation is updated to the cross-window memory vector of the current local time window subsequence, which is then used for the self-attention weight calculation of the next local time window subsequence to extract local multimodal fusion features containing cross-window dependencies.
9. The intelligent interpretation method for formation pressure test data according to claim 4, characterized in that, The step of calculating the partial derivative of the transient formation pressure value with respect to the time coordinate and the gradient divergence with respect to the spatial coordinate using automatic differentiation technology includes: obtaining the spatial coordinate position of the abrupt change interface of the formation parameters, and constructing a continuous relaxation mask function based on the spatial coordinate position, wherein the continuous relaxation mask function has a smooth transition distribution on both sides of the abrupt change interface. Multiply the continuous relaxation mask function by the formation permeability tensor to obtain a smooth-transition equivalent permeability tensor; Using the automatic differentiation technique, the partial derivative of the transient formation pressure value predicted by the physical information neural network with respect to the spatial coordinates of the equivalent permeability tensor of the smooth transition is calculated; The gradient divergence is obtained by performing an inner product operation between the equivalent permeability tensor of the smooth transition and the partial derivative of the transient formation pressure value with respect to spatial coordinates, thereby suppressing numerical oscillations at abrupt interfaces.
10. The intelligent interpretation method for formation pressure test data according to claim 6, characterized in that, The step of using the gradient balancing factor as the dynamic adaptive weighting coefficient of the physical penalty term to update the weight value of the physical penalty term in the joint loss function includes: initializing the historical weighting coefficient of the physical penalty term to a preset constant; Calculate the current ratio of the first gradient norm to the second gradient norm in the current iteration step, and use it as the current gradient balancing factor; Calculate the natural logarithm of the current gradient balance factor to obtain the logarithmic domain gradient balance factor; Based on the exponential moving average update rule, the logarithmic domain gradient balance factor is weighted and fused with the historical logarithmic domain weighted coefficient of the previous iteration update to calculate the current logarithmic domain smoothing weighted coefficient. The current logarithmic domain smoothing weighted coefficients are restored by exponential operation to obtain the updated dynamic adaptive weighted coefficients, and the weight values of the physical penalty term in the joint loss function are updated using the dynamic adaptive weighted coefficients.