Training method of data completion model for magnetic diagnosis and data completion method

CN123012558APending Publication Date: 2026-10-30SHAANXI STARTORUS FUSION TECHNOLOGY COMPANY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510516947.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]现有技术中,磁诊断过程的测量信号常受噪声、传感器漂移或数据丢失的影响,导致重建结果不稳定

Benefits of technology

[0024]如此,获取第一磁诊断设备测得的设定数值个样本测量数据,从设定数值个样本测量数据中确定第一磁诊断设备的有效测量样本;将有效测量样本分别与至少一种样本待测信号的各样本待测位置输入初始补全模型,预测获得各样本待测位置的预测磁通数据;基于预测磁通数据的预测损失以及物理约束损失,对初始补全模型进行训练,获得目标数据补全模型,其中,预测损失用于指示预测磁通数据与实测磁通数据的差异,物理约束损失是指在等离子体平衡位形的物理约束下预测磁通数据的损失。通过预测损失和物理约束损失对初始补全模型进行优化,能够有效提高磁通数据补全的准确性和物理一致性,确保模型输出既与实测数据高度一致,又符合等离子体平衡位形的物理约束,从而提升整体模型的性能和可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012558A_ABST
    Figure CN123012558A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a training method of a data completion model for magnetic diagnosis and a data completion method. The training method of the data completion model for magnetic diagnosis comprises the following steps: acquiring a set number of sample measurement data measured by a first magnetic diagnosis device, determining effective measurement samples of the first magnetic diagnosis device from the set number of sample measurement data; inputting the effective measurement samples and each sample to-be-measured position of at least one sample to-be-measured signal into an initial completion model respectively, and obtaining predicted magnetic flux data of each sample to-be-measured position; training the initial completion model based on a prediction loss of the predicted magnetic flux data and a physical constraint loss, and obtaining a target data completion model, wherein the prediction loss is used to indicate the difference between the predicted magnetic flux data and actually measured magnetic flux data, and the physical constraint loss is the loss of the predicted magnetic flux data under the physical constraint of the plasma equilibrium configuration. The accuracy of magnetic diagnosis data completion is improved, and manual intervention is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of magnetic diagnostic technology, and in particular to a training method and a data completion method for a data completion model used in magnetic diagnostics. Background Technology

[0002] Tokamak devices, through the interaction of circumferential and poloidal magnetic fields, form a stable helical magnetic field structure, effectively confining high-temperature plasma and serving as core equipment for achieving controlled nuclear fusion. To precisely control and optimize the plasma state, researchers rely on magnetic diagnostic techniques to monitor plasma behavior in real time, including using single-turn loops and magnetic probes to measure magnetic field distribution.

[0003] In existing technologies, the measurement signals during magnetic diagnostic processes are often affected by noise, sensor drift, or data loss, leading to unstable reconstruction results. Traditional methods rely on manual signal screening, which is highly subjective and prone to missing valuable information, thus reducing the accuracy and reliability of magnetic diagnostics in tokamak devices. Therefore, there is an urgent need for a method to complete magnetic diagnostic data. Summary of the Invention

[0004] In view of this, embodiments of this application provide a training method for a data completion model for magnetic diagnostics. One or more embodiments of this application also relate to a training apparatus for a data completion model for magnetic diagnostics, a data completion method for magnetic diagnostics, a data completion device for magnetic diagnostics, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.

[0005] According to a first aspect of the embodiments of this application, a training method for a data completion model for magnetic diagnostics is provided, comprising:

[0006] Acquire a set number of sample measurement data obtained by the first magnetic diagnostic device, and determine the valid measurement samples of the first magnetic diagnostic device from the set number of sample measurement data;

[0007] The effective measurement samples are respectively input into the sample test positions of at least one sample test signal to the initial completion model to predict the magnetic flux data of each sample test position.

[0008] Based on the prediction loss and physical constraint loss of the predicted magnetic flux data, the initial completion model is trained to obtain the target data completion model. The prediction loss is used to indicate the difference between the predicted magnetic flux data and the measured magnetic flux data, and the physical constraint loss refers to the loss of the predicted magnetic flux data under the physical constraints of the plasma equilibrium configuration.

[0009] According to a second aspect of the embodiments of this application, a data completion method for magnetic diagnostics is provided, comprising:

[0010] Acquire a set number of target measurement signals measured by the first magnetic diagnostic device, and determine the valid measurement signal of the first magnetic diagnostic device from the set number of target measurement signals;

[0011] The effective measurement signal and the target test signal are input into the target data completion model at each target test position to predict the target magnetic flux data at each target test position. The target data completion model is trained based on the test positions of at least one sample test signal under prediction loss and physical constraint loss. The target test signal is any one of at least one sample test signal.

[0012] According to a third aspect of the embodiments of this application, a training apparatus for a data completion model for magnetic diagnostics is provided, comprising:

[0013] The first acquisition module is configured to acquire a set number of sample measurement data obtained by the first magnetic diagnostic device, and determine the valid measurement samples of the first magnetic diagnostic device from the set number of sample measurement data.

[0014] The first prediction module is configured to input the effective measurement samples and the sample test positions of at least one sample test signal into the initial completion model to predict the predicted magnetic flux data of each sample test position.

[0015] The training module is configured to train the initial completion model based on the prediction loss and physical constraint loss of the predicted magnetic flux data to obtain the target data completion model. The prediction loss is used to indicate the difference between the predicted magnetic flux data and the measured magnetic flux data, and the physical constraint loss refers to the loss of the predicted magnetic flux data under the physical constraints of the plasma equilibrium configuration.

[0016] According to a fourth aspect of the embodiments of this application, a data completion device for magnetic diagnostics is provided, comprising:

[0017] The second acquisition module is configured to acquire a set number of target measurement signals measured by the first magnetic diagnostic device, and determine the valid measurement signal of the first magnetic diagnostic device from the set number of target measurement signals.

[0018] The second prediction module is configured to input the effective measurement signal and the target test signal at each target test position into the target data completion model to obtain the target magnetic flux data at each target test position. The target data completion model is trained based on each sample test position of at least one sample test signal under prediction loss and physical constraint loss. The target test signal is any one of at least one sample test signal.

[0019] According to a fifth aspect of the embodiments of this application, a computing device is provided, comprising:

[0020] Memory and processor;

[0021] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, they implement the steps of the training method or data completion method for the data completion model used for magnetic diagnosis.

[0022] According to a sixth aspect of the present application, a computer-readable storage medium is provided that stores a computer program / instructions, which, when executed by a processor, implement the steps of the above-described training method or data completion method for a data completion model for magnetic diagnostics.

[0023] According to a seventh aspect of the present application, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described training method or data completion method for a data completion model for magnetic diagnostics.

[0024] Thus, a set number of sample measurement data points obtained from the first magnetic diagnostic device are acquired, and valid measurement samples of the first magnetic diagnostic device are determined from these sample measurement data points. The valid measurement samples are then input into the initial completion model along with the test positions of at least one sample test signal, respectively, to predict the magnetic flux data for each test position. Based on the prediction loss and physical constraint loss of the predicted magnetic flux data, the initial completion model is trained to obtain the target data completion model. The prediction loss indicates the difference between the predicted and measured magnetic flux data, while the physical constraint loss refers to the loss of predicted magnetic flux data under the physical constraints of the plasma equilibrium configuration. Optimizing the initial completion model through prediction and physical constraint losses effectively improves the accuracy and physical consistency of the magnetic flux data completion, ensuring that the model output is highly consistent with the measured data and conforms to the physical constraints of the plasma equilibrium configuration, thereby improving the overall model performance and reliability. Attached Figure Description

[0025] Figure 1 This is a flowchart illustrating a training method for a data completion model for magnetic diagnostics, provided in one embodiment of this application.

[0026] Figure 2 This is a flowchart of a data completion method for magnetic diagnostics provided in one embodiment of this application;

[0027] Figure 3 This is a flowchart illustrating the processing steps of a training method for a data completion model for magnetic diagnostics, provided in one embodiment of this application.

[0028] Figure 4 This is a schematic diagram of the prediction result of a data completion model provided in one embodiment of this application;

[0029] Figure 5 This is a schematic diagram of the structure of a training device for a data completion model for magnetic diagnostics provided in one embodiment of this application;

[0030] Figure 6 This is a schematic diagram of a data completion device for magnetic diagnostics provided in one embodiment of this application;

[0031] Figure 7 This is a structural block diagram of a computing device provided in one embodiment of this application. Detailed Implementation

[0032] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0033] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to and includes any or all possible combinations of one or more associated listed items.

[0034] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0035] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0036] First, the terms and concepts involved in one or more embodiments of this application will be explained.

[0037] A tokamak is a device used for magnetically confined nuclear fusion reactions. Its design aims to confine high-temperature plasma within a toroidal region using a strong magnetic field to achieve controlled nuclear fusion. The tokamak utilizes a powerful magnetic field to confine the plasma, preventing it from contacting the container walls and cooling it. The magnetic field is generated by magnetic field coils, and the plasma's own current also generates a self-generated magnetic field. Maintaining plasma stability and efficient confinement is one of the key challenges of the tokamak, involving complex physical processes such as magnetohydrodynamic (MHD) stability and current profile control. A tokamak consists of a vacuum chamber, magnetic field coils, plasma current, diagnostic systems, and heating systems. The vacuum chamber is a toroidal metal container evacuated to an ultra-high vacuum to contain the plasma. The magnetic field coils include toroidal field coils, poloidal field coils, and the central solenoid coil (CS coil). The toroidal field coils are ring-shaped coils surrounding the vacuum chamber, generating a toroidal magnetic field (along the main ring of the tokamak) to confine the plasma. The poloidal field coils mainly surround the outside of the toroidal vacuum chamber of the tokamak device, typically arranged symmetrically above, below, and to the sides of the plasma to form a poloidal magnetic field, primarily used for plasma balance control, configuration control, and position adjustment. The central solenoid coil is located at the center of the tokamak device, i.e., the axis of the toroidal vacuum chamber (the center of the plasma ring), arranged longitudinally along the axis of symmetry of the device, and is used to induce plasma current. The plasma current is generated within the plasma through induction or auxiliary heating, and this current generates a self-generated magnetic field, further enhancing the confinement of the plasma. Diagnostic systems are used to monitor various plasma parameters, such as temperature, density, and current distribution. Common diagnostic tools include magnetic probes, soft X-ray cameras, and Thomson scatterometers. Heating systems are used to heat the plasma to the required high temperatures, including neutral beam injectors and radio frequency heating systems. The spherical tokamak (ST), as a more compact and smaller tokamak device, has become an important branch of magnetic confinement nuclear fusion research due to its unique geometry and potential high efficiency.

[0038] Plasma is a macroscopic system composed of a large number of charged particles (ions, electrons) and neutral particles (atoms, molecules). It is often referred to as the fourth state of matter. Under the influence of high temperature or strong electromagnetic field, atoms in a gas are ionized, producing free electrons and ions, thus forming plasma. It is electrically neutral as a whole and has unique physical properties and behaviors. It is widely present in the universe, such as inside stars and in interstellar space. It can also be generated in the laboratory by various means.

[0039] Plasma equilibrium configuration refers to a state and spatial distribution of plasma that has reached mechanical equilibrium under the influence of various forces, and which does not change macroscopically over time. When plasma is in equilibrium configuration, its internal thermal pressure and magnetic force are in balance.

[0040] Grad-Shafranov (GS) equilibrium of plasma refers to the magnetohydrodynamic equilibrium state of axisymmetric plasma in a tokamak device, described by solving the Grad-Shafranov equations (GS equations). The GS equations are the core equations of tokamak plasma equilibrium, describing the relationship between plasma pressure distribution, poloidal flux function, and poloidal field current distribution.

[0041] Plasma current: a current that flows in the circumferential direction of a tokamak, generated by the induction effect of a magnetic field or by being driven by an external current.

[0042] In tokamak experiments, a "shot" refers to each independently conducted plasma discharge experiment. Each discharge experiment is typically assigned a specific number for easy identification and data recording, allowing researchers to compare and analyze results from experiments conducted at different times and under different conditions.

[0043] In a spherical tokamak, the state and behavior of plasma need to be monitored in real time using various diagnostic methods, among which magnetic diagnostics is crucial. Magnetic diagnostics can accurately measure the plasma's current distribution, magnetic field topology, and instability evolution, primarily relying on devices such as the Flux Loop (FL) and Magnetic Probe (MP). Besides magnetic diagnostics, spherical tokamas also widely utilize optical diagnostics (such as interferometers and Thomson scattering systems for measuring electron density and temperature) and particle diagnostics (such as energy analyzers for measuring escape electron energy spectra). However, in magnetic diagnostics, the FL and MP, as core devices, provide the most direct and critical plasma information. The FL consists of a closed loop of wire; by integrating the induced electromotive force, it can measure the change in magnetic flux in the plasma, thereby calculating the total current distribution. The MP consists of multiple small induction coils installed at different locations to measure changes in the local magnetic field, thus providing important data for analyzing magnetohydrodynamic instabilities, magnetic island structures, and boundary magnetic fields. Due to the compact structure of the spherical tokamak, the signal acquisition process for FL and MP requires particularly precise design to reduce noise interference and improve measurement reliability, ultimately providing high-quality data support for plasma equilibrium reconstruction and configuration control.

[0044] Although magnetic diagnostic signals provide a wealth of crucial information in practice, during measurement, single-turn loop and magnetic probe signals are often affected by factors such as noise, sensor drift, or data loss, which can lead to instability in plasma equilibrium reconstruction results. Traditional signal processing methods rely on manual screening of valid signals, a process that is not only highly subjective but may also result in the loss of useful information, thus affecting the accuracy of the final reconstruction. Therefore, how to compensate for the inconsistencies in magnetic probe signals through more automated and precise methods has become a key challenge in improving the accuracy and stability of plasma equilibrium reconstruction.

[0045] To address the aforementioned problems, this application provides a training method for a data completion model for magnetic diagnostics. One or more embodiments of this application also relate to a training apparatus for a data completion model for magnetic diagnostics, a data completion method for magnetic diagnostics, a data completion device for magnetic diagnostics, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.

[0046] See Figure 1 , Figure 1 This is a flowchart of a training method for a data completion model for magnetic diagnostics provided in one embodiment of this application, which specifically includes the following steps.

[0047] Step 102: Obtain the set number of sample measurement data obtained by the first magnetic diagnostic device, and determine the valid measurement samples of the first magnetic diagnostic device from the set number of sample measurement data.

[0048] The sample measurement data consists of multiple data points measured by the first magnetic diagnostic device within a specific time period. These data reflect the changes in the magnetic field at different locations and times. For example, the data sequence measured by the single-loop device is: [{Measurement value of single-loop 1: 0.5 Weber} - {Measurement value of single-loop 2: 0.6 Weber} - {Measurement value of single-loop 3: 0.45 Weber}]. Valid measurement samples are data points selected from the sample measurement data that meet quality standards. These data points are not affected by noise, sensor drift, or data loss, ensuring their accuracy and reliability. For example, the valid measurement samples selected from the above single-loop data are: [{Valid measurement value of single-loop 1: 0.5 Weber} - {Valid measurement value of single-loop 3: 0.45 Weber}].

[0049] In practice, the system first acquires a set number of sample measurement data points obtained by the first magnetic diagnostic device. These data typically contain magnetic field strength information at multiple time points and spatial locations. Next, the system determines the valid measurement samples, a step involving quality assessment of the sample measurement data. Specifically, the system checks each data point for outliers or noise and determines its validity based on preset standards. Invalid data points may be due to sensor malfunction, external interference, or other factors and therefore need to be excluded.

[0050] Specifically, in the magnetic diagnostic task of the spherical tokamak, the system first acquires multiple sample measurement data obtained by the single-turn ring device at a certain moment, such as [{measurement value of single-turn ring 1: 0.5 Weber} - {measurement value of single-turn ring 2: 0.6 Weber} - {measurement value of single-turn ring 3: 0.45 Weber}]. Then, the system filters out valid measurement samples according to preset quality standards. For example, if the measurement value of single-turn ring 2 shows obvious sensor drift, it is marked as invalid, and the final valid measurement samples are [{valid measurement value of single-turn ring 1: 0.5 Weber} - {valid measurement value of single-turn ring 3: 0.45 Weber}]. These valid measurement samples will be used for subsequent model training and plasma state analysis, ensuring the accuracy and reliability of the data.

[0051] Further, acquiring a set number of sample measurement data points measured by a first magnetic diagnostic device, and determining valid measurement samples from the set number of sample measurement data points, includes: acquiring sample measurement data points of a set number of values ​​measured by at least two first magnetic diagnostic devices in multiple measurement batches, and data reference identifiers corresponding to the sample measurement data, wherein the data reference identifiers are used to indicate whether the sample measurement data is valid; based on the data reference identifiers and the sample measurement data, determining at least one target magnetic diagnostic device among the at least two first magnetic diagnostic devices, wherein the at least one target magnetic diagnostic device is a first magnetic diagnostic device whose sample measurement data is valid in any measurement batch; and determining valid measurement samples from the sample measurement data based on the at least one target magnetic diagnostic device.

[0052] Data reference identifiers are used to indicate whether sample measurement data is valid, such as marking a valid single-turn loop signal or magnetic probe signal. Target magnetic diagnostic equipment refers to the first magnetic diagnostic equipment whose sample measurement data is valid in any measurement batch; that is, the data from these equipment remains of high quality throughout the experiment.

[0053] In practice, the system first acquires sample measurement data of set values ​​obtained by at least two primary magnetic diagnostic devices in multiple measurement batches, along with corresponding data reference identifiers. These data reference identifiers help the system identify the validity of each sample measurement data. For example, in a particular firing cycle, the measurement data for single-loop 1, single-loop 2, and single-loop 3 are valid, invalid, and valid, respectively. Based on these data reference identifiers, the system can filter out single-loop devices that are valid in all measurement batches. Specifically, the system examines the sample measurement data of each primary magnetic diagnostic device in each measurement batch to determine which devices' data are valid across all batches.

[0054] Next, based on the data reference identifier and sample measurement data, the system identifies at least one target magnetic diagnostic device among at least two first magnetic diagnostic devices. These target magnetic diagnostic devices are those whose sample measurement data are valid in any measurement batch. For example, if single-turn loop 1 is valid in all measurement batches, then single-turn loop 1 is the target magnetic diagnostic device.

[0055] Finally, the system identifies valid measurement samples from the sample measurement data based on at least one target magnetic diagnostic device. This means that the system will only use data from devices that are valid across all measurement batches as valid measurement samples for subsequent analysis. This screening method ensures data quality and consistency, avoiding the impact of invalid data on model training and results analysis.

[0056] Specifically, in the spherical tokamak magnetic diagnostics mission, researchers aimed to identify single-turn ring devices that were effective across all firing cycles to optimize plasma state analysis. The system first acquired sample measurement data and data reference identifiers for multiple first magnetic diagnostic devices (such as single-turn ring 1, single-turn ring 2, and single-turn ring 3) across multiple measurement batches. For example, single-turn ring 1 was effective in all measurement batches, while single-turn ring 2 contained invalid data in some batches. Based on the data reference identifiers, the system selected single-turn ring 1 as the target magnetic diagnostic device and determined its sample measurement data across all measurement batches as valid measurement samples. These valid measurement samples were used for subsequent model training and plasma state analysis, ensuring the accuracy and reliability of the data.

[0057] By applying this embodiment, and screening sample measurement data from multiple measurement batches, a single-turn loop device valid in all batches can be identified, thereby ensuring the accuracy and reliability of subsequent data analysis. This method not only improves the completeness and accuracy of the data but also reduces manual intervention, enhancing task efficiency and the reliability of the analysis results.

[0058] Further, acquiring sample measurement data of at least two first magnetic diagnostic devices at multiple measurement batches with a set value includes: acquiring historical measurement data of at least two first magnetic diagnostic devices and the corresponding current value of the historical measurement data within a target time period, wherein the current value is used to characterize the historical measurement data measured by at least two first magnetic diagnostic devices when the plasma current reaches the current value, and the target time period includes multiple measurement batches; and filtering sample measurement data from the historical measurement data based on a preset current threshold and current value.

[0059] Historical measurement data refers to the magnetic field-related data measured by the first magnetic diagnostic device within the target time period. These data reflect the influence of plasma current on the magnetic field at different time points. Current values ​​are used to characterize historical measurement data measured by at least two first magnetic diagnostic devices when the plasma current reaches a specific value. For example, in a certain measurement batch, single-turn ring 1 and single-turn ring 2 recorded magnetic field strength data when the plasma current was 5 kA and 12 kA, respectively. A preset current threshold is a key parameter used to filter out sample measurement data that meet the conditions, ensuring that only data when the plasma current reaches a certain level (e.g., greater than 10 kA) is retained.

[0060] In practice, the system first acquires historical measurement data and corresponding current values ​​from at least two primary magnetic diagnostic devices within the target time period. The target time period includes multiple measurement batches, each corresponding to different experimental conditions or plasma states. Next, the system filters sample measurement data from the historical data based on a preset current threshold and current value. Specifically, the system checks whether the current value in each measurement batch exceeds a preset current threshold (e.g., 10kA) and marks historical measurement data that meets the condition as sample measurement data. For example, if the current value of single-turn ring 1 in a measurement batch is 8kA, the data from that batch will not be selected as sample measurement data; while the current value of single-turn ring 2 in another measurement batch is 12kA, the data from that batch will be retained as sample measurement data.

[0061] Specifically, in the spherical tokamak magnetic diagnostics task, researchers aimed to select sample measurement data with plasma currents greater than 10 kA to optimize plasma equilibrium reconstruction. The system first acquired historical measurement data and corresponding current values ​​from multiple primary magnetic diagnostic devices (such as single-turn ring 1, single-turn ring 2, and single-turn ring 3) within the target time period. For example, single-turn ring 1 had a current value of 8 kA in one measurement batch and 12 kA in another; single-turn ring 2 had a current value greater than 10 kA in all measurement batches. The system selected sample measurement data that met the preset current threshold (10 kA), ultimately retaining all data from single-turn ring 2 and the data from single-turn ring 1 at a current value of 12 kA as sample measurement data. These sample measurement data will be used for subsequent model training and plasma state analysis, ensuring the accuracy and reliability of the data.

[0062] By applying this embodiment, and filtering historical measurement data to ensure that only sample measurement data with plasma currents greater than a preset current threshold (e.g., 10kA) are retained, the accuracy and reliability of data analysis can be significantly improved. This method avoids the impact of noise interference or non-ideal data that may exist under low current conditions on subsequent analysis, while enhancing the physical consistency and reliability of the data.

[0063] Furthermore, based on at least one target magnetic diagnostic device, the sample measurement data is determined from the sample measurement data, including: screening the target measurement data measured by at least one target magnetic diagnostic device from the sample measurement data; and for any target magnetic diagnostic device, normalizing the target measurement data corresponding to any target magnetic diagnostic device to obtain the sample measurement data.

[0064] Target measurement data refers to data obtained from at least one target magnetic diagnostic device selected from the sample measurement data. These selected data represent high-quality data points valid across all measurement batches. Normalization is a standardization process performed on the data obtained from each single-loop device in its different shots, aiming to make the data comparable at the same scale, thereby improving the accuracy and reliability of subsequent analysis.

[0065] In practice, the system first filters the target measurement data from at least one target magnetic diagnostic device in the sample measurement data. For example, if both single-loop 1 and single-loop 2 are target magnetic diagnostic devices, the system will filter the measurement data of these two single loops in each measurement batch from all sample measurement data. Next, for any target magnetic diagnostic device, the system normalizes its corresponding target measurement data. Specifically, for each single-loop device, the system normalizes the data measured in different shots to ensure that the data are comparable at the same scale. Various methods can be used for normalization, such as min-max normalization or Z-score standardization, which are not limited here.

[0066] For example, suppose the data for single-turn loop 1 measured in shot A is [0.5, 0.6, 0.7] Webers, and the data measured in shot B is [1.0, 1.2, 1.4] Webers. To perform normalization, the system can choose to use the min-max normalization method to transform these data into the interval [0, 1]. After normalization, the data for single-turn loop 1 in shot A becomes [0.0, 0.5, 1.0], and the data in shot B becomes [0.0, 0.667, 1.0]. The purpose of this is to eliminate potential dimensional differences between different shot counts, making the data comparable at the same scale.

[0067] Specifically, in the magnetic diagnostics task of the spherical tokamak, researchers aimed to normalize the data from single-turn ring devices to optimize plasma state analysis. The system first screened out single-turn ring devices that were valid across all measurement batches, such as single-turn ring 1 and single-turn ring 2. Then, the system normalized the data measured by each single-turn ring device in different shots. For example, the data measured by single-turn ring 1 in shots A, B, and C were [0.5, 0.6, 0.7] Weber, [1.0, 1.2, 1.4] Weber, and [0.8, 0.9, 1.1] Weber, respectively. The system used a min-max normalization method to process these data, obtaining normalized data of [0.0, 0.5, 1.0], [0.0, 0.667, 1.0], and [0.333, 0.667, 1.0], respectively. These normalized data will be used for subsequent model training and plasma state analysis, ensuring the accuracy and reliability of the data.

[0068] By applying this embodiment, through screening sample measurement data and normalizing the data measured by each single-ring device in different blasts, the accuracy and reliability of data analysis can be significantly improved. This method not only ensures data quality and consistency but also reduces the impact of dimensional differences between different batches, thereby improving task efficiency and the credibility of analysis results.

[0069] Step 104: Input the effective measurement samples and the test positions of at least one sample test signal into the initial completion model to predict the predicted magnetic flux data of each test position.

[0070] The sample test signal is a measurement signal from a generalized magnetic diagnostic device, such as a single-turn loop signal and a magnetic probe signal. These signals reflect the intensity variation of the magnetic field at different locations. The predicted magnetic flux data is a specific value calculated by the initial completion model based on the input valid measurement samples and the test positions of each sample test signal, representing the magnetic flux at each test position. For example, the predicted magnetic flux data is: [{Predicted magnetic flux of single-turn loop 1: 0.48 Weber} - {Predicted magnetic flux of single-turn loop 2: 0.59 Weber}].

[0071] In practice, the system first acquires valid measurement samples, which are high-quality data points selected from the data obtained by the first magnetic diagnostic device. Then, the system inputs these valid measurement samples along with the measured positions of at least one sample signal into the initial completion model. Specifically, the system concatenates the position information of each valid measurement sample with that of the corresponding magnetic diagnostic device within the spherical tokamak, using this as input to the initial completion model. For example, for a single-turn loop device, its position information might include radial coordinate R and axial coordinate Z. In this way, the model can predict the magnetic flux data for each sample measured position.

[0072] Specifically, in the magnetic diagnostic task of the spherical tokamak, the system first acquires valid measurement samples of the single-turn loop device, such as [{valid measurement value of single-turn loop 1: 0.5 Weber} - {valid measurement value of single-turn loop 3: 0.45 Weber}]. Next, the system concatenates these valid measurement samples with the test positions of the magnetic probe signals [position of single-turn loop 2 (R = 1.3m, Z = 0.6m), position of single-turn loop 4 (R = 1.4m, Z = 0.7m)] and inputs this data into the initial completion model. Based on this input data, the model predicts the predicted magnetic flux data for each test position, for example, [{predicted magnetic flux of single-turn loop 2: 0.48 Weber} - {predicted magnetic flux of single-turn loop 4: 0.44 Weber} - {predicted magnetic flux of magnetic probe 1: 0.47 Weber} - {predicted magnetic flux of magnetic probe 2: 0.54 Weber}].

[0073] Furthermore, the sample location to be tested includes the location of the diagnostic device and the external diagnostic location; the sample measurement data and the sample location to be tested are input into the initial completion model to predict the predicted magnetic flux data of the sample location to be tested, including: acquiring the diagnostic device location and plasma configuration information of at least two first magnetic diagnostic devices; determining the external diagnostic location based on the plasma configuration information, wherein the external diagnostic location is the location outside the plasma in the region to be tested; inputting the sample measurement data and the diagnostic device location into the initial completion model to predict the first predicted magnetic flux data of the diagnostic device location; inputting the sample measurement data and the external diagnostic location into the initial completion model to predict the second predicted magnetic flux data of the external diagnostic location.

[0074] The diagnostic device location refers to the specific position of the magnetic diagnostic device inside the tokamak device, such as the location of a single-turn loop or magnetic probe. The external diagnostic location refers to the location outside the plasma in the test area; these locations are used to monitor the magnetic field distribution outside the plasma boundary. Sample measurement data is a collection of data obtained by the first magnetic diagnostic device in multiple measurement batches; this data reflects the changes in the magnetic field at different times and spatial locations.

[0075] In practical implementation, the system first acquires the diagnostic device locations and plasma configuration information of at least two primary magnetic diagnostic devices. The diagnostic device locations provide the specific coordinates (e.g., radial coordinate R and axial coordinate Z) of the magnetic diagnostic device within the tokamak device. The plasma configuration information describes the morphology and boundaries of the plasma within the tokamak, helping to determine which locations are outside the plasma. Based on the plasma configuration information, the system can determine the external diagnostic locations, i.e., locations outside the plasma in the region to be tested. For example, in a spherical tokamak, the plasma boundary is typically a closed surface, and the external diagnostic locations are specific locations outside this closed surface.

[0076] Next, the system inputs the sample measurement data and the location of the diagnostic equipment into the initial completion model to predict the first predicted magnetic flux data for the location of the diagnostic equipment. This step utilizes existing measurement data and equipment location information to generate predicted magnetic flux values ​​at the locations of each magnetic diagnostic equipment through the model. For example, for the valid measurement data of single-turn loop 1 and single-turn loop 2 and the location information of single-turn loop 3, the system can predict the magnetic flux data at the location of single-turn loop 3.

[0077] The system then inputs the sample measurement data and the external diagnostic location into the initial completion model to predict the second predicted magnetic flux data for the external diagnostic location. This step expands the model's application scope beyond existing magnetic diagnostic device locations to predict magnetic field distributions outside the plasma boundary. For example, if the external diagnostic location is (R = 1.6 m, Z = 0.9 m), the system can predict the magnetic flux data at that location based on the sample measurement data.

[0078] Specifically, in the magnetic diagnostics task of a spherical tokamak, researchers aimed to predict magnetic probe signals to optimize plasma state analysis. The system first acquired the diagnostic device location of a single-turn ring device [(R = 1.2 m, Z = 0.5 m), (R = 1.3 m, Z = 0.6 m)] and plasma configuration information. Based on the plasma configuration information, the system determined the external diagnostic location [(R = 1.6 m, Z = 0.9 m)]. Then, the system input the effective measurement data of the single-turn ring device and the diagnostic device location into an initial completion model to predict the first predicted magnetic flux data for the diagnostic device location, for example [{predicted magnetic flux for single-turn ring 1: 0.48 Weber}, {predicted magnetic flux for single-turn ring 2: 0.59 Weber}]. Next, the system input the same sample measurement data and the external diagnostic location into the initial completion model to predict the second predicted magnetic flux data for the external diagnostic location, for example [{predicted magnetic flux for external diagnostic location: 0.25 Weber}]. These predicted magnetic flux data will be used for further analysis of the plasma state, ensuring the accuracy and reliability of the data.

[0079] By processing sample measurement data and the sample's test location, this embodiment allows the system to predict not only the magnetic flux data at the location of the magnetic diagnostic device but also the magnetic field distribution outside the plasma boundary, thus providing a comprehensive understanding of the magnetic field distribution throughout the tokamak device. This method not only improves data integrity and accuracy but also reduces human intervention, enhancing task efficiency and the reliability of analysis results.

[0080] Step 106: Based on the prediction loss and physical constraint loss of the predicted magnetic flux data, train the initial completion model to obtain the target data completion model. The prediction loss is used to indicate the difference between the predicted magnetic flux data and the measured magnetic flux data, and the physical constraint loss refers to the loss of the predicted magnetic flux data under the physical constraints of the plasma equilibrium configuration.

[0081] The sample signal indicates the type of magnetic diagnostic device to be predicted, such as a single-loop or magnetic probe. These signals represent measurements at specific locations from different types of magnetic field measuring devices. For example, a single-loop signal sequence: [{Measurement value of single-loop 1: 0.5 Weber, location: (R = 1.2 m, Z = 0.5 m)} - {Measurement value of single-loop 2: 0.6 Weber, location: (R = 1.3 m, Z = 0.6 m)}; a magnetic probe signal sequence: [{Measurement value of magnetic probe 1: 0.4 Weber, location: (R = 1.4 m, Z = 0.7 m)} - {Measurement value of magnetic probe 2: 0.55 Weber, location: (R = 1.5 m, Z = 0.8 m)}].

[0082] In practice, the system first acquires valid measurement samples, which are high-quality data points selected from the data obtained by the first magnetic diagnostic device. Then, the system inputs these valid measurement samples along with the measured positions of at least one sample signal into the initial completion model. Specifically, the system concatenates the position information of each valid measurement sample with the corresponding magnetic diagnostic device within the spherical tokamak as input to the initial completion model. In this way, the model can predict the magnetic flux data for each sample's measured position. Next, the system calculates the prediction loss based on the predicted magnetic flux data and the physical constraint loss based on the physical constraints of the plasma equilibrium configuration. The prediction loss measures the difference between the predicted and measured magnetic flux data, while the physical constraint loss ensures that the prediction results conform to physical laws. For example, under the constraints of the Grad-Shafranov equations (GS equations), the predicted magnetic flux data should satisfy specific magnetic field distribution conditions.

[0083] Specifically, in the magnetic diagnostic task of the spherical tokamak, the system first acquires the effective measurement samples and corresponding measured magnetic flux data of the single-turn ring device, such as [{effective measurement value of single-turn ring 1: 0.5 Weber, position: (R=1.2m, Z=0.5m), measured magnetic flux: 0.5 Weber} - {effective measurement value of single-turn ring 3: 0.45 Weber, position: (R=1.5m, Z=0.8m), measured magnetic flux: 0.46 Weber}]. Then, the system inputs these effective measurement samples into the initial completion model to obtain predicted magnetic flux data, for example, [{predicted magnetic flux of single-turn ring 1: 0.48 Weber} - {predicted magnetic flux of single-turn ring 3: 0.44 Weber}]. Next, the system calculates the prediction loss and finds a difference of 0.02 Weber between the predicted and measured magnetic flux of single-turn ring 1. Simultaneously, the system calculates the physical constraint loss based on the GS equation to ensure that the predicted magnetic flux data conforms to the physical constraints of the plasma equilibrium configuration. After multiple iterations of training, the system optimized the initial completion model and finally obtained the target data completion model. Throughout the process, the system automatically completed model training and optimization, reducing manual intervention and improving task efficiency. These optimized predicted magnetic flux data will be used for further analysis of the plasma state, ensuring the accuracy and reliability of the data.

[0084] Furthermore, before training the initial completion model based on the prediction loss and physical constraint loss of the predicted magnetic flux data to obtain the target data completion model, the process includes: acquiring the measured magnetic flux data corresponding to the location of the diagnostic equipment; calculating the prediction loss based on the first predicted magnetic flux data and the measured magnetic flux data; and calculating the higher-order variation characteristics of the predicted magnetic flux data in the radial and axial directions based on the second predicted magnetic flux data and the external diagnostic location to obtain the physical constraint loss.

[0085] Measured magnetic flux data refers to the magnetic field flux values ​​obtained experimentally at the location of the diagnostic equipment. These data provide a reference standard under actual physical conditions. Prediction loss is an indicator that measures the difference between the model's predicted magnetic flux data and the measured magnetic flux data, and is used to evaluate the accuracy of the model output. Physical constraint loss is the higher-order variation characteristics of the predicted magnetic flux data in the radial and axial directions, calculated based on the Grad-Shafranov (GS) equations, ensuring that the model output not only matches the experimental data but also conforms to the physical laws of plasma equilibrium configuration.

[0086] In practice, the system first acquires the measured magnetic flux data corresponding to the location of the diagnostic device. This data is usually extracted from experimental records or databases and represents the actual magnetic flux value measured at a specific location. For example, the measured magnetic flux of a single-turn ring 1 at location (R = 1.2 m, Z = 0.5 m) is 0.48 Weber.

[0087] Next, the system calculates the prediction loss based on the first predicted flux data and the measured flux data. Specifically, the system compares the difference between the first predicted flux data and the corresponding measured flux data for each diagnostic device location, and uses mean squared error (MSE) or other suitable loss functions to quantify this difference. For example, if the first predicted flux data for single-turn loop 1 is 0.47 Weber, while the measured flux is 0.48 Weber, the prediction loss reflects the difference between the two.

[0088] Then, based on the second predicted magnetic flux data and the external diagnostic location, the system calculates the higher-order variation characteristics of the predicted magnetic flux data in the radial and axial directions to obtain the physical constraint loss. This step uses the Grad-Shafranov (GS) equations to check whether the predicted magnetic flux data meets specific physical constraint conditions. Specifically, the system analyzes the higher-order variation characteristics of the predicted magnetic flux data, such as gradients and curvatures, in the radial (R) and axial (Z) directions to ensure that the magnetic field distribution is reasonable and meets the requirements of plasma equilibrium configuration. For example, at the external diagnostic location (R = 1.6 m, Z = 0.9 m), the system calculates the radial and axial gradients of the second predicted magnetic flux data and verifies them based on the GS equations.

[0089] Specifically, in the magnetic diagnostic task of the spherical tokamak, the system first acquires valid measurement samples of the single-turn ring device and its corresponding location information. For example, single-turn ring 1 is located at (R = 1.2 m, Z = 0.5 m), and the measured magnetic flux data at this location is 0.48 Weber. The system inputs these valid measurement samples into the initial completion model to obtain the first predicted magnetic flux data, for example, the predicted magnetic flux of single-turn ring 1 is 0.47 Weber. The system calculates the prediction loss and finds a difference of 0.01 Weber between the predicted magnetic flux of single-turn ring 1 and the measured magnetic flux. Next, based on the second predicted magnetic flux data at the external diagnostic location (R = 1.6 m, Z = 0.9 m), the system calculates its higher-order variation characteristics in the radial and axial directions, and calculates the physical constraint loss based on the GS equation to ensure that the predicted magnetic flux data conforms to the physical constraints of the plasma equilibrium configuration. After multiple iterations of training, the system optimizes the initial completion model and finally obtains the target data completion model.

[0090] By applying this embodiment, the prediction loss is calculated between the first predicted magnetic flux data and the measured magnetic flux data, and the physical constraint loss is calculated based on the GS equation for the second predicted magnetic flux data. This can effectively optimize the initial completion model, making its output highly consistent with the measured data and conforming to the physical constraints of the plasma equilibrium configuration. This improves the overall performance and reliability of the model and reduces the possibility of invalid or unreasonable predictions.

[0091] Further, obtaining the measured magnetic flux data corresponding to the location of the diagnostic device includes: determining the sample measurement batch of the sample measurement data; obtaining the device reference identifier of the first magnetic diagnostic device corresponding to the location of the diagnostic device in the sample measurement batch; and, if the device reference identifier indicates that the first magnetic diagnostic device corresponding to the location of the diagnostic device is a valid device, obtaining the measured magnetic flux data of the valid device.

[0092] The device reference identifier is a number used to indicate whether the first magnetic diagnostic device is valid within a specific measurement batch (shot). This identifier marks the validity of each single-turn loop or magnetic probe in each shot, ensuring that the validity of single-turn loops is consistent across different times within the same shot. When obtaining valid or invalid identifiers, it is essential to ensure that the shot number corresponds to the shot input to the model to guarantee the accuracy of loss calculation. Including invalid single-turn loop or magnetic probe data in loss calculations will result in poor model training performance. For example, suppose a spherical tokamak device has 28 single-loop rings. In 10 shots, single-loop rings numbered 14-28 are all valid. Then the measurement data of the 15 single-loop rings numbered 14-28 can be used as the input signal for the data completion model. Suppose that single-loop rings numbered 1-3 and 14-28 are valid in shot 1. Among them, single-loop rings numbered 1-3 are specific valid numbers in shot 1, and single-loop rings numbered 14-28 are valid numbers that are common to shot 1-10. When calculating the relevant losses of shot 1, in addition to single-loop rings numbered 14-28, it is still necessary to retrieve the measurement data of single-loop rings numbered 1-3 to participate in the loss calculation. The same applies to shot 2-10.

[0093] In practice, the system first determines the sample measurement batches of the sample measurement data. These batches correspond to different experimental conditions or plasma states, and each batch contains data records at multiple time points. Next, the system obtains the device reference identifier of the first magnetic diagnostic device corresponding to the location of the diagnostic device within the sample measurement batch. For example, in a certain shot, the validity identifiers of single-turn ring 1 and single-turn ring 2 are valid and invalid, respectively.

[0094] Specifically, the system checks the device reference identifier of each first magnetic diagnostic device in a specified sample measurement batch to confirm whether the device is valid. Only if the first magnetic diagnostic device corresponding to the location indicated by the device reference identifier is a valid device will the system further acquire the measured magnetic flux data of that valid device. For example, if the device reference identifier of a single-turn loop 1 is valid in a certain batch, the system will extract the measured magnetic flux data of that single-turn loop at all times in that batch.

[0095] Specifically, in the magnetic diagnostics task of a spherical tokamak, researchers aim to screen out effective single-turn loop devices in specific firing cycles to optimize plasma state analysis. The system first determines the sample measurement batch for the sample measurement data, such as firing cycle A. Then, the system obtains the device reference identifier for the first magnetic diagnostic device corresponding to its location in firing cycle A. Assume that the device reference identifiers for single-turn loop 1, single-turn loop 2, and single-turn loop 3 in firing cycle A are effective, invalid, and effective, respectively. Based on these device reference identifiers, the system screens out single-turn loop 1 and single-turn loop 3 as effective devices and extracts their measured magnetic flux data in firing cycle A from the database. For example, the measured magnetic flux data for single-turn loop 1 in firing cycle A is [{Time Point 1: 0.48 Weber}, {Time Point 2: 0.50 Weber}], and the measured magnetic flux data for single-turn loop 3 is [{Time Point 1: 0.45 Weber}, {Time Point 2: 0.47 Weber}].

[0096] In applying this embodiment, to ensure the accuracy of loss calculation, the system needs to guarantee that the device reference identifier used is consistent with the currently processed sample measurement batch. For example, if the system is processing data from a specific shot, it must use the device reference identifier corresponding to that shot to determine which single-turn loops or magnetic probes are valid. This step is crucial to avoid including data from invalid devices in the loss calculation, as invalid device data may introduce noise or outliers, thereby affecting the model's training performance.

[0097] Furthermore, before acquiring sample measurement data, the method further includes: acquiring historical measurement data of at least two first magnetic diagnostic devices within a target time period, wherein the target time period includes multiple measurement batches; for a target measurement batch, performing a reference evaluation on the historical measurement data corresponding to the target measurement batch based on a preset reference evaluation rule to obtain a reference evaluation result, wherein the target measurement batch is any one of the multiple measurement batches; if the reference evaluation result indicates that the historical measurement data is reference measurement data, generating a positive reference identifier for the first magnetic diagnostic device corresponding to the reference measurement data; if the reference evaluation result indicates that the historical measurement data is non-reference measurement data, generating a negative reference identifier for the first magnetic diagnostic device corresponding to the non-reference measurement data.

[0098] Positive and negative reference identifiers are numbers used to indicate whether the first magnetic diagnostic device (MDD) is valid within a specific measurement batch (shot). These identifiers help the system identify valid and invalid data within each measurement batch, ensuring that subsequent analyses use only high-quality data. Preset reference evaluation rules are a set of standards used to evaluate the quality of historical measurement data and determine whether it is reference measurement data (i.e., valid data). A target measurement batch refers to any one of multiple measurement batches; by evaluating its historical measurement data, the validity of each MMD device within that batch can be determined.

[0099] In practice, the system first acquires historical measurement data from at least two primary magnetic diagnostic devices within a target time period, which includes multiple measurement batches. For example, within a certain time period, the system may acquire historical measurement data for single-loop 1, single-loop 2, and single-loop 3 across multiple shot runs.

[0100] For each target measurement batch, the system performs a reference evaluation on the corresponding historical measurement data based on preset reference evaluation rules to obtain a reference evaluation result. The preset reference evaluation rules may include checking for outliers, noise, or deviations from other probe signals. For example, in a particular shot, the system will evaluate the data quality of single-loop 1, single-loop 2, and single-loop 3 according to these rules.

[0101] If the reference evaluation result indicates that the historical measurement data is the reference measurement data (i.e., valid data), then a positive reference identifier is generated for the first magnetic diagnostic device corresponding to the reference measurement data. For example, if the data of single-turn ring 1 and single-turn ring 3 are evaluated as valid in a certain shot, then the system generates positive reference identifiers for these two devices.

[0102] Conversely, if the reference evaluation result indicates that the historical measurement data is non-reference measurement data (i.e., invalid data), a negative reference identifier is generated for the first magnetic diagnostic device corresponding to the non-reference measurement data. For example, if the data of single-turn ring 2 is evaluated as invalid in a certain shot, the system generates a negative reference identifier for that device.

[0103] To ensure the accuracy of loss calculation, the system needs to guarantee that the reference identifier used is consistent with the sample measurement batch being processed. For example, if the system is processing data from a specific shot, it must use the reference identifier corresponding to that shot to determine which single-turn loops or magnetic probes are valid. This step is crucial to avoid including data from invalid devices in the loss calculation, as data from invalid devices may introduce noise or outliers, thus affecting the model's training performance.

[0104] Specifically, in the magnetic diagnostics mission of the spherical tokamak, researchers aimed to screen out effective single-turn ring devices in specific firing cycles to optimize plasma state analysis. The system first acquired historical measurement data and corresponding measurement batches for multiple primary magnetic diagnostic devices within the target time period. For example, within the target time period, the system acquired historical measurement data for single-turn ring 1, single-turn ring 2, and single-turn ring 3 in firing cycles A, B, and C.

[0105] For shot A, the system performs a reference evaluation on the historical measurement data of that batch based on preset reference evaluation rules. Assume that data from single-loop 1 is evaluated as valid, data from single-loop 2 is evaluated as invalid, and data from single-loop 3 is evaluated as valid. Based on these evaluation results, the system generates positive reference identifiers for single-loop 1 and single-loop 3, and a negative reference identifier for single-loop 2.

[0106] In this embodiment, the system automatically completes data acquisition, evaluation, and label generation, reducing manual intervention and improving task efficiency. Through this mechanism, the system can efficiently and accurately filter out valid single-loop devices from multiple batches of data, greatly improving the quality of data analysis and the credibility of research results. Simultaneously, it ensures the accuracy of loss calculation, avoids interference from invalid device data, and thus enhances the effectiveness of model training. In this way, the system can not only identify the validity of each measuring device in each firing cycle but also ensure that only high-quality data is used for model training and prediction in subsequent steps.

[0107] Furthermore, based on the prediction loss and physical constraint loss of the predicted magnetic flux data, the initial completion model is trained to obtain the target data completion model, including: obtaining the preset loss weights; calculating the total loss based on the preset loss weights, prediction loss and physical constraint loss; and training the initial completion model based on the total loss until the training stops, thereby obtaining the data completion model.

[0108] Preset loss weights are parameters used to adjust the relative importance of prediction loss and physical constraint loss, ensuring a balance between the impact of the two losses on model optimization during training. Prediction loss measures the difference between the model's predicted magnetic flux data and the actual measured magnetic flux data, while physical constraint loss, based on physical constraints (such as the Grad-Shafranov equations), ensures that the prediction results conform to the physical laws of plasma equilibrium configuration. The total loss is a comprehensive metric calculated by combining prediction loss, physical constraint loss, and preset loss weights, used to guide the initial training process of the completed model.

[0109] The preset loss weights are parameters used to adjust the relative importance of prediction loss and physical constraint loss. By setting different weights, the influence of each in model training can be controlled. For example, if physical consistency is more important, the physical constraint loss can be given a higher weight; conversely, if data fit is more important, the prediction loss can be given a higher weight. The prediction loss measures the difference between the magnetic flux data predicted by the model and the measured magnetic flux data, reflecting the accuracy of the model output. The physical constraint loss is calculated based on physical constraints (such as the GS equations) to ensure that the model output not only matches the experimental data but also conforms to physical laws.

[0110] In practice, the system first obtains preset loss weights, which determine the relative importance of prediction loss and physical constraint loss in model training. For example, suppose the prediction loss weight is 0.7 and the physical constraint loss weight is 0.3. Then, based on the preset loss weights, prediction loss, and physical constraint loss, the system calculates the total loss.

[0111] Then, the system trains the initial completed model based on the total loss until the training stopping condition is met, thus obtaining the target data completed model. Training stopping conditions typically include reaching a predetermined maximum number of iterations, the total loss falling below a certain threshold, or performance on the validation set no longer improving. For example, in each iteration, the system uses gradient descent to update the model parameters, gradually reducing the total loss until the set stopping condition is met.

[0112] Specifically, in the magnetic diagnostics task of a spherical tokamak, researchers aimed to optimize plasma state analysis. The system first acquires valid measurement samples from a single-turn ring device and their corresponding position information, and determines preset loss weights. Next, the system trains an initial completion model based on the total loss, gradually updating the model parameters using gradient descent. After multiple iterations, when the total loss falls below a set threshold or the maximum number of iterations is reached, the system stops training and obtains the target data completion model.

[0113] By applying this embodiment, and by introducing preset loss weights and combining the predicted loss with the physical constraint loss to calculate the total loss, the initial completed model can be effectively optimized. This ensures that the output not only closely matches the measured data but also conforms to the physical constraints of the plasma equilibrium configuration, thereby improving the overall performance and reliability of the model. This method reduces the possibility of invalid or unreasonable predictions and enhances the model's adaptability and robustness under complex experimental conditions.

[0114] One embodiment of this application implements an optimization of the initial completion model by using prediction loss and physical constraint loss, which can effectively improve the accuracy and physical consistency of magnetic flux data completion, ensuring that the model output is highly consistent with the measured data and conforms to the physical constraints of the plasma equilibrium configuration, thereby improving the overall model performance and reliability.

[0115] See Figure 2 , Figure 2 This is a flowchart of a data completion method for magnetic diagnostics provided in one embodiment of this application, which specifically includes the following steps.

[0116] Step 202: Obtain the set number of target measurement signals measured by the first magnetic diagnostic device, and determine the valid measurement signal of the first magnetic diagnostic device from the set number of target measurement signals.

[0117] The target measurement signal is the type of magnetic diagnostic device signal that researchers hope to complete during the actual prediction phase after model training, such as a single-turn loop signal, a magnetic probe signal, or other types of magnetic field measurement signals.

[0118] In practice, the system first acquires target measurement signals of predetermined values ​​obtained from the first magnetic diagnostic device. These signals represent the types of magnetic diagnostic devices the researchers wish to supplement and their corresponding measurement values. Next, the system performs a quality assessment on these target measurement signals, filtering out valid signals. Specifically, the system checks each target measurement signal for outliers or noise and determines its validity based on preset standards. Invalid signals may be due to sensor malfunction, external interference, or other factors and therefore need to be excluded.

[0119] Specifically, in the magnetic diagnostics task of the spherical tokamak, researchers aimed to complete the single-loop signal to optimize plasma state analysis. The system first acquired the target measurement signals of the single-loop device, such as [{Measurement value of single-loop 1: 0.5 Weber, position: (R = 1.2 m, Z = 0.5 m)} - {Measurement value of single-loop 2: 0.6 Weber, position: (R = 1.3 m, Z = 0.6 m)} - {Measurement value of single-loop 3: 0.45 Weber, position: (R = 1.5 m, Z = 0.8 m)}]. Then, the system filters out valid measurement signals according to preset quality standards. For example, it finds that the measurement value of single-turn ring 2 has obvious sensor drift, so it is marked as invalid. The final valid measurement signals are: [{valid measurement value of single-turn ring 1: 0.5 Weber, position: (R=1.2m, Z=0.5m)}-{valid measurement value of single-turn ring 3: 0.45 Weber, position: (R=1.5m, Z=0.8m)}].

[0120] Step 204: Input the effective measurement signal and the target test position of the target test signal into the target data completion model to predict the target magnetic flux data of each target test position. The target data completion model is trained based on the test positions of at least one sample test signal under prediction loss and physical constraint loss. The target test signal is any one of at least one sample test signal.

[0121] In practice, the system first acquires valid measurement signal identifiers, which are high-quality data points selected from the data measured by the first magnetic diagnostic device. Then, the system concatenates these valid measurement signals with the target locations of the signal to be measured and inputs this data into the target data completion model. Specifically, even if only single-loop data is input, the system can predict the magnetic probe signal by concatenating the position information of the magnetic probe into the input. For example, the system can concatenate the valid measurement data of single-loop 1 and single-loop 3 with the position information of single-loop 3 as input to the model. In this way, the model can predict the magnetic flux data at the magnetic probe location using existing single-loop data, and can not only complete missing data but also verify the accuracy of existing data.

[0122] The target data completion model is trained based on the test locations of at least one sample of the test signal, under both prediction and physical constraint losses. The prediction loss measures the difference between the predicted and measured magnetic flux data, while the physical constraint loss ensures that the prediction results conform to the physical laws of plasma equilibrium configuration. In this way, even if the input contains only single-turn loop data, the model can generate high-precision magnetic probe signal predictions and can be validated against existing data.

[0123] Specifically, in the magnetic diagnostics task of a spherical tokamak, researchers aim to predict magnetic probe signals to optimize plasma state analysis. The system first acquires valid measurement signal identifiers for single-turn loop devices, such as single-turn loop 1 and single-turn loop 3. Then, the system concatenates these valid measurement signal identifiers with the position information of magnetic probe 1 and magnetic probe 2 [(R = 1.4 m, Z = 0.7 m), (R = 1.5 m, Z = 0.8 m)], serving as input to the target data completion model. Based on this input data, the model predicts the magnetic flux data at each magnetic probe position, for example, [{predicted magnetic flux of magnetic probe 1: 0.47 Weber} - {predicted magnetic flux of magnetic probe 2: 0.54 Weber}]. Furthermore, the system verifies existing magnetic probe data, identifying deviations or anomalies, thus prompting researchers to conduct further checks or corrections.

[0124] In this embodiment, by acquiring a set number of target measurement signals measured by a first magnetic diagnostic device, identifying the valid measurement signals, and then inputting these valid measurement signals along with the target measurement locations into a target data completion model, the target magnetic flux data for each target measurement location can be predicted. This model is trained based on the measurement locations of at least one sample measurement signal, under prediction loss and physical constraint loss, ensuring the accuracy and physical consistency of the completed data. This not only achieves automatic data completion and reduces manual intervention but also improves the accuracy and reliability of magnetic diagnostic data and optimizes the results of plasma equilibrium reconstruction.

[0125] The following is in conjunction with the appendix Figure 3 Taking the training method of the data completion model for magnetic diagnosis provided in this application in the magnetic diagnosis of a tokamak device as an example, the training method of the data completion model for magnetic diagnosis will be further explained. Among them, Figure 3 This is a flowchart of the training process of a data completion model for magnetic diagnostics provided in one embodiment of this application, which specifically includes the following steps.

[0126] Step 302: Prepare the data needed to train the neural network.

[0127] Specifically, data from shot 119 in the experiment were selected, and corresponding single-turn loops (28 in total), magnetic probes (56 in total), and plasma current signals were extracted from the database. To ensure the validity of the training data, after data screening, only data with plasma current greater than 10kA (9100 time points in total) were retained to avoid the adverse effects of data with too small values ​​on the training process, thereby improving training efficiency and reducing training losses.

[0128] Since the selected 119-shot data may be distributed across multiple time periods, single-loop signals from different shots may be invalid. To ensure that all input signals to the neural network are valid and to avoid invalid signals affecting model training, the 119-shot data needs to be filtered to extract single-loop numbers that remain valid across all shots, and only these valid signals are used as input features for the neural network. For example, if there are 28 single-loops in 10-shot data, and single-loop number 1 from the first shot is invalid, single-loop number 2 from the second shot is invalid, single-loop number 3 from the third shot is invalid, while single-loops from the fourth to the tenth shot are valid, then the final selected common valid single-loops are numbers 4 to 28, a total of 25. This filtering process ensures the validity of the input data, prevents invalid signals from interfering with model training, and improves model stability and training accuracy. Furthermore, all valid single-loop signals are normalized. Normalization eliminates differences in signal magnitude, improving the stability, convergence speed, and generalization ability of model training.

[0129] Normalization scales data to a fixed range (e.g., [0, 1] or [-1, 1]) through a linear transformation, suitable for situations where the data distribution is known and there are no obvious outliers. Its calculation formula is as follows: x' = (x - xmin) / (xmax - xmin), where x is the original data, xmin and xmax are the minimum and maximum values ​​of the data, respectively, and x' is the normalized data. This method can eliminate the influence of data units, ensuring different features have the same scale, thus improving the stability and convergence speed of model training.

[0130] Invalid signal marking rules include: no signal; zero drift that is difficult to remove using a zero drift removal function (zero drift can be removed by means removal, high-pass filtering, differential method, wavelet transform or empirical mode decomposition, etc., and the appropriate processing method should be selected according to the signal characteristics); the signal differs significantly from the signals of its surrounding probes and its symmetrical probes (more than 10%); the difference between the experimental signal and the simulated signal is greater than 10%.

[0131] For each shot in the 119-shot data set, the valid and invalid numbers of the magnetic probes and single-turn loops need to be recorded and saved for use in constructing the loss function. The specific steps are as follows: Traverse the 119-shot data set, identify and record the valid and invalid magnetic probe and single-turn loop signal numbers for each shot; store the valid and invalid numbers for each shot separately to ensure future availability; design a loss function based on this recorded information, enabling it to weight or mask the validity of data from different shots, avoiding interference from invalid signals during model training. This ensures that the data used during training is high-quality and valid, further improving model performance.

[0132] Step 304: Build a data completion model.

[0133] Specifically, the constructed data completion model adopts a four-layer fully connected network structure, and introduces dropout layers between the second and third layers, and between the third and fourth layers, to reduce the risk of overfitting and enhance the model's generalization ability. The activation function chosen is SiLU (Sigmoid Linear Unit), which, compared to ReLU (Rectified Linear Unit), has smoother gradient changes, making the optimization process more stable, and can improve the model's expressive power and training effect in deep learning tasks.

[0134] The model's input (x_input) includes the signals of any valid single-turn loop (e.g., 15) at a given moment from any shot, as well as the RZ coordinates (latitude and longitude coordinates) of the spatial point to be predicted, totaling 17 features. After passing through the data completion network, the model can predict the signals of 56 magnetic probes, 28 single-turn loops, or the signal value of any point in space at the current moment, thereby achieving comprehensive completion and high-precision reconstruction of magnetic field data.

[0135] Step 306: Construct the loss function.

[0136] Specifically, the loss function of the data completion model consists of three parts: the first part is the difference between the single-turn loop signal predicted by the neural network and the experimentally measured single-turn loop signal, which is calculated only for valid signals to avoid the influence of invalid signals on the loss and improve the model training effect; the second part is the difference between the magnetic probe signal predicted by the neural network and the experimentally measured magnetic probe signal, which also eliminates invalid signals to ensure the accuracy of loss calculation and improve the reliability of completion results; the third part is to constrain the magnetic field distribution outside the plasma based on the physical GS equation (Grad-Shafranov equation) so that the completed magnetic field data conforms to physical laws and improves the physical consistency and generalization ability of the model.

[0137] At time a, taking the effective single-turn loop 1 as an example, the model input x_input consists of the signals of 15 effective single-turn loops and the RZ position information of the single-turn loop 1. After this input is processed by the data completion network, the model predicts the flux signal ψ of the single-turn loop 1. Subsequently, the error between the predicted ψ and the experimentally measured ψ is calculated, and the mean squared error (MSE) is used as the loss function to ensure that the model can accurately reconstruct the single-turn loop signal, finally obtaining the single-turn loop loss FL_loss corresponding to time a.

[0138] Similarly, the position information RZ of the magnetic probe is appended to the end of x_input, and then the input data is used to complete the neural network. The network output is the predicted magnetic flux ψ. Next, the partial derivative of the predicted ψ at the position RZ of the magnetic probe measurement point is taken, and the radial and axial magnetic field components are calculated as shown in the following formula (1):

[0139]

[0140] Then, the radial magnetic field Br and the axial magnetic field Bz are calculated using the following formulas (2) and (3):

[0141]

[0142] The poloidal field component Bp measured by the magnetic probe is then calculated using the following formula (4):

[0143] B p =cos(θ)·B r +sin(θ)·B Z (4)

[0144] Where θ is the polar angle, which is the angle between the direction of the magnetic field and the axis (Z-axis) of the device.

[0145] Finally, the error between the Bp predicted by the neural network and the experimentally measured magnetic probe signal was calculated. The mean square error was used as the loss function MP_loss and normalized to reduce the impact of scale differences in different magnetic probe signals.

[0146] During the data preparation phase, I extract the information of the outermost closed magnetic surface (LCFS, Last ClosedFluxSurface) of the plasma at each time step, which can be simply understood as the configuration of the outermost layer of the plasma. This information is crucial for accurately characterizing the plasma boundary and will play a key role in subsequent model training and physical constraints. At time a, we first calculate the spatial points located in the vacuum chamber but not within the LCFS and summarize the RZ coordinate information of these points. Then, we concatenate the RZ information of these spatial coordinate points to x_input as the input of the neural network. After the data completion model calculation, the network will output the magnetic flux signal ψ corresponding to these spatial points. Finally, we calculate the loss of the GS equation (GSloss) using the following formula (5):

[0147]

[0148] Ensure that the model meets physical constraints while improving the accuracy of data completion.

[0149] The final loss function consists of three parts: single-turn loop loss (FLloss), magnetic probe loss (MPloss), and GS equation loss (GSloss), to ensure that the model can meet the experimental data constraints while conforming to the laws of plasma physics. The total loss calculation formula (6) is as follows:

[0150] TotalLoss=λ1·FL_Loss+λ2·MP_Loss+λ3·GS_Loss(6)

[0151] λ1, λ2, and λ3 are weighting coefficients used to balance the impact of different losses on model training. By adjusting these coefficients, the loss function can be optimized, enabling the model to accurately complete the magnetic probe and single-turn loop signals while satisfying the constraints of the physical equations, thereby improving the physical rationality and generalization ability of the completed data.

[0152] Step 308: Train data to complete the model.

[0153] Specifically, taking data from a specific moment as an example, the model first inputs 15 valid single-turn loop signals from that moment, and then concatenates them with the position information (RZ coordinates) of 56 magnetic probes. After data completion, the flux signal at the positions of the 56 magnetic probes at that moment is predicted, and the magnetic field components are further calculated. Then, these predicted values ​​are compared with the experimentally measured signals of the 56 magnetic probes to calculate the error, and the valid magnetic probe numbers for that moment are selected, resulting in the magnetic probe loss (MP Loss). Since the validity and invalidity of single-turn loops are the same at different moments within the same firing cycle, assigning a valid or invalid single-turn loop number at each moment essentially identifies which single-turn loop is valid or invalid within each firing cycle. Loss calculation can only be performed when the single-turn loop is valid in that firing cycle. Otherwise, including invalid single-turn loops or magnetic probes in the loss calculation will lead to poor model training performance.

[0154] Next, the model is input again with 15 valid single-loop signals at that moment, and the position information (RZ coordinates) of 28 single-loops are spliced ​​together to predict the flux signal of the 28 single-loops at that moment. The error is calculated with the flux signal of the 28 single-loops measured in the experiment, and the valid single-loop numbers are selected to obtain the single-loop loss (FLLoss).

[0155] Finally, the model is input with 15 valid single-turn loop signals at that moment, and the position information (RZ coordinates) of spatial points (the number of which is determined according to specific circumstances) located in the vacuum chamber but not within the outermost closed magnetic surface (LCFS) is spliced ​​together. The flux signals of these spatial points are predicted, and constrained calculations are performed using the Grad-Shafranov equation (GS equation) to obtain the GS equation loss. Finally, the MP Loss, FFL Loss, and GS Loss are weighted and summed to obtain the total loss.

[0156] In each iteration, the loss is backpropagated once, and the gradient of the model parameters is calculated. After training for multiple epochs, the decrease in the total loss value is observed; a smaller loss indicates that the completed signal provided by the neural network is closer to the experimental signal. After completing one backpropagation and calculating the gradient, the model parameters are updated based on the gradient of the loss function to reduce the loss value. To accelerate training and avoid gradient vanishing or exploding, several strategies are typically employed to optimize the training process:

[0157] Learning Rate Adjustment: The learning rate is a key hyperparameter during training. A large learning rate can be used initially to accelerate training, but as training progresses, it may be necessary to gradually decrease the learning rate to avoid skipping local optima. This can be achieved using a learning rate decay strategy or by employing adaptive learning rate algorithms (such as Adam (Adaptive Moment Estimation) and Adagrad (Adaptive Gradient Algorithm)) to dynamically adjust the learning rate based on changes in the loss function.

[0158] Using Momentum: Momentum can help overcome some local minima in gradient descent. By giving a "momentum", parameter updates not only depend on the current gradient, but are also affected by the previous update direction, thereby accelerating convergence.

[0159] Batch Normalization (BN): To improve training stability and avoid gradient vanishing or exploding, batch normalization (BN) can be applied to the output of each layer. By standardizing each batch of data, the data distribution remains stable, thereby accelerating training.

[0160] Early stopping: Training can be stopped when the training loss does not decrease significantly over several iterations. Monitoring performance on the validation set can prevent overfitting. If the validation set loss starts to rise, it indicates that the model may have overfitted the training data.

[0161] Regularization: In addition to using Dropout to prevent overfitting, L1 or L2 regularization can be used to constrain the model's parameters, further reducing the risk of overfitting.

[0162] Adjusting the batch size: Smaller batch sizes generally result in better generalization because parameters are not over-tuned with each update. However, smaller batches may make training more unstable; conversely, larger batches may speed up training but reduce generalization. Choosing an appropriate batch size balances training speed and effectiveness.

[0163] By optimizing these steps, neural networks can be trained more effectively, ensuring they achieve optimal performance in fewer training cycles while avoiding overfitting and other common training problems.

[0164] Step 310: Verify the reliability of the data completion model.

[0165] Specifically, after training, to verify the model's reliability, a valid single-turn loop signal at a certain moment can be input, allowing the model to predict the magnetic flux of the 56 magnetic probes, the magnetic flux of the 28 single-turn loops, and the magnetic flux distribution throughout space at that moment. The specific process is as follows:

[0166] First, data from a specific moment is selected, and the 15 valid single-turn loop signals at that moment are input into the model. The position information of 28 single-turn loops is then concatenated to predict the magnetic flux of all 28 single-turn loops at that moment. Next, the position information of 56 magnetic probes is concatenated to the same valid single-turn loop signals, allowing the model to predict the magnetic flux of all magnetic probes. The poloidal magnetic field component Bp of the magnetic probes is calculated by differentiation. Finally, the valid single-turn loop signals are concatenated with the coordinates of spatial points located within the vacuum chamber but not within the outermost closed magnetic surface to predict the magnetic flux distribution at each point in space at that moment.

[0167] Throughout the process, by comparing with experimental data and analyzing the error distribution, the reliability of the model in completing magnetic diagnostic data and identifying anomalies was further evaluated. Specifically, the magnetic flux predicted by the model for 28 single-turn loops and 56 magnetic probes was compared with experimental measurements, and the mean square error was calculated to quantify the prediction accuracy. For the full-space magnetic flux distribution, physical constraints were checked using the GS equation to ensure that the prediction results conform to the laws of plasma physics. Through these steps, the model's performance can be comprehensively evaluated, ensuring that it can not only accurately complete missing data but also effectively identify anomalies, improving overall data quality and physical consistency.

[0168] See Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the prediction result of a data completion model provided in one embodiment of this application. Figure 4 Figure (a) shows a contour map plotted by predicting the magnetic flux ψ at each point in space using a data completion network. It illustrates the cross-sectional distribution of the plasma within the tokamak device when it reaches equilibrium. This figure helps us visually observe the shape and position of the outermost closed magnetic surface of the plasma (the bolded black portion in the figure), which typically presents a ring-shaped structure, representing the approximate outline of the plasma boundary. By comparing the predicted results with actual measurement data, the accuracy of the model can be preliminarily assessed: if the predicted plasma shape is close to the ideal ring, the model performs well; conversely, if the shape deviates significantly from the expectation, it suggests a possible prediction error. This figure not only verifies the rationality of the magnetic flux data but also provides a visual basis for further analysis of the spatial distribution of the plasma.

[0169] Figure 4(b) in the figure compares the single-turn loop signals. The horizontal axis represents the single-turn loop number, and the vertical axis represents the measured value. The circles and squares represent the valid and invalid single-turn loop signals measured in the experiment, respectively. The blue curve represents the prediction result of the data completion network. Figure 4 (c) in the figure shows a comparison of the magnetic probe signal, and its physical phenomena are similar to those in the second subfigure. The results show that the data completion network can not only verify the reliability of the valid single-turn loop signal, but also complete the invalid signal, thereby using the complete diagnostic signal to support related studies such as plasma equilibrium reconstruction.

[0170] Step 312: Deploy the data completion model.

[0171] Through steps 302-312 above, the reliability of the magnetic probe signal can be automatically identified and verified, while invalid or missing signals are supplemented, ensuring the integrity and accuracy of experimental data. Combined with electromagnetic field physical constraints, the supplemented signal not only conforms to the actual experimental trend but also follows the physical laws of the magnetic field, significantly enhancing the reliability and physical interpretability of the data. This method optimizes the stability and accuracy of plasma equilibrium reconstruction, reduces manual intervention, and improves the robustness of the system under complex experimental conditions, effectively handling measurement noise and data loss. Ultimately, it significantly improves the automation level of magnetic diagnostic data processing and the quality of reconstruction results, providing more reliable and efficient data support for plasma physics research.

[0172] Corresponding to the above method embodiments, this application also provides an embodiment of a training device for a data completion model for magnetic diagnostics. Figure 5 This is a schematic diagram of the structure of a training device for a data completion model for magnetic diagnostics, provided in one embodiment of this application. Figure 5 As shown, the device includes:

[0173] The first acquisition module 502 is configured to acquire a set number of sample measurement data measured by the first magnetic diagnostic device, and determine the valid measurement samples of the first magnetic diagnostic device from the set number of sample measurement data.

[0174] The first prediction module 504 is configured to input the effective measurement samples and the sample test positions of at least one sample test signal into the initial completion model to predict the predicted magnetic flux data of each sample test position.

[0175] Training module 506 is configured to train the initial completion model based on the prediction loss and physical constraint loss of the predicted magnetic flux data to obtain the target data completion model. The prediction loss is used to indicate the difference between the predicted magnetic flux data and the measured magnetic flux data, and the physical constraint loss refers to the loss of the predicted magnetic flux data under the physical constraints of the plasma equilibrium configuration.

[0176] In one embodiment, the first acquisition module 502 is further configured to:

[0177] Acquire sample measurement data of at least two first magnetic diagnostic devices in multiple measurement batches, each with a set value, and a data reference identifier corresponding to the sample measurement data, wherein the data reference identifier is used to indicate whether the sample measurement data is valid;

[0178] Based on data reference identifiers and sample measurement data, at least one target magnetic diagnostic device is identified among at least two first magnetic diagnostic devices, wherein at least one target magnetic diagnostic device is a first magnetic diagnostic device whose sample measurement data is valid in any measurement batch;

[0179] Based on at least one target magnetic diagnostic device, determine the valid measurement sample from the sample measurement data.

[0180] In one embodiment, the first acquisition module 502 is further configured to:

[0181] Acquire historical measurement data and corresponding current values ​​of at least two first magnetic diagnostic devices within a target time period. The current values ​​are used to characterize the historical measurement data measured by at least two first magnetic diagnostic devices when the plasma current reaches the current value. The target time period includes multiple measurement batches.

[0182] Based on preset current thresholds and current values, sample measurement data are selected from historical measurement data.

[0183] In one embodiment, the first acquisition module 502 is further configured to:

[0184] From the sample measurement data, at least one target measurement data obtained by a target magnetic diagnostic device is selected;

[0185] For any target magnetic diagnostic device, the target measurement data corresponding to the target magnetic diagnostic device is normalized to obtain sample measurement data.

[0186] In one embodiment, the sample testing location includes the location of the diagnostic device and the external diagnostic location;

[0187] Accordingly, the first prediction module 504 is further configured as follows:

[0188] Acquire diagnostic device location and plasma configuration information for at least two first magnetic diagnostic devices;

[0189] Based on plasma configuration information, the external diagnostic location is determined, where the external diagnostic location is the location outside the plasma in the region to be tested.

[0190] The sample measurement data and the location of the diagnostic device are input into the initial completion model to predict the first predicted magnetic flux data of the location of the diagnostic device.

[0191] The sample measurement data and the external diagnostic location are input into the initial completion model to predict the second predicted magnetic flux data of the external diagnostic location.

[0192] In one embodiment, the training apparatus for the data completion model for magnetic diagnostics further includes a loss calculation module configured to:

[0193] Acquire measured magnetic flux data corresponding to the location of the diagnostic equipment;

[0194] Based on the first predicted magnetic flux data and the measured magnetic flux data, the prediction loss is calculated;

[0195] Based on the second predicted magnetic flux data and the external diagnostic location, the higher-order variation characteristics of the predicted magnetic flux data in the radial and axial directions are calculated to obtain the physical constraint loss.

[0196] In one embodiment, the loss calculation module is further configured to:

[0197] Determine the sample measurement batch for the sample measurement data;

[0198] Obtain the device reference identifier of the first magnetic diagnostic device in the sample measurement batch corresponding to the location of the diagnostic device;

[0199] If the first magnetic diagnostic device corresponding to the location of the diagnostic device indicated by the device reference mark is a valid device, the measured magnetic flux data of the valid device is obtained.

[0200] In one embodiment, the loss calculation module is further configured to:

[0201] Acquire historical measurement data from at least two first magnetic diagnostic devices within a target time period, wherein the target time period includes multiple measurement batches;

[0202] For a target measurement batch, the historical measurement data corresponding to the target measurement batch are evaluated based on a preset reference evaluation rule to obtain a reference evaluation result. The target measurement batch is any one of multiple measurement batches.

[0203] If the historical measurement data is indicated by the reference evaluation results as the reference measurement data, a positive reference identifier is generated for the first magnetic diagnostic device corresponding to the reference measurement data;

[0204] If the reference evaluation results indicate that the historical measurement data is non-reference measurement data, a negative reference identifier is generated for the first magnetic diagnostic device corresponding to the non-reference measurement data.

[0205] In one embodiment, the training module 506 is further configured to:

[0206] Obtain the preset loss weight;

[0207] The total loss is calculated based on the preset loss weights, the predicted loss, and the physical constraint loss.

[0208] The initial completion model is trained based on the total loss until the training stops, thus obtaining the data completion model.

[0209] In this embodiment, a set number of sample measurement data points obtained by a first magnetic diagnostic device are acquired. Valid measurement samples from these samples are then determined. These valid measurement samples are input into an initial completion model along with the test positions of at least one sample signal. Predicted magnetic flux data for each test position is then obtained. Based on the prediction loss and physical constraint loss of the predicted magnetic flux data, the initial completion model is trained to obtain a target data completion model. The prediction loss indicates the difference between the predicted and measured magnetic flux data, while the physical constraint loss refers to the loss of predicted magnetic flux data under the physical constraints of the plasma equilibrium configuration. Optimizing the initial completion model using the prediction loss and physical constraint loss effectively improves the accuracy and physical consistency of the magnetic flux data completion, ensuring that the model output is highly consistent with the measured data and conforms to the physical constraints of the plasma equilibrium configuration, thereby improving the overall model performance and reliability.

[0210] The above is a schematic scheme of a training device for a data completion model for magnetic diagnostics according to this embodiment. It should be noted that the technical solution of this training device for a data completion model for magnetic diagnostics and the technical solution of the training method for a data completion model for magnetic diagnostics described above belong to the same concept. Details not described in detail in the technical solution of the training device for a data completion model for magnetic diagnostics can be found in the description of the technical solution of the training method for a data completion model for magnetic diagnostics described above.

[0211] Corresponding to the above method embodiments, this application also provides an embodiment of a data completion device for magnetic diagnostics. Figure 6 This is a schematic diagram of a data completion device for magnetic diagnostics provided in one embodiment of this application. Figure 6 As shown, the device includes:

[0212] The second acquisition module 602 is configured to acquire a set number of target measurement signals measured by the first magnetic diagnostic device, and determine the valid measurement signal of the first magnetic diagnostic device from the set number of target measurement signals.

[0213] The second prediction module 604 is configured to input the effective measurement signal and the target test signal at each target test position into the target data completion model to obtain the target magnetic flux data at each target test position. The target data completion model is trained based on each sample test position of at least one sample test signal under prediction loss and physical constraint loss. The target test signal is any one of the at least one sample test signals.

[0214] In this embodiment, by acquiring a set number of target measurement signals measured by a first magnetic diagnostic device, identifying the valid measurement signals, and then inputting these valid measurement signals along with the target measurement locations into a target data completion model, the target magnetic flux data for each target measurement location can be predicted. This model is trained based on the measurement locations of at least one sample measurement signal, under prediction loss and physical constraint loss, ensuring the accuracy and physical consistency of the completed data. This not only achieves automatic data completion and reduces manual intervention but also improves the accuracy and reliability of magnetic diagnostic data and optimizes the results of plasma equilibrium reconstruction.

[0215] The above is a schematic scheme of a data completion device for magnetic diagnostics according to this embodiment. It should be noted that the technical solution of this data completion device for magnetic diagnostics and the technical solution of the data completion method for magnetic diagnostics described above belong to the same concept. For details not described in detail in the technical solution of the data completion device for magnetic diagnostics, please refer to the description of the technical solution of the data completion method for magnetic diagnostics described above.

[0216] Figure 7 A structural block diagram of a computing device 700 according to an embodiment of this application is shown. The components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and a database 750 is used to store data.

[0217] The computing device 700 also includes an access device 740, which enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., a network interface controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.

[0218] In one embodiment of this application, the aforementioned components of the computing device 700 and Figure 7 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 7 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.

[0219] The computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 700 can also be a mobile or stationary server.

[0220] The processor 720 is used to execute the following computer program / instruction, which, when executed by the processor, implements the steps of the above-mentioned training method for a data completion model for magnetic diagnosis or a data completion method for magnetic diagnosis.

[0221] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the computing device embodiments are basically similar to a training method for a data completion model for magnetic diagnostics or an embodiment of a data completion method for magnetic diagnostics, so the description is relatively simple. Relevant parts can be referred to the descriptions of a training method for a data completion model for magnetic diagnostics or an embodiment of a data completion method for magnetic diagnostics.

[0222] An embodiment of this application also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described training method for a data completion model for magnetic diagnostics or a data completion method for magnetic diagnostics.

[0223] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the computer-readable storage medium embodiment is relatively simple in description because it is substantially similar to a training method for a data completion model for magnetic diagnostics or an embodiment of a data completion method for magnetic diagnostics. Relevant parts can be referred to in the description of a training method for a data completion model for magnetic diagnostics or an embodiment of a data completion method for magnetic diagnostics.

[0224] An embodiment of this application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described training method for a data completion model for magnetic diagnostics or a data completion method for magnetic diagnostics.

[0225] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the above-described training method for a data completion model for magnetic diagnostics or a data completion method for magnetic diagnostics. For details not described in detail in the technical solution of the computer program product, please refer to the description of the above-described training method for a data completion model for magnetic diagnostics or a data completion method for magnetic diagnostics.

[0226] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0227] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0228] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this application.

[0229] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0230] The embodiments disclosed above are merely illustrative of this application and do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments of this application. These embodiments are selected and specifically described in this application to better explain the principles and practical applications of the embodiments of this application, thereby enabling those skilled in the art to better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.

Claims

1. A training method for a data completion model for magnetic diagnostics, characterized in that, include: Acquire a set number of sample measurement data obtained by a first magnetic diagnostic device, and determine the valid measurement samples of the first magnetic diagnostic device from the set number of sample measurement data; The effective measurement samples are respectively input into the sample test positions of at least one sample test signal to the initial completion model to predict the predicted magnetic flux data of each sample test position. Based on the prediction loss and physical constraint loss of the predicted magnetic flux data, the initial completion model is trained to obtain the target data completion model. The prediction loss is used to indicate the difference between the predicted magnetic flux data and the measured magnetic flux data, and the physical constraint loss refers to the loss of the predicted magnetic flux data under the physical constraints of the plasma equilibrium configuration.

2. The method according to claim 1, characterized in that, The step of acquiring a set number of sample measurement data points measured by the first magnetic diagnostic device, and determining the valid measurement samples of the first magnetic diagnostic device from the set number of sample measurement data points, includes: Acquire sample measurement data of at least two first magnetic diagnostic devices in multiple measurement batches, each containing a set value, and a data reference identifier corresponding to the sample measurement data, wherein the data reference identifier is used to indicate whether the sample measurement data is valid; Based on the data reference identifier and the sample measurement data, at least one target magnetic diagnostic device is determined among the at least two first magnetic diagnostic devices, wherein the at least one target magnetic diagnostic device is a first magnetic diagnostic device whose sample measurement data is valid in any measurement batch; Based on the at least one target magnetic diagnostic device, a valid measurement sample is determined from the sample measurement data.

3. The method according to claim 2, characterized in that, The acquisition of sample measurement data of at least two first magnetic diagnostic devices measuring a set number of values ​​in multiple measurement batches includes: The historical measurement data of the at least two first magnetic diagnostic devices and the corresponding current value of the historical measurement data are obtained within a target time period. The current value is used to characterize the historical measurement data measured by the at least two first magnetic diagnostic devices when the plasma current reaches the current value. The target time period includes multiple measurement batches. Based on a preset current threshold and the current value, sample measurement data are filtered from the historical measurement data.

4. The method according to claim 2, characterized in that, Based on the at least one target magnetic diagnostic device, determining the sample measurement data from the sample measurement data includes: The target measurement data obtained by the at least one target magnetic diagnostic device are selected from the sample measurement data; For any target magnetic diagnostic device, the target measurement data corresponding to the target magnetic diagnostic device is normalized to obtain sample measurement data.

5. The method according to claim 1, characterized in that, The sample location to be tested includes the location of the diagnostic device and the external diagnostic location; the step of inputting the sample measurement data and the sample location to be tested into the initial completion model to predict the predicted magnetic flux data of the sample location to be tested includes: Acquire the diagnostic device position and plasma configuration information of the at least two first magnetic diagnostic devices; Based on the plasma configuration information, the external diagnostic location is determined, wherein the external diagnostic location is a location outside the plasma in the region to be tested; The sample measurement data and the location of the diagnostic device are input into the initial completion model to predict the first predicted magnetic flux data of the location of the diagnostic device. The sample measurement data and the external diagnostic location are input into the initial completion model to predict the second predicted magnetic flux data of the external diagnostic location.

6. The method according to claim 5, characterized in that, Before training the initial completion model based on the prediction loss and physical constraint loss of the predicted magnetic flux data to obtain the target data completion model, the method further includes: Obtain the measured magnetic flux data corresponding to the location of the diagnostic device; Based on the first predicted magnetic flux data and the measured magnetic flux data, the prediction loss is calculated; Based on the second predicted magnetic flux data and the external diagnostic location, the higher-order variation characteristics of the predicted magnetic flux data in the radial and axial directions are calculated to obtain the physical constraint loss.

7. The method according to claim 6, characterized in that, The step of obtaining the measured magnetic flux data corresponding to the location of the diagnostic device includes: Determine the sample measurement batch of the sample measurement data; Obtain the device reference identifier of the first magnetic diagnostic device corresponding to the location of the diagnostic device in the sample measurement batch; If the first magnetic diagnostic device corresponding to the location of the diagnostic device indicated by the device reference identifier is a valid device, the measured magnetic flux data of the valid device is obtained.

8. The method according to claim 7, characterized in that, Before acquiring the sample measurement data, the following is also included: Acquire historical measurement data of at least two first magnetic diagnostic devices within a target time period, wherein the target time period includes multiple measurement batches; For a target measurement batch, the historical measurement data corresponding to the target measurement batch are evaluated based on a preset reference evaluation rule to obtain a reference evaluation result, wherein the target measurement batch is any one of the plurality of measurement batches; If the reference evaluation result indicates that the historical measurement data is reference measurement data, a positive reference identifier is generated for the first magnetic diagnostic device corresponding to the reference measurement data; If the reference evaluation result indicates that the historical measurement data is non-reference measurement data, a negative reference identifier is generated for the first magnetic diagnostic device corresponding to the non-reference measurement data.

9. The method according to claim 1, characterized in that, The process of training the initial completion model based on the prediction loss and physical constraint loss of the predicted magnetic flux data to obtain the target data completion model includes: Obtain the preset loss weight; The total loss is calculated based on the preset loss weight, the predicted loss, and the physical constraint loss. The initial completion model is trained based on the total loss until the training stops, thus obtaining the data completion model.

10. A data completion method for magnetic diagnostics, characterized in that, include: Acquire a set number of target measurement signals measured by a first magnetic diagnostic device, and determine the valid measurement signal of the first magnetic diagnostic device from the set number of target measurement signals; The effective measurement signal and the target test signal are input into the target data completion model at each target test position to predict and obtain the target magnetic flux data at each target test position. The target data completion model is trained based on each sample test position of at least one sample test signal under prediction loss and physical constraint loss. The target test signal is any one of the at least one sample test signals.

11. A training device for a data completion model for magnetic diagnostics, characterized in that, include: The first acquisition module is configured to acquire a set number of sample measurement data measured by the first magnetic diagnostic device, and determine the valid measurement samples of the first magnetic diagnostic device from the set number of sample measurement data. The first prediction module is configured to input the effective measurement samples and each sample test position of at least one sample test signal into an initial completion model to predict the predicted magnetic flux data of each sample test position. The training module is configured to train the initial completion model based on the prediction loss and physical constraint loss of the predicted magnetic flux data to obtain the target data completion model. The prediction loss is used to indicate the difference between the predicted magnetic flux data and the measured magnetic flux data, and the physical constraint loss refers to the loss of the predicted magnetic flux data under the physical constraints of the plasma equilibrium configuration.

12. A data completion device for magnetic diagnostics, characterized in that, include: The second acquisition module is configured to acquire a set number of target measurement signals measured by the first magnetic diagnostic device, and determine the valid measurement signal of the first magnetic diagnostic device from the set number of target measurement signals. The second prediction module is configured to input the effective measurement signal and the target test signal at each target test position into the target data completion model to obtain the target magnetic flux data at each target test position. The target data completion model is trained based on each sample test position of at least one sample test signal under prediction loss and physical constraint loss. The target test signal is any one of the at least one sample test signal.

13. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1-10.

14. A computer-readable storage medium, characterized in that, It stores a computer program / instructions that, when executed by a processor, implement the steps of the method described in any one of claims 1-10.

15. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-10.