Compressor root cause tracing method and device based on cross-modal base model, equipment and medium
By using semantic fusion technology of cross-modal base model, the time series data of natural gas electric centrifugal compressor is transformed into a representation form that the base model can understand. This solves the problem of insufficient generalization ability of deep learning methods in fault diagnosis of natural gas electric centrifugal compressor, and realizes high-precision and low-cost cross-operating condition fault diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF PETROLEUM (BEIJING)
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-05
AI Technical Summary
Existing deep learning methods lack generalization ability in fault diagnosis of natural gas electric centrifugal compressors, cannot adapt to complex industrial scenarios, and the base model cannot directly parse numerical time series data.
A cross-modal base model is adopted, and the time series data of the natural gas electric centrifugal compressor is transformed into a resolvable representation of the base model through cross-modal semantic fusion. Semantic fusion is performed using a cross-attention mechanism, and a structured prompt word template is constructed to guide fault diagnosis.
It achieves high-precision diagnosis of various fault types under multiple operating conditions, breaks the fragmented development mode of "one model per machine, one model per operating condition", reduces engineering deployment and maintenance costs, and improves cross-operating condition diagnostic performance.
Smart Images

Figure CN122152583A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fault diagnosis, and in particular to a method, apparatus, equipment and medium for tracing the root causes of compressor failures based on a cross-modal base model. Background Technology
[0002] As a core power unit in gas pipeline systems, the health of electric centrifugal compressors directly impacts the operational safety and efficiency of the entire pipeline network. Accurate and timely fault diagnosis of these compressors is crucial for preventing serious accidents and achieving predictive maintenance. With the development of artificial intelligence technology, deep learning-based fault diagnosis methods have become the mainstream in research and application.
[0003] However, existing deep learning methods have significant limitations: their models are typically trained for a single device, a single operating condition, or a limited number of fault types, and the learned feature representations are strongly correlated with the distribution of the training data. When faced with cross-condition scenarios common in real-world industrial environments, such as speed fluctuations, load changes, and equipment differences, model performance often drops sharply, and generalization ability is insufficient. This leads to a fragmented development model of "one model per device, one model per operating condition," which not only results in high engineering deployment and maintenance costs but also fails to meet the urgent needs of industrial sites for general and adaptive diagnostic capabilities.
[0004] In recent years, Large Language Models (LLMs) have emerged with the "emergent capabilities" gained from training on massive amounts of data, providing powerful general feature extraction and cross-scenario reasoning abilities, thus offering a new path to solve the problem of poor generalization of traditional models. However, the training data for LLMs mainly consists of natural language text, and they are essentially processing models for discrete text symbols, which cannot directly analyze numerical time series data such as vibration signals generated during the operation of natural gas electric centrifugal compressors.
[0005] Therefore, how to develop a root cause tracing method that can achieve cross-modal semantic fusion and has both universality and generalization is an urgent problem to be solved. Summary of the Invention
[0006] In view of this, the purpose of this application is to provide a method, device, equipment, and medium for compressor root cause tracing based on a cross-modal base model, which can achieve high-precision diagnosis of multiple fault types under multiple operating conditions using only a single general model through cross-modal semantic fusion. The specific solution is as follows: Firstly, this application provides a compressor root cause tracing method based on a cross-modal base model, including: The original time series data obtained from the natural gas electric centrifugal compressor is acquired, the original time series data is segmented into continuous local segments, and the local segments are mapped into target high-dimensional segment vectors through a linear embedding layer. The target high-dimensional fragment vector is input into a pre-constructed cross-modal alignment module; the cross-modal alignment module includes learnable text prototypes, which are semantic vectors derived from the word embedding space of the base model; wherein, the cross-modal alignment module uses a cross-attention mechanism to semantically fuse the target high-dimensional fragment vector and multiple semantically related text prototypes to obtain the textual representation vector corresponding to the target high-dimensional fragment vector. Construct prompt word information and convert the prompt word information into prompt word vectors. Concatenate the prompt word vectors as prefixes with each of the text-based representation vectors to obtain the target input sequence corresponding to the original time series data. The prompt word information includes dataset context, task instructions, and feature information extracted from the original time series data to clarify the data source and application scenario. The target input sequence is input into the pre-trained and parameter-frozen pedestal model to perform root cause analysis, thereby obtaining the root cause analysis results corresponding to the original time series data.
[0007] Optionally, the cross-modal alignment module further includes a text prototype generation unit; the text prototype generation unit filters out semantic vectors corresponding to target words related to fault diagnosis of natural gas electric centrifugal compressors from the word embedding space of the base model; Specifically, the target vocabulary is converted into corresponding semantic vectors through the word embedding layer built into the base model.
[0008] Optionally, the step of acquiring the raw time-series data based on the natural gas electric centrifugal compressor, segmenting the raw time-series data into continuous local segments, and mapping the local segments into target high-dimensional segment vectors through a linear embedding layer includes: The raw time series data obtained from the natural gas electric centrifugal compressor is acquired, and the raw time series data is standardized to obtain the target time series data. The target time series data is segmented using a sliding window of preset length to obtain several continuous local segments; Each local segment is mapped to a target high-dimensional segment vector with the same dimension as the word embedding space of the base model through a trainable linear transformation layer; the linear embedding layer is an entity component with a weight matrix and a bias term.
[0009] Optionally, the step of semantically fusing the target high-dimensional fragment vector with multiple semantically related text prototypes to obtain the textual representation vector corresponding to the target high-dimensional fragment vector includes: Determine the semantic similarity between the target high-dimensional fragment vector and multiple semantically related text prototypes, and assign corresponding weights to each text prototype based on the semantic similarity; Based on the weights corresponding to the text prototypes, the target high-dimensional fragment vector is semantically fused with the corresponding text prototypes to obtain the textual representation vector corresponding to the target high-dimensional fragment vector.
[0010] Optionally, after obtaining the textual representation vector corresponding to the target high-dimensional fragment vector, the method further includes: The textual representation vectors are concatenated according to the chronological order of their corresponding local segments in the original time series data to obtain a textual representation vector sequence. Accordingly, the step of constructing prompt word information and converting the prompt word information into prompt word vectors, and concatenating the prompt word vectors as prefixes with each of the textual representation vectors to obtain the target input sequence corresponding to the original time series data, includes: Construct prompt word information, and convert the prompt word information into prompt word vectors through the word embedding layer built into the base model; The prompt word vector is concatenated before the text-based representation vector sequence to obtain the target input sequence corresponding to the original time series data.
[0011] Optionally, the step of inputting the target input sequence into the pre-trained and parameter-frozen base model for root cause analysis to obtain the root cause analysis result corresponding to the original time series data includes: The target input sequence is input into the pre-trained and parameter-frozen base model so that the base model outputs a deep semantic representation sequence corresponding to the target input sequence; the deep semantic representation sequence includes a redundant sequence corresponding to the prompt word vector and a valid sequence corresponding to the text-based representation vector sequence; Extract the effective sequence from the deep semantic representation sequence and use the effective sequence as the fault feature vector sequence; The fault feature vector sequence is flattened into a one-dimensional feature vector, and the one-dimensional feature vector is mapped to an unnormalized confidence score corresponding to different fault categories through a trainable fully connected layer. The confidence scores are normalized to obtain the probability of occurrence of various types of faults, and the root cause tracing results corresponding to the original time series data are determined based on the probability of occurrence of various types of faults.
[0012] Secondly, this application provides a compressor root cause tracing device based on a cross-modal base model, comprising: The data acquisition module is used to acquire raw time series data based on a natural gas electric centrifugal compressor, segment the raw time series data into continuous local segments, and map the local segments into target high-dimensional segment vectors through a linear embedding layer. A semantic fusion module is used to input the target high-dimensional fragment vector into a pre-constructed cross-modal alignment module; the cross-modal alignment module includes learnable text prototypes, which are semantic vectors derived from the word embedding space of the base model; wherein, the cross-modal alignment module uses a cross-attention mechanism to semantically fuse the target high-dimensional fragment vector and multiple semantically related text prototypes to obtain a textual representation vector corresponding to the target high-dimensional fragment vector; The vector concatenation module is used to construct prompt word information and convert the prompt word information into prompt word vectors. The prompt word vectors are used as prefixes to concatenate with each of the text-based representation vectors to obtain the target input sequence corresponding to the original time series data. The prompt word information includes dataset context, task instructions, and feature information extracted from the original time series data to clarify the data source and application scenario. The root cause tracing module is used to input the target input sequence into the pre-trained and parameter-frozen base model to perform root cause tracing and obtain the root cause tracing result corresponding to the original time series data.
[0013] Optionally, the data acquisition module includes: The data processing unit is used to acquire raw time series data based on a natural gas electric centrifugal compressor, and to standardize the raw time series data to obtain target time series data. The data segmentation unit is used to segment the target time series data using a sliding window of preset length to obtain several continuous local segments; The data mapping unit is used to map each of the local segments into a target high-dimensional segment vector with the same dimension as the word embedding space of the base model through a trainable linear transformation layer; the linear embedding layer is an entity component with a weight matrix and a bias term.
[0014] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned compressor root cause tracing method based on a cross-modal pedestal model.
[0015] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned compressor root cause tracing method based on a cross-modal pedestal model.
[0016] In this application, raw time-series data based on a natural gas electric centrifugal compressor is obtained. The raw time-series data is segmented into continuous local segments, and these local segments are mapped to target high-dimensional segment vectors through a linear embedding layer. The target high-dimensional segment vectors are then input into a pre-constructed cross-modal alignment module. This cross-modal alignment module includes learnable text prototypes, which are semantic vectors derived from the word embedding space of the base model. The cross-modal alignment module utilizes a cross-attention mechanism to semantically fuse the target high-dimensional segment vectors with multiple semantically related text prototypes to obtain the target high-dimensional segment vectors. The textual representation vector corresponding to the high-dimensional segment vector of the target is described; prompt word information is constructed and converted into prompt word vectors; the prompt word vectors are used as prefixes and concatenated with each of the textual representation vectors to obtain the target input sequence corresponding to the original time series data; the prompt word information includes dataset context, task instructions, and feature information extracted from the original time series data to clarify the data source and application scenario; the target input sequence is input into the pre-trained and parameter-frozen base model to perform root cause tracing to obtain the root cause tracing result corresponding to the original time series data. As can be seen from the above, on the one hand, this application utilizes the "emergent capability" of general feature extraction and cross-scenario reasoning obtained by training a pre-trained base model with massive amounts of data. This eliminates the need to train separate models for single devices, single operating conditions, or limited fault types. Instead, it transforms compressor time-series data into a representation form that the base model can parse and inputs it into the general model to complete fault diagnosis. This breaks the fragmented development model of "one model per machine, one model per operating condition," leveraging the general adaptability of the large model to improve cross-operating condition diagnostic performance while significantly reducing the cost of engineering deployment and maintenance. On the other hand, this application constructs a cross-modal alignment module containing text prototypes derived from the word embedding space of the base model. The cross-modal alignment module uses a cross-attention mechanism to semantically fuse the target high-dimensional fragment vector obtained through data segmentation and linear embedding with multiple semantically related text prototypes. This transforms numerical time-series data into textual representation vectors that the base model can understand, achieving cross-modal semantic fusion of numerical time-series data and textual modalities. This allows the base model to effectively parse time-series operating data such as compressor vibration signals. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0018] Figure 1 This is a flowchart of a compressor root cause tracing method based on a cross-modal base model disclosed in this application; Figure 2 This is a schematic diagram of cross-modal data alignment disclosed in this application; Figure 3 This is a schematic diagram of another cross-modal data alignment disclosed in this application; Figure 4 This is a schematic diagram of a centrifugal compressor fault diagnosis model framework based on a base model disclosed in this application; Figure 5 This is a schematic diagram of the structure of a compressor root cause tracing device based on a cross-modal base model disclosed in this application; Figure 6 This is a schematic diagram of the structure of an electronic device disclosed in this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0020] Existing fault diagnosis technologies face a dual challenge: on the one hand, traditional deep learning models suffer from insufficient generalization and poor adaptability to operating conditions, making it difficult to meet the diverse needs of complex industrial scenarios; on the other hand, the general capabilities of the base model cannot be directly transferred to time-series data-driven fault diagnosis tasks. To address this, this application provides a compressor root cause tracing method based on a cross-modal base model. This method integrates time-series data with linguistic semantics and fully utilizes the general reasoning capabilities of the base model to achieve universal, accurate, and adaptive equipment health management for complex and ever-changing industrial scenarios.
[0021] See Figure 1 As shown in the figure, this application discloses a compressor root cause tracing method based on a cross-modal base model, including: Step S11: Obtain the original time series data based on the natural gas electric centrifugal compressor, divide the original time series data into continuous local segments, and map the local segments into target high-dimensional segment vectors through a linear embedding layer.
[0022] In this embodiment, the raw time-series data obtained from a natural gas electric centrifugal compressor is first acquired and standardized to obtain the target time-series data. Then, a sliding window of preset length is used to segment the target time-series data, resulting in several continuous local segments. Next, a trainable linear transformation layer is used to map each local segment into a target high-dimensional segment vector with the same dimension as the word embedding space of the base model; wherein, the linear embedding layer is an entity component with a weight matrix and bias terms. For example... Figure 2 As shown, a fragment embedder is used to encode numerical time series fragments into target high-dimensional fragment vectors with the same dimension as the word embedding space of the base model.
[0023] Step S12: Input the target high-dimensional fragment vector into a pre-constructed cross-modal alignment module; the cross-modal alignment module includes learnable text prototypes, which are semantic vectors derived from the word embedding space of the base model; wherein, the cross-modal alignment module uses a cross-attention mechanism to semantically fuse the target high-dimensional fragment vector and multiple semantically related text prototypes to obtain the textual representation vector corresponding to the target high-dimensional fragment vector.
[0024] In this embodiment, the cross-modal alignment module further includes a text prototype generation unit; the text prototype generation unit filters semantic vectors corresponding to target words related to fault diagnosis of natural gas electric centrifugal compressors from the word embedding space of the base model; wherein, the target words are converted into corresponding semantic vectors through the word embedding layer built into the base model. For example Figure 2 As shown, text prototypes are generated using pre-trained word embeddings of the pedestal model, and semantic fusion is performed between the target high-dimensional fragment vector and multiple semantically related text prototypes based on the cross-attention mechanism.
[0025] The process of semantically fusing a target high-dimensional fragment vector with multiple semantically related text prototypes to obtain a textual representation vector corresponding to the target high-dimensional fragment vector can include: first, determining the semantic similarity between the target high-dimensional fragment vector and multiple semantically related text prototypes, and assigning corresponding weights to each text prototype based on the semantic similarity; then, performing weighted semantic fusion of the target high-dimensional fragment vector with the corresponding text prototypes based on the weights corresponding to the text prototypes to obtain the textual representation vector corresponding to the target high-dimensional fragment vector.
[0026] Furthermore, after obtaining the textual representation vector corresponding to the target high-dimensional segment vector, it may also include: concatenating each textual representation vector according to the chronological order of the corresponding local segments in the original time series data to obtain a textual representation vector sequence.
[0027] For example Figure 3As shown, at the source end, i.e., the base model end, discrete words such as "time," "ahead of time," and "lag" are first mapped into distributed text prototypes through word embedding technology. At the target end, i.e., the natural gas electric centrifugal compressor end, the original time series data is split into multiple time series segments, and after processing, the target high-dimensional segment vectors corresponding to each time series segment are obtained, which are also time series segment embedding vectors. The core operation of cross-modal alignment is to dynamically combine and map the text prototypes at the source end to the time series segment embedding space at the target end. The cross-modal alignment module uses a cross-attention mechanism to perform semantic fusion between the target high-dimensional segment vectors and multiple semantically related text prototypes. It should be noted that this alignment process presents a many-to-many nonlinear relationship, that is, a single text prototype can participate in the construction of multiple textual representation vectors, and each textual representation vector is generated by weighted semantic fusion of the corresponding target high-dimensional segment vector and multiple semantically related text prototypes. For example, when a certain time series segment shows a sudden increase in value, the target high-dimensional segment vector corresponding to that time series segment will be aligned with semantically related text prototypes such as "sharply" and "increase." This process successfully abstracted and integrated the numerical change features of time series segments into lexical-level semantic features, enabling numerical time series data to have a semantic expression form that the base model can understand, laying the core feature foundation for subsequent fault diagnosis reasoning tasks.
[0028] The calculation formula for the cross-attention mechanism in this embodiment is as follows: ; ; Where Q is the query vector in the cross-attention mechanism, which is derived from the real-time monitoring data sequence of the natural gas electric centrifugal compressor; K is the key vector in the cross-attention mechanism, which is derived from the pre-trained lexical vector representation of the base model; and V is the value vector in the cross-attention mechanism, which is derived from the pre-trained lexical vector representation of the base model. Feature vector embedding representation of time series segments; The base model pre-trained lexical feature vector embedding representation is represented by W; W is the corresponding learnable weight matrix. Let K be the dimension of the key vector in the cross-attention mechanism. By aligning cross-modal data, time-series data is mapped to a unified semantic space, making different modalities representing the same concept or describing the same entity in this new space similar in features. This enables the base model to parse monitoring data of natural gas electric centrifugal compressors.
[0029] Step S13: Construct prompt word information and convert the prompt word information into prompt word vectors. Use the prompt word vectors as prefixes to concatenate with each of the textual representation vectors to obtain the target input sequence corresponding to the original time series data. The prompt word information includes dataset context, task instructions, and feature information extracted from the original time series data to clarify the data source and application scenario.
[0030] In this embodiment, constructing prompt word information and converting it into prompt word vectors, then concatenating these vectors with each text-based representation vector to obtain the target input sequence corresponding to the original time series data, can be achieved by: first, constructing prompt word information and converting it into prompt word vectors using the word embedding layer built into the base model; then, concatenating the prompt word vectors before the text-based representation vector sequence to obtain the target input sequence corresponding to the original time series data.
[0031] Understandably, to guide the pre-trained LLM with frozen parameters to effectively focus on the fault diagnosis task of natural gas electric centrifugal compressors and to enhance its ability to model time series context information, this embodiment designs a structured prompt word template, which consists of the following three parts: (1) Dataset context: Clearly define the data source and application scenario, such as "Given the following vibration signals of centrifugal compressors"; (2) Task instructions: Clearly define the specific operations that the model needs to perform, such as "Please help me diagnose the fault that has occurred in this centrifugal compressor"; (3) Feature information: Provides key statistical features of vibration signals, such as mean, variance, extreme values, etc., to provide numerical auxiliary information for the model.
[0032] The LLM's built-in word embedding layer converts the cue word template into a vector representation, which is then used as a prefix and concatenated with the cross-modal aligned textual representation vector to form the model's input sequence, as shown in the following equation: ; in, The vector representation of the prompt word obtained through the word embedding layer; This is a textual representation vector that has undergone cross-modal alignment.
[0033] Step S14: Input the target input sequence into the pre-trained and parameter-frozen pedestal model to perform root cause analysis and obtain the root cause analysis result corresponding to the original time series data.
[0034] In this embodiment, inputting the target input sequence into a pre-trained, parameter-frozen base model to obtain the root cause tracing result corresponding to the original time series data can include: inputting the target input sequence into the pre-trained, parameter-frozen base model so that the base model outputs a deep semantic representation sequence corresponding to the target input sequence; wherein, the deep semantic representation sequence includes a redundant sequence corresponding to the prompt word vector and a valid sequence corresponding to the text-based representation vector sequence. Then, the valid sequence is extracted from the deep semantic representation sequence and used as the fault feature vector sequence. Next, the fault feature vector sequence is flattened into a one-dimensional feature vector, and a trainable fully connected layer is used to map the one-dimensional feature vector into unnormalized confidence scores corresponding to different fault categories. Finally, the confidence scores are normalized to obtain the occurrence probability of each type of fault, and the root cause tracing result corresponding to the original time series data is determined based on the occurrence probability of each type of fault.
[0035] For example, the concatenated sequence The input is fed into a frozen LLM with L Transformer layers for forward propagation. For the l-th layer (l=1,2,...,L): ; Finally, the deep representation H(L) of the entire sequence is obtained. In the final output H(L), the part corresponding to the prompt word is discarded, and only the part corresponding to the time series segment is retained as the effective context-aware feature.
[0036] The feature sequence is flattened into a one-dimensional vector and projected through a trainable fully connected layer to map its dimension to the number of fault categories C: ; Where z is the unnormalized logits of the model output. and These are the weights and bias parameters of the fully connected layer, respectively.
[0037] The log odds z is transformed into probability distributions for each class using the Softmax function: ; The index corresponding to the maximum value in the probability vector is the fault category predicted by the model.
[0038] To objectively evaluate the diagnostic performance of the method proposed in this embodiment, precision, recall, and F1 score can be used as evaluation metrics. Precision measures the proportion of samples that the model predicts as positive but are actually positive, reflecting the accuracy of the prediction. Recall measures the proportion of all true positive samples correctly predicted by the model, reflecting the model's coverage of positive samples. The F1 score is the harmonic mean of precision and recall, used to comprehensively evaluate the model's performance.
[0039] ; ; ; Where TP represents true positive samples; FP represents the number of false positive samples; FN represents the number of false negative samples; the F1 score ranges from [0, 1]. The larger the F1 value, the better the model fits the data and the more accurate the fault diagnosis.
[0040] The following is based on Figure 4 The technical solution in this embodiment is explained using the schematic diagram of a centrifugal compressor fault diagnosis model framework based on a base model as an example.
[0041] The system uses the raw vibration signal of a natural gas electric centrifugal compressor and the raw input text (including task instructions and input features) as dual inputs. The raw vibration signal is first normalized to stabilize the data distribution, then segmented into time-series fragments. Features are then extracted by a fragment embedder and mapped through a fully connected layer before entering a cross-modal alignment module. This module combines text prototypes derived from pre-trained word embeddings with a cross-attention mechanism to achieve interactive fusion of temporal features and textual semantics, outputting cross-modal aligned fragment embeddings. Simultaneously, the raw input text is first segmented, then converted into a sequence of word embedding vectors by a word embedder, and processed by a text encoder to generate cue word embeddings. The cross-modal aligned fragment embeddings and cue word embeddings are concatenated into a complete input sequence, which is then input into a parameter-frozen base model. Internally, the model uses residual connections + layer normalization and a feedforward neural network to complete sequence modeling and feature processing, outputting temporal fragment embeddings. The output temporal fragment embeddings are flattened and integrated through a fully connected layer, then mapped to the fault category dimension through an output projection (linear projection layer), ultimately outputting the root cause analysis results of the centrifugal compressor.
[0042] As shown above, this embodiment, by designing a cross-modal semantic alignment mechanism and structured prompt word templates, successfully transfers the general representation capability of the base model to the fault diagnosis scenario of a natural gas electric centrifugal compressor. This not only solves the fragmentation problem of traditional deep learning models ("one model per machine, one model per operating condition"), eliminating the need for repeated modeling for specific equipment, faults, or operating conditions, thus significantly reducing engineering development and maintenance costs, but also overcomes the bottleneck that the base model cannot directly parse numerical time-series data. Furthermore, by training only a very small number of adaptation parameters and freezing the main parameters of the base model, a general diagnostic framework can be constructed. While maintaining high diagnostic accuracy, it exhibits excellent cross-operating condition generalization capability, significantly reducing model development and maintenance costs, and providing an efficient and feasible technical path for achieving the generalization and practicality of intelligent equipment diagnosis.
[0043] See Figure 5 As shown in the figure, this application also discloses a compressor root cause tracing device based on a cross-modal base model, comprising: The data acquisition module 11 is used to acquire the raw time series data obtained from the natural gas electric centrifugal compressor, divide the raw time series data into continuous local segments, and map the local segments into target high-dimensional segment vectors through a linear embedding layer. Semantic fusion module 12 is used to input the target high-dimensional fragment vector into a pre-constructed cross-modal alignment module; the cross-modal alignment module includes learnable text prototypes, which are semantic vectors derived from the word embedding space of the base model; wherein, the cross-modal alignment module uses a cross-attention mechanism to semantically fuse the target high-dimensional fragment vector and multiple semantically related text prototypes to obtain a textual representation vector corresponding to the target high-dimensional fragment vector; The vector concatenation module 13 is used to construct prompt word information and convert the prompt word information into prompt word vectors, and concatenate the prompt word vectors as prefixes with each of the text-based representation vectors to obtain the target input sequence corresponding to the original time series data; the prompt word information includes dataset context, task instructions, and feature information extracted from the original time series data to clarify the data source and application scenario; The root cause tracing module 14 is used to input the target input sequence into the pre-trained and parameter-frozen base model to perform root cause tracing and obtain the root cause tracing result corresponding to the original time series data.
[0044] In some specific embodiments, the cross-modal alignment module further includes a text prototype generation unit; the text prototype generation unit filters out semantic vectors corresponding to target words related to fault diagnosis of natural gas electric centrifugal compressors from the word embedding space of the base model; Specifically, the target vocabulary is converted into corresponding semantic vectors through the word embedding layer built into the base model.
[0045] In some specific embodiments, the data acquisition module 11 includes: The data processing unit is used to acquire raw time series data based on a natural gas electric centrifugal compressor, and to standardize the raw time series data to obtain target time series data. The data segmentation unit is used to segment the target time series data using a sliding window of preset length to obtain several continuous local segments; The data mapping unit is used to map each of the local segments into a target high-dimensional segment vector with the same dimension as the word embedding space of the base model through a trainable linear transformation layer; the linear embedding layer is an entity component with a weight matrix and a bias term.
[0046] In some specific embodiments, the semantic fusion module 12 includes: The weight allocation unit is used to determine the semantic similarity between the target high-dimensional fragment vector and multiple semantically related text prototypes, and to assign corresponding weights to each text prototype according to the semantic similarity. The semantic fusion unit is used to perform weighted semantic fusion between the target high-dimensional fragment vector and the corresponding text prototype based on the weights corresponding to the text prototype, so as to obtain the textual representation vector corresponding to the target high-dimensional fragment vector.
[0047] In some specific embodiments, the semantic fusion module 12 further includes: The first data splicing unit is used to splice each of the text-based representation vectors according to the chronological order of the corresponding local segments in the original time series data to obtain a text-based representation vector sequence. In some specific embodiments, the vector splicing module 13 includes: The prompt word construction unit is used to construct prompt word information and convert the prompt word information into prompt word vectors through the word embedding layer built into the base model; The second data concatenation unit is used to concatenate the prompt word vector before the text-based representation vector sequence to obtain the target input sequence corresponding to the original time series data.
[0048] In some specific embodiments, the root cause tracing module 14 includes: An input unit is used to input the target input sequence into the pre-trained and parameter-frozen base model, so that the base model outputs a deep semantic representation sequence corresponding to the target input sequence; the deep semantic representation sequence includes a redundant sequence corresponding to the prompt word vector and a valid sequence corresponding to the text-based representation vector sequence; A data extraction unit is used to extract the effective sequence from the deep semantic representation sequence and use the effective sequence as a fault feature vector sequence. The confidence determination unit is used to flatten the fault feature vector sequence into a one-dimensional feature vector, and map the one-dimensional feature vector into an unnormalized confidence score corresponding to different fault categories through a trainable fully connected layer. The fault diagnosis unit is used to normalize the confidence scores to obtain the occurrence probability of various faults, and to determine the root cause tracing result corresponding to the original time series data based on the occurrence probability of various faults.
[0049] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0050] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the compressor root cause tracing method based on a cross-modal base model disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0051] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0052] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0053] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the compressor root cause tracing method based on a cross-modal base model, which is executed by the electronic device 20 according to any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0054] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned compressor root cause tracing method based on a cross-modal pedestal model. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0055] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0056] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0057] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0058] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only 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.
[0059] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A compressor root cause tracing method based on a cross-modal base model, characterized in that, include: The original time series data obtained from the natural gas electric centrifugal compressor is acquired, the original time series data is segmented into continuous local segments, and the local segments are mapped into target high-dimensional segment vectors through a linear embedding layer. The target high-dimensional fragment vector is input into a pre-constructed cross-modal alignment module; the cross-modal alignment module includes learnable text prototypes, which are semantic vectors derived from the word embedding space of the base model; wherein, the cross-modal alignment module uses a cross-attention mechanism to semantically fuse the target high-dimensional fragment vector and multiple semantically related text prototypes to obtain the textual representation vector corresponding to the target high-dimensional fragment vector. Construct prompt word information and convert the prompt word information into prompt word vectors. Concatenate the prompt word vectors as prefixes with each of the text-based representation vectors to obtain the target input sequence corresponding to the original time series data. The prompt word information includes dataset context, task instructions, and feature information extracted from the original time series data to clarify the data source and application scenario. The target input sequence is input into the pre-trained and parameter-frozen pedestal model to perform root cause analysis, thereby obtaining the root cause analysis results corresponding to the original time series data.
2. The compressor root cause tracing method based on a cross-modal base model according to claim 1, characterized in that, The cross-modal alignment module also includes a text prototype generation unit; the text prototype generation unit selects semantic vectors corresponding to target words related to fault diagnosis of natural gas electric centrifugal compressors from the word embedding space of the base model; Specifically, the target vocabulary is converted into corresponding semantic vectors through the word embedding layer built into the base model.
3. The compressor root cause tracing method based on a cross-modal base model according to claim 1, characterized in that, The process of acquiring raw time-series data based on a natural gas electric centrifugal compressor, segmenting the raw time-series data into continuous local segments, and mapping the local segments into target high-dimensional segment vectors through a linear embedding layer includes: The raw time series data obtained from the natural gas electric centrifugal compressor is acquired, and the raw time series data is standardized to obtain the target time series data. The target time series data is segmented using a sliding window of preset length to obtain several continuous local segments; Each local segment is mapped to a target high-dimensional segment vector with the same dimension as the word embedding space of the base model through a trainable linear transformation layer; the linear embedding layer is an entity component with a weight matrix and a bias term.
4. The compressor root cause tracing method based on a cross-modal base model according to claim 1, characterized in that, The step of semantically fusing the target high-dimensional fragment vector with multiple semantically related text prototypes to obtain the textual representation vector corresponding to the target high-dimensional fragment vector includes: Determine the semantic similarity between the target high-dimensional fragment vector and multiple semantically related text prototypes, and assign corresponding weights to each text prototype based on the semantic similarity; Based on the weights corresponding to the text prototypes, the target high-dimensional fragment vector is semantically fused with the corresponding text prototypes to obtain the textual representation vector corresponding to the target high-dimensional fragment vector.
5. The compressor root cause tracing method based on a cross-modal base model according to claim 1, characterized in that, After obtaining the textual representation vector corresponding to the target high-dimensional fragment vector, the process further includes: The textual representation vectors are concatenated according to the chronological order of their corresponding local segments in the original time series data to obtain a textual representation vector sequence. Accordingly, the step of constructing prompt word information and converting the prompt word information into prompt word vectors, and concatenating the prompt word vectors as prefixes with each of the textual representation vectors to obtain the target input sequence corresponding to the original time series data, includes: Construct prompt word information, and convert the prompt word information into prompt word vectors through the word embedding layer built into the base model; The prompt word vector is concatenated before the text-based representation vector sequence to obtain the target input sequence corresponding to the original time series data.
6. The compressor root cause tracing method based on a cross-modal base model according to claim 5, characterized in that, The step of inputting the target input sequence into the pre-trained and parameter-frozen base model for root cause analysis to obtain the root cause analysis results corresponding to the original time series data includes: The target input sequence is input into the pre-trained and parameter-frozen base model so that the base model outputs a deep semantic representation sequence corresponding to the target input sequence; the deep semantic representation sequence includes a redundant sequence corresponding to the prompt word vector and a valid sequence corresponding to the text-based representation vector sequence; Extract the effective sequence from the deep semantic representation sequence and use the effective sequence as the fault feature vector sequence; The fault feature vector sequence is flattened into a one-dimensional feature vector, and the one-dimensional feature vector is mapped to an unnormalized confidence score corresponding to different fault categories through a trainable fully connected layer. The confidence scores are normalized to obtain the probability of occurrence of various types of faults, and the root cause tracing results corresponding to the original time series data are determined based on the probability of occurrence of various types of faults.
7. A compressor root cause tracing device based on a cross-modal base model, characterized in that, include: The data acquisition module is used to acquire raw time series data based on a natural gas electric centrifugal compressor, segment the raw time series data into continuous local segments, and map the local segments into target high-dimensional segment vectors through a linear embedding layer. A semantic fusion module is used to input the target high-dimensional fragment vector into a pre-constructed cross-modal alignment module; the cross-modal alignment module includes learnable text prototypes, which are semantic vectors derived from the word embedding space of the base model; wherein, the cross-modal alignment module uses a cross-attention mechanism to semantically fuse the target high-dimensional fragment vector and multiple semantically related text prototypes to obtain a textual representation vector corresponding to the target high-dimensional fragment vector; The vector concatenation module is used to construct prompt word information and convert the prompt word information into prompt word vectors. The prompt word vectors are used as prefixes to concatenate with each of the text-based representation vectors to obtain the target input sequence corresponding to the original time series data. The prompt word information includes dataset context, task instructions, and feature information extracted from the original time series data to clarify the data source and application scenario. The root cause tracing module is used to input the target input sequence into the pre-trained and parameter-frozen base model to perform root cause tracing and obtain the root cause tracing result corresponding to the original time series data.
8. The compressor root cause tracing device based on a cross-modal base model according to claim 7, characterized in that, The data acquisition module includes: The data processing unit is used to acquire raw time series data based on a natural gas electric centrifugal compressor, and to standardize the raw time series data to obtain target time series data. The data segmentation unit is used to segment the target time series data using a sliding window of preset length to obtain several continuous local segments; The data mapping unit is used to map each of the local segments into a target high-dimensional segment vector with the same dimension as the word embedding space of the base model through a trainable linear transformation layer; the linear embedding layer is an entity component with a weight matrix and a bias term.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the compressor root cause tracing method based on a cross-modal pedestal model as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the compressor root cause tracing method based on a cross-modal pedestal model as described in any one of claims 1 to 6.