Magnetotelluric efficient parallel simulation method and device based on random path integration
By rewriting the Helmholtz equations into stochastic path integrals and dividing the process into two stages—offline preparation and online computation—the problem of low parallel efficiency in large-scale electromagnetic simulations is solved, achieving efficient parallel simulation, which in particular improves simulation speed and accuracy in complex geological scenarios.
Patent Information
- Application Number
- CN202511202270.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2026-01-09
AI Technical Summary
Existing deterministic simulation methods based on solving equations suffer from bottlenecks in unit communication, load balancing, and I/O in large-scale electromagnetic parallel simulations, resulting in low parallel efficiency and making it difficult to meet the high-efficiency simulation requirements of complex geological scenarios.
The Helmholtz equation is rewritten into a stochastic path integral form using the Feynman-Kac formula. The process is divided into two stages: offline preparation and online computation. The path matrix and interpolation matrix are constructed through Monte Carlo simulation, and matrix multiplication is performed on a parallel heterogeneous computing platform to achieve efficient parallel simulation.
It improves the parallel efficiency of magnetotelluric simulation and increases the simulation speed. In particular, it achieves a balance between accuracy and efficiency in complex geological scenarios, and reduces communication load and I/O bottlenecks.
Smart Images

Figure CN121302831A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electromagnetic field simulation modeling technology, and in particular to a method and apparatus for efficient parallel simulation of magnetotelluric simulation using stochastic path integrals. Background Technology
[0002] Electromagnetic modeling, as a general-purpose tool, provides powerful support for electromagnetic field analysis by efficiently and accurately solving Maxwell's equations. This technique is widely used in engineering and scientific research. For example, magnetotelluric modeling is specifically used to calculate the Earth's response characteristics to naturally occurring electromagnetic fields. Accurate and efficient magnetotelluric modeling is key to achieving stable inversion and reliable interpretation of magnetotelluric data.
[0003] In related technologies, traditional magnetotelluric forward modeling methods mainly include the finite difference method, integral equation method, and finite element method. These methods require transforming Maxwell's equations into linear matrix equations, which are then solved using direct or iterative solvers. However, when the number of unknowns is large, solving the linear equations consumes significant computational resources and time. Currently, several deterministic computational methods to accelerate magnetotelluric simulations have been proposed, including Rayleigh-Fast Fourier Transform (FFT) techniques, local mesh methods, and deep learning methods.
[0004] However, in related technologies, deterministic computation methods require extensive communication between computational nodes, both in the stiffness matrix construction step and in the solution of large-scale linear equation systems. Therefore, the algorithms inherently lack sufficient parallelism (for example, in the domain decomposition method, the forward modeling of different regions requires node communication to ensure the continuity of boundary conditions, which leads to additional communication load between nodes, reducing parallel efficiency, and this communication load can generally only be mitigated through optimization but is basically unavoidable). Due to this communication load, the upper limit of the parallel efficiency of large-scale electromagnetic parallel simulation algorithms is basically 60% to 70%, which is significantly different from the ideal parallel efficiency of close to 100%. The load balancing and I / O bottleneck problems caused by the frequent communication between computational units will greatly limit the performance of parallel algorithms as the problem scale increases, and urgently need to be improved. Summary of the Invention
[0005] This application provides a high-efficiency parallel simulation method and apparatus for magnetotelluric problems using stochastic path integrals, in order to solve the problems of unit communication, load balancing and I / O bottlenecks in the parallel simulation of large-scale electromagnetic positive problems caused by the parallelization of existing deterministic simulation methods based on solving equations using non-parallel algorithms.
[0006] The first aspect of this application provides an efficient parallel simulation method for magnetotelluric equations using stochastic path integrals, comprising the following steps: solving the Helmholtz equations based on a preset Feynman-Kac formula to rewrite the deterministic solution based on the solution matrix equations into a form based on stochastic path integrals; in the offline preparation stage, recording the number of times each random walk particle passes through each grid point on the random walk grid to generate a path matrix, and recording the number of times each random walk particle passes through all grid points on the Robin boundary to generate a boundary path matrix, and interpolating a preset model grid to different random walk grids to generate an interpolation matrix; in the online stage, based on the form based on stochastic path integrals, obtaining a discrete matrix operation form to obtain the final calculation result according to the path matrix, the boundary path matrix, and the interpolation matrix, thus ending the efficient parallel simulation process for magnetotelluric equations.
[0007] Through the above technical solutions, the embodiments of this application can solve the Helmholtz equation based on the Feynman-Kac formula, rewriting the deterministic electromagnetic field simulation method based on matrix equation solving into a form based on stochastic path integrals. Furthermore, the stochastic algorithm for magnetotelluric simulation based on stochastic path integrals is divided into two stages: offline and online. The path matrix, boundary path matrix, and interpolation matrix are generated based on the offline stage, and the final calculation result is obtained in the online stage, realizing parallel simulation of magnetotelluric data. Compared with traditional deterministic simulation algorithms, the stochastic algorithm for magnetotelluric simulation based on stochastic path integrals in the offline-online two-stage stage proposed in the embodiments of this application can efficiently complement existing deterministic simulation algorithms. In scenarios with moderate accuracy requirements, a large number of repeated simulations, and a small number of measurement points and frequency points, the stochastic algorithm has a significant speed-up effect.
[0008] Optionally, in one embodiment of this application, the discrete matrix operation takes the form of:
[0009]
[0010] Where, N path The total number of paths in a random walk. For the average operator, Let be the path integral functional of a random particle, where j is the imaginary unit, ω is the angular frequency, μ is the permeability, and L is the unit grid length. To correspond to the random walk matrix of the entire solution domain, Let exp{} be the random walk matrix corresponding to the Robin boundary, σ be the exponentiation vector, and σ be the conductivity vector of the entire solution domain. R This is the conductivity vector corresponding to the Robin boundary.
[0011] Through the above technical solution, the application embodiment transforms the representation of random electric fields into discrete matrix operations, which can realize the "bridge" for numerical simulation. It not only solves the computability of continuous random problems, but also efficiently handles randomness.
[0012] Optionally, in one embodiment of this application, obtaining the final calculation result based on the path matrix, the boundary path matrix, and the interpolation matrix includes: performing matrix-array multiplication on the model vector to be solved and the interpolation matrix to obtain multiple interpolation vectors; and performing matrix-array multiplication on the multiple interpolation vectors, the path matrix, and the boundary path matrix according to the form of discrete matrix operations to obtain the final calculation result.
[0013] Through the above technical solution, the embodiments of this application can calculate the interpolation vector based on the interpolation matrix, and then calculate the simulation results based on the interpolation vector combined with the path matrix and boundary path matrix obtained in the offline stage, thereby realizing efficient simulation of electromagnetic fields.
[0014] Optionally, in one embodiment of this application, before recording the number of times each random walking particle passes through each grid point on the random walking grid, the method further includes: setting the random walking grid, which represents the discrete grid points of the particles' random walks; releasing multiple particles on the grid and performing random walks within the grid of the random walking grid according to the aforementioned random process, wherein when a particle reaches the Neumann boundary or Robin boundary, it bounces back to the solution region, and when it reaches the Dirichlet boundary, the particle's movement terminates, until all particles' random walks reach the Dirichlet boundary, at which point the random walk simulation terminates.
[0015] Through the above technical solutions, the embodiments of this application can make the "spatial stage" of particle motion geometrically match the real geological structure by fitting discrete grid points to complex boundaries and non-uniform medium distributions, avoiding boundary effect distortion caused by grid coarseness. Thus, it is possible to generate physically consistent and statistically reliable field distribution samples in complex geological scenes (non-uniform medium + irregular boundaries) with controllable computational cost, providing core data support for offline interpolation matrix construction and online efficient simulation, and ultimately achieving a "precision-efficiency" balance in the stochastic simulation of complex systems such as magnetotellurics.
[0016] A second aspect of this application provides a high-efficiency parallel simulation device for magnetotellurics based on stochastic path integrals, comprising: a rewriting module for solving the Helmholtz equation based on a preset Feynman-Kac formula, thereby rewriting the deterministic solution based on the solution matrix equation into a form based on stochastic path integrals; a generation module for recording the number of times all random walk particles on the random walk grid pass through each grid point during the offline preparation stage, generating a path matrix, and recording the number of times all random walk particles pass through all grid points of the Robin boundary, generating a boundary path matrix, and interpolating a preset model grid to different random walk grids to generate an interpolation matrix; and a simulation module for obtaining a discrete matrix operation form based on the stochastic path integral form during the online stage, thereby obtaining the final calculation result based on the path matrix, the boundary path matrix, and the interpolation matrix, and ending the high-efficiency parallel simulation process for magnetotellurics.
[0017] Through the above technical solutions, the embodiments of this application can solve the Helmholtz equation based on the Feynman-Kac formula, rewriting the deterministic electromagnetic field simulation method based on matrix equation solving into a form based on stochastic path integrals. Furthermore, the stochastic algorithm for magnetotelluric simulation based on stochastic path integrals is divided into two stages: offline and online. The path matrix, boundary path matrix, and interpolation matrix are generated based on the offline stage, and the final calculation result is obtained in the online stage, realizing parallel simulation of magnetotelluric data. Compared with traditional deterministic simulation algorithms, the stochastic algorithm for magnetotelluric simulation based on stochastic path integrals in the offline-online two-stage stage proposed in the embodiments of this application can efficiently complement existing deterministic simulation algorithms. In scenarios with moderate accuracy requirements, a large number of repeated simulations, and a small number of measurement points and frequency points, the stochastic algorithm has a significant speed-up effect.
[0018] Optionally, in one embodiment of this application, the discrete matrix operation takes the form of:
[0019]
[0020] Where, N path The total number of paths in a random walk. For the average operator, Let be the path integral functional of a random particle, where j is the imaginary unit, ω is the angular frequency, μ is the permeability, and L is the unit grid length. To correspond to the random walk matrix of the entire solution domain, Let exp{} be the random walk matrix corresponding to the Robin boundary, σ be the exponentiation vector, and σ be the conductivity vector of the entire solution domain. R This is the conductivity vector corresponding to the Robin boundary.
[0021] Through the above technical solution, the application embodiment transforms the representation of random electric fields into discrete matrix operations, which can realize the "bridge" for numerical simulation. It not only solves the computability of continuous random problems, but also efficiently handles randomness.
[0022] Optionally, in one embodiment of this application, the simulation module includes: a first calculation unit, configured to perform matrix-array multiplication of the model vector to be solved with the interpolation matrix to obtain multiple interpolation vectors; and a second calculation unit, configured to perform matrix-array multiplication of the multiple interpolation vectors, the path matrix, and the boundary path matrix according to the form of the discrete matrix operation to obtain the final calculation result.
[0023] Through the above technical solution, the embodiments of this application can calculate the interpolation vector based on the interpolation matrix, and then calculate the simulation results based on the interpolation vector combined with the path matrix and boundary path matrix obtained in the offline stage, thereby realizing efficient simulation of electromagnetic fields.
[0024] Optionally, in one embodiment of this application, it further includes: a setting module, used to set the random walk grid representing the discrete grid points on which the particles randomly walk before recording the number of times each random walk particle passes through each grid point on the random walk grid; and a walking module, used to release multiple particles on the grid and perform random walks within the grid of the random walk grid according to the aforementioned random process, wherein when a particle reaches the Neumann boundary or Robin boundary, it bounces back to the solution region, and when it reaches the Dirichlet boundary, the particle's movement terminates, until all particles' random walks reach the Dirichlet boundary, at which point the random walk simulation terminates.
[0025] Through the above technical solutions, the embodiments of this application can make the "spatial stage" of particle motion geometrically matched with the real geological structure by fitting discrete grid points to complex boundaries and non-uniform medium distributions, avoiding boundary effect distortion caused by grid coarseness. Thus, it is possible to generate physically consistent and statistically reliable field distribution samples in complex geological scenes (non-uniform medium + complex boundaries) at a controllable computational cost, providing core data support for offline interpolation matrix construction and efficient online simulation, and ultimately achieving a "precision-efficiency" balance in the stochastic simulation of complex systems such as magnetotellurics.
[0026] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the efficient parallel simulation method for stochastic path integral magnetotelluric simulation as described in the above embodiments.
[0027] A fourth aspect of this application provides a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described efficient parallel simulation method for stochastic path integral magnetotelluric simulation.
[0028] A fifth aspect of this application provides a computer program product that stores a computer program that, when executed by a processor, implements the above-described efficient parallel simulation method for stochastic path integral magnetotelluric simulation.
[0029] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0030] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0031] Figure 1 This is a flowchart of an efficient parallel simulation method for magnetotelluric data using stochastic path integrals, provided according to an embodiment of this application.
[0032] Figure 2 A schematic diagram of an efficient parallel simulation algorithm for magnetotelluric random path integral according to a specific embodiment of this application;
[0033] Figure 3 A flowchart of an efficient parallel simulation method for magnetotelluric random path integrals according to a specific embodiment of this application;
[0034] Figure 4 A schematic diagram of the conductivity model of a portion of the computational examples used to test the effectiveness of a high-efficiency parallel simulation method for random path integral magnetotellurics according to a specific embodiment of this application.
[0035] Figure 5 This is a schematic diagram comparing the apparent resistivity of a simulation using the stochastic path integral method and the finite difference method for a specific embodiment of this application.
[0036] Figure 6 This is a schematic diagram comparing the phase of simulations using the stochastic path integral method and the finite difference method according to a specific embodiment of this application;
[0037] Figure 7 For a specific embodiment according to this application Figure 6 A schematic diagram illustrating the test results of the proposed algorithm on a set of computational examples;
[0038] Figure 8 This is a schematic diagram of the structure of a high-efficiency parallel simulation device for random path integration according to an embodiment of this application;
[0039] Figure 9 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0040] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0041] The following describes, with reference to the accompanying drawings, an efficient parallel simulation method and apparatus for magnetotelluric equations using stochastic path integrals according to embodiments of this application. Addressing the issues of unit communication, load balancing, and I / O bottlenecks in parallel simulations of large-scale electromagnetic forward problems caused by the parallelization of existing deterministic simulation methods based on equation solving using non-parallel algorithms, this application provides an efficient parallel simulation method for magnetotelluric equations using stochastic path integrals. In this method, a random walk corresponding to the magnetotelluric control equations can be constructed using the Feynman-Kac formula, and random variables can be constructed based on the random walk, transforming the deterministic electromagnetic diffusion equations into a form where random particles perform path integration. Furthermore, the magnetotelluric simulation is divided into two stages: offline preparation and online computation. In the offline preparation stage, a random path matrix is first constructed and saved using Monte Carlo simulation, followed by the construction and saving of an interpolation matrix. In the online computation stage, the saved random path matrix and interpolation matrix are read and parallel matrix multiplication is performed on a parallel heterogeneous computing platform, achieving efficient magnetotelluric forward modeling simulation, thereby fundamentally improving the parallel simulation computation efficiency and simulation speed. This solves the problems of unit communication, load balancing, and I / O bottlenecks in the parallel simulation of large-scale electromagnetic positive problems caused by the parallelization of existing deterministic simulation methods based on solving equations using non-parallel algorithms.
[0042] Specifically, Figure 1 This is a flowchart illustrating an efficient parallel simulation method for magnetotelluric data using stochastic path integrals, provided in an embodiment of this application.
[0043] like Figure 1 As shown, this efficient parallel simulation method for magnetotelluric data using stochastic path integrals includes the following steps:
[0044] In step S101, the Helmholtz equation is solved based on the preset Feynman-Kac formula, so as to rewrite the deterministic solution based on the solution matrix equation into a form based on the stochastic path integral.
[0045] Understandably, the Stochastic Path Integral (SPI) is the mathematical representation of the Feynman-Kac formula for boundary value problems. It intuitively explains the connection between the expectation of a stochastic process and the solution of a partial differential equation from the perspective of "weighted summation over all possible stochastic paths." Furthermore, the core of the SPI can be understood as: assigning a "weight function" to each path, and then summing (integrating) the "weight × objective function" over all paths to obtain the average behavior (expectation) of the system.
[0046] Stochastic algorithms decompose the solution of electromagnetic field equations into a large number of independent subtasks, possessing inherent parallelism, low communication requirements, and strong scalability. The Feynman-Kac formula extends the deterministic Feynman integral to a probabilistic framework, providing probabilistic functional solutions to deterministic partial differential equations through stochastic path integrals. This method uses a large number of independent random walks to characterize electromagnetic field solutions, naturally possessing parallelism and scalability. For example, Chati explored the possibility of directly using SPI to solve the Helmholtz equations; Janaswamy used SPI to simulate paraxial wave propagation in homogeneous media; Budaev et al. transformed the Helmholtz equations into procedural equations and complete transport equations, and used the Feynman-Kac formula to solve the latter. However, their work did not address electromagnetic modeling involving complex boundary conditions and inhomogeneous media. In many applications (such as magnetotelluric modeling), complex boundary conditions and inhomogeneous media must be considered. The magnetotelluric data simulation method based on stochastic path integrals proposed in this application can incorporate complex boundary conditions and inhomogeneous media into magnetotelluric modeling.
[0047] Specifically, such as Figure 2 As shown, the expression for the magnetotelluric data simulation method based on the stochastic path integral form proposed in this application has the following form:
[0048] The magnetotelluric forward modeling within the computational region G can be expressed as a boundary value problem (BVP) as follows: Within region G (int(G)), we have:
[0049]
[0050] On the G boundary have:
[0051]
[0052] Where B, a, b, and f can be represented as:
[0053] B=-1 / 2jωμσ,(3)
[0054] (a,b,f)=(0,1,-jJ0)at DirichletBoundary (4)
[0055] (a,b,f)=(1,0,0)at NeumannBoundary (5)
[0056]
[0057] Where ω is the angular frequency, μ and σ are the magnetic permeability and electrical conductivity, respectively, σ varies with spatial coordinates, j is the imaginary unit, and J0 is a constant related to the source strength. The unknown to be solved is the electric field E at the receiver on the ground. x The magnetic field can be calculated by taking the derivative of the electric field.
[0058] The aforementioned BVP primarily solves a second-order partial differential equation. In this embodiment, the solution to the second-order partial differential equation can be expressed in probabilistic form according to the Feynman-Kac formula; the aforementioned BVP is accompanied by a discrete-time stochastic process Ξ. n The transition probability expression for its random variable can be:
[0059]
[0060] Where 'a' is defined as in the previous equation, 'n' is the normal direction of the boundary, and the random representation of the electric field to be determined. It can be:
[0061]
[0062] Where Ω is the sample space, P(dξ) n ξ is the probability measure in the sampling space; n It is an implementation of the stochastic process Ξ, where Ξ0 is the coordinate of the starting point of the random walking particle, and also the coordinate of the field point to be solved.
[0063] Through the above formula, the embodiments of this application can successfully transform the solution of the deterministic matrix equation into the probabilistic functional form of the path integral of the random walk.
[0064] Based on the above scheme, the embodiments of this application can extend the deterministic Feynman integral to a probabilistic framework by using the Feynman-Kac formula, and provide a probabilistic functional solution for the deterministic partial differential equation through stochastic path integrals. Furthermore, the boundary value problem is introduced during the rewriting process, which enables the electromagnetic field solution to be characterized by a large number of independent random walks. Compared with traditional algorithms, the magnetotelluric simulation method based on stochastic path integrals has endogenous parallelism and scalability. It can achieve a parallel efficiency of nearly 100% with almost no parallelization modification, and can minimize parallel loss and better compatibility with GPU computing platforms.
[0065] In step S102, during the offline preparation stage, the number of times each random walk particle passes through each grid point on the random walk grid is recorded to generate a path matrix. The number of times each random walk particle passes through all grid points of the Robin boundary is also recorded to generate a boundary path matrix. Furthermore, the preset model grid is interpolated to different random walk grids to generate an interpolation matrix.
[0066] In computer implementation, embodiments of this application can write the stochastic representation formula of the electric field to be determined as a discrete matrix operation.
[0067] Optionally, in one embodiment of this application, discrete matrix operations can be expressed as:
[0068]
[0069] Where, N path The total number of paths in a random walk. The averaging operator is the path integral functional over all random particles. Calculate the average. Let be the path integral functional of a random particle, where j is the imaginary unit, ω is the angular frequency, μ is the permeability, and L is the unit grid length. To correspond to the random walk matrix of the entire solution domain, Let exp{} be the random walk matrix corresponding to the Robin boundary, σ be the exponentiation vector, and σ be the conductivity vector of the entire solution domain. R This is the conductivity vector corresponding to the Robin boundary.
[0070] Representing random electric fields as discrete matrix operations is the core link between theoretical models and numerical simulations. Continuous random equations cannot be directly calculated by computers. After being discretized into matrix form, they can be solved using linear algebra tools (such as LU decomposition and matrix multiplication), transforming continuous electromagnetic field simulation problems into programmable numerical problems. Matrix form also facilitates the handling of randomness by combining random numerical methods (such as Monte Carlo simulation and polynomial chaotic expansion).
[0071] In summary, the embodiments of this application transform the representation of random electric fields into discrete matrix operations, which can serve as a "bridge" for numerical simulation. This solves both the computability of continuous random problems and the ability to efficiently handle randomness.
[0072] Furthermore, during the computation of the embodiments of this application, two facts were observed, namely:
[0073] a) The electromagnetic field at a certain point is greatly affected by the conductivity distribution of the surrounding area;
[0074] b) The path matrix P is independent of the conductivity vector σ.
[0075] Therefore, for the above formula, as Figure 2 As shown, this application embodiment can design an offline-online separated random simulation algorithm.
[0076] like Figure 3 As shown, in step S302, the offline stage includes:
[0077] 1) Monte Carlo simulation based on random walk;
[0078] 2) Construction of the interpolation matrix;
[0079] In step S303, the online phase includes: simulation calculation based on matrix array multiplication.
[0080] A two-stage stochastic simulation process with offline and online separation is constructed. Regarding the offline Monte Carlo simulation based on random walks, optionally, in one embodiment of this application, before recording the number of times each random walk particle traverses each grid point on the random walk grid, the process further includes: setting a random walk grid representing discrete grid points for particle random walks; releasing multiple particles on the grid and performing random walks within the grid according to the aforementioned stochastic process, wherein when a particle reaches the Neumann boundary or Robin boundary, it bounces back to the solution domain; when it reaches the Dirichlet boundary, the particle's motion terminates; and the random walk simulation terminates when all particles have reached the Dirichlet boundary.
[0081] In the offline phase, path matrices P and P' are constructed using Monte Carlo simulation. R Since it is independent of the conductivity distribution σ, it can be reused across different models σ, avoiding repeated, time-consuming Monte Carlo path simulations. In the online phase, P and P... R Once loaded into computer memory, rapid and efficient online electromagnetic field data calculation can be achieved, which is especially suitable for situations where electromagnetic fields of a large number of models are repeatedly calculated. In this stage, the handling of complex boundary conditions includes 1. the random walk motion law (as shown in equation (7)); 2. the construction of the path matrix (i.e., generating the path matrix based on the number of times all random walk particles pass through each grid point on the random walk grid; and generating the boundary path matrix by recording the number of times all random walk particles pass through all grid points of the Robin boundary). In terms of handling non-uniform media, since the construction of the path matrix and the conductivity are decoupled, there are no requirements on the conductivity distribution pattern of the model in the calculation, so the field corresponding to any non-uniform model can be calculated.
[0082] Specifically, as an achievable method, this application embodiment can set up a fixed-size random walk grid that is not deterministically associated with spatial coordinates. This grid is a discrete grid representing the random walk of particles. There are (N+m) grids in the horizontal direction and N+1 grids in the vertical direction. A large number of particles are released on the (m+1, N / 2+1) grids and perform random walks within the grid according to the random process shown in equation (7). When a particle reaches the Neumann boundary or Robin boundary, it bounces back to the solution domain. When it reaches the Dirichlet boundary, the particle's motion terminates. When all particles have reached the Dirichlet boundary, the random walk simulation terminates. The number of times each random walk particle passes through each grid point is recorded as the path matrix P, and the number of times each random walk particle passes through all grid points of the Robin boundary is recorded as the Robin boundary path matrix P. R P and P R Save it to your hard drive.
[0083] Regarding the construction of the interpolation matrix in the offline stage, specifically, as one feasible approach, this embodiment defines the simulation model on another set of model meshes related to spatial coordinates, assuming that N needs to be solved. f If there are 1 frequency point, then construct N respectively. f interpolation matrices The model mesh is interpolated onto different random walk meshes. The reason for setting up the interpolation matrix is that the spatial size of the model to be simulated is fixed. However, for electromagnetic waves of different frequencies, the skin depth of propagation in conductors is different, so the sensitivity region (i.e., the spatial size that needs to be considered in random modeling) is also different. Therefore, the same set of random walk meshes represents different spatial regions under different frequencies and receiver settings. To map the fixed model to be simulated onto random walk meshes with the same number of grid points but different spatial sizes, the model interpolation problem is necessary. Constructing the interpolation matrix separately in the offline stage is to pre-calculate the computationally intensive parts, so that during online simulation, the path matrix can be directly read, which can greatly save computation time.
[0084] For different frequencies, the physical size corresponding to the unit random walk grid is:
[0085]
[0086] The interpolation between grids is weighted by area, and the interpolation matrix is saved to the hard disk.
[0087] In step S103, during the online phase, the discrete matrix operation is obtained based on the form of stochastic path integral, so as to obtain the final calculation result according to the path matrix, boundary path matrix and interpolation matrix, thus ending the efficient parallel simulation process of magnetotellurics.
[0088] Optionally, in one embodiment of this application, obtaining the final calculation result based on the path matrix, the boundary path matrix, and the interpolation matrix includes: performing matrix-array multiplication on the model vector to be solved and the interpolation matrix to obtain multiple interpolation vectors; and performing matrix-array multiplication on the multiple interpolation vectors, the path matrix, and the boundary path matrix according to the form of discrete matrix operations to obtain the final calculation result.
[0089] The two-stage process of separating offline and online is essentially the construction of a proxy model for electromagnetic field simulation (such as a proxy model based on neural networks, which also obtains faster online inference speed through time-consuming offline training). However, the construction of the proxy model in the embodiments of this application has strict mathematical support, which can avoid the black box problem of deep learning methods.
[0090] Specifically, as one possible approach, embodiments of this application may first read the path matrices P and P R and N f The interpolation matrix is loaded onto the GPU, and the model vector to be solved is multiplied by the interpolation matrix. Matrix multiplication is performed separately according to the number of frequency points and the number of receivers to obtain N. f N r The interpolation vectors are multiplied by matrix arrays of the interpolation vectors and the path matrix according to equations (10) and (11) respectively, so as to obtain the final calculation result.
[0091] Furthermore, to verify the correctness of the stochastic path integral method, this application compares the finite difference method (FDM) with the stochastic path integral method (SPI) as follows:
[0092] First, the computational domain settings, performance index definitions, and parameter and hyperparameter configurations of the FDM and SPI solvers are introduced: the computational domain width is 5km, the depth is 3km, 12 receivers are uniformly distributed along the ground surface, and 13 operating frequencies are used, namely 0.001, 0.003, 0.01, 0.032, 0.1, 0.316, 1, 3.16, 10, 31.6, 100, 316, and 1000Hz. In this embodiment, a test model set is generated, which contains 2000 models with more complex conductivity distributions: the number of blocks ranges from 1 to 20, and the resistivity of both the background and the blocks is independently sampled from a uniform distribution U(20,100)Ωm. Figure 4 Show four example models in the test set. Figure 5 and Figure 6Plot the apparent resistivity, phase, and relative error of the random path integral and finite difference simulations, respectively. Figure 5 In response to Figure 4 The example compares the apparent resistivity simulations using the stochastic path integral method and the finite difference method; the first row represents the simulation results using the finite difference method; the second row represents the simulation results using the stochastic path integral method; and the third row represents the relative error. Figure 6 In response to Figure 4 The simulation results for the example are compared using the stochastic path integral method and the finite difference method. The first row represents the simulation results of the finite difference method; the second row represents the simulation results of the stochastic path integral method; and the third row represents the relative error. It can be observed that the results of the two methods are close, verifying the correctness of the stochastic path integral method.
[0093] Furthermore, in this embodiment, magnetotelluric profiles of 2000 models are calculated using finite difference and stochastic path integral, respectively. The counts of the 2000 relative error (MRE) histograms of the full data profile are as follows: Figure 7 As shown, Figure 7 The proposed SPI algorithm is demonstrated to converge on a set of examples, showing that the computational error converges as the number of parameters increases. With the increase of the number of SPI parameters, the mean relative error (MRE) of apparent resistivity, phase, and full data profile decreases by 66%, 30%, and 51%, respectively, proving that the SPI algorithm converges with the increase of parameter size.
[0094] Furthermore, this application embodiment compares simulations of finite difference and stochastic path integral with similar relative computational errors: when the relative error is 1.2%, the online computation time of stochastic path integral on the GPU is 0.032 seconds, while the computation time of finite difference on the GPU is about 17 seconds. Compared with GPU-based finite difference, it achieves an acceleration of more than 550 times, while its memory usage is only about 70% of that of finite difference.
[0095] Furthermore, this application embodiment compares another set of random path integrals and finite difference integrals with similar relative errors: when the average error is 0.58%, the online computation of random path integrals achieves an acceleration of about 5 times compared to GPU-based finite difference integrals.
[0096] In summary, the efficient parallel magnetotelluric simulation method based on stochastic path integrals is an intrinsically parallel simulation algorithm that can achieve nearly 100% parallel efficiency without special optimization. Compared with traditional equation-solving algorithms, it is better adapted to parallel computing platforms. The algorithm can fully convert computational resources into computational speed, achieving a significant acceleration of computation. Compared with deterministic equation-solving methods, it has better scalability, and compared with deep learning methods, it has physical interpretability and lower generalization risk. It also shows stable performance for different models.
[0097] The efficient parallel simulation method for magnetotelluric equations based on stochastic path integrals proposed in this application can utilize the Feynman-Kac formula to construct a random walk corresponding to the magnetotelluric control equations. Random variables are then constructed based on the random walk, transforming the deterministic electromagnetic diffusion equations into path integrals performed by random particles. Furthermore, the magnetotelluric simulation is divided into two stages: offline preparation and online computation. In the offline preparation stage, a random path matrix is first constructed and saved using Monte Carlo simulation, followed by the construction and saving of an interpolation matrix. In the online computation stage, the saved random path matrix and interpolation matrix are read and parallel matrix multiplication is performed on a parallel heterogeneous computing platform, achieving efficient magnetotelluric forward modeling simulation. This fundamentally improves the efficiency and speed of parallel simulation computation. Therefore, it solves the problems of unit communication, load balancing, and I / O bottlenecks in the parallel simulation of large-scale electromagnetic forward problems caused by the parallelization of existing deterministic simulation methods based on equation solving using non-parallel algorithms.
[0098] Next, refer to the appendix. Figure 8 This application describes a high-efficiency parallel simulation device for stochastic path integral magnetotelluric simulation based on embodiments of the present application.
[0099] Figure 8 This is a block diagram of a high-efficiency parallel simulation device for stochastic path integral magnetotelluric simulation according to an embodiment of this application.
[0100] like Figure 8 As shown, the high-efficiency parallel simulation device for magnetotelluric simulation of random path integrals 10 includes: a rewriting module 100, a generation module 200, and a simulation module 300.
[0101] The rewriting module 100 is used to solve the Helmholtz equation based on the preset Feynman-Kac formula, so as to rewrite the deterministic solution based on the solution matrix equation into a form based on the stochastic path integral.
[0102] The generation module 200 is used in the offline preparation stage to record the number of times all random walk particles pass through each grid point on the random walk grid, generate a path matrix, record the number of times all random walk particles pass through all grid points of the Robin boundary, generate a boundary path matrix, and interpolate the preset model grid to different random walk grids to generate an interpolation matrix.
[0103] The simulation module 300 is used in the online stage to obtain discrete matrix operations based on the form of stochastic path integrals, so as to obtain the final calculation results based on the path matrix, boundary path matrix and interpolation matrix, thus ending the efficient parallel simulation process of magnetotellurics.
[0104] Optionally, in one embodiment of this application, the discrete matrix operation takes the form of:
[0105]
[0106] Where, N path The total number of paths in a random walk. The averaging operator is the path integral functional over all random particles. Calculate the average. Let be the path integral functional of a random particle, where j is the imaginary unit, ω is the angular frequency, μ is the permeability, and L is the unit grid length. To correspond to the random walk matrix of the entire solution domain, Let exp{} be the random walk matrix corresponding to the Robin boundary, σ be the exponentiation vector, and σ be the conductivity vector of the entire solution domain. R This is the conductivity vector corresponding to the Robin boundary.
[0107] Optionally, in one embodiment of this application, the simulation module 300 includes: a first calculation unit and a second calculation unit; wherein, the first calculation unit is used to perform matrix-array multiplication of the model vector to be solved with the interpolation matrix to obtain multiple interpolation vectors; the second calculation unit is used to perform matrix-array multiplication of the multiple interpolation vectors, the path matrix and the boundary path matrix according to the form of discrete matrix operations to obtain the final calculation result.
[0108] Optionally, in one embodiment of this application, the efficient parallel simulation device 10 for random path integral magnetotellurics further includes: a setting module and a walking module; wherein, the setting module is used to set a random walking grid representing discrete grid points for random walking of particles before recording the number of times all random walking particles pass through each grid point on the random walking grid; the walking module is used to release multiple particles on the grid and perform random walking within the grid of the random walking grid according to the previous random process, wherein when a particle reaches the Neumann boundary or Robin boundary, it bounces back to the solution region, and when it reaches the Dirichlet boundary, the particle's movement terminates, until all particles' random walking reaches the Dirichlet boundary, at which point the random walking simulation terminates.
[0109] It should be noted that the foregoing explanation of the embodiment of the efficient parallel simulation method for stochastic path integral magnetotellurics also applies to the efficient parallel simulation device for stochastic path integral magnetotellurics in this embodiment, and will not be repeated here.
[0110] The efficient parallel simulation device for magnetotelluric equations based on stochastic path integrals proposed in this application can construct a random walk corresponding to the magnetotelluric control equations using the Feynman-Kac formula, and construct random variables based on the random walk, thus rewriting the deterministic electromagnetic diffusion equations as path integrals performed by random particles. Furthermore, the magnetotelluric simulation is divided into two stages: offline preparation and online computation. In the offline preparation stage, a random path matrix is first constructed and saved using Monte Carlo simulation, followed by the construction and saving of an interpolation matrix. In the online computation stage, the saved random path matrix and interpolation matrix are read and parallel matrix multiplication is performed on a parallel heterogeneous computing platform, achieving efficient magnetotelluric forward modeling simulation. This fundamentally improves the efficiency and speed of parallel simulation computation. Therefore, it solves the problems of unit communication, load balancing, and I / O bottlenecks in the parallel simulation of large-scale electromagnetic forward problems caused by the parallelization of existing deterministic simulation methods based on equation solving using non-parallel algorithms.
[0111] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:
[0112] The memory 901, the processor 902, and the computer program stored on the memory 901 and capable of running on the processor 902.
[0113] When the processor 902 executes the program, it implements the efficient parallel simulation method for magnetotelluric random path integrals provided in the above embodiments.
[0114] Furthermore, electronic devices also include:
[0115] Communication interface 903 is used for communication between memory 901 and processor 902.
[0116] The memory 901 is used to store computer programs that can run on the processor 902.
[0117] The memory 901 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0118] If the memory 901, processor 902, and communication interface 903 are implemented independently, then the communication interface 903, memory 901, and processor 902 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0119] Optionally, in a specific implementation, if the memory 901, processor 902, and communication interface 903 are integrated on a single chip, then the memory 901, processor 902, and communication interface 903 can communicate with each other through an internal interface.
[0120] The processor 902 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0121] This application also provides a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described efficient parallel simulation method for stochastic path integral magnetotelluric simulation.
[0122] This application also provides a computer program product storing a computer program that, when executed by a processor, implements the above-mentioned efficient parallel simulation method for magnetotelluric simulation using stochastic path integrals.
[0123] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0124] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0125] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0126] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0127] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0128] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0129] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0130] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A highly efficient parallel simulation method for magnetotelluric data based on stochastic path integrals, characterized in that, Includes the following steps: Based on the pre-defined Feynman-Kac formula, the Helmholtz equation is solved to rewrite the deterministic solution based on the solution matrix equation into a form based on stochastic path integrals. During the offline preparation phase, the number of times each random walk particle passes through each grid point on the random walk grid is recorded to generate a path matrix. The number of times each random walk particle passes through all grid points on the Robin boundary is also recorded to generate a boundary path matrix. Furthermore, the preset model grid is interpolated to different random walk grids to generate an interpolation matrix. In the online phase, based on the form of random path integral, a discrete matrix operation is obtained, and the final calculation result is obtained according to the path matrix, the boundary path matrix and the interpolation matrix, thus ending the efficient parallel simulation process of magnetotellurics.
2. The method according to claim 1, characterized in that, The discrete matrix operation takes the form of: Where, N path Let be the total number of paths taken in a random walk. For the average operator, Let be the path integral functional of a random particle, j be the imaginary unit, ∈ be the angular frequency, μ be the permeability, and L be the unit grid length. To correspond to the random walk matrix of the entire solution domain, Let exp{} be the random walk matrix corresponding to the Robin boundary, σ be the exponentiation vector, and σ be the conductivity vector of the entire solution domain. R This is the conductivity vector corresponding to the Robin boundary.
3. The method according to claim 1, characterized in that, The step of obtaining the final calculation result based on the path matrix, the boundary path matrix, and the interpolation matrix includes: The model vector to be solved is multiplied by the interpolation matrix to obtain multiple interpolation vectors; The final calculation result is obtained by performing matrix multiplication of the interpolation vectors, the path matrix, and the boundary path matrix according to the form of discrete matrix operations.
4. The method according to claim 1, characterized in that, Before recording the number of times each random walk particle traverses each grid point on the random walk grid, the following is also included: The random walk grid is defined by setting discrete grid points that characterize the random walk of particles. Multiple particles are released on the grid and perform random walks within the grid according to the previous random process. When a particle reaches the Neumann boundary or Robin boundary, it bounces back to the solution domain. When it reaches the Dirichlet boundary, the particle's motion terminates. The random walk simulation terminates when all particles have reached the Dirichlet boundary.
5. A high-efficiency parallel simulation device for magnetotellurics based on stochastic path integrals, characterized in that, include: The rewrite module is used to solve the Helmholtz equation based on the preset Feynman-Kac formula, so as to rewrite the deterministic solution based on the solution matrix equation into a form based on the stochastic path integral. The generation module is used in the offline preparation stage to record the number of times all random walk particles pass through each grid point on the random walk grid, generate a path matrix, record the number of times all random walk particles pass through all grid points of the Robin boundary, generate a boundary path matrix, and interpolate the preset model grid to different random walk grids to generate an interpolation matrix. The simulation module is used in the online phase to obtain discrete matrix operations based on the form of random path integral, so as to obtain the final calculation result according to the path matrix, the boundary path matrix and the interpolation matrix, and end the efficient parallel simulation process of magnetotellurics.
6. The apparatus according to claim 5, characterized in that, The discrete matrix operation takes the form of: Where, N path Let be the total number of paths taken in a random walk. For the average operator, Let be the path integral functional of a random particle, where j is the imaginary unit, ω is the angular frequency, μ is the permeability, and L is the unit grid length. To correspond to the random walk matrix of the entire solution domain, Let exp{} be the random walk matrix corresponding to the Robin boundary, σ be the exponentiation vector, and σ be the conductivity vector of the entire solution domain. R This is the conductivity vector corresponding to the Robin boundary.
7. The apparatus according to claim 5, characterized in that, The simulation module includes: The first calculation unit is used to perform matrix-array multiplication between the model vector to be solved and the interpolation matrix to obtain multiple interpolation vectors; The second calculation unit is used to perform matrix-array multiplication of the interpolation vectors and the path matrix on the plurality of interpolation vectors, the path matrix and the boundary path matrix according to the form of the discrete matrix operation, so as to obtain the final calculation result.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the efficient parallel simulation method for stochastic path integral magnetotelluric simulation as described in any one of claims 1-4.
9. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the efficient parallel simulation method for magnetotelluric random path integrals as described in any one of claims 1-4.
10. A computer program product, comprising a computer program, characterized in that, The computer program is executed to implement the efficient parallel simulation method for magnetotelluric random path integrals as described in any one of claims 1-4.