Method and device for constructing a magnetic resonance while drilling magnet, equipment and medium

By constructing an optimization objective function using intelligent prediction models and optimization algorithms, the problem of magnetic field non-uniformity of the nuclear magnetic resonance magnet in the target detection area during drilling was solved, thereby improving the magnet design efficiency and measurement accuracy.

CN122389666APending Publication Date: 2026-07-14CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA UNIV OF PETROLEUM (BEIJING)
Filing Date
2026-06-12
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In existing drilling nuclear magnetic resonance technology, the non-uniformity of the static magnetic field distribution of the magnet in the target detection area seriously affects the measurement accuracy and signal-to-noise ratio. Traditional optimization methods are time-consuming and inefficient, and it is difficult to take into account the field uniformity in both the cross-sectional and axial profile directions.

Method used

A pre-trained intelligent prediction model is used to construct an optimization objective function, and a preset optimization algorithm is used to calculate the optimal uniform magnetic sheet arrangement. The intelligent prediction model and optimization algorithm reduce the iteration time of traditional finite element simulation and improve the efficiency of uniform design.

Benefits of technology

It significantly improves the magnetic field uniformity of the magnet within the target detection area, reduces the design cycle, and enhances measurement accuracy and signal-to-noise ratio.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122389666A_ABST
    Figure CN122389666A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, equipment and medium for constructing a magnetic body of a nuclear magnetic resonance while drilling. The method comprises: obtaining an initial non-uniform field in a target detection area; superimposing a predicted compensation magnetic field output by a pre-trained intelligent prediction model and the initial non-uniform field to obtain a synthetic magnetic field; constructing an optimization objective function based on a deviation between the synthetic magnetic field and a target uniform field; calculating an optimal uniform field magnetic sheet arrangement configuration based on the optimization objective function and a preset optimization algorithm; and deploying the uniform field magnetic sheet according to the optimal uniform field magnetic sheet arrangement configuration. Thus, the optimization objective function is constructed by the intelligent prediction model, and the optimal uniform field magnetic sheet arrangement configuration is obtained by combining the preset optimization algorithm, thereby significantly reducing the high time consumption of traditional finite element simulation iteration and improving the uniform field design efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of nuclear magnetic resonance (NMR) technology during drilling, and in particular to a method, apparatus, equipment, and medium for constructing NMR magnets during drilling. Background Technology

[0002] Nuclear magnetic resonance (NMR) technology while drilling has significant application value in the field of oil and gas exploration and development, enabling real-time acquisition of key information such as formation porosity, permeability, and fluid properties during drilling. One of the core components of a NMR instrument while drilling is the magnet system, whose task is to generate a uniform and stable static magnetic field within the target detection area. However, due to constraints such as the compact structure under drilling conditions, manufacturing errors, assembly errors, and temperature effects, the initial static magnetic field generated by the actual magnet within the target detection area often exhibits a significant non-uniform distribution, severely affecting measurement accuracy and signal-to-noise ratio.

[0003] Existing technologies are mainly passive shimming design techniques based on simulation analysis and traditional optimization methods. That is, first, a magnet structure model is established, and then, for different combinations of shimming magnetic sheet arrangement parameters, the magnetic field distribution results generated by different schemes are calculated using finite element analysis, magnetic dipole approximation method or permanent magnet analytical model. On this basis, a better shimming scheme is found through trial and error, empirical adjustment or by using traditional optimization methods such as genetic algorithm, simulated annealing, and particle swarm optimization.

[0004] However, existing technologies still have significant shortcomings in engineering applications. For example, traditional methods often require simulation and solution of a large number of candidate solutions one by one, which is costly for each simulation evaluation and results in a long overall design cycle. Traditional optimization methods are mostly gradient-free search methods, which usually require a large number of function evaluations to gradually approach the optimal solution. They have problems such as slow convergence speed, susceptibility to the influence of initial values ​​and algorithm parameters, and low optimization efficiency. Although traditional methods can improve the local field distribution in the target area to a certain extent, there is still a lack of a systematic and efficient technical solution for how to simultaneously take into account the field uniformity in the cross-sectional direction and the axial profile direction, how to expand the effective sweet spot region, and how to achieve fast field shimming design through data-driven methods. Summary of the Invention

[0005] To address the aforementioned technical problems, this disclosure provides a method, apparatus, equipment, and medium for constructing a nuclear magnetic resonance magnet while drilling.

[0006] In a first aspect, this disclosure provides a method for constructing a nuclear magnetic resonance magnet while drilling, including: Obtain the initial non-uniform field within the target detection area; The synthesized magnetic field is obtained by superimposing the predicted compensation magnetic field output by the pre-trained intelligent prediction model and the initial non-uniform field, and an optimization objective function is constructed based on the deviation metric between the synthesized magnetic field and the target uniform field. The optimal uniform magnetic sheet arrangement configuration is calculated based on the aforementioned objective function and the preset optimization algorithm. The shimming magnetic sheets are deployed according to the optimal shimming magnetic sheet arrangement configuration.

[0007] Secondly, this disclosure provides a drilling-while-drilling nuclear magnetic resonance magnet construction apparatus, comprising: The first acquisition module is used to acquire the initial non-uniform field within the target detection area; The first construction module is used to obtain a synthetic magnetic field by superimposing the predicted compensation magnetic field output by the pre-trained intelligent prediction model and the initial non-uniform field, and to construct an optimization objective function based on the deviation metric between the synthetic magnetic field and the target uniform field. The first calculation module is used to calculate the optimal uniform magnetic sheet arrangement configuration based on the optimization objective function and the preset optimization algorithm. The magnetic sheet deployment module is used to deploy the shimming magnetic sheet according to the optimal shimming magnetic sheet arrangement configuration.

[0008] Thirdly, this disclosure provides a drilling-while-drilling nuclear magnetic resonance magnet construction device, comprising: processor; Memory, used to store executable instructions; The processor is used to read executable instructions from memory and execute the executable instructions to implement the drilling-while-drilling nuclear magnetic resonance magnet construction method of the first aspect.

[0009] Fourthly, this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the drilling-while-drilling nuclear magnetic resonance magnet construction method of the first aspect.

[0010] The technical solution provided in this disclosure has the following advantages compared with the prior art: The drilling-while-drilling nuclear magnetic resonance magnet construction method of this disclosure can acquire an initial non-uniform field within the target detection area. Then, a synthetic magnetic field is obtained by superimposing the predicted compensation magnetic field output by a pre-trained intelligent prediction model with the initial non-uniform field. An optimization objective function is constructed based on the deviation metric between the synthetic magnetic field and the target uniform field. The optimal shimming magnetic sheet arrangement is then calculated based on the optimization objective function and a preset optimization algorithm. Finally, the shimming magnetic sheets are deployed according to the optimal shimming magnetic sheet arrangement. Therefore, by constructing an optimization objective function through an intelligent prediction model and combining it with a preset optimization algorithm to obtain the optimal shimming magnetic sheet arrangement, the high time consumption of traditional finite element simulation iterations is significantly reduced, and the efficiency of shimming design is improved. Attached Figure Description

[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0012] Figure 1 A schematic flowchart illustrating a method for constructing a nuclear magnetic resonance magnet while drilling, provided as an embodiment of this disclosure; Figure 2 A schematic diagram illustrating a training dataset construction process provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of an intelligent prediction model provided in an embodiment of the present disclosure; Figure 4 A schematic flowchart of another method for constructing a nuclear magnetic resonance magnet while drilling, provided in an embodiment of this disclosure; Figure 5 A schematic flowchart illustrating another method for constructing a nuclear magnetic resonance magnet while drilling, provided as an embodiment of this disclosure; Figure 6 A schematic diagram of a drilling-while-drilling nuclear magnetic resonance magnet construction system provided in this embodiment of the present disclosure; Figure 7 A schematic diagram illustrating the principle of uniform magnetic sheet arrangement and predictive compensation magnetic field superposition provided in this embodiment of the disclosure; Figure 8 A schematic diagram comparing magnetic field distributions provided in this embodiment of the present disclosure; Figure 9 This is another comparative diagram of magnetic field distribution provided by an embodiment of the present disclosure; Figure 10 A schematic diagram of a drilling-while-drilling nuclear magnetic resonance magnet construction device provided in this embodiment of the present disclosure; Figure 11This is a schematic diagram of a drilling-while-drilling nuclear magnetic resonance magnet construction device provided in an embodiment of this disclosure. Detailed Implementation

[0013] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0014] It should be understood that the various steps described in the method implementation of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method implementation may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0015] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0016] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0017] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0018] The names of messages or information exchanged between multiple devices in this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0019] To address the aforementioned problems, this disclosure provides a method, apparatus, device, and medium for constructing a nuclear magnetic resonance magnet while drilling. The following is a detailed description... Figure 1-9 The method for constructing a nuclear magnetic resonance magnet while drilling provided in the embodiments of this disclosure will be described in detail.

[0020] Figure 1 A schematic flowchart of a method for constructing a nuclear magnetic resonance magnet while drilling, provided in an embodiment of this disclosure, is shown.

[0021] In this embodiment of the disclosure, the method for constructing a nuclear magnetic resonance magnet while drilling can be executed by an electronic device. This electronic device may include, but is not limited to, devices such as computer equipment, cloud servers, or cloud server clusters.

[0022] like Figure 1 As shown, the method for constructing a nuclear magnetic resonance magnet while drilling may include the following steps.

[0023] S110. Obtain the initial non-uniform field within the target detection area.

[0024] In this embodiment of the disclosure, the electronic device can acquire an initial non-uniform field within the target detection area.

[0025] Optionally, the target detection area can be the area that the drilling nuclear magnetic resonance instrument needs to detect.

[0026] Optionally, the initial non-uniform field can be the initial non-uniform static magnetic field generated by the main magnet within the target detection area. This initial non-uniform field may be caused by magnet manufacturing errors, assembly errors, structural constraints, temperature effects, or other engineering factors.

[0027] Specifically, electronic equipment can acquire the initial non-uniform field in the target detection area detected by the drilling nuclear magnetic resonance instrument. For example, multiple uniformly distributed sampling points can be set in the target detection area through finite element simulation, analytical modeling or experimental measurement, and the magnetic flux density modulus at each sampling point can be obtained through static magnetic field simulation to form the initial non-uniform field vector, thus obtaining the initial non-uniform field.

[0028] S120. The predicted compensation magnetic field output by the pre-trained intelligent prediction model is superimposed with the initial non-uniform field to obtain the synthetic magnetic field, and an optimization objective function is constructed based on the deviation metric between the synthetic magnetic field and the target uniform field.

[0029] In this embodiment of the disclosure, the electronic device can obtain a synthetic magnetic field by superimposing the predicted compensation magnetic field output by the pre-trained intelligent prediction model and the initial non-uniform field, and construct an optimization objective function based on the deviation metric between the synthetic magnetic field and the target uniform field.

[0030] Optionally, the intelligent prediction model can be a pre-trained model used to predict and optimize the objective function.

[0031] Alternatively, the predicted compensation magnetic field can be an additional magnetic field generated for the target detection area by balancing the magnetic sheets.

[0032] Alternatively, the target uniform field can be a magnetic field with high field uniformity that is desired to be achieved.

[0033] Optionally, the objective function can be optimized to make the predicted compensation magnetic field, when superimposed with the initial non-uniform field, approach the target uniform field.

[0034] Specifically, the electronic device can superimpose the initial non-uniform field and the predicted compensation magnetic field output by the intelligent prediction model based on the arrangement parameters of the shimming magnetic sheet to obtain the composite magnetic field. That is, in the same space, the predicted compensation magnetic field generated by the shimming magnetic sheet and the initial magnetic field generated by the main magnet are linearly superimposed to form the final composite magnetic field.

[0035] Furthermore, the target uniform field can be a pre-defined ideal magnetic field distribution, typically a magnetic field that remains constant or varies according to a specific pattern within the target detection area. The deviation metric is used to quantify the degree of difference between the synthesized magnetic field and the target uniform field. Based on the deviation metric between the synthesized magnetic field and the target uniform field, the electronic device constructs an optimization objective function. The smaller the objective function, the smaller the deviation between the synthesized magnetic field and the target uniform field, and the better the shimming effect.

[0036] Among them, the objective function is optimized. The corresponding formula is: .

[0037] in, This represents the objective function to be optimized. This represents the parameters of the uniform magnetic sheet arrangement. This represents the predicted compensation magnetic field output by the intelligent prediction model. Indicates the initial non-uniform field. This represents a target uniform field.

[0038] S130. The optimal uniform magnetic sheet arrangement configuration is calculated based on the optimization objective function and the preset optimization algorithm.

[0039] In this embodiment of the disclosure, the electronic device can calculate the optimal uniform magnetic sheet arrangement configuration based on the optimization objective function and the preset optimization algorithm.

[0040] Specifically, after obtaining the objective function, the electronic device can calculate the optimal uniform magnetic sheet arrangement based on the objective function and a preset optimization algorithm. For example, the preset optimization algorithm can be a particle swarm optimization algorithm (PSO), a genetic algorithm (GA), or a gradient descent algorithm.

[0041] S140. Deploy the shimming magnetic sheets according to the optimal shimming magnetic sheet arrangement configuration.

[0042] In this embodiment of the disclosure, the electronic device can deploy the shimming magnetic sheet according to the optimal shimming magnetic sheet arrangement configuration.

[0043] Specifically, after obtaining the optimal shimming magnetic sheet arrangement, the electronic device can deploy the shimming magnetic sheets according to the optimal shimming magnetic sheet arrangement. For example, according to the optimized shimming magnetic sheet position coordinates, thickness, quantity and magnetization direction parameters, the installation state of the permanent magnet shimming magnetic sheet in the drilling nuclear magnetic resonance magnet can be determined so that the user can install the permanent magnet shimming magnetic sheet of the corresponding specification in the preset shimming slot of the drilling nuclear magnetic resonance magnet.

[0044] Therefore, the initial non-uniform field within the target detection area can be obtained. Then, a synthetic magnetic field is obtained by superimposing the predicted compensation magnetic field output by a pre-trained intelligent prediction model with the initial non-uniform field. An optimization objective function is then constructed based on the deviation metric between the synthetic magnetic field and the target uniform field. The optimal shimming magnetic sheet arrangement is then calculated based on the optimization objective function and a preset optimization algorithm. Finally, the shimming magnetic sheets are deployed according to the optimal shimming magnetic sheet arrangement. Thus, by constructing an optimization objective function through an intelligent prediction model and combining it with a preset optimization algorithm to obtain the optimal shimming magnetic sheet arrangement, the high time consumption of traditional finite element simulation iterations is significantly reduced, and the efficiency of shimming design is improved.

[0045] Optionally, prior to S120, the method for constructing a nuclear magnetic resonance magnet while drilling may further include: obtaining a training dataset based on the correspondence between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target region; and training the intelligent prediction model based on the training dataset to establish a mapping relationship between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target region.

[0046] In this embodiment of the disclosure, the electronic device can acquire a training dataset constructed based on the correspondence between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target region.

[0047] Specifically, the electronic device can acquire a training dataset constructed based on the correspondence between the shimming magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target area. This dataset contains a large number of samples, each of which consists of input features (shimming magnetic sheet arrangement parameter vector) and output labels (predicted compensation magnetic field intensity distribution vectors for each sampling point in the target area under the corresponding configuration).

[0048] Furthermore, the electronic device can train the intelligent prediction model based on the training dataset, so that the intelligent prediction model establishes a mapping relationship between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target area.

[0049] Specifically, after constructing the training dataset, the intelligent prediction model can be trained based on the training dataset. This intelligent prediction model can be a deep neural network model, including at least one of fully connected neural networks, convolutional neural networks, residual networks, or Transformer networks, comprising an input layer, at least three hidden layers, and an output layer. The input layer takes the uniform magnetic sheet arrangement parameter vector as input, each hidden layer uses the ReLU linear rectified function as the activation function, and the output layer outputs the predicted compensation magnetic field strength at each sampling point in the target region. During model training, mean squared error can be used as the loss function, and a regularization mechanism can be introduced to prevent overfitting. Simultaneously, an early stopping strategy can be combined to determine the optimal model parameters. After training, the resulting intelligent prediction model can quickly predict the distribution of the compensation magnetic field in the target region under conditions far lower than traditional simulation time.

[0050] Therefore, the intelligent prediction model can effectively fit the complex nonlinear relationship between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field, thus ensuring prediction accuracy.

[0051] Optionally, obtaining a training dataset based on the correspondence between the shimming magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target region includes: generating multiple sets of shimming magnetic sheet arrangement configurations within a preset shimming magnetic sheet arrangement parameter space using a Latin hypercube sampling strategy, wherein the shimming magnetic sheet arrangement parameters include at least one of the geometric parameters, spatial position parameters, quantity parameters, and magnetic parameters of the shimming magnetic sheets; for each set of shimming magnetic sheet arrangement configurations, calculating the corresponding predicted compensation magnetic field intensity distribution in the target region using finite element simulation or analytical methods, and constructing the training dataset based on the correlation between the shimming magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target region.

[0052] In this embodiment of the disclosure, the electronic device can generate multiple sets of uniform magnetic sheet arrangement configurations within a preset uniform magnetic sheet arrangement parameter space using a Latin hypercube sampling strategy.

[0053] Optionally, the shimming magnetic sheet arrangement parameters include at least one of the following: geometric parameters, spatial position parameters, quantity parameters, and magnetic parameters of the shimming magnetic sheets.

[0054] Specifically, the electronic device can predefine a shim magnetic sheet arrangement parameter space, wherein the shim magnetic sheet arrangement parameters include at least one of the following: geometric parameters (such as thickness, length, and width), spatial position parameters (such as the coordinate position of the mounting slot), quantity parameters (such as the total number of shim magnetic sheets and their distribution in each slot), and magnetic parameters (such as magnetization direction and remanence). To obtain sufficiently comprehensive training samples, multiple sets of shim magnetic sheet arrangement configurations are generated within the parameter space using a Latin hypercube sampling strategy or a random sampling method.

[0055] Furthermore, the electronic device can calculate the corresponding target region predicted compensation magnetic field intensity distribution for each group of uniform magnetic sheet arrangement configuration through finite element simulation or analytical method, and construct the training dataset based on the correlation between the uniform magnetic sheet arrangement parameters and the target region predicted compensation magnetic field intensity distribution.

[0056] Specifically, for each set of shimming magnetic sheet arrangements, the electronic device can obtain the corresponding predicted compensation magnetic field strength distribution in the target area through finite element simulation or analytical methods. For example, batch simulation can be performed using COMSOL with MATLAB scripts, or rapid calculation can be performed using an accurate analytical model of the permanent magnet (such as the equivalent magnetic charge method or the magnetic dipole integral method) to obtain the predicted compensation magnetic field strength distribution in the target area corresponding to that configuration. Finally, the training dataset is constructed based on the correlation between the shimming magnetic sheet arrangement parameters and the predicted compensation magnetic field strength distribution in the target area. Specifically, the shimming magnetic sheet arrangement parameter vector of each configuration is used as the input sample, and the corresponding predicted compensation magnetic field strength vector is used as the output label, forming a set of paired data. All paired data are then aggregated to obtain the training dataset.

[0057] Therefore, a large-scale, high-quality training dataset covering the parameter space is constructed to provide a data foundation for the full training of the intelligent prediction model. The Latin hypercube sampling method ensures the uniformity and representativeness of the samples and avoids sampling blind spots, thereby improving the model's prediction generalization ability in various regions of the parameter space.

[0058] Figure 2 A schematic diagram of a training dataset construction process provided by an embodiment of this disclosure is shown.

[0059] like Figure 2As shown, the training dataset construction process includes: acquiring the instrument's geometry and constraints, such as the size, shape, and material properties of the magnet's main structure; the spatial location and range of the target detection area; the number, location, and size of the preset shimming slots and the allowed specifications of the shimming magnetic sheets; and engineering constraints such as assembly gaps, installation tolerances, and temperature ranges. A shimming magnetic sheet arrangement parameter space is defined, including geometric parameters such as the thickness, length, width, or shape factor of the shimming magnetic sheets; spatial location parameters such as the slot number, coordinate position, circumferential angle, and axial offset of the magnetic sheets; quantity parameters such as the total number of shimming magnetic sheets and their distribution in each slot; and magnetic parameters such as magnetization direction (e.g., forward, reverse, or no magnetization), material remanence, and magnetic property level. Parameter sampling is performed within the defined parameter space, using a preset Latin hypercube sampling strategy to generate multiple sets of shimming magnetic sheet arrangement configurations. Magnetic field calculation is then performed, for each sampled shimming magnetic sheet arrangement configuration, using finite element simulation or analytical methods to calculate the predicted compensation magnetic field strength distribution within the target area under that configuration. The predicted compensation magnetic field distribution in the target area is extracted. From the magnetic field calculation results, the predicted compensation magnetic field intensity values ​​at each sampling point in the target detection area are extracted to form a standardized output vector. A training dataset is constructed by mapping the uniform magnetic sheet arrangement parameter vector to the predicted compensation magnetic field intensity vector.

[0060] Figure 3 A schematic diagram of the structure of an intelligent prediction model provided in an embodiment of this disclosure is shown.

[0061] like Figure 3 As shown, the intelligent prediction model includes an input layer, at least three hidden layers, and an output layer. The intelligent prediction model receives a vector of shim-field magnetic sheet arrangement parameters through the input layer. Each dimension of the vector corresponds to an adjustable design variable, including: magnetic sheet position parameters: the installation coordinates of the shim-field magnetic sheets in the instrument (e.g., circumferential angle, axial offset, radial distance, or slot number), which determines the spatial distribution characteristics of the predicted compensation magnetic field; magnetic sheet thickness parameters: the thickness of each shim-field magnetic sheet along the magnetization direction, directly affecting the intensity amplitude of the predicted compensation magnetic field; magnetic sheet quantity parameters: the total number of shim-field magnetic sheets or their distribution in each slot, affecting the overall superposition effect of the predicted compensation magnetic field; and magnetization direction parameters: the magnetization direction of each shim-field magnetic sheet (e.g., forward magnetization, reverse magnetization, or no magnetization), which determines whether the magnetic field generated by that sheet enhances or weakens the local magnetic field.

[0062] This intelligent prediction model employs a deep neural network to achieve nonlinear mapping. The deep neural network model includes at least one of fully connected neural networks, convolutional neural networks, residual networks, or Transformer networks. Each hidden layer uses the ReLU linear rectified function as the activation function. During model training, mean squared error can be used as the loss function, and a regularization mechanism is introduced to prevent overfitting. An early stopping strategy can also be combined to determine the optimal model parameters. Through multi-layer nonlinear transformations, deep neural networks can approximate arbitrarily complex continuous mapping functions. Therefore, the model can accurately learn the physical relationship from x (distribution parameters) to f(x) (predicted compensation magnetic field distribution). In this intelligent prediction model, the output layer is a fully connected layer with the number of nodes equal to the total number of sampling points M within the target detection area. Each component of the output vector f(x) ∈ RM corresponds to the predicted compensation magnetic field strength value at a sampling point (e.g., predicted compensation magnetic field at sampling point 1, predicted compensation magnetic field at sampling point 2, ..., predicted compensation magnetic field at sampling point M).

[0063] Optionally, S130 may specifically include: selecting a corresponding preset optimization algorithm according to the variable type of the uniform magnetic sheet arrangement parameters; and using a multiple random initialization strategy to select the configuration that minimizes the value of the optimization objective function from multiple optimization results calculated based on the optimization objective function and the preset optimization algorithm as the optimal uniform magnetic sheet arrangement configuration.

[0064] In this embodiment of the disclosure, the electronic device can select a corresponding preset optimization algorithm based on the variable type of the uniform magnetic sheet arrangement parameters.

[0065] For example, when the shimming magnetic sheet arrangement parameters are continuous variables, gradient-based optimization algorithms can be used; when the parameters include discrete variables, gradient-free optimization algorithms can be used; when the parameter space contains a mixture of continuous and discrete variables, optimization methods suitable for mixed variable problems can also be used.

[0066] Furthermore, the electronic device can employ a multiple random initialization strategy to select the configuration that minimizes the value of the objective function from multiple optimization results calculated based on the objective function and a preset optimization algorithm as the optimal uniform magnetic sheet arrangement configuration.

[0067] Specifically, the electronic device can employ a multiple random initialization strategy, such as starting from each initial configuration and independently optimizing using the optimization algorithm selected in the first step, resulting in M ​​candidate optimization results. The objective function value corresponding to each candidate result is calculated, and the configuration that minimizes the objective function value is selected as the final optimal uniform magnetic sheet arrangement configuration.

[0068] Therefore, adaptively selecting the optimization algorithm based on the variable type improves the efficiency and success rate of the optimization search. The multiple random initialization strategy effectively reduces the risk of getting trapped in local optima, increases the probability of finding the global optimum, and ensures that the final output uniform magnetic sheet arrangement has superior uniformity.

[0069] Figure 4 A schematic flowchart of another method for constructing a nuclear magnetic resonance magnet while drilling, provided in an embodiment of this disclosure, is shown.

[0070] like Figure 4 As shown, the method for constructing a nuclear magnetic resonance magnet while drilling includes: inputting an initial non-uniform field and target uniform field Next, initialize the shim magnetic sheet arrangement parameters. The predictive compensation magnetic field is calculated using a machine learning prediction model. Construct the optimization objective function Call the preset optimization algorithm to update After each parameter update, the optimization process is checked to see if it meets the preset convergence condition. When the convergence condition is met, the iteration terminates, and the current parameter vector is considered the optimal uniform magnetic sheet arrangement. This configuration is output for subsequent deployment and experimental verification of the shimming magnetic sheet.

[0071] Optionally, after S140, the drilling-while-drilling nuclear magnetic resonance magnet construction method may further include: optimizing the circumferential distribution of the shimming magnetic sheet based on the circumferential magnetic field uniformity index in the cross-sectional direction; and optimizing the axial distribution of the shimming magnetic sheet based on the continuity index of the effective detection area in the axial profile direction.

[0072] In this embodiment of the disclosure, the electronic device can optimize the circumferential distribution of the uniform magnetic field sheet based on the circumferential magnetic field uniformity index in the cross-sectional direction, and optimize the axial distribution of the uniform magnetic field sheet based on the continuity index of the effective detection area in the axial cross-sectional direction.

[0073] Specifically, the electronic equipment can set corresponding preset optimization targets for both the cross-sectional and axial profile directions to finely adjust the arrangement of the deployed shimming magnetic sheets. For example, for the cross-sectional direction, the preset optimization target is the consistency of the circumferential magnetic field within the cross-section. The cross-section of a drilling nuclear magnetic resonance magnet is usually a ring-shaped symmetrical structure. Ideally, the magnetic field strength at each point on the same radius of the circumference should be consistent. In actual shimming, due to various residual errors, the magnetic field strength at each point on the circumference may exhibit dispersion. The adjustment process is as follows: measure the magnetic field strength at each sampling point along the circumferential direction within the cross-section of the target area, calculate its deviation from the target uniform field or the circumferential average value, and analyze the circumferential distribution law of the deviation. Based on the deviation distribution, fine-tune the spatial angular distribution of the shimming magnetic sheets in the circumferential direction. For example, increase the thickness or number of shimming magnetic sheets at circumferential positions where the magnetic field is weak, and reduce the number of shimming magnetic sheets at circumferential positions where the magnetic field is strong. The goal of the adjustment is to make the isomagnetic field profile approach a regular circle, that is, to achieve the preset requirement for the consistency of the magnetic field strength at each point on the circumference. For the axial profile direction, the preset optimization objectives are to maximize the effective detection area and minimize the boundary gradient within the axial profile. The effective detection area of ​​a drilling nuclear magnetic resonance (NMR) instrument typically presents as a crescent-shaped spatial region (referred to as the sweet spot). The continuity, boundary smoothness, and spatial extent of this region directly affect the intensity and signal-to-noise ratio of the measurement signal. The adjustment process involves: measuring the magnetic field intensity at each sampling point within the axial profile of the target region, identifying the effective detection area boundary that meets the uniformity threshold condition, and calculating the spatial extent of this region and the magnetic field gradient at the boundary. Based on the measurement results, the distribution density or magnetization intensity of the shimming magnetic strip along the axial direction is fine-tuned. For example, the shimming magnetic strip is adjusted near the effective region boundary to smooth the magnetic field transition, and shimming magnetic strips are added at both ends of the sweet spot to expand the effective range. The goal of the adjustment is to expand the sweet spot area, smooth the boundary, and suppress axial magnetic field fluctuations.

[0074] Therefore, by making targeted adjustments in two orthogonal directions, namely the cross-section and the axial direction, after deployment, the magnetic field uniformity is further optimized, making the isomagnetic field profile in the target area approach a regular circle, expanding the effective detection area and smoothing the boundary, thereby improving the signal-to-noise ratio and effective detection depth of the drilling nuclear magnetic resonance instrument.

[0075] Optionally, after S140, the drilling-while-drilling nuclear magnetic resonance magnet construction method may further include: acquiring the measured magnetic field distribution at multiple sampling points within the target detection area using a magnetic field measurement device; calculating a magnetic field uniformity index based on the measured magnetic field distribution; when the magnetic field uniformity index does not reach a preset threshold, using the measured magnetic field distribution as the updated initial non-uniform field distribution, keeping the network parameters of the intelligent prediction model unchanged, and re-executing the steps of constructing the optimization objective function and calculating the optimal uniform field magnetic sheet arrangement configuration to form a closed-loop iterative correction until the preset requirements are met.

[0076] In this embodiment of the disclosure, the electronic device can obtain the measured magnetic field distribution at multiple sampling points within the target detection area through a magnetic field measuring device.

[0077] Specifically, the magnetic field measuring device can be a high-precision gaussmeter, a three-dimensional magnetic field testing platform, or a nuclear magnetic resonance magnetic field imager. During measurement, the electronic equipment can use the magnetic field measuring device to perform point-by-point measurements within the target detection area according to a preset spatial grid, recording the magnetic flux density modulus or vector components at each measuring point, and obtaining the measured magnetic field distribution at multiple sampling points.

[0078] Furthermore, the electronic device can calculate the magnetic field uniformity index based on the measured magnetic field distribution.

[0079] Specifically, the magnetic field uniformity index is a quantitative parameter used to evaluate the uniformity of magnetic field distribution. Electronic devices can calculate the magnetic field uniformity index based on the measured magnetic field distribution. For example, the relative standard deviation can be used as the uniformity index. The smaller the magnetic field uniformity index, the better the uniformity.

[0080] Furthermore, when the magnetic field uniformity index does not reach the preset threshold, the electronic device can use the measured magnetic field distribution as the updated initial non-uniform field distribution, keep the network parameters of the intelligent prediction model unchanged, and re-execute the steps of constructing the optimization objective function and calculating the optimal uniform magnetic sheet arrangement configuration to form a closed-loop iterative correction until the preset requirements are met.

[0081] Specifically, the electronic device can compare the magnetic field uniformity index with a preset threshold. The preset threshold is a qualified standard pre-set according to engineering application requirements. If the magnetic field uniformity index does not reach the preset threshold, the measured magnetic field distribution can be used as the updated initial non-uniform field distribution. The steps of constructing the optimization objective function and calculating the optimal uniform magnetic sheet arrangement are then re-executed. During re-optimization, the intelligent prediction model does not need to be retrained; the already trained model is used directly. After obtaining the new optimal arrangement, the uniform magnetic sheets are adjusted or redeployed according to the new configuration. After deployment, the measurement and evaluation are repeated. If the standard is still not met, the iteration continues until the measured magnetic field uniformity index meets the preset threshold requirement.

[0082] Therefore, by forming a closed-loop iterative correction mechanism through experimental feedback, the deviation between the simulation model and the actual physical system (such as differences in material properties, assembly errors, temperature effects, etc.) is effectively compensated, ensuring that the final deployed uniform magnetic sheet can achieve the preset uniformity requirements under actual working conditions, thus improving the robustness and engineering applicability of the method.

[0083] Figure 5 A schematic flowchart of another method for constructing a nuclear magnetic resonance magnet while drilling, provided in an embodiment of this disclosure, is shown.

[0084] like Figure 5 As shown, after deploying the shimming magnetic sheets according to the optimal shimming magnetic sheet arrangement, the actual magnetic field distribution is measured. For example, a high-precision magnetic field measuring device is used to measure the intensity value of the actual synthetic magnetic field at multiple sampling points in the target detection area. Then, the magnetic field uniformity index is calculated, and it is determined whether the magnetic field uniformity index meets the preset threshold. When the magnetic field uniformity index does not reach the preset threshold, the measured magnetic field distribution is used as the updated initial non-uniform field distribution, and the steps of constructing the optimization objective function and calculating the optimal shimming magnetic sheet arrangement are re-executed to form a closed-loop iterative correction until the preset requirements are met. If the requirements are met, the final solution is output, that is, the closed-loop iteration terminates, and the current optimal arrangement and related design documents are output.

[0085] Optionally, regarding intelligent prediction models, in addition to deep neural network models, other machine learning models with nonlinear fitting capabilities can be used to establish the relationship between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field distribution, depending on the sample size, parameter dimensions, accuracy requirements, and computational resources. This is used to establish a rapid prediction relationship between the arrangement parameters and the magnetic field compensation effect through a trainable model.

[0086] Optionally, regarding the shimming magnetic sheet arrangement parameters, in addition to position, thickness, quantity, and magnetization direction, parameters such as the shape, width, height, material type, magnetic properties, installation angle, zonal arrangement method, and multi-layer arrangement relationship of the shimming elements can all be included as optimization variables, thereby forming a shimming design scheme with a higher degree of freedom. For tools with more complex structures, differentiated shimming element parameters can be set according to different axial segments or different circumferential regions to achieve zonal shimming or multi-region coupled shimming design.

[0087] Optionally, the objective function can be expanded from a single objective of approximating the target uniform field to a multi-objective optimization form. For example, in addition to magnetic field uniformity, indicators or constraints such as target detection depth, sweet spot area, local magnetic field gradient distribution, total magnet weight, total amount of shimming magnetic sheets, manufacturing cost, assembly convenience, and temperature stability can also be considered simultaneously. By introducing a multi-objective optimization mechanism, the constructed magnet scheme can better adapt to the actual engineering constraints of drilling tools while meeting the field uniformity requirements.

[0088] Optionally, for continuous parameter problems, gradient-based optimization methods can be used; for discrete or mixed parameter problems, gradient-free optimization methods can be used; for more complex engineering scenarios, multiple optimization strategies can be combined, such as performing a global coarse search first and then a local fine optimization, to balance solution efficiency and result quality.

[0089] Optionally, regarding training data construction, this solution can generate training data through simulation, incorporate experimental measurement data, or combine simulation and field measurements to construct the dataset. For example, in the early design phase, simulation data is primarily used to train the basic model, while in the subsequent prototype debugging phase, a small amount of field measurement data is used to correct or transfer the model, thereby improving the model's adaptability to real tool conditions. For a series of products with different tool specifications, magnet sizes, or detection depth requirements, applications can be expanded through transfer learning, incremental learning, or model retraining.

[0090] Optionally, this method for constructing NMR magnets while drilling can be applied not only to the construction of high-uniformity magnets for single NMR tools while drilling, but also extended to the design of NMR logging magnets of different specifications, sizes, and structural forms. Furthermore, it can be integrated with automated design platforms or interactive software systems to combine functions such as initial magnetic field input, parameter space definition, training data construction, intelligent prediction model invocation, shimming scheme optimization, result visualization, and experimental feedback correction, forming an intelligent auxiliary design tool for NMR magnet design while drilling.

[0091] Figure 6 A schematic diagram of a drilling-while-drilling nuclear magnetic resonance magnet construction system provided in an embodiment of this disclosure is shown.

[0092] like Figure 6 As shown, this drilling-while-nuclear magnetic resonance (NMR) magnet construction system is used to implement the drilling-while-nuclear magnetic resonance (NMR) magnet construction method, including an input layer, a data layer, an optimization layer, and an output layer. The input layer is used to collect and define various initial parameters and constraints required for magnet construction, including: an initial non-uniform field, which is the original static magnetic field distribution within the target detection area obtained through finite element simulation, analytical modeling, or experimental measurement; instrument structural parameters, such as the geometric dimensions, material properties, magnet arrangement, and the location and number of shimming slots of the drilling-while-nuclear magnetic resonance magnet; candidate magnetic sheet parameters, the selectable parameter range for the shimming magnetic sheet, including the sheet thickness, length, width, magnetization direction, and remanence of the material; and a target uniform field, a preset ideal magnetic field distribution, typically a uniform or gradient-distributed magnetic field pattern within the target detection area.

[0093] The data layer is responsible for generating training samples and constructing the dataset. This includes parameter sampling, which generates multiple different magnetic sheet arrangement configurations within the shimmed magnetic sheet arrangement parameter space using a preset Latin hypercube sampling strategy (such as Latin hypercube sampling or random sampling); simulation / analytical calculation, which calculates the predicted compensation magnetic field strength distribution within the target region under each sampled arrangement configuration using finite element analysis or a precise analytical model of permanent magnets (such as the equivalent magnetic charge method or the magnetic dipole integral method); and dataset construction, which associates each shimmed magnetic sheet arrangement parameter vector with the corresponding predicted compensation magnetic field strength distribution vector to form the training dataset.

[0094] The optimization layer utilizes a trained intelligent prediction model as a surrogate model to construct an optimization objective function and solve for the optimal uniform magnetic sheet arrangement. This includes objective function construction: based on the initial non-uniform field and target uniform field provided by the input layer, and the predicted compensation magnetic field distribution output by the intelligent prediction model, a deviation metric function between the synthetic magnetic field and the target uniform field is constructed; optimization solution: according to the variable type (continuous, discrete, or mixed) of the uniform magnetic sheet arrangement parameters, a suitable optimization algorithm (such as gradient descent, particle swarm optimization, genetic algorithm, etc.) is selected to search for the optimal solution in the parameter space with the goal of minimizing the objective function. A multiple random initialization strategy is employed to avoid getting trapped in local optima; scheme selection: from multiple candidate schemes obtained through multiple optimization solutions, the configuration that minimizes the objective function value and satisfies engineering constraints is selected as the final optimal uniform magnetic sheet arrangement scheme.

[0095] The output layer is responsible for translating the optimization results into physical deployment and achieving closed-loop control through experimental verification and feedback correction. This includes: Optimal layout scheme: The optimal shimming magnetic sheet layout configuration determined by the output optimization layer, including specific parameters such as the position coordinates, thickness, number, and magnetization direction of each shimming magnetic sheet; Shimming magnetic sheet deployment: Based on the optimal layout scheme, permanent magnet shimming magnetic sheets of the corresponding specifications are actually installed in the preset shimming slots of the drilling nuclear magnetic resonance magnet. The deployment process must ensure accurate position and magnetization direction; Experimental verification: After deployment, the actual magnetic field distribution is measured at multiple sampling points within the target detection area using a high-precision magnetic field measurement device (such as a gaussmeter or a three-dimensional magnetic field testing platform), and the uniformity index (such as relative standard deviation) is calculated and compared with a preset threshold; Feedback correction: If the measured uniformity index does not meet the preset requirements, the measured magnetic field distribution is fed back to the input layer or optimization layer as a new initial non-uniform field, triggering a new dataset update or optimization solution process, forming a closed-loop iterative correction until the requirements are met.

[0096] Figure 7 This illustration shows a schematic diagram of the principle of uniform magnetic sheet arrangement and predictive compensation magnetic field superposition provided in an embodiment of the present disclosure.

[0097] like Figure 7As shown, (a) is the overall structure of the drilling NMR probe, including the probe body 1 and the magnet-antenna assembly 2. (b) is a longitudinal sectional view of the probe, including the magnet assembly 3, the antenna assembly 4, the outer magnet 5, the inner magnet 6, and the shimming magnetic sheet 7. (c) is a schematic diagram of the longitudinal predictive compensation magnetic field superposition principle, and (d) is a schematic diagram of the radial predictive compensation magnetic field superposition principle. It can be seen that the predictive compensation magnetic field generated after the shimming magnetic sheet is arranged is superimposed with the initial non-uniform static magnetic field, so that the synthetic magnetic field in the target area gradually approaches the target uniform field.

[0098] Figure 8 A schematic diagram showing a comparison of magnetic field distributions provided in an embodiment of this disclosure is shown.

[0099] like Figure 8 As shown, within the cross-section of the drilling nuclear magnetic resonance magnet, the isomagnetic field distribution corresponding to the target detection area typically exhibits a ring-like characteristic. The consistency of the magnetic field intensity at various positions along its circumference can characterize the magnetic field uniformity within this plane. Before shimming, the magnetic field distribution along the circumference of the target area exhibits significant fluctuations, with substantial differences in magnetic field intensity at different radial orientations, causing the isomagnetic field profile to deviate from an ideal circle. However, after optimizing the shimming magnetic sheet arrangement, the dispersion of the magnetic field intensity along the circumference of the target area is significantly reduced, and the isomagnetic field profile becomes closer to a regular circle, indicating that the consistency of the magnetic field intensity in each radial direction is improved, and the magnetic field uniformity within the cross-section is significantly enhanced.

[0100] Figure 9 This illustration shows another comparative diagram of magnetic field distribution provided by an embodiment of the present disclosure.

[0101] like Figure 9 As shown, within the axial profile of the tool, the effective detection area of ​​the drilling nuclear magnetic resonance (NMR) instrument typically manifests as a crescent-shaped or semi-circular sweet spot region distributed along the target area. The extent, boundary smoothness, and continuity of this region reflect the quality of magnetic field uniformity in the axial direction. Before shimming, the sweet spot region is relatively small, with obvious boundary curvature and significant local magnetic field gradient variations, exhibiting strong spatial distortion. However, after optimizing the magnetic sheet arrangement for shimming, the effective range of the sweet spot region significantly increases, its boundary shape becomes smoother, and the crescent-shaped region is stretched, indicating a more uniform magnetic field distribution within the target area and effective suppression of magnetic field fluctuations in the axial direction. This demonstrates that the proposed scheme can simultaneously improve the magnetic field consistency in both the cross-sectional and axial directions, thereby expanding the effective detection area and enhancing the overall field uniformity of the drilling NMR magnet.

[0102] Figure 10 A schematic diagram of a drilling-while-drilling nuclear magnetic resonance magnet construction device provided in an embodiment of this disclosure is shown.

[0103] like Figure 10As shown, the drilling-while-drilling nuclear magnetic resonance magnet construction device 1000 may include a first acquisition module 1010, a first construction module 1020, a first calculation module 1030, and a magnetic sheet deployment module 1040.

[0104] The first acquisition module 1010 can be used to acquire the initial non-uniform field within the target detection area.

[0105] The first construction module 1020 can be used to obtain a synthetic magnetic field by superimposing the predicted compensation magnetic field output by the pre-trained intelligent prediction model and the initial non-uniform field, and to construct an optimization objective function based on the deviation metric between the synthetic magnetic field and the target uniform field.

[0106] The first calculation module 1030 can be used to calculate the optimal uniform magnetic sheet arrangement configuration based on the optimization objective function and the preset optimization algorithm.

[0107] The magnetic sheet deployment module 1040 can be used to deploy uniform magnetic sheets according to the optimal uniform magnetic sheet arrangement configuration.

[0108] Therefore, in this embodiment, an initial non-uniform field within the target detection area can be obtained. Then, a synthetic magnetic field is obtained by superimposing the predicted compensation magnetic field output by a pre-trained intelligent prediction model with the initial non-uniform field. An optimization objective function is constructed based on the deviation metric between the synthetic magnetic field and the target uniform field. The optimal shimming magnetic sheet arrangement is then calculated based on the optimization objective function and a preset optimization algorithm. Finally, the shimming magnetic sheets are deployed according to the optimal shimming magnetic sheet arrangement. Thus, by constructing an optimization objective function through an intelligent prediction model and combining it with a preset optimization algorithm to obtain the optimal shimming magnetic sheet arrangement, the high time consumption of traditional finite element simulation iterations is significantly reduced, and the efficiency of shimming design is improved.

[0109] In some embodiments of this disclosure, the drilling-while-drilling nuclear magnetic resonance magnet fabrication apparatus 1000 may further include: The second acquisition module is used to acquire a training dataset constructed based on the correspondence between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target area.

[0110] The model training module is used to train the intelligent prediction model based on the training dataset, so that the intelligent prediction model establishes a mapping relationship between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target area.

[0111] In some embodiments of this disclosure, the second acquisition module may specifically include: The first processing unit is used to generate multiple sets of uniform magnetic sheet arrangement configurations within a preset uniform magnetic sheet arrangement parameter space using a Latin hypercube sampling strategy. The uniform magnetic sheet arrangement parameters include at least one of the geometric parameters, spatial position parameters, quantity parameters, and magnetic parameters of the uniform magnetic sheets.

[0112] The second processing unit is used to calculate the corresponding target area predicted compensation magnetic field intensity distribution for each group of uniform magnetic sheet arrangement configurations through finite element simulation or analytical method, and to construct the training dataset based on the correlation between the uniform magnetic sheet arrangement parameters and the target area predicted compensation magnetic field intensity distribution.

[0113] In some embodiments of this disclosure, the formula corresponding to the objective function is: ; in, This represents the parameters of the uniform magnetic sheet arrangement. This represents the predicted compensation magnetic field output by the intelligent prediction model. Indicates the initial non-uniform field. This represents a target uniform field.

[0114] In some embodiments of this disclosure, the first computing module 1030 may specifically include: The algorithm selection unit is used to select the corresponding preset optimization algorithm based on the variable type of the uniform magnetic sheet arrangement parameters.

[0115] The third processing unit is used to select the configuration that minimizes the value of the optimization objective function from multiple optimization results calculated based on the optimization objective function and the preset optimization algorithm as the optimal uniform magnetic sheet arrangement configuration by adopting a multiple random initialization strategy.

[0116] In some embodiments of this disclosure, the drilling-while-drilling nuclear magnetic resonance magnet fabrication apparatus 1000 may further include: The configuration adjustment module is used to optimize the circumferential distribution of the uniform magnetic field sheet based on the circumferential magnetic field uniformity index in the cross-sectional direction; and to optimize the axial distribution of the uniform magnetic field sheet based on the continuity index of the effective detection area in the axial cross-sectional direction.

[0117] In some embodiments of this disclosure, the drilling-while-drilling nuclear magnetic resonance magnet fabrication apparatus 1000 may further include: The third acquisition module is used to acquire the measured magnetic field distribution at multiple sampling points within the target detection area through a magnetic field measurement device.

[0118] The second calculation module is used to calculate the magnetic field uniformity index based on the measured magnetic field distribution.

[0119] The optimization iteration module is used to take the measured magnetic field distribution as the updated initial non-uniform field distribution when the magnetic field uniformity index does not reach the preset threshold, keep the network parameters of the intelligent prediction model unchanged, and re-execute the steps of constructing the optimization objective function and calculating the optimal uniform magnetic sheet arrangement configuration to form a closed-loop iterative correction until the preset requirements are met.

[0120] It should be noted that, Figure 10 The drilling-while-drilling nuclear magnetic resonance magnet construction device 1000 shown can perform... Figure 1-9 The various steps in the method embodiment shown are implemented. Figure 1-9 The processes and effects in the method embodiments shown are not described in detail here.

[0121] Figure 11 A schematic diagram of a drilling-while-drilling nuclear magnetic resonance magnet construction device provided in an embodiment of this disclosure is shown.

[0122] In some embodiments of this disclosure, Figure 11 The drilling-while-drilling nuclear magnetic resonance magnet construction device shown can be an electronic device. Specifically, the electronic device can include, but is not limited to, devices such as computer equipment, cloud servers, or cloud server clusters.

[0123] like Figure 11 As shown, the drilling-while-drilling nuclear magnetic resonance magnet construction device may include a processor 1101 and a memory 1102 storing computer program instructions.

[0124] Specifically, the processor 1101 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0125] Memory 1102 may include a mass storage device for information or instructions. For example, and not limitingly, memory 1102 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1102 may include removable or non-removable (or fixed) media. Where appropriate, memory 1102 may be internal or external to the integrated gateway device. In a particular embodiment, memory 1102 is a non-volatile solid-state memory. In a particular embodiment, memory 1102 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0126] The processor 1101 reads and executes computer program instructions stored in the memory 1102 to perform the steps of the drilling-while-drilling nuclear magnetic resonance magnet construction method provided in this embodiment of the present disclosure.

[0127] In one example, the drilling-while-drilling nuclear magnetic resonance magnet construction device may also include a transceiver 1103 and a bus 1104. Wherein, as... Figure 11 As shown, the processor 1101, memory 1102 and transceiver 1103 are connected via bus 1104 and communicate with each other.

[0128] Bus 1104 may include hardware, software, or both. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 1104 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.

[0129] This disclosure also provides a computer-readable storage medium that can store a computer program that, when executed by a processor, enables the processor to implement the drilling-while-drilling nuclear magnetic resonance magnet construction method provided in this disclosure.

[0130] The aforementioned storage medium may, for example, include a memory 1102 containing computer program instructions, which can be executed by the processor 1101 of the drilling-while-drilling nuclear magnetic resonance magnet construction apparatus to complete the drilling-while-drilling nuclear magnetic resonance magnet construction method provided in this embodiment. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), compact disc ROM (CD-ROM), magnetic tape, floppy disk, and optical data storage device.

[0131] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0132] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for constructing a nuclear magnetic resonance magnet while drilling, characterized in that, include: Obtain the initial non-uniform field within the target detection area; The synthesized magnetic field is obtained by superimposing the predicted compensation magnetic field output by the pre-trained intelligent prediction model and the initial non-uniform field, and an optimization objective function is constructed based on the deviation metric between the synthesized magnetic field and the target uniform field. The optimal uniform magnetic sheet arrangement configuration is calculated based on the aforementioned objective function and the preset optimization algorithm. The shimming magnetic sheets are deployed according to the optimal shimming magnetic sheet arrangement configuration.

2. The method according to claim 1, characterized in that, Before the composite magnetic field is obtained by superimposing the predicted compensation magnetic field output by the pre-trained intelligent prediction model and the initial non-uniform field, the method further includes: A training dataset was constructed based on the correspondence between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target region. The intelligent prediction model is trained based on the training dataset, so that the intelligent prediction model establishes a mapping relationship between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target area.

3. The method according to claim 2, characterized in that, The training dataset constructed based on the correspondence between the uniform magnetic sheet arrangement parameters and the predicted compensation magnetic field intensity distribution in the target region includes: Multiple sets of uniform magnetic sheet arrangement configurations are generated within a preset uniform magnetic sheet arrangement parameter space using a Latin hypercube sampling strategy. The uniform magnetic sheet arrangement parameters include at least one of the geometric parameters, spatial position parameters, quantity parameters, and magnetic parameters of the uniform magnetic sheets. For each group of uniform magnetic sheet arrangements, the corresponding target area predicted compensation magnetic field intensity distribution is obtained by finite element simulation or analytical method, and the training dataset is constructed based on the correlation between the uniform magnetic sheet arrangement parameters and the target area predicted compensation magnetic field intensity distribution.

4. The method according to claim 1, characterized in that, The formula corresponding to the optimization objective function is: ; in, This represents the objective function to be optimized. This represents the parameters of the uniform magnetic sheet arrangement. This represents the predicted compensation magnetic field output by the intelligent prediction model. Indicates the initial non-uniform field. This represents a target uniform field.

5. The method according to claim 3, characterized in that, The process of calculating the optimal uniform magnetic sheet arrangement based on the optimization objective function and the preset optimization algorithm includes: Select the corresponding preset optimization algorithm based on the variable type of the uniform magnetic sheet arrangement parameters; A multiple random initialization strategy is adopted to select the configuration that minimizes the value of the objective function from multiple optimization results calculated based on the objective function and the preset optimization algorithm as the optimal uniform magnetic sheet arrangement configuration.

6. The method according to claim 1, characterized in that, After deploying the shimming magnetic sheets according to the optimal shimming magnetic sheet arrangement, the method further includes: Based on the circumferential magnetic field uniformity index in the cross-sectional direction, the circumferential distribution of the uniform magnetic sheet is optimized. Based on the continuity index of the effective detection area in the axial profile direction, the axial distribution of the uniform magnetic sheet is optimized.

7. The method according to claim 1, characterized in that, After deploying the shimming magnetic sheets according to the optimal shimming magnetic sheet arrangement, the method further includes: The measured magnetic field distribution at multiple sampling points within the target detection area is obtained using a magnetic field measuring device; The magnetic field uniformity index is calculated based on the measured magnetic field distribution. When the magnetic field uniformity index does not reach the preset threshold, the measured magnetic field distribution is used as the updated initial non-uniform field distribution. The network parameters of the intelligent prediction model remain unchanged, and the steps of constructing the optimization objective function and calculating the optimal uniform magnetic sheet arrangement are re-executed to form a closed-loop iterative correction until the preset requirements are met.

8. A device for constructing a nuclear magnetic resonance magnet while drilling, characterized in that, include: The first acquisition module is used to acquire the initial non-uniform field within the target detection area; The first construction module is used to obtain a synthetic magnetic field by superimposing the predicted compensation magnetic field output by the pre-trained intelligent prediction model and the initial non-uniform field, and to construct an optimization objective function based on the deviation metric between the synthetic magnetic field and the target uniform field. The first calculation module is used to calculate the optimal uniform magnetic sheet arrangement configuration based on the optimization objective function and the preset optimization algorithm. The magnetic sheet deployment module is used to deploy the shimming magnetic sheet according to the optimal shimming magnetic sheet arrangement configuration.

9. A drilling-while-drilling nuclear magnetic resonance magnet construction device, characterized in that, include: processor; Memory, used to store executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the drilling nuclear magnetic resonance magnet construction method according to any one of claims 1-7.

10. A non-volatile computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, causes the processor to implement the drilling nuclear magnetic resonance magnet construction method according to any one of claims 1-7.