A composite fault detection and diagnosis system and method based on cloud-edge-end collaborative AI agent

By combining cloud-edge-device collaborative AI agents with large language models and distributed Transformer models, the generality and interactivity issues of traditional fault detection methods in system-level complex fault diagnosis are solved. This achieves efficient system-level fault detection and diagnosis, generates comprehensive reports including root cause analysis, and improves generalization ability and diagnostic performance.

CN121143288BActive Publication Date: 2026-07-24HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2025-09-30
Publication Date
2026-07-24

Smart Images

  • Figure CN121143288B_ABST
    Figure CN121143288B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of intelligent fault diagnosis, and particularly discloses a composite fault detection and diagnosis system and method based on cloud-edge-end collaborative AI agents, which comprises a terminal sensing layer, an edge operation layer and a cloud brain layer, wherein the sensing module of the terminal layer collects multi-source industrial signals and pre-processes them; the edge layer is embedded with an innovatively designed distributed collaborative Transformer for multi-subsystem feature extraction and reduction of signal interference between subsystems; and the cloud layer takes a large language model as the core and undertakes reasoning and decision-making, task scheduling and man-machine interaction functions. The application can dynamically adapt to various tasks such as fault detection, diagnosis and man-machine interaction, improve the generalization ability for unseen composite fault combinations, reduce communication costs, and simultaneously output a comprehensive diagnosis report containing causal analysis, risk classification and maintenance suggestions, and is suitable for system-level composite fault detection and diagnosis of complex mechanical systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent fault diagnosis, and more specifically, relates to a composite fault detection and diagnosis system and method based on a cloud-edge-end collaborative AI intelligent agent. Background Art

[0002] In the field of intelligent manufacturing, fault detection and diagnosis (FDD) is a key task to ensure the safe and reliable operation of systems. With the continuous increase in the scale and complexity of mechanical systems, composite fault detection and diagnosis (CFDD) involving multiple subsystems has become an inevitable requirement. Traditional fault detection and diagnosis methods have many limitations: (1) Lack of generality and interactivity: Existing research is mostly limited to the design of feature extraction strategies and neural network models, which can only provide quantitative indicators of fault probabilities and cannot generate comprehensive reports containing causal analysis, risk grading, and actionable suggestions. In addition, these solutions are usually targeted at single scenarios and preset processes, and their static architectures and manual deployment methods hinder seamless interaction with users, other systems, or dynamic environments. With the growing demand for dynamic cross-domain generality and human-machine collaborative intelligence in industrial applications, the inefficiency and even inapplicability of traditional paradigms have become increasingly prominent.

[0003] (2) Limited to component-level FDD: Most existing research focuses on single components (such as bearings, gears) in the laboratory. In system-level signals involving multiple heterogeneous sub-components, there are more serious feature coupling and interference, which exacerbates the overfitting risk of deep learning models. At the same time, since it is difficult to obtain all label combinations during the training phase, the generalization scenario for unseen composite fault combinations is inevitable, which poses higher requirements for the generalization performance of zero-shot diagnosis.

[0004] In recent years, large language models (LLMs) have received extensive attention due to their powerful logical reasoning, content generation, and human-machine interaction capabilities, providing potential possibilities for solving the above problems. Existing research has attempted to apply LLMs to the field of fault diagnosis, such as a fault diagnosis reasoning framework enhanced by a knowledge graph, a health management framework that uses an LLM to unify bearing-related tasks, etc. However, most of these studies focus on language dialogues based on knowledge graph retrieval or improve the performance of multi-modal feature extraction networks by introducing images and texts, and have not fully solved the core challenges of weak generalization ability, multi-subsystem signal interference, and insufficient human-machine interaction in system-level composite fault diagnosis.

[0005] Therefore, there is an urgent need for a detection and diagnosis method that can integrate the generalization perception and human-machine interaction capabilities of LLMs with the deterministic reasoning capabilities of traditional intelligent fault diagnosis models and is applicable to system-level composite faults. Summary of the Invention

[0006] In view of the above deficiencies or improvement requirements of the prior art, the present invention provides a composite fault detection and diagnosis system and method based on a cloud-edge-end collaborative AI intelligent agent, aiming to achieve system-level composite fault diagnosis and detection.

[0007] To achieve the above object, according to the first aspect of the present invention, a composite fault detection and diagnosis method is proposed, including the following steps: Preprocess the industrial signals of each subsystem of the mechanical system to obtain structured signals; The large language model analyzes the text instructions based on the pre-set prompts to obtain key information, and then retrieves from the domain professional knowledge base based on the key information to obtain precise instructions; the pre-set prompts are pre-set output rule prompts, and the text instructions are instructions input by the user regarding fault detection requirements; Call the neural network model that meets the requirements according to the precise instructions, and based on the structured signals, obtain the fault prediction results through the neural network model; The large language model integrates the fault prediction results, the domain professional knowledge base and the historical detection results to obtain the composite fault detection and diagnosis results.

[0008] As a further preference, the composite fault detection and diagnosis includes anomaly detection and fault diagnosis. Anomaly detection refers to judging whether there is an anomaly in the mechanical system, and fault diagnosis refers to judging the specific location of the mechanical system fault; call the corresponding neural network model according to the precise instructions for anomaly detection and / or fault diagnosis.

[0009] As a further preference, when performing fault diagnosis, the neural network model adopts a distributed collaborative Transformer model, which includes a unified convolutional patch interface, a fusion perception module, an internal-external position encoding module, a pruning structure and sub-networks, where: The unified convolutional patch interface is used to convert the industrial signals of each subsystem into unified dimension patch features, and each subsystem industrial signal corresponds to N patch features divided by time series; The fusion perception module is used to associate the patch features corresponding to the industrial signals of different sub-systems to obtain N associated patch features; The internal-external position encoding module is used to add position information to the associated patch features; The pruning structure is used to screen key associated patch features from the associated patch features; The sub-network is used to obtain the probabilities of various types of faults of the subsystem according to the key associated patch features and the patch features corresponding to the subsystem industrial signals; combine the fault probability results of each subsystem corresponding to several sub-networks to determine the specific location of the mechanical system fault and achieve fault detection.

[0010] As a further preference, the fusion perception module extracts the associations between patch features based on dilated convolution to obtain associated patch features; the pruning structure calculates the weights of the associated patch features through a multi-head attention mechanism and retains the Top-K associated patch features as the key associated patch features.

[0011] As a further preference, the sub-network continues the Transformer encoder structure, and each sub-network independently outputs the prediction results of the corresponding subsystem based on a multi-label classifier; when training the distributed collaborative Transformer model, the mean of the loss functions of each sub-network is used as the overall training loss function.

[0012] As a further preference, a batch decision-making strategy is adopted to process the fault prediction results, and then the processed prediction results are input into the large language model.

[0013] As a further preference, the domain professional knowledge base includes task types, diagnostic objects, signal sources, and model parameter information, and is stored in JSON format; the preamble prompt includes role definitions and a JSON-based structured language protocol, which are used to constrain the large language model to generate key information that conforms to the specifications.

[0014] According to the second aspect of the present invention, there is provided a composite fault detection and diagnosis system based on a cloud-edge-end collaborative AI intelligent agent for implementing the above composite fault detection and diagnosis method, including a perception module, an API toolset, an operation module, a brain module, a domain professional knowledge base, and a preamble prompt. The perception module and the API toolset are deployed at the terminal layer, the operation module is deployed at the edge layer, and the brain module, the domain professional knowledge base, and the preamble prompt are deployed in the cloud; wherein: The perception module is used to obtain industrial signals and text instructions input by users; The API toolset is used to preprocess industrial signals to obtain structured signals; The operation module includes several pre-trained neural network models for fault prediction based on structured signals; The brain module includes a large language model, which is used to parse text instructions to obtain key information, and retrieve from the domain professional knowledge base based on the key information to obtain precise instructions to guide the operation of the operation module; and is used to integrate fault prediction results, the domain professional knowledge base, and historical detection results to obtain fault detection results; The preamble prompt is used to constrain the large language model to generate key information that conforms to the rules.

[0015] As a further preference, during data transmission, the terminal layer to the edge layer uses a 1Mbps bandwidth for transmission and adds a 10% data encapsulation overhead, and the edge layer to the cloud uses a 0.5Mbps bandwidth for transmission and adds a 15% data encapsulation overhead.

[0016] According to the third aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned composite fault detection and diagnosis method is implemented.

[0017] Generally speaking, compared with the prior art by the above technical solution conceived by the present invention, the following technical advantages are mainly possessed: 1. The present invention integrates the interactive cognitive intelligence of the large language model LLM and the deterministic reasoning ability of the traditional diagnostic model, solves the problem that the traditional static fault detection and diagnosis is limited to the component level and lacks generality and interactivity, can realize system-level composite fault diagnosis, and can generate a comprehensive report including root cause analysis and maintenance suggestions, rather than only outputting quantitative probability indicators, breaking through the limitations of the traditional paradigm, and is applicable to system-level composite fault detection and diagnosis of complex mechanical systems (such as systems containing multiple components such as motors, gears, and axle boxes).

[0018] 2. The present invention can simultaneously realize anomaly detection and fault diagnosis, and designs a distributed collaborative Transformer model for optimizing fault diagnosis. Its distributed architecture and multi-module design effectively reduce cross-subsystem signal interference, and can improve the generalization ability for unseen composite fault combinations; further combined with the batch decision strategy, the false alarm rate caused by limited single-window information is reduced, and the fault diagnosis performance and generalization ability are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the overall framework of the cloud-edge-terminal collaborative AI intelligent agent in an embodiment of the present invention; Figure 2 It is a schematic diagram of the DiCoT architecture in an embodiment of the present invention; Figure 3 It is a schematic diagram of the structure of the fusion perception (FP) module in an embodiment of the present invention; Figure 4 It is a comparison diagram of the traditional static task and the dynamic task setting of the CET - AI agent in an embodiment of the present invention; Figure 5 It is a t - SNE feature visualization diagram in an embodiment of the present invention; Figure 6 It is a diagram of the batch decision result in an embodiment of the present invention; Figure 7 It is a schematic diagram of the process of the composite fault detection and diagnosis method in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] To make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0021] A composite fault detection and diagnosis system based on a cloud-edge-end collaborative AI agent (CET - AI agent) provided by an embodiment of the present invention is used for system-level composite fault detection and diagnosis (CFDD) of complex mechanical systems. Its core is to construct a three-layer collaborative architecture of "terminal-edge-cloud", which is defined in the form of a six-tuple as . As Figure 1 shown, it shows the module composition and data interaction process of the terminal layer (perception), edge layer (operation), and cloud layer (brain), including key links such as sensor data acquisition, API preprocessing, DiCoT feature extraction, LLM decision-making and report generation. Specifically as follows: (1) Terminal layer: includes a perception module and an API tool .

[0022] The perception module includes multi-source sensors (such as vibration sensors) and a human-computer interaction interface, which are used to collect multi-modal information, including industrial signals and text instructions; for example, the industrial signal is the vibration signal output by the vibration sensors at each subsystem , and the text instruction is the text of the fault diagnosis requirement input by the user , n is the number of sensors, and J is the number of text instructions.

[0023] The API tool covers functions such as standardized processing, sliding window slicing, and file dynamic reading tools, which are used to preprocess the original industrial signal and convert it into structured data suitable for subsequent neural networks , and at the same time transmit the text instruction to the cloud. Specifically:

[0024] M is the number of subsystems, and the preprocessing process satisfies the formula

[0025] where represents multi-API nesting, [ , are the signal mean and standard deviation respectively, is the unified sliding window operation.

[0026] (2) Edge layer: The core is the operation module .

[0027] Operation module It includes several pre-trained neural network models. Different neural network models are used to perform different types of tasks, specifically including anomaly detection (AD) and fault diagnosis (FD). Anomaly detection refers to judging whether there is an anomaly, and fault diagnosis refers to judging the specific location of the fault. This layer receives the preprocessed structured signal data from the terminal layer and obtains the fault prediction result; at the same time, it communicates with the cloud to obtain the diagnostic report and decision guidance, and can directly control the device or push maintenance tips to the staff.

[0028] Further, the fault diagnosis adopts the Distributed Cooperative Transformer (DiCoT) model. The DiCoT model is used to complete the feature extraction and fault analysis of multiple subsystems, and outputs the fault probability of each subsystem, reducing the signal interference across subsystems. As Figure 2 shown, DiCoT specifically includes a Unified Convolutional Patch (UCP) interface, a Fusion Perception (FP) module, an Internal-External Position Encoding (IEPC) module, a pruning structure, and sub-networks, where: 1) Unified Convolutional Patch (UCP) interface: It uses large-stride and large-kernel convolution (256, 512) operations to achieve the unification of heterogeneous inputs of multiple subsystems and feature dimension reduction, integrating the local perception advantage of the convolutional neural network and the global modeling ability of the Transformer, and converting the heterogeneous inputs of multiple subsystems into unified-dimensional patch features.

[0029] The calculation of the nth patch of the mth subsystem satisfies the formula <00...

[0030] where is the convolutional kernel weight, is the convolutional signal value, D is the number of convolutional kernels, s is the convolutional stride, and the stride is set to half of the convolutional kernel length. In the experimental scenario, the original dimension of the largest subsystem can be compressed from 512×10 to 32×64, and the data transmission volume is reduced by 60%.

[0031] 2) Fusion Perception (FP) module: It correlates the patch features corresponding to the industrial signals of different subsystems to obtain N associated patch features. As Figure 3 shown, specifically for the coupled association characteristics of multiple subsystems, a multi-scale feature extraction strategy is adopted, and the association features between UCPs are extracted based on dilated convolution. The calculation of the rth scale feature satisfies the formula: [[ID=...

[0032]

[0033] where is the length of the dilated convolutional kernel, is the width of the convolutional kernel, is the number of dilated convolutional kernels, is the number of multi-scale branches, and the dilated convolutional stride is set to 1 to reduce information loss.

[0034] 3) Internal-External Position Encoding (IEPC) and pruning structure: IEPC adds position information to the associated patch features through the formula to improve the accuracy of temporal feature modeling. The pruning structure includes layer normalization (LN), residual connection, and multi-head self-attention module (MSA). The key associated patch features are screened through the attention mechanism, and the weight calculation satisfies:

[0035]

[0036] where is the multi-head self-attention function, is the layer normalization function, is the tanh activation function, and the patch indices with the top K weights are screened to retain the key features and reduce the cross-subsystem signal interference.

[0037] 4) Sub-network: It is used to obtain the probabilities of various types of faults in the subsystem based on the key associated patch features and the patch features corresponding to the subsystem industrial signals; the sub-network corresponds to the subsystem, and the fault probabilities of each subsystem are obtained through several sub-networks, and then the specific location of the mechanical system fault is determined to achieve fault detection. Each sub-network continues the Transformer encoder structure, including layer normalization, multi-head self-attention, fully connected layer and residual structure. Each sub-network independently outputs the prediction results of the corresponding subsystem based on the multi-label classifier.

[0038] Each sub-network adopts a multi-label classifier, and the loss function of the sub-network satisfies the formula:

[0039] The DiCoT training collaborative loss satisfies the formula to ensure the collaborative reliability of the fault diagnosis results of each subsystem:

[0040] where and are the predicted value and the true label of the i-th sample of the m-th subsystem respectively, is the number of subsystem categories.

[0041] Furthermore, anomaly detection is relatively simple. A lightweight graph convolutional neural network model can be used to capture the information correlation between subsystems through the node logic between graph convolutions and quickly output the anomalies of the subsystems. The DiCoT model mentioned above can also be used for anomaly detection, but the output vector corresponds to anomaly detection, that is, the length is the number of subsystems, rather than the number of fault categories in fault diagnosis.

[0042] (3) Cloud layer: includes the brain module , domain knowledge base and prior hint (pre - prompt) .

[0043] Brain module With a large - language model (LLM, such as DeepSeeker R1 - 8B) as the core, acting as a "manager" and "summarizer", it is used for task recognition, model invocation, and generation of comprehensive diagnostic reports. Specifically, it can perform reasoning and decision - making, task scheduling, and human - machine interaction, receive text instructions and the processing results of the edge layer, and generate diagnostic - related information; Domain knowledge base Stores task elements and rules. Specifically, it is stored in JSON format, including structured information such as diagnostic objects, signal sources, model parameters, task types, etc. For example, the stored content includes {"Diagnostic Object": "Bogie", "Source": "Train", "Model": "DiCoT", "Task": "Diagnosis"}.

[0044] Prior hint Includes role definitions and JSON - based structured language protocol , standardizes the interaction logic and output format of the LLM, restricts the LLM to generate key information that meets the specifications , and the generation process satisfies the formula

[0045] Where is information splicing, is the t - th token, is the JSON syntax constraint function.

[0046] Furthermore, the agents adopt the following cooperation strategy: 1) Structured language protocol (SLP): Defines the interaction specifications between the LLM and traditional models based on the JSON format. The LLM generates key information in JSON format through the formula where It is a syntax state transition function to ensure that the output conforms to JSON syntax and guarantee the accuracy of instruction transmission.

[0047] 2) Batch decision-making mechanism: For the batch processing signals output by the edge layer , through the formula Calculate the final decision probability, reduce the uncertainty of single-window data, and reduce the false alarm rate. When there are both anomaly detection (AD) and fault diagnosis (FD) tasks at the same time, the LLM receives the prediction results of the two tasks and , and through the formula Integrate the multi-task results to generate a comprehensive report; where 、 are the readable text results of the AD and FD models respectively, is the multi-task comprehensive report.

[0048] Furthermore, during the data transmission process, the edge layer compresses the original vibration data (512×24 sampling points, corresponding to 49152 bytes) into a 20×64 feature matrix (corresponding to 5120 bytes) through the UCP interface. The terminal to the edge uses a 1Mbps bandwidth for transmission and adds a 10% data encapsulation overhead, and the edge to the cloud uses a 0.5Mbps bandwidth for transmission and adds a 15% data encapsulation overhead. Compared with traditional cloud computing, it can reduce the edge-to-cloud transmission time by 98.29%, the system response time by 88.58%, and the total transmission traffic by 89.86%.

[0049] The embodiment of the present invention also provides a composite fault diagnosis method, including the following steps: (1) Data acquisition and preprocessing: The terminal sensing module acquires industrial signals and text instructions, and the API tool standardizes and divides the industrial signals by sliding windows to obtain structured signal data , and the text instructions are transmitted to the cloud.

[0050] (2) Task recognition and instruction generation: The cloud LLM analyzes the text instructions based on the pre-set prompts to generate key information in JSON format , and according to the exact instructions retrieved and matched from the domain knowledge base 。 .

[0051] Specifically, the exact instructions are indexed from the domain knowledge base through key information (such as "anomaly detection", "fault diagnosis"), and contain many other information, such as the name of the adapted model, hyperparameters, the shape of the input and output for building the model, the address for saving the weights of the model, the probability-text mapping of the corresponding fault types, etc.

[0052] (3) Edge layer feature extraction and fault analysis: The edge layer calls the neural network model according to precise instructions. Based on structured signals, the fault prediction results are obtained through the called neural network model.

[0053] For example, when performing fault diagnosis (FD), the DiCoT model is loaded according to precise instructions, and operations such as feature extraction, position encoding, and pruning are performed on the structured signal data, and the fault probabilities of each subsystem are output.

[0054] Further, a batch decision strategy is adopted to process the prediction results, and the batch signal output satisfies the formula:

[0055] The final decision probability satisfies the following formula and is fed back to the cloud LLM:

[0056] Where is the total number of state categories, b is the number of batches, is the rounding function.

[0057] (4) The LLM integrates the decision results, knowledge base and historical diagnosis results to generate a comprehensive report and updates the stored historical diagnosis records through the following formula:

[0058] [[ID=3…]]​​​​​​​​​​​Dataset: The dataset covers component-level compound faults and system-level associated compound faults. The fault categories and labels are as follows: motors (such as broken rotor bars, bearing faults, etc., labels 3 - 5), gears (tooth breakage, wear, missing teeth, tooth collapse, etc., labels 6 - 11), axle boxes (inner ring faults, outer ring faults, rolling element faults, cage faults, etc., labels 12 - 25), and also includes normal state labels (7, 16, 21). For each system state, 500 samples are randomly sampled through a sliding window of length 512 for training. The test samples focus on unseen compound fault combinations, rather than different working conditions or source domain diagnosis scenarios of the same category, which is more in line with the actual engineering requirements.

[0061] (2)Model Training and Parameter Settings DiCoT training parameters: The Adam optimizer is used, with 20 training epochs and a learning rate of 0.001; The DiCoT hyperparameters are set as follows: the length of each sample channel is 512, the number of subsystems is 4, the number of convolutional kernels is 64, the UCP length is 32, the UCP stride is 16, the number of dilated convolutional kernels is 64, the dilated convolutional kernel length is 3, and the number of branches at different scales is 3.

[0062] Comparison model settings: Advanced models such as WDCNN, TFSCL, MSMCNN, ASFCNN, MSRCN, PathGCN, DPC - MGCN, DLLM, etc. are selected for comparison. All models use the same training data and training parameters to ensure the fairness of the experiment.

[0063] Figure 4 This is a diagram for the experiment, comparing the differences between traditional static tasks and CET-AI agent dynamic tasks, including model call logic, task type adaptation range, and output result form.

[0064] (3)Implementation Steps Data collection and preprocessing: Vibration signals of a multi-component mechanical system are collected through 24 sensors at the terminal layer, and at the same time, the text diagnosis instructions input by the user are received; The API tool is used to normalize and slice the vibration signals with a sliding window, and convert them into structured inputs ,and the text instructions are directly transmitted to the cloud LLM.

[0065] LLM task scheduling: The cloud LLM analyzes the text instructions based on prior prompts to generate key information in JSON format ,retrieves the adapted diagnostic task parameters (such as the diagnostic object is the axle box and the model DiCoT is selected) from the domain knowledge to generate a JSON instruction and sends it to the edge layer.

[0066] Edge layer feature extraction and prediction: The edge layer calls the DiCoT model according to the JSON instruction to perform UCP processing, FP feature correlation extraction, IEPC position encoding, key patch pruning, and sub-network prediction on the structured input to obtain the fault prediction probabilities of each subsystem.

[0067] Batch decision-making and report generation: The edge layer transmits the prediction probabilities to the cloud layer. The LLM uses the batch decision-making strategy to calculate the final decision result, and combines domain knowledge to generate a comprehensive report including root cause analysis of faults, result credibility assessment, and maintenance suggestions, which is fed back to the user or used for automatic device control.

[0068] Historical record storage: The LLM stores the current diagnosis results and reports in the memory to form historical diagnosis records, which support subsequent queries by users and fault trend analysis.

[0069] Figure 5 is a t-SNE feature visualization graph, which intuitively shows the focusing ability of each sub-network of DiCoT on the features of different subsystems (such as sub-network 1 focusing on motor features and sub-network 3 focusing on axle box features) and the final output sample clustering effect; Figure 6 is a batch decision result graph, which presents the prediction probability distribution of the SSM model and the batch decision mean in 100 consecutive diagnoses, verifying the effect of batch decision-making on reducing the false alarm rate.

[0070] It is easy for those skilled in the art to understand that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A composite fault detection and diagnosis method, characterized in that, Includes the following steps: The industrial signals of each subsystem of the mechanical system are preprocessed to obtain structured signals; The large language model parses text instructions based on pre-provided prompts to obtain key information, and then retrieves precise instructions from the domain knowledge base based on the key information; the pre-provided prompts are preset output rule prompts, and the text instructions are user-input instructions regarding fault detection needs; The neural network model that meets the requirements is invoked according to precise instructions, and the fault prediction result is obtained through the neural network model based on structured signals; the fault prediction result is processed by a batch decision-making strategy, and then the processed prediction result is input into the large language model. The large language model integrates fault prediction results, domain knowledge base and historical detection results to obtain composite fault detection and diagnosis results; The composite fault detection and diagnosis includes anomaly detection and fault diagnosis. Anomaly detection refers to determining whether there is an anomaly in the mechanical system, and fault diagnosis refers to determining the specific location of the fault in the mechanical system. The corresponding neural network model is invoked according to precise instructions to perform anomaly detection and / or fault diagnosis. When performing fault diagnosis, the neural network model adopts a distributed cooperative Transformer model, which includes a unified convolutional patch interface, a fusion sensing module, an inner-outer position encoding module, a pruning structure, and sub-networks, wherein: The unified convolutional patching interface is used to transform the industrial signals of each subsystem into patch features of a unified dimension. Each subsystem's industrial signal corresponds to N patch features divided according to time sequence. The fusion sensing module is used to associate the patch features corresponding to industrial signals from different subsystems to obtain N associated patch features; specifically, it extracts the association between patch features based on dilated convolution to obtain associated patch features. The internal-external location encoding module is used to add location information to the associated patch features; The pruning structure is used to filter key associated patch features from associated patch features; specifically, the weights of associated patch features are calculated through a multi-head attention mechanism, and the Top - K associated patch features are retained as key associated patch features. The sub-network is used to obtain the probability of each type of fault in the subsystem based on the key associated patch features and the patch features corresponding to the industrial signals of the subsystem; by combining the fault probability results of each subsystem obtained from several sub-networks, the specific location of the mechanical system fault is determined, thereby realizing fault detection.

2. The composite fault detection and diagnosis method as described in claim 1, characterized in that, The sub-networks continue the Transformer encoder structure, and each sub-network independently outputs the prediction results of the corresponding subsystem based on the multi-label classifier. When training the distributed collaborative Transformer model, the mean of the loss functions of each sub-network is used as the overall training loss function.

3. The composite fault detection and diagnosis method as described in claim 1 or 2, characterized in that, The domain knowledge base includes task type, diagnostic object, signal source and model parameter information, and is stored in JSON format; the pre-launch hints include role definitions and a JSON-based structured language protocol, which are used to constrain the large language model to generate key information that conforms to the specifications.

4. A composite fault detection and diagnosis system based on a cloud-edge-device collaborative AI agent for implementing the composite fault detection and diagnosis method as described in any one of claims 1-3, characterized in that, It includes a perception module, an API toolset, an operation module, a brain module, a domain knowledge base, and pre-emptive prompts. The perception module and API toolset are deployed at the terminal layer, the operation module is deployed at the edge layer, and the brain module, domain knowledge base, and pre-emptive prompts are deployed in the cloud; wherein: The sensing module is used to acquire industrial signals and text commands input by the user; The API toolset is used to preprocess industrial signals to obtain structured signals; The operation module includes several pre-trained neural network models for fault prediction based on structured signals; The brain module includes a large language model, which is used to parse text instructions to obtain key information, and retrieve precise instructions from the domain knowledge base based on the key information to guide the operation of the module; and to integrate fault prediction results, the domain knowledge base and historical detection results to obtain fault detection results. The pre-construction prompts are used to constrain the large language model to generate key information that conforms to the rules.

5. The composite fault detection and diagnosis system based on cloud-edge-device collaborative AI intelligent agent as described in claim 4, characterized in that, During data transmission, the terminal layer to the edge layer uses 1Mbps bandwidth with an additional 10% data encapsulation overhead, and the edge layer to the cloud uses 0.5Mbps bandwidth with an additional 15% data encapsulation overhead.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the composite fault detection and diagnosis method as described in any one of claims 1-3.