Nuclear accident fault diagnosis method and equipment combining physical constraints and large language model
By combining physical constraints with a large language model, a nuclear power pipeline fluid model was constructed and fine-tuned, which solved the adaptability and robustness problem of the nuclear power plant fault diagnosis system in complex nonlinear systems, and achieved more efficient and accurate fault identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN TECH UNIV
- Filing Date
- 2025-07-08
- Publication Date
- 2026-04-21
AI Technical Summary
Existing nuclear power plant fault diagnosis systems lack physical constraints in complex nonlinear systems, resulting in a mechanical training process, poor generalization, and insufficient adaptability and robustness of large language models in nuclear energy scenarios.
By combining physical constraints with a large language model, a fluid model of a nuclear energy pipeline is constructed. Its information is transformed into lexical units that the large language model can understand, and physical constraint information is embedded. Fine-tuning training is then performed to adapt to the task of nuclear energy pipeline fault diagnosis.
It improves the scientific rigor and reliability of fault diagnosis, enhances the intuitive understanding of the operating status of nuclear energy facilities, improves the efficiency and accuracy of fault identification, and enhances the adaptability of the model in nuclear pipeline fault diagnosis.
Smart Images

Figure CN120724343B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault diagnosis technology, and specifically to a method for diagnosing nuclear accident faults that combines physical constraints with a large language model. Background Technology
[0002] Currently, most nuclear power plants are equipped with fault early warning and diagnosis systems that operate as follows: After system startup, the first step is to comprehensively collect parameter values from sensors at various measuring points throughout the nuclear power plant. These sensors are distributed in key areas of the nuclear power plant, continuously monitoring various operational data. Subsequently, based on accumulated expert knowledge and past practical experience, corresponding threshold ranges are set for these collected parameters. The setting of thresholds is crucial, as it provides a clear standard for judging whether parameters are normal. Once the system detects that the value of a parameter exceeds the pre-set threshold during real-time monitoring, an alarm mechanism is immediately triggered, issuing an alarm signal. At the same time, the system will also use its built-in analysis logic to indicate the specific location of the possible fault and the potential cause of the fault, so that staff can quickly take countermeasures. Existing nuclear power plant fault diagnosis technologies can be divided into methods based on mathematical models, signal processing, and artificial intelligence, such as... Figure 1 As shown.
[0003] 1) Mathematical model-based methods
[0004] Based on a deep understanding of the object being diagnosed, an accurate mathematical model is established. Faults are detected and diagnosed by comparing the residuals between the actual output of the nuclear reactor system and the model's predicted output. Commonly used mathematical models include state-space models and transfer function models. These models are suitable for scenarios with clearly defined equations and mathematical principles, and a failure is indicated by any deviation from these principles.
[0005] 2) Signal processing-based methods
[0006] Signal processing techniques are used to analyze and process various sensor signals generated during system operation, such as pressure, flow rate, and velocity, to extract signal feature quantities that reflect fault characteristics, thereby achieving fault diagnosis. The specific process includes: Signal acquisition: Using sensors to collect various signals during system operation. Preprocessing the acquired signals, such as filtering and noise reduction, to improve signal quality. Using signal processing methods, extracting feature quantities reflecting fault characteristics, such as frequency components, amplitude, and phase, from the preprocessed signals. Analyzing and comparing the extracted feature quantities to determine the presence and severity of a fault. Finally, based on the feature analysis results and in conjunction with a fault mode library, determining the type and location of the fault.
[0007] 3) Fault diagnosis methods based on artificial intelligence
[0008] Artificial intelligence-based methods do not require modeling; they only need to collect a large amount of historical data, use AI algorithms to learn and train on a large number of fault sample data, establish a fault diagnosis model, and then use this model to classify and predict actual fault data. This is applicable to complex, nonlinear systems, especially those that are difficult to model precisely. In nuclear energy fault diagnosis, due to the large scale of system parameters, the complexity of piping and reactor structures, and the wide variety of fault types, AI-based fault diagnosis technology can play a crucial role.
[0009] While current artificial intelligence methods can achieve better fault diagnosis results without requiring complex principles compared to traditional modeling and signal methods, they still have the following problems:
[0010] 1) Artificial intelligence methods often lack physical principles, especially in system modeling, where they lack the conditions to constrain complex nonlinear systems. This leads to a mechanical training process, where the algorithm is trained simply to fit the target, resulting in poor generalization on actual test sets. This is because neural network training cannot understand the physical processes. Therefore, it is necessary to introduce physical priors and incorporate physical constraints during black-box training to better adapt to the physical objects in nuclear reactor accident scenarios.
[0011] 2) Existing artificial intelligence models are often specific, only usable within defined datasets. When the scenario changes or unforeseen environmental noise is introduced, even with the same configuration and physical quantities, they struggle to perform fault classification, exhibiting poor robustness. While existing large language models (LLMs) have shown advantages—effectively integrating into various systems due to their pre-trained knowledge of diverse natural information—they still require adaptation to specific domains. Therefore, this invention designs a heterogeneous PINN method driven by a large language model to understand semantic knowledge under different nuclear accident modes.
[0012] 3) PINN has been widely used in physics problem solving. For complex equations, manual solutions are often cumbersome and require consideration of numerous constraints, often failing to yield closed-form solutions. By introducing data errors and physical information errors through PINN, key physical information of the output can be obtained based on the current input variables, thereby enabling fault diagnosis and identification. Summary of the Invention
[0013] The present invention proposes a method, device and storage medium for nuclear accident fault diagnosis that combines physical constraints and a large language model, which can at least solve one of the technical problems in the background art.
[0014] To achieve the above objectives, the present invention adopts the following technical solution:
[0015] A method for diagnosing nuclear accident faults that combines physical constraints with a large language model includes the following steps:
[0016] S1. Construct a mathematical model of fluid flow in nuclear energy pipelines to describe the behavior of fluid in the pipelines;
[0017] S2. Convert the relevant information of the nuclear energy pipeline fluid model established in step S1 into tokens that can be understood by the Large Language Model (LLM).
[0018] S3. Embed physical constraint information into the Large Language Model (LLM);
[0019] S4. After embedding physical constraint information, fine-tune the large language model LLM to adapt it to the nuclear pipeline fault diagnosis task.
[0020] S5. The finely tuned and trained large language model LLM is used to classify fault categories in new nuclear pipeline operation data.
[0021] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.
[0022] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.
[0023] As can be seen from the above technical solution, the nuclear accident fault diagnosis method combining physical constraints and large language models of the present invention has the following beneficial effects:
[0024] The large-model-driven nuclear accident diagnosis technology based on physical embedding and the fault diagnosis text adaptation mechanism based on nuclear energy-related lexical embedding proposed in this invention have significant advantages over existing technologies in the field of nuclear energy facility operation fault diagnosis, and have produced many positive effects. The following is a detailed analysis of the specific technical solutions:
[0025] 1) The fault diagnosis text adaptation mechanism with nuclear energy-related word embedding effectively combines the physical process of nuclear energy faults with the large model.
[0026] In existing technologies, traditional nuclear facility inspection work orders typically only contain simple numerical descriptions of various parameters and brief records of past faults. This presentation method lacks intuitive textual information that presents the nuclear energy operation status and potential risk factors, making it difficult for technicians to fully and deeply understand the physical meaning and operational status behind the data when analyzing faults.
[0027] This invention constructs a mathematical model of fluid flow within a nuclear power pipeline in step S1, accurately describing the fluid's behavior within the pipeline. This model considers various factors, including the fluid's density and viscosity, the pipeline's geometry, and boundary conditions (such as inlet flow rate and outlet pressure). The model is established based on the fundamental equations of fluid mechanics, the Navier-Stokes equations, and the equations are discretized using the numerical finite element method to obtain the distribution of parameters such as the velocity field and pressure field of the fluid within the pipeline.
[0028] In step S2, unlike traditional LLM methods that directly embed numerical values, this invention transforms the relevant information of the nuclear pipeline fluid model established in step S1 into tokens that the Large Language Model (LLM) can understand. Based on a quantile-based word segmentation conversion table, the parameter names and descriptions in the fluid model are converted. This transformation transforms the originally dry numerical information into linguistic information rich in nuclear energy operation characteristics. Through the quantile-based word segmentation conversion table, pressure value ranges are converted into intuitive text descriptions such as "normal pressure," "high pressure," and "excessive pressure." Similarly, flow parameters are converted into text information such as "normal flow," "high flow," and "excessive flow." In this way, technicians can more intuitively understand the operating status of nuclear energy facilities when analyzing faults, quickly identify potential risk factors, and greatly improve the efficiency and accuracy of fault diagnosis.
[0029] 2) Physical embedding ensures that the LLM output conforms to physical laws, improving the scientific rigor and reliability of fault diagnosis.
[0030] In existing technologies, when using large models (such as TimeGPT) directly for fault diagnosis, only data loss is often utilized, while the constraints of physical laws on the model output are ignored. This results in the model generating results that, although they conform to the data distribution, violate physical principles, thereby reducing the scientificity and reliability of fault diagnosis.
[0031] In step S3 of this invention, to ensure that the output generated by the LLM conforms to the physical laws of the nuclear energy pipeline fluid model, physical constraint information is embedded into the LLM. These physical constraints are based on the relationships derived from the fluid model established in step S1. For example, according to the law of conservation of mass, under steady-state flow conditions, the flow rate at the pipe inlet is equal to the flow rate at the outlet, i.e., ... This constraint condition is transformed into a regularization term and added to the loss function of the LLM.
[0032] In this way, LLM considers not only the distribution of the data itself during training and inference, but also adheres to physical laws. This makes the model's output more scientific and reasonable, improving the reliability of fault diagnosis. When judging abnormal pipeline flow, the model not only makes judgments based on data trends, but also incorporates physical laws such as the law of conservation of mass, avoiding erroneous judgments that do not conform to reality.
[0033] 3) Employ a task-driven fine-tuning approach to improve the adaptability of LLM to nuclear pipeline fault diagnosis tasks.
[0034] In existing technologies, large models are typically pre-trained on general datasets. While they possess some generalization ability, they are poorly adapted to specific nuclear pipeline fault diagnosis tasks. Furthermore, the inability to fully understand the specialized knowledge and characteristics within nuclear pipeline-related data leads to inadequate fault diagnosis results.
[0035] In step S4 of this invention, a task-driven fine-tuning method is proposed. After embedding physical constraint information, the LLM is fine-tuned to better adapt to the nuclear pipeline fault diagnosis task. Fine-tuning training is performed on the pre-trained LLM using a specific dataset related to nuclear pipelines. The training dataset contains a large number of nuclear pipeline operation cases, each including the pipeline's fluid model parameters, operating conditions (temperature, pressure, flow rate, etc.), and corresponding fault information (fault presence, fault type, etc.). Nuclear information terms are used as input to expand the domain dictionary and reconstruct the embedding space. Then, the backbone network is frozen and the adapter classification head is fine-tuned to obtain the predicted probability output. The adapter classification head is a key component for fine-tuning, consisting of three linear layers and a ReLU activation function; the hidden layer size is determined by the pre-trained model. Attached Figure Description
[0036] Figure 1 Classify existing fault diagnosis technologies;
[0037] Figure 2 This is the overall process flow of the embodiments of the present invention;
[0038] Figure 3 This is a flowchart illustrating step S2 of an embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of the fine-tuning process according to an embodiment of the present invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0041] During the operation of nuclear energy facilities, pipeline characteristics are closely linked to the occurrence of nuclear accidents and malfunctions. Anomalies in parameters such as reactor pressure, pipeline flow rate, and coolant temperature can all be potential triggers. Traditional nuclear energy facility inspection work orders typically only contain simple numerical descriptions of various parameters and brief records of past malfunctions, lacking textual information that intuitively presents the nuclear energy operating status and potential risk factors. To better adapt to the nuclear accident and malfunction diagnosis task focused on in this invention, this invention proposes a malfunction diagnosis text adaptation mechanism based on the embedding of nuclear energy-related terms. This mechanism transforms the nuclear energy operating parameter information presented in numerical form in the work order into linguistic information containing rich nuclear energy operating characteristics, thereby fully leveraging the advantages of large-scale models in feature extraction. Specific steps are as follows... Figure 2 :
[0042] Step S1: Establishing a fluid model for nuclear power pipelines
[0043] A mathematical model of fluid flow within a nuclear power pipeline is constructed to accurately describe the fluid's behavior within the pipeline. This requires considering the fluid's physical properties (density, viscosity), the pipeline's geometry (diameter, length, degree of curvature), and boundary conditions such as inlet flow rate and outlet pressure.
[0044] The model is built based on the fundamental equations of fluid mechanics, the Navier-Stokes equations. For laminar flow of incompressible fluids in a pipe, the Navier-Stokes equations can be simplified to the following in Cartesian coordinates:
[0045] ;
[0046] Where ρ is the fluid density, u is the fluid velocity vector, t is time, p is pressure, μ is the fluid dynamic viscosity, and f is the external force vector acting on the fluid. In pipe flow problems, this equation is usually further simplified according to the specific flow conditions. Simultaneously, it is combined with the continuity equation. (For incompressible fluids) to ensure mass conservation. The above equations are discretized using numerical methods such as the finite difference method and the finite element method to obtain the distribution of parameters such as the velocity field and pressure field of the fluid inside the pipe.
[0047] Step S2: Large Model LLM Lexical Transformation and Driving
[0048] like Figure 3As shown, unlike traditional LLM methods that directly embed numerical values, this invention transforms the relevant information of the nuclear energy pipeline fluid model established in step S1 into tokens that the Large Language Model (LLM) can understand. This is based on a quantile-based tokenization table. Tokens can be words, subwords, or characters, depending on the LLM's tokenization strategy. This invention proposes a tokenization table based on quantiles, as shown in Table 1.
[0049] For parameters in the fluid model ("density" corresponds to density ρ, "viscosity" corresponds to viscosity μ) and boundary condition descriptions ("inlet flow rate" corresponds to inlet flow rate Q), they all need to be converted into corresponding word sequences.
[0050] A mapping rule is used for lexical transformation. Let M be the mapping function from model parameters to lexical units, where M(ρ) = "density" for the density parameter ρ. When driving the LLM, these lexical sequences are input into the LLM, enabling it to process information related to the nuclear pipeline fluid model. This can be represented as...
[0051] ;
[0052] in, These are the transformed word units, and n is the number of word units. These word units are input into the input layer of the LLM and processed through the multi-layer neural network structure of the LLM.
[0053] Table 1. Nuclear Energy Quantile Word Segmentation Conversion Table
[0054]
[0055] Step S3: LLM embeds physical constraint information
[0056] To ensure that the output generated by the LLM conforms to the physical laws of the nuclear pipeline fluid model, physical constraint information needs to be embedded into the LLM. Unlike methods that directly utilize large models such as TimeGPT and only rely on data loss, the core of this invention lies in achieving large-model-driven nuclear accident diagnosis through physical embedding. These physical constraints can be based on the relationships derived from the fluid model established in step S1. According to the law of conservation of mass, under steady-state flow conditions, the flow rate at the pipeline inlet is equal to the flow rate at the outlet, i.e. This constraint is transformed into a regularization term and added to the loss function of the LLM.
[0057] Let the original loss function of LLM be and the regularization term of the physical constraints be , then the total loss function can be expressed as:
[0058] ;
[0059] Here, λ is a hyperparameter used to balance the loss inherent in the LLM model with the impact of physical constraints. Physical loss It can be defined according to specific physical constraints. In nuclear pipeline fault diagnosis, this invention is set as follows:
[0060] ;
[0061] Step S4: Fine-tuning training
[0062] After embedding physical constraint information, the LLM is fine-tuned to better adapt it to nuclear pipeline fault diagnosis tasks. Fine-tuning involves further training the pre-trained LLM using a specific dataset related to nuclear pipelines.
[0063] The training dataset can contain a large number of nuclear energy pipeline operation cases. Each case includes the pipeline's fluid model parameters, operating conditions such as temperature, pressure, and flow rate, as well as corresponding fault information (whether there is a fault, the type of fault, etc.).
[0064] The aforementioned nuclear energy term embedding can transform work order text into an LLM-compatible format. To adapt the LLM generation model to nuclear accident fault classification tasks, this invention proposes a task-driven fine-tuning method, the fine-tuning process of which is as follows: Figure 4 As shown.
[0065] like Figure 4 As shown, nuclear energy information terms are used as input to expand the domain dictionary and reconstruct the embedding space. Then, the backbone network is frozen and the adapter classification head is fine-tuned to obtain the predicted probability output. The adapter classification head is a key component for fine-tuning. The adapter classification head consists of three linear layers and a ReLU activation function. The hidden layer size is determined by the pre-trained model, and in the Chinese variant pre-training weights selected in this invention, it is 768. The adapter classification head output can be expressed as... ;
[0066] ;
[0067] in, The weight representing the adapter category header, It is a feature text input. , and These represent the weights of the linear layer, , and This represents the bias of the three linear layers. This represents the probability distribution obtained from the mapping.
[0068] In the task-driven fine-tuning process, weights that are not updated when the backbone model is frozen are used to avoid overfitting and reduce computational overhead. The loss function for the fine-tuning process... It can be represented as
[0069] ;
[0070] in, This is the dance category label. N represents the number of samples in the batch.
[0071] Step S5: Classify the fault category
[0072] The finely tuned LLM can be used to classify fault categories in new nuclear pipeline operation data. New pipeline fluid model parameters, operating conditions, and other information are converted into word sequences and input into the finely tuned LLM.
[0073] LLM (Learning Model for Imaging) outputs a probability distribution based on the knowledge and physical constraints learned during training, representing the probability that the input data belongs to different fault categories. Let the set of fault categories be... The probability distribution of LLM output is ,in Is the input data a category? The probability of.
[0074] As shown in Table 2, the PINN+LLM method, which embeds nuclear energy terminology and extracts semantic features using LLM, then embeds physical constraints for diagnosis, outperforms the ordinary PINN method in fault classification performance by 3.4%, 2.6%, and 3.0% in P, R, and F1 scores, respectively. Experimental results demonstrate that the proposed method achieves higher discrimination accuracy by introducing a large language model to embed nuclear energy physical attributes.
[0075] Table 2 Comparison of Fault Diagnosis Performance
[0076]
[0077] Furthermore, the replacement techniques in embodiments of the present invention include the following:
[0078] 1) Replacement of the large model
[0079] The original technical solution employed a specific Large Language Model (LLM) to process nuclear energy-related terms and perform fault diagnosis. However, with the continuous development of artificial intelligence technology, various large models are available as alternatives. The patent suggests using superior LLMs such as GPT-4 and DeepSeek-o1, which possess stronger language understanding and generation capabilities, richer knowledge reserves, and more complex logical reasoning abilities. When processing nuclear energy-related terms, they may more accurately understand their semantics and contextual relationships, thereby improving the accuracy of fault diagnosis. However, their function remains consistent: leveraging the large-scale data prior advantage of the large models themselves to provide prior knowledge for understanding nuclear accidents, thus helping to improve the accuracy of fault diagnosis.
[0080] 2) Application of fluid quantization by combining core physical equations with large-scale models
[0081] The technical solution uses the Navier-Stokes equations, the fundamental equations of fluid mechanics, to establish a mathematical model of fluid flow within nuclear power pipelines, embedding physical constraint information into the larger model. Besides the Navier-Stokes equations, other core physical equations can be used to describe fluid flow; the following are some alternative equations and their applications in conjunction with the larger model:
[0082] Euler equations
[0083] The Euler equations are a simplified form of the Navier-Stokes equations, neglecting viscous forces, and are suitable for describing the flow of inviscid fluids. In nuclear power pipelines, if the viscosity of the fluid has a relatively small impact, the Euler equations can be considered for establishing a fluid model. The application method in conjunction with a larger model is similar to the original approach: first, a mathematical model of the fluid flow within the nuclear power pipeline is established based on the Euler equations, obtaining the distribution of parameters such as the fluid's velocity field and pressure field. Then, this parameter information is transformed into a sequence of terms that the larger model can understand, and physical constraint information is embedded into the larger model. For example, based on the laws of conservation of mass and momentum (physical laws embodied in the Euler equations), the corresponding constraints are transformed into regularization terms and added to the loss function of the larger model.
[0084] Reynolds-averaged Navier-Stokes equations (RANS equations)
[0085] The Reynolds-averaged Navier-Stokes equations are derived by averaging the Navier-Stokes equations and are suitable for describing turbulent flow. In nuclear power pipelines, if turbulence exists, the RANS equations can be used to establish a fluid model. Application in conjunction with larger models: A mathematical model of turbulent flow within a nuclear power pipeline is established based on the RANS equations to obtain statistical characteristics of turbulence, such as turbulent kinetic energy and turbulent dissipation rate. These statistical characteristics are then transformed into a sequence of terms that the larger model can understand, and turbulence-related physical constraints are embedded into the larger model. Based on the energy balance relationship of turbulence, the corresponding constraints are transformed into regularization terms and added to the loss function of the larger model.
[0086] In summary, the key technical points involved in the embodiments of the present invention are as follows:
[0087] 1) Fault diagnosis text adaptation mechanism based on nuclear energy-related word embedding: The relevant information of the nuclear energy pipeline fluid model is converted into words (tokens) that can be understood by the large language model (LLM) according to the quantile word segmentation conversion table. The nuclear energy operation parameter information, which was originally presented in numerical form, is transformed into language information containing rich nuclear energy operation characteristics. This allows technicians to more intuitively understand the operating status of nuclear energy facilities, quickly identify potential risk factors, and improve the efficiency and accuracy of fault diagnosis. This is the key innovation of this invention, which is different from the existing technology and realizes the effective combination of the physical process of nuclear energy faults and the large model.
[0088] 2) Physically embedded large model-driven nuclear accident diagnosis technology: Physical constraint information (mainly Wiener-Stokes equations) derived from the nuclear pipeline fluid model is transformed into a regularization term and added to the loss function of LLM. This ensures that the output generated by LLM conforms to the physical laws of the nuclear pipeline fluid model, improves the scientificity and reliability of fault diagnosis, and solves the problem of ignoring physical constraints when large models are used for fault diagnosis in existing technologies.
[0089] 3) Task-driven fine-tuning method: Based on the pre-trained LLM, fine-tuning training is performed using a specific dataset related to nuclear pipelines. Nuclear energy information terms are used as input to expand the domain dictionary and reconstruct the embedding space. The backbone network is frozen and the adapter classification head is fine-tuned to obtain the predicted probability output, making the LLM better adaptable to the nuclear pipeline fault diagnosis task and solving the problem of poor adaptability of existing large models to specific nuclear pipeline fault diagnosis tasks.
[0090] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.
[0091] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.
[0092] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the nuclear accident fault diagnosis methods combining physical constraints and large language models in the above embodiments.
[0093] It is understood that the systems, devices, and storage media provided in the embodiments of the present invention correspond to the methods provided in the embodiments of the present invention, and the explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding parts of the above methods.
[0094] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0095] It should be noted that in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0096] The various embodiments in this specification are described in a related 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 system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0097] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for diagnosing nuclear accident faults that combines physical constraints with a large language model, characterized in that, Includes the following steps, S1. Construct a mathematical model of fluid flow in nuclear energy pipelines to describe the behavior of fluid in the pipelines; S2. Convert the relevant information of the nuclear energy pipeline fluid model established in step S1 into tokens that can be understood by the Large Language Model (LLM). S3. Embed physical constraint information into the Large Language Model (LLM); S4. After embedding physical constraint information, fine-tune the large language model LLM to adapt it to the nuclear pipeline fault diagnosis task. S5. The finely tuned and trained Large Language Model (LLM) is used to classify fault categories in new nuclear pipeline operation data. Step S3 specifically includes, According to the law of conservation of mass, under steady-state flow conditions, the flow rate at the pipe inlet is equal to the flow rate at the pipe outlet, i.e. This constraint is transformed into a regularization term and added to the loss function of the Large Language Model (LLM). Let the original loss function of the Large Language Model (LLM) be... The regularization term for the physical constraints is Then the total loss function is expressed as: ; Here, λ is a hyperparameter used to balance the impact of the loss of the large language model LLM itself and the physical constraints. Defined based on specific physical constraints, in nuclear pipeline fault diagnosis, it is set as follows: ; ρ is the fluid density, u is the fluid velocity vector, μ is the fluid dynamic viscosity, f is the external force vector acting on the fluid, t is time, and p is pressure.
2. The nuclear accident fault diagnosis method combining physical constraints and a large language model according to claim 1, characterized in that: In step S1, a mathematical model of fluid flow inside the nuclear energy pipeline is constructed, taking into account the physical properties of the fluid, including density, viscosity, pipeline geometry (diameter, length, degree of curvature), and boundary conditions (inlet flow rate, outlet pressure).
3. The nuclear accident fault diagnosis method combining physical constraints and a large language model according to claim 1, characterized in that: Step S1 specifically includes, The model is built based on the fundamental equations of fluid mechanics, the Navier-Stokes equations. For laminar flow of incompressible fluids in a pipe, the Navier-Stokes equations simplify to the following in Cartesian coordinates: ; Discretizing the above equations yields the distribution of parameters such as the velocity field and pressure field of the fluid inside the pipe.
4. The nuclear accident fault diagnosis method combining physical constraints and a large language model according to claim 3, characterized in that: Step S2 specifically includes, A word segmentation conversion table is proposed based on quantiles, as shown in Table 1; For the parameter names "density" corresponding to density ρ, "viscosity" corresponding to viscosity μ, and the boundary condition description "inlet flow rate" corresponding to inlet flow rate Q in the fluid model, they are all converted into corresponding word sequences; A mapping rule is used for lexical transformation. Let M be the mapping function from model parameters to lexical units. For the density parameter ρ, M(ρ) = "density". When driving the Large Language Model (LLM), these lexical sequences are input into the LLM to enable the processing of information related to the nuclear energy pipeline fluid model, represented as follows: ; in, These are the transformed word units, and n is the number of word units. These word units are input into the input layer of the Large Language Model (LLM) and processed through the multi-layer neural network structure of the LLM. Table 1. Nuclear Energy Quantile Word Segmentation Conversion Table 。 5. The nuclear accident fault diagnosis method combining physical constraints and a large language model according to claim 4, characterized in that: The physical constraints in step S3 are derived from the relationships established in step S1 based on the fluid model.
6. The nuclear accident fault diagnosis method combining physical constraints and a large language model according to claim 5, characterized in that: Step S4 specifically includes, Nuclear energy information terms are used as input to expand the domain dictionary and reconstruct the embedding space. Then, the backbone network is frozen and the adapter classification head is fine-tuned to obtain the predicted probability output. The adapter classification head consists of three linear layers and a ReLU activation function. The hidden layer size is determined by the pre-trained model. The output of the adapter classification head is represented as follows: ; ; ; in, The weight representing the adapter category header, It is a feature text input. and These represent the weights of the linear layer, and This represents the bias of the three linear layers. The probability distribution obtained by table mapping; In the task-driven fine-tuning process, the backbone model is frozen, meaning the model weights are not updated. The loss function of the fine-tuning process is... Represented as ; in, This is the dance category label, where N represents the number of samples in the batch.
7. The nuclear accident fault diagnosis method combining physical constraints and a large language model according to claim 6, characterized in that: Step S5 specifically includes, The new pipeline fluid model parameters and operating conditions are converted into word sequences and input into the fine-tuned large language model LLM. Large Language Model (LLM) outputs a probability distribution based on the knowledge and physical constraints learned during training, representing the probability that the input data belongs to different fault categories; let the set of fault categories be... The probability distribution output by the Large Language Model (LLM) is as follows: ,in Is the input data a category? The probability of.
8. A computer-readable storage device storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method as described in any one of claims 1 to 7.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, it causes the processor to perform the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Language model-based battery health state prediction method, device and product
CN119224582A
Crude oil pipeline flow characteristic mining method and system, processing equipment and storage medium
CN119442180A