A method for magnetic dipole model inversion based on spatiotemporal feature fusion neural network

CN122818930APending Publication Date: 2026-09-25HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610996419.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

传统反演方法(如Levenberg-Marquardt非线性优化、多极子展开法)通常依赖于复杂的初始值设定,且在动态旋转场景下计算效率低,难以应对高噪声干扰

Benefits of technology

(1)在磁偶极子反演中,通过记录磁偶极子的旋转时的磁场数据,引入时间特征;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122818930A_ABST
    Figure CN122818930A_ABST
Patent Text Reader

Abstract

The application provides a magnetic dipole model inversion method based on a space-time feature fusion neural network, belongs to the technical field of magnetic field measurement and signal processing, and constructs a dynamic rotating magnetic field forward data set; magnetic field data in the rotating process of a magnetic dipole around a fixed shaft is acquired through a magnetic sensor array, so that the forward data set simultaneously has spatial distribution characteristics and time sequence characteristics; the data set is cut into a training set and a verification set, data standardization and leakage prevention processing are performed; a space-time feature fusion neural network is constructed to capture the space-time features of the magnetic dipole inversion; a weighted loss function is used to optimize and train the model; the trained model is subjected to verification and stress testing to verify the inversion effect. Compared with a traditional fully connected layer neural network, the method provided by the application can more accurately calculate the position and magnetic moment of the magnetic dipole under the premise of the same training data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of magnetic field measurement and signal processing technology, specifically, it relates to a magnetic dipole model inversion method based on a spatiotemporal feature fusion neural network. Background Technology

[0002] With the rapid development of magnetic target detection technology, magnetic field modeling and inversion have demonstrated significant application value in military, marine, aerospace, and industrial inspection fields. The magnetic dipole model, as a classic method of magnetic field equivalence, is widely used to describe the magnetic field characteristics of various magnetic targets due to its clear physical meaning and relatively simple calculation.

[0003] Magnetic dipole localization inversion has significant application value in fields such as medical device tracking, industrial non-destructive testing, and underground target detection. Traditional inversion methods (such as Levenberg-Marquardt nonlinear optimization and multipole expansion methods) typically rely on complex initial value settings and suffer from low computational efficiency in dynamic rotation scenarios, making them difficult to handle high noise interference. In recent years, although deep learning has been introduced into magnetic field inversion, existing models often neglect the physical correlation between multi-axis data from magnetic sensors and the temporal characteristics of the target during rotation, resulting in insufficient localization accuracy and generalization ability in complex dynamic environments. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention proposes a magnetic dipole model inversion method based on a spatiotemporal feature fusion neural network. It utilizes grouped convolution to extract multi-axis physical features of a single sensor and combines bidirectional cyclic gate units (Bi-GRU) to capture the temporal dynamic features of magnetic source rotation.

[0005] This invention is achieved through the following technical solution: a magnetic dipole model inversion method based on a spatiotemporal feature fusion neural network, the method specifically including the following steps: Step 1, construct a dynamic rotating magnetic field forward modeling dataset: acquire magnetic field data during the rotation of a magnetic dipole around a fixed axis using a magnetic sensor array to obtain a forward modeling dataset that simultaneously possesses spatial distribution characteristics and time series characteristics; Step 2: Divide the dataset into training and validation sets, and perform data standardization and leakage prevention measures. Step 3: Construct a spatiotemporal feature fusion neural network to capture the spatiotemporal features of magnetic dipole inversion; Step 4: Optimize and train the model using a weighted loss function; Step 5: Perform validation and stress testing on the trained model to verify the inversion effect.

[0006] Further, in step 1, A magnetic sensor array with a cubic layout is arranged, the magnetic sensor array containing a total of 8 magnetic sensors, which are respectively set at the 8 vertices of the cube; the spatial coordinates of the magnetic dipoles are randomly generated in the cube space, and the magnetic moment direction of the magnetic dipoles is set along the x-axis; Simulate the process of a magnetic dipole rotating around the z-axis for one revolution, and generate a rotation angle sequence corresponding to multiple time steps according to a preset angle step size; Based on the magnetic dipole magnetic field calculation formula, the three-axis magnetic field components of each magnetic sensor in spherical coordinates are calculated at each time step. The magnetic field components in spherical coordinates are converted into three magnetic field components in Cartesian coordinates. Standard Gaussian white noise is added to the obtained magnetic field data to finally obtain the dynamic rotating magnetic field forward modeling dataset.

[0007] Furthermore, in step 2, The ratio of training set to validation set data volume is 9:1. The mean and standard deviation of the training set are calculated, and these statistics are used to normalize the validation set and test set to prevent information leakage during the data validation phase.

[0008] Furthermore, in step 3, the spatiotemporal feature fusion neural network specifically comprises: Group convolutions in the spatial feature layer are used to extract local sensor features, while residuals are used to extract higher-order spatial relationship features. The residual evolution layer extracts high-order features through multiple residual blocks and uses residual connections to solve the gradient vanishing problem in deep networks. The temporal extraction layer introduces a bidirectional recurrent gate unit network to perform omnidirectional scanning of the rotation sequence and capture the dynamic trajectory features of the magnetic source motion; The regression output layer uses a fully connected network to map spatiotemporal features into three spatial coordinates and one magnetic moment parameter.

[0009] Furthermore, in step 4, The error weighting optimization strategy is learned by training with the mean square error loss function and setting different weighting factors for the position prediction error and magnetic moment prediction error, as shown in Equation (13): (13) In the formula, MSE 位置 and MSR 磁矩 These are the mean square errors of position and magnetic moment, respectively. w 位置 and w 磁矩 These are the error weights corresponding to position and magnetic moment, respectively; by adjusting the weight coefficients... w 位置 and w 磁矩 Optimize the positional accuracy and magnetic moment accuracy.

[0010] Furthermore, in step 5, An early stopping mechanism is introduced, which dynamically adjusts the learning rate based on the validation set loss and saves the optimal model. Stress tests were conducted using novel simulation data to statistically analyze the distribution of average distance error and magnetic moment error.

[0011] A magnetic dipole model inversion system based on a spatiotemporal feature fusion neural network; The system includes a data acquisition module, a standardization module, a spatiotemporal feature fusion neural network module, a training module, and a verification module; The data acquisition module constructs a dynamic rotating magnetic field forward modeling dataset: it acquires magnetic field data during the rotation of a magnetic dipole around a fixed axis using a magnetic sensor array, thus obtaining a forward modeling dataset that simultaneously possesses spatial distribution characteristics and time series characteristics. The standardization module divides the dataset into training and validation sets, and performs data standardization and leakage prevention. The spatiotemporal feature fusion neural network module is used to capture the spatiotemporal features of magnetic dipole inversion; The training module uses a weighted loss function to optimize and train the model; The verification module performs verification and stress testing on the trained model to verify the inversion effect.

[0012] A computer device system includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method. A computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0013] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the method described above.

[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) In magnetic dipole inversion, time characteristics are introduced by recording the magnetic field data when the magnetic dipole rotates; (2) The spatial distribution characteristics of magnetic field data between various sensors are captured by convolutional layers, and the temporal series characteristics of magnetic field data are captured by bidirectional gated recurrent units; (2) The initial convolutional layer uses a group convolutional layer, and the subsequent convolutional layers use a fully convolutional layer, so that the initial convolutional layer focuses on capturing the independent characteristics of the sensor, and then the spatial feature interaction between different sensors is realized through the fully convolutional layer. (3) Compared with traditional fully connected layer neural networks, the method proposed in this invention can calculate the position and magnetic moment of magnetic dipoles more accurately under the same training data. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the magnetic sensor arrangement and magnetic dipole inversion of the present invention; Figure 2 A comparison graph showing the changes in position and magnetic moment loss values ​​over the training process; Figure 3 A comparison chart showing the change of the total loss value of the training set and validation set as a result of the training process; Figure 4 A comparison chart of the accuracy of magnetic dipole position inversion; Figure 5 This is a comparison chart of the accuracy of magnetic moment inversion for magnetic dipoles. Detailed Implementation

[0016] 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 embodiments of the present invention, and not all embodiments. 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.

[0017] Unless otherwise specified, the experimental methods used in the following examples are conventional methods. Unless otherwise specified, the materials, reagents, methods, and instruments used are all conventional materials, reagents, methods, and instruments in the art, and can be obtained commercially by those skilled in the art.

[0018] This invention discloses a dynamic inversion method for rotating magnetic dipoles, specifically including the following steps: Step 1: Construct a dynamic rotating magnetic field forward modeling dataset Define the sensor array coordinates, using a cubic layout with a total of 8 magnetic sensors distributed at the vertices of a 2m side length cube, as follows. Figure 1 As shown; Randomly generate the spatial position of the magnetic dipole ( x 0, y 0, z 0) and the magnitude of the magnetic moment m x The positions of the magnetic dipoles are randomly generated within a cube with sides of 1m, and the direction of the magnetic moment points to... x The axis has a size range of 0.1 A. m 2 -1 A m 2 .

[0019] Compared to traditional magnetic dipole inversion methods, this method simulates the magnetic dipole's rotation... z The rotation of the axis generates a sequence of rotation angles over several time steps. Through this inversion arrangement, the recorded magnetic field data possesses not only the spatial characteristics of the eight magnetic sensors but also the temporal characteristics generated during one rotation of the magnetic dipole. Subsequently, convolution and bidirectional recurrent gates can be used to capture the spatial and temporal characteristics, respectively.

[0020] Based on the magnetic dipole magnetic field calculation formula, the triaxial magnetic flux density of each sensor at each time step is vectorized and calculated. B x , B y , B z ); the following are examples of... x Formula for calculating the magnetic field produced in space by a magnetic dipole with axial magnetic moment: (1) (2) (3) (4) (5) (6) in, B r , B θ and B It is the triaxial magnetic moment component generated by the magnetic dipole at the magnetic sensor. μ 0 is the permeability of air. r It is the distance between the magnetic dipole and the magnetic sensor. θ and φ These are the pitch and azimuth angles of the magnetic sensor relative to the magnetic dipole. m It is a magnetic dipole x Magnetic moment components in the axial direction, ( x 0, y 0, z 0) is the spatial coordinate of the magnetic dipole, ( x s , y s , z s ) are the spatial coordinates of the magnetic sensor.

[0021] Make the magnetic dipole zAs the axis gradually rotates 360 degrees clockwise, the magnetic field generated at the magnetic sensor by the device under test due to this rotation can be expressed as: (7) (8) (9) in, B' r , B' θ and B' These are the three components of the magnetic field generated when a magnetic dipole rotates. α This represents the rotation angle of the magnetic dipole. If a data point is recorded every 10 degrees, then each sensor records 36 magnetic field data points that present a time-series pattern.

[0022] The three components of the magnetic field in spherical coordinates are transformed into three components of the magnetic field in Cartesian coordinates, as shown below: (10) (11) (12) The above formula can be used to calculate the input magnetic field data used to train the neural network. Standard Gaussian white noise is added to the magnetic field data to simulate real-world application scenarios.

[0023] Step 2: Data Standardization and Leakage Prevention: The dataset is split into a training set and a validation set, with a data volume ratio of 9:1. The mean and standard deviation of the training set are calculated, and these statistics are used to normalize the validation and test sets to prevent information leakage during the data validation phase.

[0024] Step 3: Construct a spatiotemporal feature fusion neural network Spatial Feature Layer: First, 1D grouped convolution is used to group the input channels according to the number of sensors (each group has 3 channels, corresponding to...). B x , B y , B z This approach specifically extracts inter-axis correlation features from individual sensors, allowing the initial convolutional layers to focus on capturing sensor-independent characteristics. Subsequently, several deep residual networks are added, each containing convolutional layers, to enable the interaction of spatial features between different sensors, providing global feature extraction capabilities across sensors. In other words, group convolutions are used to extract local sensor features, while residuals extract higher-order spatial relationship features.

[0025] Residual Evolution Layer: High-order features are extracted through multiple layers of residual blocks, and residual connections are used to solve the gradient vanishing problem in deep networks; Temporal extraction layer: A bidirectional cyclic gate unit network is introduced to perform omnidirectional scanning of the rotation sequence and capture the dynamic trajectory features of the magnetic source motion; Regression output layer: A fully connected network is used to map spatiotemporal features into a 4-dimensional physical parameter vector (3 spatial coordinates and 1 magnetic moment parameter).

[0026] Thus, this invention has gradually achieved spatiotemporal feature capture of magnetic dipole inversion through convolutional layers, bidirectional gated recurrent units, and fully connected layers.

[0027] Step 4: Weighted loss function optimization training The model is trained using the mean squared error (MSE) loss function, and different weighting factors are set for the position prediction error and the magnetic moment prediction error, respectively, to learn an error weighting optimization strategy, as shown in Equation (13): (13) In the formula, MSE 位置 and MSR 磁矩 These are the mean square errors of position and magnetic moment, respectively. w 位置 and w 磁矩 These are the error weights corresponding to position and magnetic moment, respectively. By adjusting the weighting coefficients... w 位置 and w 磁矩, The optimization direction of positional accuracy and magnetic moment accuracy can be adjusted.

[0028] Step 5: Model Validation and Stress Testing An early stopping mechanism is introduced, which dynamically adjusts the learning rate based on the validation set loss and saves the optimal model. Stress tests were conducted using entirely new, never-before-seen simulation data to statistically analyze the distribution of average distance error and magnetic moment error.

[0029] Figures 2 to 5 In the middle, the left figure shows the training data of the method proposed in this invention—convolution + bidirectional recurrent gate unit = 10,000 × 20 rotation steps / unit; the right figure shows the training data of the traditional fully connected layer neural network method = 200,000. The arrangement of magnetic sensors, the distribution range of magnetic dipoles, the number of convolutional layers and fully connected layers, and the number of bidirectional gated recurrent units in the above magnetic dipole inversion model can all be changed according to the application conditions. Modifications based on the above method include, but are not limited to, adding attention mechanisms, learning rate scheduling methods, and loss function calculation methods.

[0030] A computer device system includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method. A computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0031] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the method described above.

[0032] The memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the methods described in this invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0033] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired means such as coaxial cable, optical fiber, digital subscriber line, DSL, or wireless means such as infrared, wireless, microwave, etc. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium such as a floppy disk, hard disk, magnetic tape; an optical medium such as a high-density digital video disc, DVD; or a semiconductor medium such as a solid-state disk, SSD, etc.

[0034] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.

[0035] It should be noted that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied as execution by a hardware decoding processor, or as execution by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0036] The foregoing has provided a detailed description of the magnetic dipole model inversion method based on spatiotemporal feature fusion neural network proposed in this invention, and has elucidated the principles and implementation methods of this invention. The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A magnetic dipole model inversion method based on a spatiotemporal feature fusion neural network, characterized in that: The method specifically includes the following steps: Step 1, construct a dynamic rotating magnetic field forward modeling dataset: acquire magnetic field data during the rotation of a magnetic dipole around a fixed axis using a magnetic sensor array to obtain a forward modeling dataset that simultaneously possesses spatial distribution characteristics and time series characteristics; Step 2: Divide the dataset into training and validation sets, and perform data standardization and leakage prevention measures. Step 3: Construct a spatiotemporal feature fusion neural network to capture the spatiotemporal features of magnetic dipole inversion; Step 4: Optimize and train the model using a weighted loss function; Step 5: Perform validation and stress testing on the trained model to verify the inversion effect.

2. The method according to claim 1, characterized in that: In step 1, A magnetic sensor array with a cubic layout is arranged, the magnetic sensor array containing a total of 8 magnetic sensors, which are respectively set at the 8 vertices of the cube; the spatial coordinates of the magnetic dipoles are randomly generated in the cube space, and the magnetic moment direction of the magnetic dipoles is set along the x-axis; Simulate the process of a magnetic dipole rotating around the z-axis for one revolution, and generate a rotation angle sequence corresponding to multiple time steps according to a preset angle step size; Based on the magnetic dipole magnetic field calculation formula, the three-axis magnetic field components of each magnetic sensor in spherical coordinates are calculated at each time step. The magnetic field components in spherical coordinates are converted into three magnetic field components in Cartesian coordinates. Standard Gaussian white noise is added to the obtained magnetic field data to finally obtain the dynamic rotating magnetic field forward modeling dataset.

3. The method according to claim 2, characterized in that: In step 2, The ratio of training set to validation set data volume is 9:

1. The mean and standard deviation of the training set are calculated, and these statistics are used to normalize the validation set and test set to prevent information leakage during the data validation phase.

4. The method according to claim 3, characterized in that: In step 3, the spatiotemporal feature fusion neural network is specifically as follows: Group convolutions in the spatial feature layer are used to extract local sensor features, while residuals are used to extract higher-order spatial relationship features. The residual evolution layer extracts high-order features through multiple residual blocks and uses residual connections to solve the gradient vanishing problem in deep networks. The temporal extraction layer introduces a bidirectional recurrent gate unit network to perform omnidirectional scanning of the rotation sequence and capture the dynamic trajectory features of the magnetic source motion; The regression output layer uses a fully connected network to map spatiotemporal features into three spatial coordinates and one magnetic moment parameter.

5. The method according to claim 4, characterized in that: In step 4, The error weighting optimization strategy is learned by training with the mean square error loss function and setting different weighting factors for the position prediction error and magnetic moment prediction error, as shown in Equation (13): (13) In the formula, MSE 位置 and MSR 磁矩 These are the mean square errors of position and magnetic moment, respectively. w 位置 and w 磁矩 These are the error weights corresponding to position and magnetic moment, respectively; By adjusting the weighting coefficients w 位置 and w 磁矩 Optimize the positional accuracy and magnetic moment accuracy.

6. The method according to claim 5, characterized in that: In step 5, An early stopping mechanism is introduced, which dynamically adjusts the learning rate based on the validation set loss and saves the optimal model. Stress tests were conducted using novel simulation data to statistically analyze the distribution of average distance error and magnetic moment error.

7. A magnetic dipole model inversion system based on a spatiotemporal feature fusion neural network, characterized in that: The system is applied to the magnetic dipole model inversion method based on spatiotemporal feature fusion neural network as described in any one of claims 1 to 6; The system includes a data acquisition module, a standardization module, a spatiotemporal feature fusion neural network module, a training module, and a verification module. The data acquisition module constructs a dynamic rotating magnetic field forward modeling dataset: it acquires magnetic field data during the rotation of a magnetic dipole around a fixed axis using a magnetic sensor array, thus obtaining a forward modeling dataset that simultaneously possesses spatial distribution characteristics and time series characteristics. The standardization module divides the dataset into training and validation sets, and performs data standardization and leakage prevention. The spatiotemporal feature fusion neural network module is used to capture the spatiotemporal features of magnetic dipole inversion; The training module uses a weighted loss function to optimize and train the model; The verification module performs verification and stress testing on the trained model to verify the inversion effect.

8. A computer device system, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that, When executed by a processor, the computer program instructions implement the steps of the method according to any one of claims 1 to 6.