Mass spectrometer fault correction method, device, equipment and medium

CN122220712BActive Publication Date: 2026-08-11SHANGHAI DEV CENT OF COMP SOFTWARE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-19
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0002]质谱仪作为关键高端科学仪器,一旦发生故障,往往会对实验进程、检测结果乃至科研与生产工作造成严重影响

Benefits of technology

本申请提供了一种质谱仪故障修正方法,通过获取质谱仪第一时刻的传感器数据和控制指令数据,输入至引入了历史知识检索模块的目标预测模型,目标预测模型是预先以样本传感器数据和样本控制指令数据作为输入,以下一时刻的样本传感器数据、满足预设条件的故障纠错评价值对应的样本控制指令数据、以及样本故障根因概率作为输出进行训练得到的。通过目标预测模型,可以准确地确定第二时刻质谱仪的预测传感器数据,根据第二时刻的预测传感器数据和第二时刻的实际传感器数据确定预测误差,根据预测误差、预设预测误差阈值、预测故障根因概率、预设故障根因概率阈值,准确地确定质谱仪是否存在故障,提高质谱仪故障识别的准确性;在质谱仪出现故障时,通过目标预测模型中的决策头,根据目标融合特征快速准确地确定执行后故障改善程度满足预设条件的目标控制指令数据,对质谱仪进行配置,提高质谱仪故障修正效率和准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122220712B_ABST
    Figure CN122220712B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and medium for correcting mass spectrometer faults. The method includes acquiring sensor data and control command data of the mass spectrometer at a first moment; determining the predicted root cause probability of a fault and the predicted sensor data at a second moment based on the sensor data and control command data at the first moment and a target prediction model; determining the prediction error based on the predicted sensor data and the actual sensor data at the second moment; determining whether the mass spectrometer has a fault based on the prediction error, a preset prediction error threshold, the predicted root cause probability, and the preset root cause probability threshold; when a fault is determined in the mass spectrometer, determining target control command data based on the sensor data and control command data at the first moment and the target prediction model; and configuring the mass spectrometer based on the target control command data. This application can improve the accuracy of mass spectrometer fault identification and the efficiency and accuracy of mass spectrometer fault correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, equipment and medium for correcting faults in a mass spectrometer. Background Technology

[0002] As a key high-end scientific instrument, a malfunction of a mass spectrometer can often have a serious impact on the experimental process, test results, and even scientific research and production work.

[0003] However, current fault detection methods are still limited to monitoring some equipment parameters. Not only is the fault detection rate low, but after a fault is detected, equipment adjustment and repair usually rely on human experience, making it difficult to achieve efficient, stable and standardized fault handling.

[0004] Therefore, it is urgent to achieve accurate fault identification and complete anomaly correction through reasonable equipment reconfiguration. Summary of the Invention

[0005] The purpose of this application is to provide a method, apparatus, device, and medium for correcting mass spectrometer faults, which can improve the accuracy of mass spectrometer fault identification and the efficiency and accuracy of mass spectrometer fault correction.

[0006] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a method for correcting malfunctions in a mass spectrometer, including: Acquire the sensor data and control command data of the mass spectrometer at the first moment; Based on the sensor data and control command data at the first moment, and based on the target prediction model, the probability of predicting the root cause of the fault and the predicted sensor data at the second moment are determined. Based on the predicted sensor data at the second moment and the actual sensor data at the second moment, the prediction error is determined. Based on the prediction error, the preset prediction error threshold, the predicted root cause probability, and the preset root cause probability threshold, it is determined whether the mass spectrometer is faulty. When it is determined that the mass spectrometer has malfunctioned, the target control command data is determined based on the sensor data and control command data at the first moment and the target prediction model. Configure the mass spectrometer based on target control command data; Among them, the target control command data is used to configure the mass spectrometer to correct malfunctions in the mass spectrometer; The target prediction model performs multimodal fusion on the sensor data and control command data at the first input moment, and extracts temporal features based on the encoder to obtain the first temporal feature. The first temporal feature is then input into the historical knowledge retrieval module, which, based on the first temporal feature, determines multiple target historical operating vectors similar to the first temporal feature from a historical operating vector library. The historical operating vector library includes historical normal operating vectors and historical fault operating vectors. Based on the first temporal feature and multiple target historical operating vectors, a first fusion vector is determined using cross-attention. Based on the first fusion vector and the first temporal feature, a target fusion feature is determined. Based on the target fusion feature, the predicted sensor data at the second moment is determined using the prediction head, and the predicted root cause probability of the fault is determined using the diagnostic head. The target prediction model is also used to determine target control command data based on the decision head, according to the target fusion characteristics, when the mass spectrometer malfunctions. The target prediction model is obtained by pre-training the initial neural network. When training the initial neural network, the sample sensor data and sample control command data are used as inputs, the sample sensor data at the next time step is used as the prediction head output, the sample control command data corresponding to the fault correction evaluation value that meets the preset conditions is used as the decision head output, and the sample fault root cause probability is used as the diagnosis head output. The fault correction evaluation value is used to indicate the degree of fault improvement of the mass spectrometer after executing the control command data.

[0007] Furthermore, there are N target control command data points. The target prediction model is specifically used to determine the N target control command data points and the corresponding fault correction evaluation values ​​based on the N target control command data points by performing N inferences based on the decision head using MC Dropout according to the target fusion features; calculate the variance of the fault correction evaluation values ​​corresponding to the N target control command data points; determine that the variance of the fault correction evaluation values ​​corresponding to the N target control command data points is less than the preset variance threshold according to the preset variance threshold; and output the N target control command data points. Configure the mass spectrometer based on target control command data, including: Mass spectrometer configured based on the mean of N target control command data.

[0008] Furthermore, before configuring the mass spectrometer based on target control command data, the mass spectrometer fault correction method also includes: When the target control command data does not conform to the physical operation rules, the target control command data is updated according to the safe operation boundary value corresponding to the target control command data.

[0009] Furthermore, the sample sensor data includes real sensor data and simulated sensor data, and the sample control command data includes real control command data and simulated control command data; The simulated sensor data is generated based on the simulated control command data and a data synthesis engine. The data synthesis engine is used to acquire the simulated mass spectrometer hidden state data at the initial time step and the simulated control command data at multiple time steps. The simulated control command data and the simulated mass spectrometer hidden state data at the initial time step are input into the drift network, and the simulated mass spectrometer hidden state data at the initial time step are input into the diffusion network. Based on the outputs of the drift network, the diffusion network, and the simulated fault operator, the simulated mass spectrometer hidden state data at the second time step is determined. The simulated mass spectrometer hidden state data at the second time step is input into the decoder, which outputs the simulated sensor data at the second time step. The simulated mass spectrometer hidden state data and the simulated control command data at the second time step are input into the drift network, and the simulated mass spectrometer hidden state data at the second time step are input into the diffusion network. Based on the outputs of the drift network, the diffusion network, and the simulated fault operator, the simulated mass spectrometer hidden state data at the third time step is determined. This process is repeated for all time steps to obtain simulated mass spectrometer hidden state data and simulated sensor data at multiple time steps. The data synthesis engine is trained on an initial model based on real control command data as input and real sensor data as output.

[0010] Furthermore, the simulated mass spectrometer latent state data for the initial time step is obtained by dividing the value range of the physical dimension of each mass spectrometer latent state data into M intervals based on Latin hypercube sampling.

[0011] Furthermore, the simulated fault operators include gradual drift faults, abrupt step faults, and intermittent oscillation faults.

[0012] Furthermore, after outputting the simulated sensor data at the second time step, the data synthesis engine is also used for: The simulated sensor data for the second time step is updated based on the industrial environmental noise.

[0013] Secondly, this application provides a mass spectrometer fault correction device, comprising: The acquisition module is used to acquire the sensor data and control command data of the mass spectrometer at the first moment; The processing module is used to determine the probability of predicting the root cause of the fault and the predictive sensor data at the second moment based on the sensor data and control command data at the first moment and the target prediction model. The determination module is used to determine the prediction error based on the predicted sensor data at the second time and the actual sensor data at the second time, and to determine whether the mass spectrometer has a fault based on the prediction error, the preset prediction error threshold, the predicted fault root cause probability, and the preset fault root cause probability threshold. The processing module is also used to determine the target control command data based on the target prediction model when it is determined that the mass spectrometer has malfunctioned; The configuration module is used to configure the mass spectrometer based on target control command data; Among them, the target control command data is used to configure the mass spectrometer to correct malfunctions in the mass spectrometer; The target prediction model performs multimodal fusion on the sensor data and control command data at the first input moment, and extracts temporal features based on the encoder to obtain the first temporal feature. The first temporal feature is then input into the historical knowledge retrieval module, which, based on the first temporal feature, determines multiple target historical operating vectors similar to the first temporal feature from a historical operating vector library. The historical operating vector library includes historical normal operating vectors and historical fault operating vectors. Based on the first temporal feature and multiple target historical operating vectors, a first fusion vector is determined using cross-attention. Based on the first fusion vector and the first temporal feature, a target fusion feature is determined. Based on the target fusion feature, the predicted sensor data at the second moment is determined using the prediction head, and the predicted root cause probability of the fault is determined using the diagnostic head. The target prediction model is also used to determine target control command data based on the decision head, according to the target fusion characteristics, when the mass spectrometer malfunctions. The target prediction model is obtained by pre-training the initial neural network. When training the initial neural network, the sample sensor data and sample control command data are used as inputs, the sample sensor data at the next time step is used as the prediction head output, the sample control command data corresponding to the fault correction evaluation value that meets the preset conditions is used as the decision head output, and the sample fault root cause probability is used as the diagnosis head output. The fault correction evaluation value is used to indicate the degree of fault improvement of the mass spectrometer after executing the control command data.

[0014] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the mass spectrometer fault correction method described above.

[0015] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the mass spectrometer fault correction method described above.

[0016] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the mass spectrometer fault correction method described above.

[0017] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a method for correcting mass spectrometer faults. It involves acquiring sensor data and control command data from the mass spectrometer at a first moment and inputting them into a target prediction model incorporating a historical knowledge retrieval module. The target prediction model is trained in advance using sample sensor data and sample control command data as input, and outputting sample sensor data from the next moment, sample control command data corresponding to a fault correction evaluation value that meets preset conditions, and the probability of sample fault root causes. Through the target prediction model, the predicted sensor data of the mass spectrometer at the second moment can be accurately determined. The prediction error is determined based on the predicted sensor data and the actual sensor data at the second moment. Based on the prediction error, a preset prediction error threshold, the predicted fault root cause probability, and the preset fault root cause probability threshold, the existence of a fault in the mass spectrometer can be accurately determined, improving the accuracy of mass spectrometer fault identification. When a fault occurs in the mass spectrometer, the decision head in the target prediction model quickly and accurately determines the target control command data that satisfies preset conditions for fault improvement after execution, based on target fusion features, and configures the mass spectrometer accordingly, improving the efficiency and accuracy of mass spectrometer fault correction. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A diagram illustrating the application environment of the mass spectrometer fault correction method provided in the embodiments of this application. Figure 2 A flowchart illustrating the mass spectrometer fault correction method provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of the target prediction model provided in the embodiments of this application; Figure 4 A schematic diagram illustrating the principle of the data synthesis engine provided in this application embodiment; Figure 5 A schematic diagram of a service-oriented system architecture based on MCP provided for the application embodiments; Figure 6 A schematic diagram of the functional modules of the mass spectrometer fault correction device provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] The mass spectrometer fault correction method provided in this application can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send sensor data and control command data from the mass spectrometer to server 104. Server 104 receives the sensor data and control command data from the mass spectrometer, determines the predicted sensor data based on a target detection model, and then determines whether the mass spectrometer is faulty. If the mass spectrometer is faulty, it determines the target control commands used to configure the mass spectrometer to correct the fault based on the target detection model. Server 104 can also provide feedback to terminal 102 regarding the mass spectrometer's sensor data and control command data. In addition, in some embodiments, the mass spectrometer fault correction method can also be implemented by the server 104 or the terminal 102 separately. For example, the terminal 102 can directly process the sensor data and control command data of the mass spectrometer, or the server 104 can obtain the sensor data and control command data of the mass spectrometer from the data storage system and process the sensor data and control command data of the mass spectrometer.

[0023] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.

[0024] In one exemplary embodiment, such as Figure 2As shown, a method for correcting malfunctions in a mass spectrometer is provided. This method is executed by a computer device, specifically a terminal or server, or both. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the following steps are taken: S201 to S205.

[0025] S201. Acquire sensor data and control command data of the mass spectrometer at the first moment.

[0026] For example, sensor data may include readings of vacuum gauges at various levels, lens voltage values, radio frequency power reflected power, total ion current intensity, signal-to-noise ratio, mass axis offset, etc.

[0027] For example, control command data may include ion source voltage, triple quadrupole RF voltage, quadrupole DC bias voltage, etc.

[0028] S202. Based on the sensor data and control command data at the first moment, and based on the target prediction model, determine the probability of predicting the root cause of the fault and the predicted sensor data at the second moment.

[0029] The target prediction model performs multimodal fusion on the sensor data and control command data at the first input moment, and extracts temporal features based on the encoder to obtain the first temporal feature. The first temporal feature is then input into the historical knowledge retrieval module, which, based on the first temporal feature, determines multiple target historical operating vectors similar to the first temporal feature from a historical operating vector library. The historical operating vector library includes historical normal operating vectors and historical fault operating vectors. Based on the first temporal feature and multiple target historical operating vectors, a first fusion vector is determined using cross-attention. Based on the first fusion vector and the first temporal feature, a target fusion feature is determined. Based on the target fusion feature, the predicted sensor data at the second moment is determined using the prediction head, and the predicted root cause probability of the fault is determined using the diagnostic head.

[0030] The target prediction model is obtained by pre-training the initial neural network. When training the initial neural network, the sample sensor data and sample control command data are used as inputs, the sample sensor data at the next time step is used as the prediction head output, the sample control command data corresponding to the fault correction evaluation value that meets the preset conditions is used as the decision head output, and the sample fault root cause probability is used as the diagnosis head output. The fault correction evaluation value is used to indicate the degree of fault improvement of the mass spectrometer after executing the control command data.

[0031] It is understandable that both sensor data and control command data are data sequences.

[0032] For example, in terms of sampling rate, the sensor data sampling rate is relatively higher, while the control command data sampling rate is relatively lower. Therefore, to address the issue of inconsistent sampling rates between sensor data and control command data, refer to... Figure 3 You can first resample to align the two to the same timeline.

[0033] For the resampled sensor data and control command data, a linear projection layer can be used to map the sensor data and control command data to a high-dimensional space and fuse them, and then superimpose rotational position encoding (i.e., Figure 3 The "Multimodal Embedding and RoPE" module in the middle of the text is used to obtain multimodal fusion embedding features.

[0034] For example, the encoder for temporal feature extraction can be a causal Transformer encoder (for example, number of layers: 6; hidden layer dimension: 512; number of attention heads: 8; feedforward network dimension: 2048). Using a causal Transformer encoder, temporal feature extraction can be performed on multimodal fused embedded features to generate a first temporal feature containing historical context. (Dimension 512). Causal masks in causal Transformer encoders ensure that the model does not see future information at the current moment.

[0035] For example, the first time-series feature can be input into the historical knowledge retrieval module. The historical knowledge retrieval module uses the first time-series feature as a query vector to perform similarity retrieval (such as Top-K retrieval) and determines multiple target historical running vectors similar to the first time-series feature from the historical running vector library.

[0036] For example, multiple historical run cases with the highest similarity can be retrieved using a distance metric (such as the L2 norm), i.e., multiple target historical run vectors.

[0037] After obtaining multiple target historical running vectors, these vectors can be decomposed into key-value pairs, resulting in a set of feature key vectors for the multiple target historical running vectors. and the set of eigenvalue vectors Furthermore, based on cross-attention, the feature key vector set of the first temporal feature and multiple target historical running vectors is obtained through the following formula. and the set of eigenvalue vectors The first fusion vector is obtained by processing the data. (i.e. Figure 3 Relationship features ): In the formula, Represents the first fusion vector. Represents the normalized activation function. This represents the linear projection matrix of the query vector. The linear projection matrix of the key vector. The feature dimension of the key vector. The linear projection matrix of the value vector.

[0038] For example, after obtaining the first fusion vector, the gating coefficient can be calculated based on the first fusion vector and the first temporal feature. Based on the gating coefficient The target fusion feature is obtained by fusing the first fusion vector and the first temporal feature using the following formula. : In the formula, Indicates target fusion features; Indicates the gating coefficient; Represents the Sigmoid function; This represents a linear transformation layer used to perform dimensionality compression and feature fusion on the concatenated feature vector, mapping the high-dimensional concatenated vector into a single scalar to provide input for the Sigmoid function; Indicates the first time-series feature and the first fusion vector The components are joined together along the feature dimension.

[0039] For example, the prediction head-1 is based on target fusion features. Regression prediction yields the predicted sensor data for the mass spectrometer at the next moment.

[0040] The network structure of the prediction head Head-1 can be a 3-layer lightweight residual MLP, where the input layer has 512 dimensions of input and 256 dimensions of output, the hidden layer has 256 dimensions of input and 256 dimensions of output, and the output layer has 256 dimensions of input and 16 dimensions of output. The predicted sensor data for the next time step is obtained through the linear activation function.

[0041] During Head-1 training, the mean squared error of the sample sensor data and the predicted sensor data at the next time step can be used as the loss function to update the network parameters of the prediction head.

[0042] For example, sample sensor data and sample control command data can be data corresponding to normal operation of the mass spectrometer and / or data corresponding to a real malfunction of the mass spectrometer.

[0043] For example, the deviation rate between the steady-state value of the sensor data after the mass spectrometer executes a control command data (which can be the average value of the sensor data after 5 time steps of executing the control command data) and the rated normal value of the mass spectrometer can be calculated, and the normalized deviation rate can be determined as the fault correction evaluation value corresponding to the control command data.

[0044] For example, the preset condition can be a preset numerical range. For instance, it can be greater than 0.5, and there is no restriction on the numerical range.

[0045] For example, the diagnostic head Head-2 can fuse features based on the input target. Output the predicted root cause probability of the mass spectrometer failure.

[0046] For example, the network structure of the diagnostic head Head-2 can be a 3-layer lightweight MLP, with the input layer having a 512-dimensional input and a 128-dimensional output, the hidden layer having a 128-dimensional input and a 64-dimensional output, and the output layer having a 64-dimensional input and a 4-dimensional output. The root cause probability of the mass spectrometer's failure is obtained through the Softmax activation function. During training, the cross-entropy of the sample failure root cause probability and the predicted failure root cause probability can be used as the loss function to update the network parameters of the diagnostic head.

[0047] For example, the root cause probability of a sample failure is the root cause probability corresponding to the sample sensor data and sample control command data input into the model during training.

[0048] S203. Based on the predicted sensor data at the second time and the actual sensor data at the second time, determine the prediction error. Based on the prediction error, the preset prediction error threshold, the predicted fault root cause probability, and the preset fault root cause probability threshold, determine whether the mass spectrometer has a fault.

[0049] It is understandable that the actual sensor data at the second moment is the actual sensor data of the mass spectrometer at the second moment.

[0050] For example, the prediction error between the predicted sensor data at the second time step and the actual sensor data at the second time step can be the mean square error.

[0051] For example, when the prediction error is greater than or equal to the preset prediction error threshold, it can be determined that the mass spectrometer has experienced an unknown fault that the model has not seen (because the model cannot accurately predict the derailment state, the error becomes larger). When the predicted root cause probability of the fault (output by the diagnostic head Head-2) is greater than the preset root cause probability threshold, it can be determined that the mass spectrometer has a known fault (at this time, even if the model obtains accurate and minimal error in the predicted sensor data at the second moment, the fault can still be identified by predicting the root cause probability).

[0052] It is understandable that as long as any of the above conditions are met, it can be determined that the mass spectrometer is malfunctioning.

[0053] For example, the prediction error can also be used as the core input data of the statistical process control (SPC) module. The SPC module will calculate a dynamic threshold that adapts to the current system state based on the temporal distribution characteristics of the prediction error and the real-time operating conditions of the mass spectrometer. Then, the prediction error will be compared with the obtained dynamic threshold to determine whether there is a fault in the mass spectrometer.

[0054] S204. When it is determined that the mass spectrometer has malfunctioned, the target control command data is determined based on the sensor data and control command data at the first moment and the target prediction model.

[0055] Among them, the target control command data is used to configure the mass spectrometer to correct malfunctions in the mass spectrometer; the target prediction model is also used to determine the target control command data based on the target fusion characteristics and the decision head when the mass spectrometer malfunctions.

[0056] For example, the decision head Head-3 can employ a conditional variational autoencoder (CVAE) structure to fuse features to the target. Using these as conditional features, multiple candidate control command data that conform to physical laws are generated, along with corresponding fault correction evaluation values. Then, based on preset conditions, the target control command data can be determined from these candidate control command data. It should be noted that when there are multiple candidate control command data that meet the preset conditions, the candidate control command data that meets the preset conditions and has the highest fault correction evaluation value can be determined as the target control command data.

[0057] For example, the deviation rate between the steady-state value of the sensor data after the mass spectrometer executes the candidate control command data (which can be the average value of the sensor data after 5 time steps of executing the candidate control command data) and the rated normal value of the mass spectrometer can be calculated, and the normalized deviation rate can be determined as the fault correction evaluation value corresponding to the candidate control command data.

[0058] For example, Head-3's CVAE can be comprised of four parts: input layer, encoder, latent space, decoder, and fault correction evaluation prediction branch.

[0059] The input layer fuses target features As a global condition for CVAE, feature mapping is performed through a linear layer + LayerNorm + Swish activation to obtain conditional feature c.

[0060] The Head-3 encoder can be a 3-layer fully connected network (MLP), with residual connections added to each layer to improve gradient propagation efficiency. The encoder's role is to encode the sample control command data (6-dimensional), combine it with the conditional feature c, and output the mean and variance of the latent space, so that the latent variables follow a Gaussian distribution to adapt to the continuous value characteristics of the mass spectrometer control parameters.

[0061] The latent space can be reparameterized to allow training of CVAEs via backpropagation.

[0062] The decoder is symmetrical to the encoder and uses a 3-layer residual MLP. The input is a concatenated vector of conditional features c and latent variables, and the output is candidate control command data.

[0063] The fault correction evaluation prediction branch can be a 2-layer MLP, with the target fused features as input. The concatenation vector with the candidate control command data outputs the fault correction evaluation value corresponding to the candidate control command data.

[0064] The loss function during Head-3 training can include reconstruction loss (mean square error between candidate control command data and sample control command data), encoder KL divergence loss, and fault correction evaluation value prediction loss (mean square error between fault correction evaluation value corresponding to candidate control command data and fault correction evaluation value corresponding to sample control command data).

[0065] A phased training strategy can be adopted when training the target prediction model. The first phase freezes the historical knowledge retrieval module and diagnostic head, training only the encoder, prediction head, and decision head of the target prediction model. The second phase unfreezes the historical knowledge retrieval module and diagnostic head, and fine-tunes the encoder of the target prediction model with a low learning rate. Simultaneously, temporal masking is applied to the historical knowledge retrieval module: during training, for samples at time t, historical cases after t are prohibited from being retrieved to prevent information skipping.

[0066] S205, Configure mass spectrometer based on target control command data.

[0067] At this point, the mass spectrometer can use target control command data to correct faults.

[0068] This embodiment acquires sensor data and control command data from the mass spectrometer at a first moment and inputs them into a target prediction model incorporating a historical knowledge retrieval module. The target prediction model is trained in advance using sample sensor data and sample control command data as input, and outputting sample sensor data at the next moment, sample control command data corresponding to a fault correction evaluation value that meets preset conditions, and the probability of sample fault root causes. Through the target prediction model, the predicted sensor data of the mass spectrometer at the second moment can be accurately determined. The prediction error is determined based on the predicted sensor data and the actual sensor data at the second moment. Based on the prediction error, a preset prediction error threshold, the predicted fault root cause probability, and the preset fault root cause probability threshold, the existence of a fault in the mass spectrometer can be accurately determined, improving the accuracy of mass spectrometer fault identification. When a fault occurs in the mass spectrometer, the decision head in the target prediction model quickly and accurately determines the target control command data that satisfies preset conditions for fault improvement after execution, based on target fusion features, and configures the mass spectrometer accordingly, improving the efficiency and accuracy of mass spectrometer fault correction.

[0069] The performance of deep learning models is highly dependent on massive and diverse training data. However, mass spectrometers are expensive and delicate, and real-world fault data (such as vacuum leaks, lens arcing, and circuit aging) often indicate hardware damage or prolonged downtime, making them extremely costly to obtain. In actual industrial scenarios, over 90% of the data is normal operating data, while fault samples are extremely scarce and unevenly distributed. This makes traditional pure data-driven models difficult to train due to a lack of sufficient negative samples, easily leading to overfitting and an inability to identify rare "long-tail" faults.

[0070] To improve the performance of the target prediction model, in some possible embodiments, the sample sensor data includes real sensor data and simulated sensor data, and the sample control command data includes real control command data and simulated control command data; The simulated sensor data is generated based on the simulated control command data and a data synthesis engine. refer to Figure 4The data synthesis engine is used to acquire the simulated mass spectrometer hidden state data at the initial time step and the simulated control command data at multiple time steps. The simulated control command data and the simulated mass spectrometer hidden state data at the initial time step are input into the drift network, and the simulated mass spectrometer hidden state data at the initial time step are input into the diffusion network. Based on the outputs of the drift network, the diffusion network, and the simulated fault operator, the simulated mass spectrometer hidden state data at the second time step is determined. The simulated mass spectrometer hidden state data at the second time step is input into the decoder, which outputs the simulated sensor data at the second time step. The simulated mass spectrometer hidden state data and the simulated control command data at the second time step are input into the drift network, and the simulated mass spectrometer hidden state data at the second time step are input into the diffusion network. Based on the outputs of the drift network, the diffusion network, and the simulated fault operator, the simulated mass spectrometer hidden state data at the third time step is determined. This process is repeated for all time steps to obtain simulated mass spectrometer hidden state data and simulated sensor data at multiple time steps. The data synthesis engine is trained based on real control command data as input and real sensor data as output.

[0071] For example, a high-dimensional state space can be defined: Hidden state space ( ): Define a vector Characterize the invisible physical nature of the system, i.e., the latent state data of the mass spectrometer (such as lens carbon deposition rate, space charge density, filament emission capability). Observation space ( ): Define a vector Characterize sensor data (such as ion current intensity, voltage levels, vacuum gauge readings). Control input space ( ): Define a vector It represents externally applied control command data (such as lens voltage adjustment and radio frequency setting).

[0072] For example, Iton's stochastic differential equations can be established to describe the evolution of the mass spectrometer: In the formula, the drift network The deterministic physical drift field is fitted using ResNet-MLP (Residual Multilayer Perceptron). The input is... The output is the rate of change of state. The network employs spectral normalization between layers to constrain the Lipschitz constant, ensuring the stability of the numerical solution; the diffusion network... The heteroscedastic noise intensity of the environment was fitted using MLP. Analog electronic noise and shot noise; fault operator : Sparse vector operator used to inject physical faults at a specific time step (such as simulating linear drift of vacuum leaks caused by aging of sealing rings).

[0073] For example, the simulated fault operators include gradual drift faults, abrupt step faults, and intermittent oscillation faults.

[0074] Gradual drift To simulate micro-leakage of the sealing ring or potential shielding by the lens, the corresponding operator can be expressed as follows: In the formula, The gradual drift rate coefficient (a positive / negative real number) mathematically determines the speed of drift and physically characterizes the rate of failure decay. The larger the absolute value, the faster the fault develops, such as (A larger value corresponds to a more severe degree of leakage from the sealing ring). In practical implementation... From the log-uniform distribution U

[10] -4 10 -2 The sampling is adapted to different degrees of gradual faults. Indicates the fault start time step. Indicates the duration of the fault. Indicates when hour ,otherwise .

[0075] abrupt step Analog circuit malfunction or power module failure: In the formula, This represents the step amplitude coefficient (a positive / negative real number). A positive value indicates a positive mutation in the parameter, and a negative value indicates a negative mutation. Indicates when hour ,otherwise .

[0076] intermittent oscillation Simulates poor contact or micro-arc discharge (sparking): In the formula, This represents the oscillation amplitude coefficient (a positive real number). Represents angular frequency. Indicates the initial phase. Indicates the start time step of the intermittent fault. Indicates the termination time step of an intermittent fault. Indicates when the fault occurs China Times, ,otherwise .

[0077] For example, the Euler-Maruyama method is used to discretize and integrate the Iton stochastic differential equation containing the fault term to obtain the evolved simulated mass spectrometer hidden state data.

[0078] For example, the hidden state space can be defined as having a dimension of 32, the control input space as having a dimension of 6, and the observation space as having a dimension of 16. The drift network is designed as a 6-layer ResNet-MLP. Input layer: 32 + 6 = 38 dimensions; Hidden layers: 512 neurons per layer, using the Swish activation function; Spectral normalization: Spectral normalization is enforced after each linear layer, strictly limiting the Lipschitz constant to 0.95 to ensure the Euler integral does not diverge. The diffusion network is designed as a 3-layer MLP (dimensions 32 → 128 → 128 → 32). Output layer activation: The Softplus function is used with a small constant ϵ = 1e-6 to ensure the output noise variance is always positive definite.

[0079] For example, the data synthesis engine training process may specifically include: Acquire real fault data, which includes real sensor data and real control command data; both real sensor data and real control command data contain multiple time steps. The actual sensor data at the initial time step is input into the encoder and mapped to the mass spectrometer latent state data at the initial time step. The mass spectrometer latent state data and the actual control command data of the initial time step are input into the drift network, and the mass spectrometer latent state data of the initial time step are input into the diffusion network. Based on the output of the drift network and the output of the diffusion network, the predicted mass spectrometer latent state data of the second time step is determined. The predicted mass spectrometer hidden state data of the second time step and the actual control command data of the second time step are input into the drift network, and the predicted mass spectrometer hidden state data of the second time step is input into the diffusion network. Based on the output of the drift network and the output of the diffusion network, the predicted mass spectrometer hidden state data of the third time step is determined. By iterating through all time steps, we can obtain the predicted latent state data of the mass spectrometer at multiple time steps. The predicted latent state data of the mass spectrometer at multiple time steps are input into the decoder to obtain the predicted sensor data at multiple time steps. The mean square error of the predicted sensor data and the actual sensor data is determined based on the predicted sensor data and the actual sensor data at multiple time steps. Based on the mean square error of the predicted sensor data and the actual sensor data, update the network parameters of the drift network, diffusion network, and decoder until the mean square error meets the preset threshold.

[0080] In this way, a large amount of realistic mass spectrometer simulation data can be obtained through the data synthesis engine, thereby improving the accuracy of the target prediction model trained using the simulation data.

[0081] Furthermore, the loss function during Head-3 prediction training can incorporate a Jacobi regularization term to constrain the model's gradient with respect to the control variable to be consistent with the gradient of the data synthesis engine. The loss function during Head-3 prediction training can include a physical consistency loss as shown in the following equation. : In the formula, This represents the coefficient of the Jacobi regularity term. This represents the gradient of the decision head with respect to the control command data. This represents the gradient of the data synthesis engine to the control command data. This represents the square of the L2 norm.

[0082] For example, such as Figure 3 As shown, the target prediction model may also include a lifetime prediction head, Head-4. Head-4 can output the remaining lifetime prediction parameters (such as Weibull distribution parameters) of the mass spectrometer based on the input target fusion features.

[0083] For example, the network structure of the lifespan prediction head Head-4 can be a 3-layer residual MLP. The input layer has a 512-dimensional input and a 256-dimensional output, the hidden layer has a 256-dimensional input and a 256-dimensional output, and the output layer has a 256-dimensional input and a 2-dimensional output. The Weibull distribution parameters (shape parameter k and scale parameter λrul) are obtained through the Softplus activation function. During training, the mean square error of the sample distribution parameters and the prediction distribution parameters can be used as the loss function to update the network parameters of the lifespan prediction head.

[0084] Furthermore, the target prediction model can employ a phased training strategy during training to address the issues of the virtual-to-real migration gap and gradient conflicts across multiple tasks.

[0085] Phase 1: Data Source: 100% simulation data. Configuration: Freeze the historical knowledge retrieval module, diagnostic head (Head-2), and lifetime prediction head (Head-4); train only the encoder, prediction head (Head-1), and decision head (Head-3) of the target prediction model. The loss function in Phase 1 incorporates the aforementioned physical consistency loss. This is to ensure that the model learns true causal relationships.

[0086] Phase Two: Data Source: A mixture of simulation and real data. Configuration: Unfreeze and activate the historical knowledge retrieval module, diagnostic head (Head-2), and lifetime prediction head (Head-4); fine-tune the backbone (i.e., the encoder of the target prediction model) with a low learning rate. Introduce homoscedasticity uncertainty parameters. Automatically balance the loss weights of the four tasks: In the formula, This represents the total loss in the second phase. Indicates the task header index. This represents the homoscedastic noise variance of the i-th task header. Let represent the learnable homoscedasticity uncertainty parameter of the i-th task head. This represents the original loss corresponding to the i-th task header.

[0087] This mechanism can automatically reduce the weights of noisy tasks (such as unpredictable lifetime labels) to prevent their gradients from interfering with other highly deterministic tasks.

[0088] It should be noted that when the target prediction model does not include the lifetime prediction head-4, the above formula can be used to balance the loss weights of the three tasks. Only the superscript "4" of the summation symbol needs to be changed to "3".

[0089] For example, the first stage: optimizer AdamW, learning rate Weight decay Phase 2: Encoder learning rate decreases to The remaining layers remain .

[0090] In some possible embodiments, there are N target control command data points. Specifically, the target prediction model is used to determine the N target control command data points and the corresponding fault correction evaluation values ​​based on the N target control command data points by performing N inferences based on the decision head using MC Dropout according to the target fusion features; calculate the variance of the fault correction evaluation values ​​corresponding to the N target control command data points; determine that the variance of the fault correction evaluation values ​​corresponding to the N target control command data points is less than the preset variance threshold according to a preset variance threshold; and output the N target control command data points. Configure the mass spectrometer based on target control command data, including: Mass spectrometer configured based on the mean of N target control command data.

[0091] For example, when the variance of the fault correction evaluation value corresponding to N target control command data is greater than or equal to a preset variance threshold, it is determined that the current operating condition is in the model's cognitive blind zone, and the AI ​​suggestion is automatically rejected (i.e., the mass spectrometer no longer executes the target control command data), and the system smoothly switches back to traditional PID control.

[0092] In this way, the risk of the model making wrong decisions due to "illusion" can be avoided from the root, the "black box uncertainty" problem of end-to-end model control can be solved, high uncertainty target control command data can be filtered in advance, and the hardware safety of mass spectrometer can be guaranteed.

[0093] In some possible embodiments, the mass spectrometer fault correction method further includes, prior to configuring the mass spectrometer based on target control command data: When the target control command data does not conform to the physical operation rules, the target control command data is updated according to the safe operation boundary value corresponding to the target control command data.

[0094] For example, a safe operating envelope for a mass spectrometer can be predefined: based on the physical mechanism, hardware design specifications, and industrial operating experience of the mass spectrometer, physical safety boundaries of multivariable coupling can be set in advance, and the coupling constraint rules between various control parameters (voltage, vacuum, gas flow, etc.) can be clarified to cover all dangerous operating conditions that may cause hardware failure.

[0095] For example, when the vacuum gauge reading P > 1 × 10 -4 During Torr, the ion source voltage must not exceed 2000V.

[0096] For example, after the decision head Head-3 outputs target control command data, it can automatically extract the real-time physical state of the current mass spectrometer (such as vacuum level and temperature), compare it with the safe operation envelope, and determine whether the target control command data falls into the multivariate coupling danger zone, that is, whether the target control command data conforms to the physical operation rules.

[0097] When the target control command data does not conform to the physical operation rules, a convex hull projection operation will be performed on the target control command data to orthogonally project and update the target control command data to the nearest physical safety boundary, thereby generating target control command data that conforms to hard constraints.

[0098] For example, if the Head-3 outputs a predicted ion source voltage of 2500V, and the current vacuum level P = 2 × 10⁻⁶, then... -4 Torr (out of safety boundary) The projection algorithm will directly truncate the voltage to 2000V and generate a compliance instruction.

[0099] In this way, the mass spectrometer can be protected at the physical mechanism level, while solving the physical compliance problem of model decision-making and improving the operational stability of the mass spectrometer.

[0100] It should be noted that, to ensure ultimate human control under all circumstances, the system is designed with a high-priority human intervention mechanism. At any stage of system operation, the operator can execute "one-click pause" or "emergency takeover" commands through a dedicated human-machine interface. One-click pause: This command immediately suspends all decision-making and execution activities of the master control agent, maintaining the system in its current safe state, awaiting human intervention. Emergency takeover: This allows the operator to directly and manually control the mass spectrometer's critical parameters. The command bypasses all AI logic and safety constraints, serving as the last line of defense for handling unexpected situations and ensuring hardware safety.

[0101] In some possible embodiments, the simulated mass spectrometer latent state data for the initial time step is obtained by dividing the range of values ​​for the physical dimension of each mass spectrometer latent state data into M equal intervals, based on Latin hypercube sampling.

[0102] This ensures that the simulation data covers different states throughout the entire life cycle of the mass spectrometer, thereby improving the accuracy of the target prediction model.

[0103] In some possible embodiments, after outputting the simulated sensor data at the second time step, the data synthesis engine is also used for: The simulated sensor data for the second time step is updated based on the industrial environmental noise.

[0104] For example, industrial environmental noise may include thermal noise (which follows a Gaussian distribution and simulates electronic noise floor), shot noise (which follows a Poisson distribution approximation and simulates the quantum discreteness of ions hitting the detector, with intensity proportional to signal amplitude), and colored noise (generated using the Ornstein-Uhlenbeck process and simulates low-frequency drift noise with time correlation).

[0105] For example, updating the simulated sensor data at the second time step can be done by adding industrial environmental noise to the simulated sensor data at the second time step (by performing a summation operation).

[0106] In this way, the simulation data can simulate the harsh industrial environment, improve the realism of the simulation data, and thus improve the accuracy of the target prediction model.

[0107] In some possible embodiments, reference is made to Figure 5 To achieve standardized interoperability between the mass spectrometer fault correction method and external clients (such as host computer software, general large model assistant, or central control system), this embodiment further constructs a service-oriented architecture based on the Model Context Protocol (MCP). This architecture encapsulates the core method components of the aforementioned steps into a standardized MCP server.

[0108] (a) Resource mapping of perception and knowledge The real-time observation data streams from actual sensors and the data synthesis engine, as well as data from the historical operation vector library, are mapped to resources in the MCP protocol. This allows external systems to obtain current sensor reading vectors, latent state features, and relevant historical cases retrieved by the historical knowledge retrieval module through a standard subscription method, providing a transparent physical context for upper-layer applications.

[0109] (ii) Tool-based encapsulation of diagnosis and decision-making The simulation and deduction capabilities of the data synthesis engine and the multi-head decoder (Head-1 to Head-4) functions in the target prediction model are encapsulated as tools in the MCP protocol.

[0110] Simulation tools: allow external systems to call the data synthesis engine to perform "counterfactual inference", that is, input hypothetical control parameters and return the predicted system evolution trajectory.

[0111] Diagnostic and predictive tools: Expose the fault prediction and diagnostic capabilities of Head-1 and Head-2, and the life prediction capability of Head-4. External systems can obtain probabilistic diagnostic results simply by sending a request.

[0112] Control tools: Encapsulate Head-3's decision-making capabilities and provide a standardized interface for issuing control commands.

[0113] (III) Security Interception Mechanisms at the Protocol Layer Integrate security risk control mechanisms into the middleware layer of the MCP protocol: Cognitive interception: When processing tool call requests, the uncertainty of the real-time calculation model is considered. Once the input data is found to be out of distribution (OOD), the protocol layer directly refuses to execute and returns a specific status code.

[0114] Command filtering: The convex hull projection algorithm is forcibly implanted into the underlying implementation of the control tool to ensure that all physical commands issued through the MCP protocol are verified and corrected by the security boundary, preventing external malicious or erroneous calls from damaging the hardware.

[0115] This application also provides an application scenario in which the above-described mass spectrometer fault correction method is applied. Specifically, the mass spectrometer fault correction method provided in this embodiment can be applied in the automated control scenario of a mass spectrometer. When a fault occurs during the normal operation of a mass spectrometer, it is necessary to control and adjust the mass spectrometer to ensure its normal operation. The mass spectrometer fault correction method provided in this embodiment belongs to this control and adjustment stage.

[0116] Based on the same inventive concept, this application also provides a mass spectrometer fault correction device for implementing the mass spectrometer fault correction method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the mass spectrometer fault correction device provided below can be found in the limitations of the mass spectrometer fault correction method described above, and will not be repeated here.

[0117] In one exemplary embodiment, such as Figure 6 As shown, a mass spectrometer fault correction device is provided, comprising: The acquisition module 601 is used to acquire the sensor data and control command data of the mass spectrometer at the first moment; The processing module 602 is used to determine the probability of predicting the root cause of the fault and the predicted sensor data at the second moment based on the sensor data and control command data at the first moment and the target prediction model. The determination module 603 is used to determine the prediction error based on the predicted sensor data at the second time and the actual sensor data at the second time, and to determine whether the mass spectrometer has a fault based on the prediction error, the preset prediction error threshold, the predicted fault root cause probability, and the preset fault root cause probability threshold. The processing module 602 is also used to determine the target control command data based on the target prediction model, according to the sensor data and control command data at the first moment, when it is determined that the mass spectrometer has malfunctioned; Configuration module 604 is used to configure the mass spectrometer based on target control command data; Among them, the target control command data is used to configure the mass spectrometer to correct malfunctions in the mass spectrometer; The target prediction model performs multimodal fusion on the sensor data and control command data at the first input moment, and extracts temporal features based on the encoder to obtain the first temporal feature. The first temporal feature is then input into the historical knowledge retrieval module, which, based on the first temporal feature, determines multiple target historical operating vectors similar to the first temporal feature from a historical operating vector library. The historical operating vector library includes historical normal operating vectors and historical fault operating vectors. Based on the first temporal feature and multiple target historical operating vectors, a first fusion vector is determined using cross-attention. Based on the first fusion vector and the first temporal feature, a target fusion feature is determined. Based on the target fusion feature, the predicted sensor data at the second moment is determined using the prediction head, and the predicted root cause probability of the fault is determined using the diagnostic head. The target prediction model is also used to determine target control command data based on the decision head, according to the target fusion characteristics, when the mass spectrometer malfunctions. The target prediction model is obtained by pre-training the initial neural network. When training the initial neural network, the sample sensor data and sample control command data are used as inputs, the sample sensor data at the next time step is used as the prediction head output, the sample control command data corresponding to the fault correction evaluation value that meets the preset conditions is used as the decision head output, and the sample fault root cause probability is used as the diagnosis head output. The fault correction evaluation value is used to indicate the degree of fault improvement of the mass spectrometer after executing the control command data.

[0118] The specific implementation methods and beneficial effects of this device embodiment can be found in the foregoing method embodiments, and will not be repeated here.

[0119] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 7 The computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When the computer program is executed by the processor, it implements the aforementioned mass spectrometer fault correction method.

[0120] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0121] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0122] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0123] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0124] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0125] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0126] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0127] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0128] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for correcting malfunctions in a mass spectrometer, characterized in that, The mass spectrometer fault correction method includes: Acquire the sensor data and control command data of the mass spectrometer at the first moment; Based on the sensor data and control command data at the first moment, and based on the target prediction model, the probability of predicting the root cause of the fault and the predicted sensor data at the second moment are determined. Based on the predicted sensor data at the second time point and the actual sensor data at the second time point, the prediction error is determined. Based on the prediction error, the preset prediction error threshold, the predicted fault root cause probability, and the preset fault root cause probability threshold, it is determined whether the mass spectrometer has a fault. When it is determined that the mass spectrometer has malfunctioned, the target control command data is determined based on the sensor data and control command data at the first moment and the target prediction model. Configure the mass spectrometer based on the target control command data; The target control command data is used to configure the mass spectrometer to correct any malfunctions that occur in the mass spectrometer. The target prediction model is used to perform multimodal fusion on the sensor data and control command data at the first input moment, and then extract time-series features based on the encoder to obtain a first time-series feature. The first time-series feature is input into the historical knowledge retrieval module, which determines multiple target historical operation vectors similar to the first time-series feature from the historical operation vector library. The historical operation vector library includes historical normal operation vectors and historical fault operation vectors. Based on the first time-series feature and multiple target historical operation vectors, a first fusion vector is determined based on cross-attention. Based on the first fusion vector and the first time-series feature, a target fusion feature is determined. Based on the target fusion feature, the predicted sensor data at the second moment is determined based on the prediction head, and the predicted root cause probability of the fault is determined based on the diagnostic head. The target prediction model is also used to determine target control command data based on the decision head when the mass spectrometer malfunctions, according to the target fusion characteristics. The target prediction model is obtained by pre-training an initial neural network. When training the initial neural network, the sample sensor data and sample control command data are used as inputs, the sample sensor data at the next time step is used as the prediction head output, the sample control command data corresponding to the fault correction evaluation value that meets the preset conditions is used as the decision head output, and the sample fault root cause probability is used as the diagnostic head output. The fault correction evaluation value is used to indicate the degree of fault improvement of the mass spectrometer after executing the control command data.

2. The mass spectrometer fault correction method according to claim 1, characterized in that, The target control command data consists of N items. The target prediction model is specifically used to determine the N target control command data and the corresponding fault correction evaluation value based on the N target control command data by using MC Dropout based on the decision head and performing N inferences based on the target fusion features. Calculate the variance of the fault correction evaluation values ​​corresponding to N target control command data; Based on the preset variance threshold, the variance of the fault correction evaluation value corresponding to N target control command data is determined to be less than the preset variance threshold; Output N target control command data; The configuration of the mass spectrometer based on the target control command data includes: Mass spectrometer configured based on the mean of N target control command data.

3. The mass spectrometer fault correction method according to claim 1, characterized in that, Before configuring the mass spectrometer based on the target control command data, the mass spectrometer fault correction method further includes: When the target control command data does not conform to the physical operation rules, the target control command data is updated according to the safe operation boundary value corresponding to the target control command data.

4. The mass spectrometer fault correction method according to claim 1, characterized in that, Sample sensor data includes real sensor data and simulated sensor data; sample control command data includes real control command data and simulated control command data. The simulated sensor data is generated based on the simulated control command data and a data synthesis engine. The data synthesis engine is used to acquire the simulated mass spectrometer hidden state data at the initial time step and the simulated control command data at multiple time steps; input the simulated control command data and the simulated mass spectrometer hidden state data at the initial time step into the drift network, input the simulated mass spectrometer hidden state data at the initial time step into the diffusion network, and determine the simulated mass spectrometer hidden state data at the second time step based on the output of the drift network, the output of the diffusion network, and the simulated fault operator; input the simulated mass spectrometer hidden state data at the second time step into the decoder, and output the simulated sensor data at the second time step; input the simulated mass spectrometer hidden state data and the simulated control command data at the second time step into the drift network, input the simulated mass spectrometer hidden state data at the second time step into the diffusion network, and determine the simulated mass spectrometer hidden state data at the third time step based on the output of the drift network, the output of the diffusion network, and the simulated fault operator; traverse all time steps to obtain simulated mass spectrometer hidden state data and simulated sensor data at multiple time steps. The data synthesis engine is trained based on real control command data as input and real sensor data as output.

5. The mass spectrometer fault correction method according to claim 4, characterized in that, The simulated latent state data of the mass spectrometer at the initial time step is obtained by dividing the value range of the physical dimension of each latent state data of the mass spectrometer into M intervals, based on Latin hypercube sampling.

6. The mass spectrometer fault correction method according to claim 4, characterized in that, The simulated fault operators include gradual drift faults, abrupt step faults, and intermittent oscillation faults.

7. The mass spectrometer fault correction method according to claim 4, characterized in that, After outputting the simulated sensor data at the second time step, the data synthesis engine is also used for: The simulated sensor data for the second time step is updated based on the industrial environmental noise.

8. A mass spectrometer fault correction device, characterized in that, The mass spectrometer fault correction device includes: The acquisition module is used to acquire the sensor data and control command data of the mass spectrometer at the first moment; The processing module is used to determine the probability of predicting the root cause of the fault and the predictive sensor data at the second moment based on the sensor data and control command data at the first moment and the target prediction model. The determination module is used to determine the prediction error based on the predicted sensor data at the second time and the actual sensor data at the second time, and to determine whether the mass spectrometer has a fault based on the prediction error, the preset prediction error threshold, the predicted fault root cause probability, and the preset fault root cause probability threshold. The processing module is also used to determine the target control command data based on the target prediction model when it is determined that the mass spectrometer has malfunctioned; The configuration module is used to configure the mass spectrometer based on the target control command data; The target control command data is used to configure the mass spectrometer to correct any malfunctions that occur in the mass spectrometer. The target prediction model is used to perform multimodal fusion on the sensor data and control command data at the first input moment, and then extract time-series features based on the encoder to obtain a first time-series feature. The first time-series feature is input into the historical knowledge retrieval module, which determines multiple target historical operation vectors similar to the first time-series feature from the historical operation vector library. The historical operation vector library includes historical normal operation vectors and historical fault operation vectors. Based on the first time-series feature and multiple target historical operation vectors, a first fusion vector is determined based on cross-attention. Based on the first fusion vector and the first time-series feature, a target fusion feature is determined. Based on the target fusion feature, the predicted sensor data at the second moment is determined based on the prediction head, and the predicted root cause probability of the fault is determined based on the diagnostic head. The target prediction model is also used to determine target control command data based on the decision head when the mass spectrometer malfunctions, according to the target fusion characteristics. The target prediction model is obtained by pre-training an initial neural network. When training the initial neural network, the sample sensor data and sample control command data are used as inputs, the sample sensor data at the next time step is used as the prediction head output, the sample control command data corresponding to the fault correction evaluation value that meets the preset conditions is used as the decision head output, and the sample fault root cause probability is used as the diagnostic head output. The fault correction evaluation value is used to indicate the degree of fault improvement of the mass spectrometer after executing the control command data.

9. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the mass spectrometer fault correction method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the mass spectrometer fault correction method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Industrial sensor intermittent fault detection method and device and storage medium

    CN121704382A

  • Vehicle fault diagnosis method and device based on deep learning and knowledge graph

    CN122020469A