Fire-fighting water supply system dynamic equipment fault diagnosis method and system, processing equipment and storage medium
By combining time series large model and large language model of fire water supply system fault diagnosis methods, the problem of insufficient interpretability and generalization capabilities of diagnostic methods in the prior art is solved, and the accurate diagnosis and reliability of dynamic equipment faults of fire water supply system is achieved to ensure the effectiveness of fire response.
Patent Information
- Application Number
- CN202510318597.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-24
AI Technical Summary
The existing fault diagnosis methods for fire water supply systems lack interpretability and generalization capabilities, making it difficult to achieve accurate diagnosis in complex fault modes, affecting fire response efficiency and public safety.
The method of combining time series large models and large language models is adopted to generate fault diagnosis models through segmentation, coding, feature-level and instance-level comparison, text prototype alignment and soft prompts to improve the accuracy and interpretability of diagnosis.
It realizes accurate diagnosis of dynamic equipment failures in the fire water supply system, improves fault detection efficiency and reliability, and ensures fire response efficiency and public safety.
Smart Images

Figure CN120196929A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and big data applications, and particularly to a method, a system, a processing device and a storage medium for diagnosing faults of dynamic equipment in a fire water supply system. Background Art
[0002] The stable operation of a fire water supply system is crucial for fire prevention and control. During a fire, the reliability of the fire water supply system directly determines the efficiency and effectiveness of fire response. Therefore, accurate fault diagnosis of the dynamic equipment in the fire water supply system is the key to ensuring the stable operation of the system. Since the dynamic equipment in the fire water supply system usually operates under harsh working conditions such as high pressure and high speed, it faces a relatively high risk of sudden faults, which may lead to water supply interruption, affect the timely extinguishment of fires, and even cause casualties and property losses. Therefore, carrying out research on fault diagnosis of dynamic equipment in the fire water supply system is of great significance for improving fire prevention and control capabilities and ensuring the safety of people's lives and property.
[0003] Currently, the commonly used fault diagnosis method for fire water supply systems is multi-fault diagnosis based on information fusion, including models such as time series models, fuzzy neural networks, and deep belief networks. These models do not have good interpretability. During the diagnosis process, due to the opaque decision-making process, it is difficult to provide technicians with in-depth analysis and explanation of the fault causes. In addition, when facing complex and variable fault patterns, these models may lack sufficient generalization ability and adaptability, resulting in insufficient accuracy and reliability of fault diagnosis. Summary of the Invention
[0004] Aiming at the above problems, the purpose of the present invention is to provide a method, a system, a processing device and a storage medium for diagnosing faults of dynamic equipment in a fire water supply system, which can improve the accuracy and reliability of fault diagnosis.
[0005] To achieve the above purpose, the present invention adopts the following technical solutions: In the first aspect, a method for diagnosing faults of dynamic equipment in a fire water supply system is provided, including:
[0006] Obtain the time series of the operation of the dynamic equipment in the fire water supply system;
[0007] Divide the obtained time series into several non-overlapping subsequences and divide them into different instances;
[0008] Encode and embed the divided instances into the feature space to obtain time series vectors, and enhance the time series vectors through feature-level comparison and instance-level comparison;
[0009] Randomly select text prototypes, perform text prototype alignment comparison, and embed and map the enhanced time series vectors near the corresponding texts to form a new feature matrix;
[0010] Adopt the method of soft prompts, and generate corresponding soft prompts based on the time series of the operation process monitoring of the dynamic equipment in the fire water supply system;
[0011] Concatenate the soft prompts corresponding to the time series and the new feature matrix, and then input them into the trained large-scale fault diagnosis model of the dynamic equipment in the fire water supply system to obtain the prediction results of the dynamic equipment in the fire water supply system, and add them to the time series of the operation of the dynamic equipment in the fire water supply system. Repeat this step until the length of the time series of the operation of the dynamic equipment in the fire water supply system reaches the expected length;
[0012] Adopt the predictive detection method to detect the time series of the operation of the dynamic equipment in the fire water supply system at this time, and determine the fault diagnosis results of the dynamic equipment in the fire water supply system.
[0013] Further, the segmentation of the time series of the operation process monitoring of the dynamic equipment in the fire water supply system into several non-overlapping subsequences and the division into different instances include:
[0014] Obtain the time series of the operation process monitoring of the dynamic equipment in the fire water supply system;
[0015] Through the segmentation function, divide the time series into a list of several non-overlapping subsequences;
[0016] Adopt the sliding window method to mark the time series, and divide the time series into anchor instances, positive sample instances and negative sample instances;
[0017] Adopt a causal temporal convolutional network with several convolutional blocks to construct an encoder, and each list of non-overlapping subsequences can be embedded into an M-dimensional space through the embedding function to form a token embedding list of the time series.
[0018] Further, the encoding and embedding of the divided instances into the feature space to obtain the time series vector, and the enhancement of the time series vector through feature-level contrast and instance-level contrast include:
[0019] Based on the constructed encoder, encode and embed the divided instances into the feature space to obtain the embedded time series vector;
[0020] Construct a projection head, obtain the projection function based on the embedded time series vector, and calculate the similarity between the projection vectors through the similarity function, which is expressed as the instance-level contrast loss function;
[0021] For the feature matrix formed after the time series is embedded, calculate the similarity and correlation between the feature vectors of different instances, and construct the feature-level contrast loss function;
[0022] For an anchor feature matrix in the embedded time series vector, divide it into a positive feature matrix and a negative feature matrix;
[0023] Based on the instance-level contrast loss function, perform instance-level contrast learning according to the row vectors of the feature matrix;
[0024] Based on the feature-level contrast loss function, perform feature-level contrast learning at the feature level according to the column vectors of the feature matrix.
[0025] Furthermore, randomly select text prototypes for text prototype alignment contrast, and embed the embedded time series vector near the corresponding text to form a new feature matrix, including:
[0026] For text prototype alignment contrast, randomly select several representative text embeddings as text prototypes, and map the text prototypes corresponding to the time series and the time series through feature representation-based embedding and association to realize text prototype mapping, and embed the encoded time series vector near the corresponding text to form a new feature matrix.
[0027] Furthermore, adopt the method of soft prompt to generate corresponding soft prompts based on the time series of the operation process monitoring of the dynamic equipment in the fire water supply system, including:
[0028] Create soft prompts, including dataset context, task instructions, and statistical information, where the dataset context is the information of the dynamic equipment to which the time series belongs, the task instructions are to extract abnormal time steps and abnormal data values, and the statistical information is the statistical features of the time series;
[0029] Establish the loss function of the soft prompt;
[0030] Based on the loss function of the soft prompt, train the soft prompt to generate a trained soft prompt.
[0031] Furthermore, the large model for fault diagnosis of dynamic equipment in the fire water supply system includes an input layer, a causal attention mechanism layer, a residual connection and normalization layer, a feed-forward neural network layer, and an output layer, where:
[0032] The input layer is used to input the data after splicing the trained soft prompt and the new feature matrix formed by text prototype alignment contrast;
[0033] The causal attention mechanism layer is used to automatically extract and select features from the data input by the input layer, and filter out noise and irrelevant information;
[0034] The residual connection and normalization layer is used to perform layer normalization and residual connection on the filtered data;
[0035] The feedforward neural network layer is used to process the data after layer normalization and residual connection through a non-linear activation function;
[0036] The output layer is used to remap each time series vector processed by the feedforward neural network layer back to a single scalar, and through the activation function, obtain the diagnostic result.
[0037] Furthermore, the predictive detection method is adopted to detect the time series of the operation of the dynamic equipment in the fire water supply system at this time, and determine the fault diagnosis result of the dynamic equipment in the fire water supply system, including:
[0038] Sort the mean square errors of all segments of the initial time series in descending order, determine the α quantile from the sorted mean square errors, and use the mean square error values corresponding to the positions of the first α after sorting as the threshold. The part higher than the threshold is considered as the interval where anomalies may exist;
[0039] Calculate the mean square error of the predicted part in the finally obtained time series;
[0040] Judge whether the mean square error of the predicted part is greater than the set threshold. If it is greater, it means that there is a fault in the dynamic equipment of the fire water supply system, determine the fault diagnosis result, and realize the fault diagnosis of the dynamic equipment in the fire water supply system. Among them, the fault diagnosis result includes the time step of the anomaly, the abnormal data, and the equipment information in the corresponding soft prompt.
[0041] In the second aspect, a fault diagnosis system for the dynamic equipment of a fire water supply system is provided, which includes:
[0042] A data acquisition module for acquiring the time series of the operation of the dynamic equipment in the fire water supply system;
[0043] A segmentation module for segmenting the acquired time series into several non-overlapping subsequences and dividing them into different instances;
[0044] An enhancement module for encoding and embedding the divided instances into the feature space to obtain time series vectors, and enhancing the time series vectors through feature-level comparison and instance-level comparison;
[0045] A text prototype alignment and comparison module for randomly selecting text prototypes for text prototype alignment and comparison, and embedding and mapping the enhanced time series vectors near the corresponding text to form a new feature matrix;
[0046] A soft prompt module for generating corresponding soft prompts based on the time series monitored during the operation of the dynamic equipment in the fire water supply system by using the soft prompt method;
[0047] A prediction result determination module is used to splice the soft prompt corresponding to the time series and the new feature matrix, and then input them into the trained large-scale dynamic equipment fault diagnosis model of the fire water supply system to obtain the prediction result of the dynamic equipment of the fire water supply system, and add it to the time series of the operation of the dynamic equipment of the fire water supply system. Repeat until the length of the time series of the operation of the dynamic equipment of the fire water supply system reaches the expected length;
[0048] A predictive detection module is used to detect the time series of the operation of the dynamic equipment of the fire water supply system at this time by using a predictive detection method, and determine the fault diagnosis result of the dynamic equipment of the fire water supply system.
[0049] In a third aspect, a processing device is provided, including computer program instructions, wherein when the computer program instructions are executed by the processing device, they are used to implement the steps corresponding to the above-mentioned dynamic equipment fault diagnosis method of the fire water supply system.
[0050] In a fourth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, wherein when the computer program instructions are executed by a processor, they are used to implement the steps corresponding to the above-mentioned dynamic equipment fault diagnosis method of the fire water supply system.
[0051] Due to the above technical solutions adopted by the present invention, it has the following advantages:
[0052] 1. To improve the understanding of the time series anomaly detection task by the large-scale anomaly detection model of the fire water supply system operation data and generate more standard diagnosis results, the present invention adopts a learnable prompt method to make the model easier to understand the input, and finally realizes anomaly detection, improving the efficiency and accuracy of fault diagnosis.
[0053] 2. By integrating deep learning methods and time series analysis, the present invention can enhance the ability to process unbalanced data, thereby realizing more accurate fault detection and diagnosis of the dynamic equipment of the fire water supply system.
[0054] 3. The present invention can overcome the limitations of opaque models, weak generalization ability, and insufficient diagnostic accuracy in complex fault modes in the prior art, improve the response efficiency and reliability of the fire water supply system in emergency situations, ensure public safety and reduce potential property losses.
[0055] 4. By combining the large language model and the time series large model, the present invention extracts effective features through operations such as tokenization during data preprocessing, providing high-quality data for subsequent model learning, which is superior to the situation of insufficient data feature mining in traditional methods.
[0056] 5. The model constructed by the present invention includes structures such as an input layer and an attention mechanism, which can effectively capture data relationships, improve generalization ability, and are more suitable for the fault diagnosis task compared with traditional model structures.
[0057] 6. The present invention can overcome the limitations of traditional models, conform to the characteristics of complex causal relationships in the fault diagnosis of fire water supply systems, ensure the accuracy, reliability, and interpretability of fault diagnosis, and enable large language models to better understand and extract abnormal time steps through the method of creating task prompts, and output in the form of a standard language report.
[0058] In summary, the present invention can be widely applied in the fields of artificial intelligence and big data application technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered as limiting the present invention. Throughout the drawings, the same reference numerals are used for the same components. In the drawings:
[0060] Figure 1 is a schematic flow chart of the method provided by an embodiment of the present invention;
[0061] Figure 2 is a schematic structural diagram of the large model for fault diagnosis of dynamic equipment in the fire water supply system provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0062] The exemplary embodiments of the present invention will be described in more detail below with reference to the drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0063] It should be understood that the terms used herein are only for the purpose of describing specific exemplary embodiments and are not intended to be limiting. Unless otherwise clearly indicated in the context, the singular forms "a", "an", and "the" as used herein may also include the plural forms. The terms "include", "comprise", "contain", and "have" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the particular order described or illustrated, unless the execution order is explicitly stated. It should also be understood that additional or alternative steps may be used.
[0064] Although terms such as first, second, third, etc. may be used herein to describe multiple elements, components, regions, layers, and / or sections, these elements, components, regions, layers, and / or sections should not be limited by these terms. These terms may be used only to distinguish one element, component, region, layer, or section from another region, layer, or section. Unless the context clearly indicates otherwise, terms such as "first", "second", and other numerical terms do not imply order or sequence when used in this document. Thus, the first element, component, region, layer, or section discussed below may be referred to as the second element, component, region, layer, or section without departing from the teachings of the exemplary embodiments.
[0065] Currently, the commonly used fault diagnosis method for fire water supply systems is multi-fault diagnosis based on information fusion, including models such as time series models, fuzzy neural networks, and deep belief networks. These models do not have good interpretability. During the diagnosis process, due to the opaque decision-making process, it is difficult to provide technicians with in-depth analysis and explanation of the fault causes. In addition, when faced with complex and variable fault patterns, these models may lack sufficient generalization ability and adaptability, resulting in insufficient diagnostic accuracy.
[0066] The large time series model (Time) shows great development potential in the fields of anomaly detection and fault diagnosis. Compared with traditional models, the large time series model can handle and analyze the long-term dependencies and complex patterns in time series data, which is crucial for capturing the performance changes and fault signs of dynamic equipment in the fire water supply system. By learning the patterns in historical data, the large time series model can predict the future state of the equipment, thus achieving early warning and diagnosis of faults. Combining the context learning and zero-shot inference capabilities of the large language model (LLM) can solve the problems of existing time series prediction models being restricted by the amount of data, having weak learning and generalization abilities, and enhance the interpretability of the large time series model. By generating descriptive language reports to explain the cause of the fault and possible impacts, it can explain its diagnostic results in a more intuitive way. This combination not only improves the accuracy of fault diagnosis but also makes the diagnostic process more transparent, facilitating technicians to understand and trust the diagnostic results of the model. Therefore, the present invention introduces a large language model and proposes a method for fault diagnosis of dynamic equipment in a fire water supply system, including: obtaining the time series of the operation of dynamic equipment in the fire water supply system; dividing the obtained time series into several non-overlapping subsequences and dividing them into different instances; encoding and embedding the divided instances into the feature space to obtain time series vectors, and enhancing the time series vectors through feature-level comparison and instance-level comparison; randomly selecting text prototypes and performing text prototype alignment comparison to map the enhanced time series vectors to the vicinity of the corresponding text to form a new feature matrix; using the method of soft prompts to generate corresponding soft prompts based on the time series monitored during the operation of dynamic equipment in the fire water supply system; splicing the soft prompts corresponding to the time series and the new feature matrix and inputting them into the trained large fault diagnosis model of dynamic equipment in the fire water supply system to obtain the prediction results of the dynamic equipment in the fire water supply system, and adding them to the time series of the operation of dynamic equipment in the fire water supply system, repeating this step until the length of the time series of the operation of dynamic equipment in the fire water supply system reaches the expected length; using a predictive detection method to detect the time series of the operation of dynamic equipment in the fire water supply system at this time to determine the fault diagnosis results of the dynamic equipment in the fire water supply system. The present invention can accurately diagnose the faults of dynamic equipment in the fire water supply system under complex working conditions and explain them in the form of a language report.
[0067] Embodiment 1
[0068] As Figure 1 shown, this embodiment provides a method for fault diagnosis of dynamic equipment in a fire water supply system, including:
[0069] 1) Divide the time series monitored during the operation of dynamic equipment in the fire water supply system into several non-overlapping subsequences and divide them into different instances.
[0070] Specifically, large language models can understand and process natural language data. However, different from natural language data which can be regarded as discrete symbols, the fire water supply system fault diagnosis process is usually a time series collected by sensors, which is a set of continuous data and cannot be directly processed by large language models. It needs to be encoded into discrete symbols to form a time series "language" similar to natural language for in-depth processing or parsing by large language models. The specific process is as follows:
[0071] 1.1) Obtain the time series of the operation process monitoring of the dynamic equipment in the fire water supply system. Among them, a set of time series has D variables and T time points, is the time series data value corresponding to the d-th variable at the t-th time point.
[0072] 1.2) Through the segmentation function f s : x → s, the time series is segmented into a list of K non-overlapping subsequences where, has an arbitrary length, 1 ≤ t i < t j ≤ T, s is the token list of the time series x, and s k is the subsequence composed of the data in the time series x from index t i to t j ; is the data segment of the time series x from the t i -th time point to the t j -th time point, which is the data part constituting the subsequence s k ; t i is the starting time point index; t j is the ending time point index.
[0073] 1.3) Adopt the sliding window method to label the time series, and divide the time series into three types of instances: anchor instance s a (anchor), positive sample instance s + and negative sample instance s - . Among them, the anchor instance s a is the standard instance, the positive sample instance s + is the instance after enhancing the anchor instance, and the negative sample instance s - is the instance composed of non-overlapping data that has no same subsequence as the anchor instance.
[0074] Specifically, the positive sample instance s + is composed of two enhanced instances from different acquisition sources, including the enhanced instance s weak : generated by the jitter and scaling strategy; and the enhanced instance s strong: Generated by permutation and jittering strategies.
[0075] 1.4) Construct an encoder that can embed each list of tokens (the smallest unit for processing text), i.e., a list of non-overlapping subsequences, through the embedding function f e :s k ∈R D×T →e k ∈R M into an M-dimensional space to form a list of token embeddings for the time series x where, R D×T is a D×T-dimensional real number space, R M is an M-dimensional real number space, e k is s k mapped to R M and the new vector is, f e (s) is the embedding function, f s (x) is the segmentation function.
[0076] Specifically, a causal temporal convolutional network (TCN) with 10 convolutional blocks is used to construct the encoder. Each convolutional block is a sequence consisting of a Gaussian error linear unit (GELU), a dilated convolution (DilatedConv), batch normalization (BatchNorm), GELU, and a dilated convolution, and each convolutional block has a skip connection. In each layer i of the convolutional block, the dilation rate of the dilated convolution is 2 i . The last convolutional block is used to map the hidden channels to the output channels, and its size is the same as the embedding size of the large language model (LLM).
[0077] 2) Encode the partitioned instances into the feature space of the embedding to obtain time series vectors, and enhance the time series vectors through feature-level contrast and instance-level contrast.
[0078] Specifically, in instance-level contrastive learning, each instance is treated independently, and relevant instances are designed to discriminate proxy tasks, increasing the correlation of similar instances and the non-correlation of dissimilar instances. To prevent overfitting due to embedding too many instances at the same time, the augmented instances of the same instance are used as the only positive sample pairs, and other instances are regarded as negative sample instances, ensuring that the model can learn the similarity between positive sample pairs and the difference between positive samples and negative samples during each training, so as to more comprehensively learn the feature representation of the data. Therefore, the specific process of this step is as follows:
[0079] 2.1) Based on the constructed encoder, encode the partitioned instances into the feature space of the embedding to obtain the embedded time series vectors e (i.e., the list of token embeddings).
[0080] 2.2) Construct a projection head f p (Multi-Layer Perceptron), based on the embedded time series vector e, obtain the projection function f p (e), and calculate the similarity between projection vectors through a similarity function Denoted as the instance-level contrast loss function:
[0081]
[0082] where, (σ(e, e + )) is the function to measure the similarity score between the projection function f p (e) and the positive sample projection vector f p (e + ); e is the time series vector obtained after the embedding operation of the anchor instance; is the vector obtained after the embedding of the positive sample instance or negative sample instance; τ is the hyperparameter controlling the distribution of the similarity score.
[0083] By mapping the original feature space to a new feature space, it is possible to better calculate the instance-level contrast similarity. At the same time, according to the instance-level contrast loss Optimize the model so that the projection vectors of similar instances are closer in the new feature space, while the projection vectors of dissimilar instances are more dispersed. This helps to improve the discriminative ability of the model.
[0084] 2.3) To break the independence between instances, a feature-level contrast method is adopted. For the feature matrix R B×M formed by the vectors of a small batch of instances after time series embedding, calculate the similarity and correlation between the feature vectors of different instances, and construct a feature-level contrast loss function to optimize the model's learning of feature relationships.
[0085] Specifically, both the row vectors and column vectors of the feature matrix have semantic information: the row vectors are an embedded instance, regarded as the soft label of the instance, which plays an important role in enhancing instance correlation; the column vectors are the soft labels of the features and are the important objects of the feature-level contrast loss.
[0086] 2.4) For an anchor feature matrix m (the B-th row copy of the time series vector e) in the embedded time series vector e, divide it into a positive feature matrix and a negative feature matrix, mark the columns in the matrix, that is, m ∈ m T , align the samples in the two feature matrices and distinguish the same columns, and calculate the loss using the following method
[0087]
[0088] where, is the similarity score function for positive sample pairs; is the similarity score function for negative sample pairs; is for different anchor instances m i and the similarity score function between it and its corresponding positive sample instance; is for different anchor instances m i and the similarity score function between it and its corresponding negative sample instance; is the loss function related to the prompt, used to optimize the model's understanding of the input prompt; L reg / cls is the regularization loss; concat(pe,e) is the operation of concatenating the positional encoding pe and the embedding vector e to include the positional information of each element in the sequence.
[0089] By minimizing the distance between the feature representations of similar instances and by maximizing the distance between the feature representations of dissimilar instances, it helps to learn more rich and discriminative feature representations, and can prevent the model from overfitting, because it encourages the model to learn more general features rather than just memorizing the training data.
[0090] 2.5) Based on the instance-level contrast loss function, perform instance-level contrast learning according to the row vectors of the feature matrix to calculate the similarity method to learn the similarity between instances.
[0091] 2.6) Based on the feature-level contrast loss function, perform feature-level contrast learning at the feature level according to the column vectors of the feature matrix, which can better adapt to the complex patterns of time series data.
[0092] 3) Randomly select text prototypes, perform text prototype alignment contrast, and map the enhanced time series vector embedding to the vicinity of the corresponding text to form a new feature matrix.
[0093] Specifically, since the pre-trained large language model has its own text token embedding space, and the time series data needs to be cross-modally transformed into a space that matches the form that the large language model can understand. Considering that the embedding space of the text is discrete while the embedding space of the time series is continuous, therefore, based on the nearest neighbor principle, the time series data is embedded near the typical text descriptions used to describe the characteristics of the time series data, such as values, shapes, frequencies, etc., so that the changes in the time series data are transformed into descriptive terms such as rising, falling, stable, fluctuating, etc. that can be more easily understood by the large language model.
[0094] Specifically, for the text prototype alignment contrast of the present invention, randomly select P representative text embeddings t p as text prototypes, and adopt feature-based contrast Implement the modeling of the text prototype. More specifically, for the text prototype t p map the embedding of the time series to the coordinate axes, so that similar time series instances have close values in the representation with the coordinate axes (text comparison).
[0095] To ensure that the ranges of the time series embedding space and the text prototype embedding space are roughly the same, the present invention adopts a method of similarity constraint to measure the similarity between the text prototype t pi and the time series embedding e, ensuring that the two spaces are similar to a certain extent (text alignment).
[0096] Embed and associate the time series and the text prototype description corresponding to the text description through the above method to realize the text prototype mapping e·t p →m, embed and map the encoded time series vector to the vicinity of the corresponding text to form a new feature matrix M Q×P :
[0097]
[0098] where m ij is the time series and the corresponding description in the embedded anchor feature matrix m, and the loss function of this process is expressed as:
[0099]
[0100] where sim(tp i ,e) is the similarity between the text prototype tp i and the time series vector e; is the feature-level contrast loss function, which accepts three parameters: e·tp (the product of the text prototype tp and the time series vector e), e + ·tp (the product of the positive sample time series vector and the text prototype), and e - ·tp (the product of the negative sample time series vector and the text prototype); Text alignment is text alignment; Text contrast is text comparison.
[0101] The purpose of this loss function is to optimize the feature representation by comparing positive and negative samples, so that similar samples are closer in the feature space and dissimilar samples are farther away. Whether it is text prototype alignment contrast or instance-level contrast learning and feature-level contrast learning, the size of the best output channel is the same as the dimension size of the embedding space of the large language model.
[0102] 4) Adopt the method of soft prompt to generate corresponding soft prompts based on the time series of the operation process monitoring of the dynamic equipment in the fire water supply system.
[0103] Specifically, after the text prototype alignment comparison, the time series has been described by embeddings that can be understood by the large language model (i.e., mapped and aligned with the corresponding text prototype). However, to make it easier for the large language model to understand the input time series and use it for embeddings in different variable tasks, the present invention adopts the method of soft prompts, that is, fine-tuning through prompts. The specific process of this step is as follows:
[0104] 4.1) Create soft prompts.
[0105] Specifically, the prompt includes dataset context (Domain), task instruction (Instruction), and statistical information (Statistics), which can learn and complete the creation of prompts for different tasks. Among them, the dataset context (Domain) provides specific information about the field to which the input time series data belongs, which is the information of the dynamic device to which the time series belongs in the present invention; the task instruction (Instruction) is the task that the large language model needs to execute, guiding the large language model to perform transformation and reasoning, which is expressed as extracting abnormal time steps and abnormal data values in the present invention; the statistical information (Statistics) includes statistical features such as the trend of the time series (such as upward or downward), lag values (such as the first few lag values obtained by calculating autocorrelation), etc., which helps the large language model better identify patterns and regularities in the time series data.
[0106] 4.2) Establish the loss function of the soft prompt. The soft prompt method proposed by the present invention is learned based on the loss between the output of the large language model and the true label of the task:
[0107]
[0108] Among them, is the loss function of the soft prompt.
[0109] Specifically, consider a conditional generation task, where the input x is the context and the output y is the token sequence. Suppose there is an autoregressive large language model p φ (y|x), and connect the input and output to form a new sequence z = [x; y]. When the pre-trained large language model infers and generates each token, it will, according to the current information and the information that has been generated or processed on the left (i.e., the past activation situation), calculate h i as a function of z i and the past activation values in its left context, that is, Y = LM φ (z i , h i ), where Y is the output of the large language model; z i is the i-th element in the model input sequence; h iIs in a hidden state, including the information accumulated by the model when processing previous elements, LM φ Is a large language model.
[0110] In the soft prompt conversion with prompt pe θ Of, the past h i If i ∈ pe idx Then h i = pe θ [i, :], otherwise Among them, pe idx Is an index set used to indicate which positions of the hidden state h i Should be replaced by the corresponding elements of the soft prompt pe θ ; pe θ [i, :] is a vector composed of all elements in the i-th row taken from the soft prompt matrix pe θ .
[0111] 4.3) To maximize the probability of generating the correct output y', it is necessary to train the soft prompt to enable the model to better understand the input (such as time series embedding, etc.), so as to perform better on the task and generate the trained soft prompt, which is specifically expressed as:
[0112]
[0113] Among them, p φ (y'|x) is the conditional probability of parameter φ; Y idx Is an index set related to the element positions in the model output sequence, used to determine which output positions to perform probability calculation and model optimization related operations; z i ' is the input element after a certain transformation; h <i Is the hidden state before position i; δz i Is the change amount of z i ; p φ (z i '|h <l ) is the probability that the input element is z <i ' when the model parameters are φ under the condition of the known previous position hidden state h i ; p φ+Δ (z i +δz i |h <i ) is the probability estimate value of the adjusted model p <i for the adjusted input z φ+Δ +δz i under the condition of the known previous hidden state h i ; Text-TSalignment is text-time series alignment; Pr o mptpe θTo prompt pe θ ; FrozenLLM is a frozen large language model that keeps the parameters of the LLM fixed and unchanged.
[0114] 5) Use the large language model GPT to construct and train a large model for dynamic equipment fault diagnosis of the fire water supply system based on the generated soft prompts and the new feature matrix. Specifically:
[0115] 5.1) As Figure 2 shown, use the large language model GPT to construct a large model for dynamic equipment fault diagnosis of the fire water supply system based on the generated soft prompts and the new feature matrix.
[0116] Specifically, GPT adopts a Decoder-only (generative architecture) and is stacked by multiple decoders of Transformer, which can better generate the fault diagnosis results of the dynamic equipment in the fire water supply system. The large model for dynamic equipment fault diagnosis of the fire water supply system includes an input layer, a causal attention mechanism layer, a residual connection and normalization layer, a feedforward neural network layer, and an output layer, where:
[0117] 5.1.1) The input layer is used to input the data after splicing the soft prompt P and the new feature matrix T formed by aligning and comparing the text prototype.
[0118] Specifically, after instance-level comparison and feature-level comparison, the similarity between the anchor instance and the positive sample instance is higher, while the similarity with the negative sample instance is lower. And through text prototype alignment and comparison, the aligned time series and the corresponding descriptive text prototype are output in an embedded form, and the prompts generated by the soft prompt are also converted into an embedded form. The dimensions of both embeddings match the input dimension of the large language model. Before entering the input layer of the large language model, the two forms of embeddings are spliced together as the model input, that is:
[0119]
[0120] P = {p1, p2, …, p n ,} = {[dom], …[dom], [inst], …, [inst], [sta], …[sta]} (9)
[0121]
[0122] where X is the data used to input into the large language model (LLM) after specific encoding operations. It is the result obtained by splicing the soft prompt P and the new feature matrix T formed by aligning and comparing the text prototype ( is the splicing operation), and then encoding through an encoder; P is the created soft prompt; T is the new feature matrix formed by text prototype alignment and comparison; pn is the n-th element in the soft prompt P; [dom] is the dataset context; [inst] is the task instruction; [sta] is the statistical information.
[0123] 5.1.2) Causal attention mechanism layer, which is used to automatically extract and select features from the data input by the input layer, and filter out noise and irrelevant information.
[0124] Specifically, since the time series has a complex structure and pattern, the attention mechanism is introduced to automatically extract and select features according to the text prototype aligned with the input time series, focus on the information most effective for the anomaly detection task, and filter out noise and irrelevant information:
[0125] 5.1.2.1) Perform a linear transformation on the input feature matrix to obtain the query vector Q, key vector K, and value vector V of the feature matrix:
[0126] Q = W Q T(11)
[0127] K = W k T(12)
[0128] V = W V T(13)
[0129] where W Q is the weight matrix for converting the input feature matrix T into the query vector Q; W k is the weight matrix for converting the input feature matrix T into the key vector K; W k is the weight matrix for converting the input feature matrix T into the value vector V.
[0130] 5.1.2.2) Use the attention calculation formula to calculate the new time series vector set Attention(Q, K, V) according to the query vector Q, key vector K, and value vector V of the feature matrix:
[0131]
[0132] where d k is the dimension of the key vector K.
[0133] 5.1.2.3) Divide each vector in the new time series vector set Attention(Q, K, V) into multiple parts according to a certain length, and apply the multi-head attention mechanism respectively:
[0134]
[0135] where d n is the length of the new time series vector set after division, n is the number of heads of the multi-head attention; dmodel is the total length of the new set of time series vectors. Through the multi-head attention mechanism, the model can learn different features of the input data in multiple subspaces in parallel, thereby improving the model's ability to process information.
[0136] 5.1.3) Residual connection and normalization layer, used to perform layer normalization and residual connection on the filtered data.
[0137] Specifically, in the large model for dynamic equipment fault diagnosis of the fire water supply system of the present invention, layer normalization is a method of normalizing according to the features of each layer in each sample, that is:
[0138]
[0139] where LayerNorm(t) is the result of performing layer normalization operation on the input feature vector t; t is the input feature vector; μ is the mean of the feature vector; σ is the standard deviation of the feature vector, and γ and β are the learned scaling coefficient and translation coefficient; ε is a very small number used to stabilize the calculation. Through the layer normalization operation, the convergence speed of the model can be accelerated and the training process of the model can be stabilized.
[0140] Specifically, vanishing gradients is a common problem in the training process of deep learning models. In the present invention, to prevent the problem of vanishing gradients, a method of residual connection is introduced, that is, adding the output directly to the input:
[0141] T out = T + F(T) (17)
[0142] where T out is the output result after the residual connection operation; F(T) is the causal attention mechanism layer or the feed-forward neural network layer. Through the above method, it is ensured that information will not be lost during the transmission process in the model, and the performance and accuracy of the model are improved.
[0143] 5.1.4) Feed-forward neural network layer, used to process the data after layer normalization and residual connection through a non-linear activation function.
[0144] Specifically, in the large model for dynamic equipment fault diagnosis of the fire water supply system of the present invention, the other parts of the model only perform linear transformations on the input vectors. For example, the causal attention mechanism and residual connection lack non-linearity, which may limit the ability of the model. Therefore, a feed-forward neural network layer is introduced:
[0145] T feed = relu(W feed T out + b feed ) (18)
[0146] Among them, T feed is the output result after being processed by the feedforward neural network layer; W feed , b feed are trainable weights and biases; relu is the ReLu activation function. The set of time series vectors obtained by the above formula (17) passes through two feedforward neural network layers composed of formula (18). The feedforward neural network enhances the model's generalization and learning ability through non-linear activation functions such as ReLU.
[0147] 5.1.5) Output layer, which is used to remap each time series vector processed by the feedforward neural network layer back to a single scalar, and obtain the prediction result through the activation function.
[0148] Specifically, the output of the large model for diagnosing dynamic equipment faults in the fire water supply system passes through the last linear layer, remapping each time series vector processed by the feedforward neural network layer back to a single scalar, and then obtaining the probability distribution Y that the prediction result belongs to a certain symbol through the softmax activation function:
[0149] Y = softmax(WT feed + b) (19)
[0150] Among them, W and b are trainable weights and biases.
[0151] 5.2) Determine the method for the large model for diagnosing dynamic equipment faults in the fire water supply system to make predictions.
[0152] Specifically, the large model for diagnosing dynamic equipment faults in the fire water supply system of the present invention adopts a predictive detection method, converting the task into the prediction of the next token, which belongs to an autoregressive model. Considering that the time series detected during the fault diagnosis of the fire water supply system is real-time, the present invention regards the obtained time series as a window, predicts the future window based on the existing window, and calculates the mean square error by comparing the predicted future segment with the actual monitored true value, that is:
[0153] The next mark of length S is generated by using N time series windows of length S, and it is regarded as the standard value, indicating the time series monitored under normal conditions. It is compared with the time series window of actual monitoring to calculate the mean square error. The mean square error (MSE) of all segments of the time series actually monitored is sorted in descending order, and the α quantile is determined from the sorted mean square error. The mean square error (MSE) value corresponding to the first α position after sorting is used as the threshold. The threshold divides the mean square error value sequence into two parts, and the part above the threshold is considered to be the interval where anomalies may exist. Compare whether the mean square error value of the predicted result and the actual value is higher than the threshold to determine whether the predicted result is abnormal. If the MSE of a certain predicted result is higher than the threshold, it is marked as an abnormal segment, so as to determine the position of the abnormal segment in the time series and form a fault diagnosis result. In this way, the real-time judgment ability of the model for sudden anomalies can be predictively tested.
[0154] In the training process, in order to prevent the model from "cheating", it is necessary to ensure that the output of each time series element depends only on the previous time series element. However, the output sequence is input once, so the present invention adopts the causal attention method to perform a mask operation on the time series input vector set, and then calculates the attention through the above formula (14), without considering the time series vectors in the input that the model has not seen yet.
[0155] In order to make it easier for the large model to learn the data features of different devices and the tasks to be completed, the soft prompts at the input layer include the device information of the anomaly detection task, the time step of the anomaly that needs to be determined, and the statistical information of the anomaly data, and the attention mechanism is used to identify the corresponding information in the entire prediction process. To achieve this process, the present invention determines the time step that has a greater impact on the result, the corresponding input time series data and the text prototype features of the data based on the analysis of the attention weight, and inserts them into the constructed description template, for example, in "device [domain] corresponding to the abnormal segment marked by anomaly detection, at the time point or time period [abnormal time point or time period marked by anomaly detection], [statistical information corresponding to the abnormal time series]".
[0156] 5.3) The predictive detection method is used to train the constructed fire water supply system dynamic equipment fault diagnosis large model to obtain the trained fire water supply system dynamic equipment fault diagnosis large model.
[0157] Specifically, unlike the traditional time series prediction model, the fire water supply system dynamic equipment fault diagnosis large model constructed by the present invention predicts the discretized time series. Therefore, the model constructed by the present invention uses cross entropy as the loss function Loss during training:
[0158]
[0159] Where N is the number of samples; C is the number of symbols; is the one-hot encoding of the actual label; y ij is the predicted probability of the model for class j. One-hot encoding means converting a time series symbol into a vector consisting of only 0s and 1s, where the dimension of the vector is equal to the total number of symbols, the position corresponding to the class in the vector is 1, and other positions are 0.
[0160] 6) Obtain the time series {x1, x2, x3,..., x n} of the operation of the dynamic equipment in the fire water supply system, and perform the processing of steps 1) to 4) on the obtained time series to obtain the soft prompt and the new feature matrix corresponding to the time series.
[0161] 7) Concatenate the soft prompt and the new feature matrix corresponding to the time series and input them into the trained large model for fault diagnosis of the dynamic equipment in the fire water supply system to obtain the prediction result x n+1 of the dynamic equipment in the fire water supply system, and add it to the time series of the operation of the dynamic equipment in the fire water supply system to obtain the time series {x1, x2, x3,..., x n , x n+1}, and repeat this step until the length of the time series of the operation of the dynamic equipment in the fire water supply system reaches the expected length.
[0162] 8) Adopt a predictive detection method to detect the time series (such as {x1, x2, x3,..., x n , x n+1 , x n+2 ,..., x 2n}) of the operation of the dynamic equipment in the fire water supply system at this time, and determine the fault diagnosis result of the dynamic equipment in the fire water supply system, specifically:
[0163] 8.1) Sort the mean square errors of all segments of the initial time series in descending order, determine the α quantile from the sorted mean square errors, and use the mean square error values corresponding to the first α positions after sorting as the threshold. This threshold divides the sequence of mean square error values into two parts, and the part higher than the threshold is considered as the interval where anomalies may exist.
[0164] 8.2) Calculate the mean square error of the predicted part {x n+1 , x n+2 ,..., x 2n} in the finally obtained time series.
[0165] 8.3) Judge whether the mean square error of the predicted part is greater than the set threshold. If it is greater, it means that there is a fault in the dynamic equipment of the fire water supply system, determine the fault diagnosis result, and realize the fault diagnosis of the dynamic equipment in the fire water supply system.
[0166] Specifically, the fault diagnosis result includes the time step when the abnormality occurs, the abnormal data, and the device information in the corresponding soft prompt.
[0167] Embodiment 2
[0168] This embodiment provides a fault diagnosis system for dynamic equipment in a fire water supply system, including:
[0169] A data acquisition module for acquiring the time series of the operation of the dynamic equipment in the fire water supply system.
[0170] A segmentation module for segmenting the acquired time series into several non-overlapping subsequences and dividing them into different instances.
[0171] An enhancement module for encoding and embedding the divided instances into the feature space to obtain time series vectors, and enhancing the time series vectors through feature-level comparison and instance-level comparison.
[0172] A text prototype alignment and comparison module for randomly selecting text prototypes for text prototype alignment and comparison, and embedding and mapping the enhanced time series vectors near the corresponding text to form a new feature matrix.
[0173] A soft prompt module for generating corresponding soft prompts based on the time series monitored during the operation of the dynamic equipment in the fire water supply system by using the soft prompt method.
[0174] A prediction result determination module for splicing the soft prompt corresponding to the time series and the new feature matrix and inputting them into the trained large fault diagnosis model for the dynamic equipment in the fire water supply system to obtain the prediction result of the dynamic equipment in the fire water supply system, and adding it to the time series of the operation of the dynamic equipment in the fire water supply system, and repeating until the length of the time series of the operation of the dynamic equipment in the fire water supply system reaches the expected length.
[0175] A predictive detection module for detecting the time series of the operation of the dynamic equipment in the fire water supply system at this time by using the predictive detection method to determine the fault diagnosis result of the dynamic equipment in the fire water supply system.
[0176] The system provided in this embodiment is used to execute the above method embodiments. For the specific process and detailed content, please refer to the above embodiments and will not be elaborated here.
[0177] Embodiment 3
[0178] This embodiment provides a processing device corresponding to the fault diagnosis method for dynamic equipment in the fire water supply system provided in Embodiment 1. The processing device can be a processing device applicable to a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of Embodiment 1.
[0179] The processing device includes a processor, a memory, a communication interface, and a bus. The processor, the memory, and the communication interface are connected through the bus to complete communication with each other. A computer program that can run on the processing device is stored in the memory. When the processing device runs the computer program, it executes the method for diagnosing faults of dynamic devices in the fire water supply system provided in Embodiment 1.
[0180] In some implementations, the memory may be a high-speed random access memory (RAM: Random Access Memory), and may also include non-volatile memory, such as at least one disk memory.
[0181] In other implementations, the processor may be various types of general-purpose processors such as a central processing unit (CPU) or a digital signal processor (DSP), which is not limited here.
[0182] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical disks, etc., which can store program codes.
[0183] Those skilled in the art can understand that the structure of the above computing device is only a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computing device to which the solution of the present invention is applied. The specific computing device may include more or fewer components, or combine certain components, or have different component arrangements.
[0184] Embodiment 4
[0185] This embodiment provides a computer program product corresponding to the method for diagnosing faults of dynamic devices in the fire water supply system provided in Embodiment 1. The computer program product may include a computer-readable storage medium, on which computer-readable program instructions for executing the method for diagnosing faults of dynamic devices in the fire water supply system described in Embodiment 1 are carried.
[0186] A computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination of the foregoing.
[0187] For the computer-readable storage medium provided by the foregoing embodiments, its implementation principle and technical effects are similar to those of the foregoing method embodiments, and will not be elaborated herein.
[0188] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0189] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction means, and the instruction means implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0190] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0191] The foregoing embodiments are only used to illustrate the present invention. The structures, connection manners, manufacturing processes, etc. of the components can all be changed. Any equivalent transformation and improvement made on the basis of the technical solution of the present invention should not be excluded from the protection scope of the present invention.
Claims
1. A method for diagnosing faults of dynamic equipment in a fire water supply system, characterized in that: include: Obtain the time series of the operation of dynamic equipment in the fire water supply system; Split the acquired time series into several non-overlapping subsequences and divide them into different instances; The divided instances are encoded and embedded into the feature space to obtain a time series vector, and the time series vector is enhanced through feature-level comparison and instance-level comparison; Randomly select text prototypes, perform text prototype alignment and comparison, embed and map the enhanced time series vector to the vicinity of the corresponding text to form a new feature matrix; The soft prompt method is adopted to generate corresponding soft prompts based on the time series of the dynamic equipment operation process monitoring of the fire water supply system; The soft prompts corresponding to the time series and the new feature matrix are spliced and input into the trained fire water supply system dynamic equipment fault diagnosis large model to obtain the prediction results of the fire water supply system dynamic equipment, and added to the time series of the fire water supply system dynamic equipment operation. This step is repeated until the length of the time series of the fire water supply system dynamic equipment operation reaches the expected length; A predictive detection method is used to detect the time series of the operation of the dynamic equipment of the fire water supply system at this time, and the fault diagnosis results of the dynamic equipment of the fire water supply system are determined.
2. A method for diagnosing faults of dynamic equipment in a fire water supply system according to claim 1, characterized in that: The time series of monitoring the operation process of the dynamic equipment of the fire water supply system is divided into a number of non-overlapping subsequences, and divided into different instances, including: Obtain the time series of the dynamic equipment operation monitoring process of the fire water supply system; Split the time series into a list of non-overlapping subsequences using a split function; The sliding window method is used to mark the time series and divide the time series into anchor instances, positive sample instances and negative sample instances; A causal temporal convolutional network with several layers of convolutional blocks is used to construct an encoder. Each list of non-overlapping subsequences can be embedded into an M-dimensional space through an embedding function to form a token embedding list of the time series.
3. A method for diagnosing faults of dynamic equipment in a fire water supply system according to claim 2, characterized in that: The encoding and embedding of the divided instances into feature spaces to obtain time series vectors, and the enhancement of the time series vectors through feature-level comparison and instance-level comparison, include: Based on the constructed encoder, the divided instances are encoded and embedded into the feature space to obtain the embedded time series vector; Construct a projection head, obtain the projection function based on the embedded time series vector, and calculate the similarity between the projection vectors through the similarity function, which is expressed as an instance-level contrast loss function; For the feature matrix formed after time series embedding, the similarity and correlation between feature vectors of different instances are calculated, and the feature-level contrast loss function is constructed; For an anchor feature matrix in the embedded time series vector, divide it into a positive feature matrix and a negative feature matrix; Based on the instance-level contrast loss function, instance-level contrast learning is performed according to the row vectors of the feature matrix; Based on the feature-level contrast loss function, feature-level contrast learning is performed at the feature level according to the column vector of the feature matrix.
4. A method for diagnosing faults of dynamic equipment in a fire water supply system according to claim 1, characterized in that: The text prototype is randomly selected, and the text prototype is aligned and compared. The embedded time series vector is embedded and mapped near the corresponding text to form a new feature matrix, including: For text prototype alignment and comparison, several representative text embeddings are randomly selected as text prototypes. The channel maps the text prototype of the text description corresponding to the time series with the time series through embedding and association based on feature representation to achieve text prototype mapping, and embeds the encoded time series vector to the corresponding text to form a new feature matrix.
5. A method for diagnosing faults of dynamic equipment in a fire water supply system according to claim 4, characterized in that: The method using soft prompts generates corresponding soft prompts based on the time series of the operation process monitoring of the dynamic equipment of the fire water supply system, including: Create soft prompts, including data set context, task instructions and statistical information, where the data set context is the information of the moving device to which the time series belongs, the task instruction is to extract the abnormal time step and abnormal data value, and the statistical information is the statistical characteristics of the time series; Establish the loss function for soft prompts; Based on the loss function of the soft prompts, the soft prompts are trained to generate trained soft prompts.
6. A method for diagnosing faults of dynamic equipment in a fire water supply system according to claim 5, characterized in that: The fire water supply system dynamic equipment fault diagnosis large model includes an input layer, a causal attention mechanism layer, a residual connection and normalization layer, a feedforward neural network layer and an output layer, wherein: The input layer is used to input the concatenated data of the new feature matrix formed by the alignment and comparison of the trained soft prompts and text prototypes; The causal attention mechanism layer is used to automatically extract and select features from the data input into the input layer, and filter out noise and irrelevant information; The residual connection and normalization layer are used to perform layer normalization and residual connection on the filtered data; The feedforward neural network layer is used to process the data after layer normalization and residual connection through nonlinear activation function; The output layer is used to remap each time series vector processed by the feedforward neural network layer back to a single scalar and obtain the diagnostic result through the activation function.
7. A method for diagnosing faults of dynamic equipment in a fire water supply system according to claim 6, characterized in that: The predictive detection method is used to detect the time series of the operation of the dynamic equipment of the fire water supply system at this time, and determine the fault diagnosis results of the dynamic equipment of the fire water supply system, including: Sort the mean square errors of all segments of the initial time series in descending order, determine the α quantile from the sorted mean square errors, and use the mean square error value corresponding to the first α positions after sorting as the threshold. The part above the threshold is considered to be an interval that may contain anomalies. Calculate the mean square error of the predicted part of the final time series; Determine whether the mean square error of the prediction part is greater than the set threshold. If it is greater, it means that there is a fault in the dynamic equipment of the fire water supply system. Determine the fault diagnosis result and realize the fault diagnosis of the dynamic equipment of the fire water supply system. The fault diagnosis result includes the time step where the abnormality occurs, the abnormal data and the equipment information in the corresponding soft prompt.
8. A fire water supply system dynamic equipment fault diagnosis system, characterized in that: include: A data acquisition module is used to obtain the time series of the operation of the dynamic equipment of the fire water supply system; A segmentation module is used to segment the acquired time series into several non-overlapping subsequences and divide them into different instances; The enhancement module is used to encode the divided instances and embed them into the feature space to obtain the time series vector, and enhance the time series vector through feature level comparison and instance level comparison; The text prototype alignment and comparison module is used to randomly select text prototypes, perform text prototype alignment and comparison, embed and map the enhanced time series vector to the vicinity of the corresponding text, and form a new feature matrix; A soft prompt module, used to generate corresponding soft prompts based on the time series of the operation process monitoring of the dynamic equipment of the fire water supply system by using the soft prompt method; The prediction result determination module is used to splice the soft prompts corresponding to the time series and the new feature matrix and input them into the trained fire water supply system dynamic equipment fault diagnosis large model to obtain the prediction results of the fire water supply system dynamic equipment and add them to the time series of the fire water supply system dynamic equipment operation, and repeat until the length of the time series of the fire water supply system dynamic equipment operation reaches the expected length; The predictive detection module is used to detect the time series of the operation of the dynamic equipment of the fire water supply system by using a predictive detection method, and determine the fault diagnosis result of the dynamic equipment of the fire water supply system.
9. A processing device, characterized in that: It includes computer program instructions, wherein the computer program instructions, when executed by a processing device, are used to implement the steps corresponding to the method for diagnosing faults of dynamic equipment in a fire water supply system according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the method for diagnosing faults of dynamic equipment in a fire water supply system according to any one of claims 1 to 7.
Citation Information
Cited By
Geoscience big data element extraction model training and application method, equipment and medium
CN122196559A