Industrial dual-path dynamic search enhanced diagnosis method and system
Patent Information
- Application Number
- CN202611031990.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-07-13
AI Technical Summary
[0005]鉴于此,本发明提出了一种工业双路动态检索增强诊断方法及系统,旨在解决模型无法感知设备当前的实时温度、震动等“活状态”,在处理连续时序信号时存在语义鸿沟,实际遇到故障会发生推理失败,从而提供误导性的诊断建议的问题
[0015]与现有技术相比,本发明的有益效果在于:通过将连续、高维的设备时序数据转换为与自然语言文本对齐的高维时序特征向量,打破了传统“信号到类别”诊断模式与自然语言诊断之间的语义鸿沟,并且,能够同时召回相似历史故障案例和静态文档,使诊断结果既具有物理经验依据,又具有规程文本依据。基于动态融合权重控制融合提示词中两路上下文的方式,避免传统检索增强生成仅依据文本相似度分配上下文而忽视设备安全状态,且通过极端工况上下文熔断机制,能够在设备处于危险状态时阻断用户无关或错误提问,使得大语言模型优先输出处置指导。大语言模型的推理生成不再仅依赖模型内部参数或单一的“死知识”(静态操作手册),而是将当前设备物理工况高度对齐的历史物理切片作为支撑,提升了在极端危急工况下的应急反应速度与底层逻辑的可靠性,避免了过度调用历史故障案例,保持良好的日常运维问答能力,提高了工业故障诊断的解释性、实时性、安全性和执行性,降低了大语言模型在复杂工业设备诊断场景中的幻觉和输出误导性建议的风险。
Smart Images

Figure CN122547932B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to an industrial dual-path dynamic retrieval enhanced diagnostic method and system. Background Technology
[0002] With the large-scale implementation of industrial internet technology, diagnostic methods based on signal processing and traditional machine learning are gradually being applied. Large language models, with their powerful semantic understanding, knowledge reasoning and natural language interaction capabilities, can output fault cause analysis, location conclusions and handling solutions, thereby improving the reliability of diagnostic results and the flexibility of operation and maintenance.
[0003] Existing patent CN118313417A discloses a multi-expert LoRA fine-tuning method for a large language model in industrial equipment fault diagnosis. This method utilizes a large language model to construct datasets from various formats of data in the field of industrial equipment fault diagnosis. Fault diagnosis for different types of equipment is performed by separate LoRA modules, making it possible to quickly build a large language model for industrial equipment fault diagnosis and supporting its application in this field. Because industrial fault diagnosis models follow a signal-to-category paradigm, they can only retrieve "dead knowledge" such as operation manuals and cannot perceive the "live state" of the equipment, such as real-time temperature and vibration. This results in a semantic gap when processing continuous time-series signals, leading to reasoning failures (illusions) when actually encountering faults, thus providing misleading diagnostic suggestions.
[0004] Therefore, it is necessary to design an industrial dual-path dynamic retrieval enhanced diagnostic method and system to solve the problems existing in the current technology. Summary of the Invention
[0005] In view of this, the present invention proposes an industrial dual-path dynamic retrieval enhanced diagnostic method and system, which aims to solve the problem that the model cannot perceive the current real-time temperature, vibration and other "live states" of the equipment, has a semantic gap when processing continuous time-series signals, and will fail to reason when encountering actual faults, thus providing misleading diagnostic suggestions.
[0006] This invention proposes an industrial dual-path dynamic retrieval enhanced diagnostic method, comprising: Acquire device time-series data from IoT sensors, extract data from the current time window based on a sliding window and input it into a time-to-converter encoder to determine a high-dimensional time-series feature vector. The high-dimensional time-series feature vector and the natural language question text are in the same semantic latent space. Using the high-dimensional temporal feature vector as the query condition, a search is performed in the dynamic physical state vector library to determine the first vector similarity, and a first context set is constructed based on the first vector similarity; The natural language question text is converted into a text feature vector, and a second vector similarity is determined by searching in a static semantic knowledge vector database. A second context set is then constructed based on the second vector similarity. The physical deviation score of the current time window data is obtained based on the Mahalanobis distance statistical algorithm; The physical deviation score is converted into a dynamic fusion weight based on a nonlinear mapping function. If the dynamic fusion weight is greater than the critical threshold, the second context set is blocked and a fusion prompt word is generated. If the dynamic fusion weight is equal to the critical threshold, the first context set and the second context set are proportionally allocated to determine the fusion prompt word. If the dynamic fusion weight is less than the critical threshold, the first context set is blocked and a fusion prompt word is generated. The diagnostic results and guidance strategies are determined based on the fusion prompts.
[0007] Furthermore, in determining high-dimensional temporal feature vectors, the following steps are included: The data in the current time window is normalized and then input into the time-to-converter encoder; The time-to-converter encoder is trained based on supervised contrastive learning, where fault sensor waveforms are used as anchor points, corresponding expert diagnostic text vectors are used as positive samples, and feature alignment is performed based on the InfoNCE loss function.
[0008] Furthermore, when constructing the first context set based on the first vector similarity, it includes: The dynamic physical state vector library includes several storage historical fault time-series slice vectors and corresponding maintenance texts. Based on the covariate perception algorithm, historical fault time-series slice vectors with the same operating conditions as the current device are matched, and similarity calculations are performed with the high-dimensional time-series feature vector to determine the similarity of the first vector.
[0009] Furthermore, when constructing the first context set based on the first vector similarity, it also includes: If the similarity of the first vector is greater than or equal to the corresponding similarity threshold, then the historical fault time-series slice vector and the corresponding maintenance text are constructed as the first context set.
[0010] Furthermore, when constructing the second context set based on the second vector similarity, it includes: Obtain the user's natural language question text, and convert the natural language question text into the text feature vector based on a text embedding model; The static semantic knowledge vector base includes at least document slice vectors of equipment operation manuals and safety procedures. The text feature vector and the document slice vector are similarly calculated to determine the similarity of the second vector. If the similarity of the second vector is greater than or equal to the corresponding similarity threshold, then the document slice vector is constructed into the second context set.
[0011] Furthermore, when determining the dynamic fusion weights, the following factors are considered: The anomaly scoring engine calculates the physical deviation score for the data in the current time window. The anomaly scoring engine determines the mean square error based on the autoencoder of the reconstruction error or quantifies the deviation based on the Mahalanobis distance statistical algorithm. The physical deviation score is converted into the dynamic fusion weight based on the S-shaped logic function, and the dynamic fusion weight is between 0 and 1.
[0012] Furthermore, when generating fusion prompts, the following are included: If the dynamic fusion weight is greater than the critical threshold, the extreme condition context circuit breaker mechanism is triggered to block the second context set and the natural language question text, and the fusion prompt words are generated by assembling the first context set based on the context window.
[0013] Furthermore, the generation of fusion prompts also includes: If the dynamic fusion weight is less than the critical threshold, the normal question-and-answer mode is triggered, blocking the historical time-series recall of the first context set, and the context window of the prompt word is assigned to the second context set and the natural language question text to generate fusion prompt words.
[0014] Furthermore, when determining the diagnostic results and guidance strategies based on the fusion prompt words, the method includes: inputting the fusion prompt words into a large language model and outputting the diagnostic results and guidance strategies.
[0015] Compared with existing technologies, the advantages of this invention are as follows: By converting continuous, high-dimensional device time-series data into high-dimensional time-series feature vectors aligned with natural language text, it bridges the semantic gap between the traditional "signal-to-category" diagnostic model and natural language diagnostics. Furthermore, it can simultaneously recall similar historical fault cases and static documents, ensuring that the diagnostic results are based on both physical experience and procedural text. Based on a dynamic fusion weight control approach that integrates two contexts in the fusion prompts, it avoids the problem of traditional retrieval enhancement generation relying solely on text similarity to allocate context while ignoring device safety status. Moreover, through an extreme operating condition context circuit breaker mechanism, it can block irrelevant or erroneous user queries when the device is in a dangerous state, allowing the large language model to prioritize outputting handling guidance. The reasoning generation of large language models no longer relies solely on internal model parameters or single "dead knowledge" (static operation manuals). Instead, it uses historical physical slices highly aligned with the current physical conditions of the equipment as support, improving the emergency response speed and the reliability of the underlying logic under extreme and critical conditions. This avoids excessive reliance on historical fault cases, maintains good daily operation and maintenance Q&A capabilities, and enhances the interpretability, real-time performance, security, and executability of industrial fault diagnosis. It also reduces the risk of large language models generating illusions and outputting misleading suggestions in complex industrial equipment diagnosis scenarios.
[0016] On the other hand, this application also provides an industrial dual-path dynamic retrieval enhanced diagnostic system for applying the above-mentioned industrial dual-path dynamic retrieval enhanced diagnostic method, including: The temporal feature cross-modal extraction module is configured to acquire device temporal data from IoT sensors, extract data from the current time window based on a sliding window and input it to the time-to-converter encoder to determine a high-dimensional temporal feature vector. The high-dimensional temporal feature vector and the natural language question text are in the same semantic latent space. Heterogeneous dual-path retrieval is configured to use the high-dimensional temporal feature vector as the query condition to search in the dynamic physical state vector library to determine the first vector similarity, and to construct a first context set based on the first vector similarity; The natural language question text is converted into a text feature vector, and a second vector similarity is determined by searching in a static semantic knowledge vector database. A second context set is then constructed based on the second vector similarity. The anomaly scoring engine is configured to obtain the physical deviation score of the data in the current time window based on the Mahalanobis distance statistical algorithm. The dynamic fusion module is configured to convert the physical deviation score into a dynamic fusion weight based on a nonlinear mapping function. If the dynamic fusion weight is greater than the critical threshold, the second context set is blocked and a fusion prompt word is generated. If the dynamic fusion weight is equal to the critical threshold, the first context set and the second context set are proportionally allocated to determine the fusion prompt word. If the dynamic fusion weight is less than the critical threshold, the first context set is blocked and a fusion prompt word is generated. The large language model reasoning generation module is configured to determine diagnostic results and guidance strategies based on the fused prompt words.
[0017] It is understandable that the above-mentioned industrial dual-path dynamic retrieval enhanced diagnostic method and system have the same beneficial effects, and will not be elaborated further here. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart of an industrial dual-path dynamic retrieval enhanced diagnostic method provided in an embodiment of the present invention; Figure 2 This is a functional block diagram of an industrial dual-path dynamic retrieval enhanced diagnostic system provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] See Figure 1 As shown in some embodiments of this application, an industrial dual-path dynamic retrieval enhanced diagnostic method includes: Step 1: Obtain the device time series data of IoT sensors, extract the data of the current time window based on the sliding window and input it into the time series-to-converter encoder to determine the high-dimensional time series feature vector. The high-dimensional time series feature vector and the natural language question text are in the same semantic latent space. Step 2: Using high-dimensional temporal feature vectors as query conditions, search in the dynamic physical state vector library to determine the first vector similarity, and construct the first context set based on the first vector similarity; Step 3: Convert the natural language question text into a text feature vector, and search in the static semantic knowledge vector database to determine the second vector similarity. Construct a second context set based on the second vector similarity. Step 4: Obtain the physical deviation score of the data in the current time window based on the Mahalanobis distance statistical algorithm; Step 5: Based on the nonlinear mapping function, the physical deviation score is converted into a dynamic fusion weight. If the dynamic fusion weight is greater than the critical threshold, the second context set is blocked and a fusion prompt word is generated. If the dynamic fusion weight is equal to the critical threshold, the first context set and the second context set are proportionally allocated to determine the fusion prompt word. If the dynamic fusion weight is less than the critical threshold, the first context set is blocked and a fusion prompt word is generated. Step 6: Determine the diagnostic results and guidance strategies based on the fusion prompt words.
[0023] Specifically, the method provided in this embodiment is applicable to CNC machine tools, compressors, pump stations, motors, industrial robots, key actuators on production lines, and other industrial equipment with continuous operational status monitoring requirements. These industrial devices typically generate multi-source IoT sensor data such as temperature, vibration, current, voltage, speed, pressure, flow rate, torque, and load rate during operation.
[0024] This embodiment does not simply classify time-series data by inputting it into the model, nor does it simply input user questions into a document library for question-and-answer processing. Instead, it simultaneously establishes a first path of dynamic physical experience retrieval based on the real-time physical state of the device, and a second path of static semantic knowledge retrieval based on the natural language question text. The first path of retrieval answers which type of historical fault is most similar to the current physical state of the device, while the second path of retrieval answers the user's question by explaining which standardized knowledge in the operation manual and safety procedures can be referenced. Based on this, the proportion of the two contexts in the fused prompt words and whether they are blocked are controlled by the physical deviation score. This ensures that when the large language model generates diagnostic results and guidance strategies, it not only refers to user questions and static documents but is also constrained by the real-time state of the device, thereby reducing the risk of the large language model generating misleading suggestions that are detached from physical reality.
[0025] In step 1, the equipment timing data is collected in real time by IoT sensors deployed on the industrial equipment. These IoT sensors may include vibration sensors, temperature sensors, current sensors, voltage sensors, pressure sensors, displacement sensors, speed sensors, acoustic sensors, and interfaces for acquiring operating parameters output by the equipment control system. For CNC machine tool scenarios, the equipment timing data may include spindle vibration, spindle temperature, spindle current, feed load, cutting speed, tool position, and coolant flow rate. For pump station or compressor scenarios, the equipment timing data may include inlet pressure, outlet pressure, flow rate, bearing temperature, motor current, and housing vibration.
[0026] A sliding window is used to extract data from a continuous time-series data stream. The length of the current time window can be determined based on the equipment fault evolution rate and sampling frequency. For example, for rapidly changing signals such as spindle vibration and bearing impact, the time window can be set to 5 to 30 seconds; for relatively slowly changing signals such as temperature rise and pressure climb, the time window can be set to 30 seconds to 5 minutes. Before inputting the data of the current time window into the time-to-converter encoder, the data of the current time window is normalized. Normalization is used to eliminate the differences in dimensions between different sensors, thereby enhancing the reliability of model diagnosis. The time-to-converter encoder is used to map the multivariate time-series data of the current time window into a high-dimensional time-series feature vector. The time-to-converter encoder may include a sensor channel embedding layer, a time position encoding layer, a multi-head self-attention layer, a feedforward network layer, and a pooling output layer. The sensor channel embedding layer is used to characterize the physical meaning of different sensor channels, the time position encoding layer is used to preserve the sequential relationship between different sampling points in the time-series data, and the multi-head self-attention layer is used to capture the correlation between different sensors and between different time points. For example, while the peak vibration of the equipment increases, the temperature shows a slow upward trend, and the current fluctuates periodically. The pooling output layer aggregates the time series within the current time window into a fixed-length high-dimensional time series feature vector, which serves as the query condition for the subsequent first-way retrieval.
[0027] The semantic latent space is a unified vector representation space formed through cross-modal feature alignment training. In this space, the high-dimensional temporal feature vectors corresponding to device time-series data have the same or comparable vector dimensions as the text feature vectors corresponding to natural language text. To ensure that the high-dimensional temporal feature vectors reside in the same semantic latent space as the natural language query text, the time-to-transformer encoder is trained based on supervised contrastive learning. Supervised contrastive learning utilizes historical samples with fault labels, expert diagnostic texts, and maintenance records to guide the temporal feature vectors closer to their corresponding natural language text vectors and distance them from irrelevant text vectors. Specifically, sensor waveforms of historically known faults are used as anchor samples, text vectors of corresponding expert diagnostic texts are used as positive samples, and text vectors of other fault types, irrelevant operating conditions, or mismatched maintenance texts are used as negative samples. Feature alignment is then performed based on the InfoNCE loss function. The InfoNCE loss function, also known as the information noise contrastive estimation loss function, aims to increase the similarity between temporal waveforms and expert diagnostic texts under the same fault event in the vector space, while reducing the similarity between different fault events or irrelevant texts in the vector space.
[0028] Secondly, the training samples include equipment model, operating conditions, fault occurrence time, expert diagnosis conclusions, maintenance measures, and fault verification results. If a historical sample lacks expert confirmation or the maintenance text is merely a manual annotation, it will not be used as a positive sample for supervised contrastive learning training. For samples of different severity levels within the same fault category, multiple levels such as minor anomalies, moderate anomalies, and severe anomalies can be retained, enabling the time-to-converter encoder to learn not only the fault category but also the degree of anomaly evolution. Through supervised contrastive learning training, high-dimensional continuous time-series signals can be transformed into searchable, text-alignable semantic representations, thus providing a foundation for subsequent dual-path retrieval.
[0029] In step 2, a search is performed in the dynamic physical state vector library using high-dimensional time-series feature vectors as query criteria. The dynamic physical state vector library stores historical fault time-series slice vectors and corresponding maintenance texts. Historical fault time-series slice vectors are vectors generated by slicing the equipment's time-series data during historical equipment operation when faults, anomalies, or warning events occur, and then encoding them using a time-to-converter encoder. The corresponding maintenance texts may include expert diagnostic conclusions, fault cause analysis, on-site inspection steps, replacement component information, shutdown handling suggestions, and recovery verification methods. When constructing the dynamic physical state vector library, unverified faults, anomalies, or warning events are avoided from being directly written into the vector library as historical fault experience. Verified faults, anomalies, or warning events are actual fault events confirmed through on-site inspection or maintenance verification.
[0030] The first-path retrieval does not simply calculate the similarity between high-dimensional time-series feature vectors and historical fault time-series slice vectors. Instead, it first matches historical fault time-series slice vectors with the same operating conditions as the current equipment based on a covariate-aware algorithm. Covariates are operating conditions that affect the time-series feature performance of the equipment but are not necessarily faults themselves, such as machine tool spindle speed, feed rate, machining material, real-time fan load, ambient temperature, pump inlet pressure, valve opening, and equipment operating mode. The same fault may exhibit different waveforms under different speeds, loads, or operating conditions, while different faults may have similar waveforms under certain operating conditions. If covariates are not considered and retrieval is based solely on vector distance, it may recall historical samples with inconsistent physical operating conditions, leading to the risk that although the retrieval results have similar vectors, the physical interpretation may be unreliable.
[0031] The covariate sensing algorithm first filters candidate historical slices from a dynamic physical state vector library based on the current equipment operating conditions. For example, for CNC machine tool spindle fault diagnosis, it first filters historical slices with the same or similar machining load level and equipment model. For wind turbine generators, it can first filter historical slices with similar wind speed range, power output range, operating mode, and ambient temperature. For pumping station equipment, it can first filter historical slices with similar flow rate range, inlet pressure range, and valve opening. Only after a historical slice satisfies the covariate constraints is the first vector similarity between it and the current high-dimensional time-series feature vector calculated, thereby enhancing the model's dynamic retrieval capability.
[0032] The first vector similarity can be calculated using cosine similarity or Euclidean distance. A higher first vector similarity indicates a closer similarity between the current physical state and the historical fault slice. The similarity threshold corresponding to the first vector similarity can be determined based on the similarity distribution of historical samples. Specifically, the false recall rate of historical samples is statistically analyzed, and the similarity threshold is dynamically set to ensure the false recall rate does not exceed a preset false recall ratio. Typically, the preset false recall ratio is set to 3%–10%. The lower the required false recall ratio, the higher the corresponding similarity threshold. For example, if the preset false recall ratio is 5%, then 95% is used as the similarity threshold; if the preset false recall ratio is 3%, then 97% is used as the similarity threshold. If the first vector similarity is greater than or equal to the corresponding similarity threshold, the corresponding historical fault time-series slice vector and the corresponding maintenance text are constructed as the first context set. The first context set is a data set constructed based on similarity and covariate consistency.
[0033] In step 3, the natural language query text is input by the operator through an industrial diagnostic terminal, maintenance platform, mobile terminal, or control room human-machine interface. For example, the operator might input questions such as "How to troubleshoot abnormal noise from the main shaft?", "Should the fan gearbox be shut down if the temperature is high?", "How to handle pump outlet pressure fluctuations?", or "Does the current alarm require an emergency shutdown?". The natural language query text is used to trigger the second-path static semantic retrieval, but it does not change the first-path physical retrieval logic based on the real-time status of the equipment. The text feature vector is transformed from the natural language query text using a general text embedding model (such as BERT). It should be noted that the text embedding model can preferably be implemented using existing technologies in the field, and it is not the focus of the improvement claimed in this application. Those skilled in the art can combine existing publicly available technologies or conventional engineering methods to complete the adaptation, replacement, or equivalent implementation without affecting the implementation of the technical solution of this application.
[0034] Document slices are text fragments formed by dividing equipment operation manuals, maintenance manuals, inspection procedures, safety procedures, fault code manuals, spare parts replacement guides, shutdown operation procedures, and emergency plans into chapters and paragraphs. Each document slice is converted into a document slice vector through a text embedding model and stored in a static semantic knowledge vector library. The second vector similarity is determined by the cosine similarity between the text feature vector and the document slice vector. The method for determining the similarity threshold corresponding to the second vector similarity is the same as the method for determining the similarity threshold corresponding to the first vector similarity, and will not be repeated here. If the second vector similarity is greater than or equal to the corresponding similarity threshold, the corresponding document slice is constructed into a second context set.
[0035] The first-path and second-path searches are heterogeneous and asynchronous. Heterogeneity means that the first-path search's query conditions come from real-time physical time-series data, and the search objects are historical fault time-series slices and maintenance texts; the second-path search's query conditions come from natural language query text, and the search objects are static document slices. Asynchronicity means that the first-path search can be automatically triggered by physical events or periodic monitoring without waiting for operator queries, while the second-path search can be triggered by operator queries without needing to synchronize with every physical sampling window. This avoids the limitations of single-path searches. In other words, when the operator does not enter the correct question, the first path can still recall historical fault experience based on the actual equipment status; when the equipment's physical status is normal but the operator needs to query maintenance rules, the second path can also provide standardized document support.
[0036] In step 4, the physical deviation score is used to quantify the degree to which the current equipment state deviates from the health baseline state. Unlike the first vector similarity, which is used to determine whether the current state is similar to certain historical fault cases, the physical deviation score is used to determine the current equipment state. The higher the physical deviation score, the more serious the deviation of the equipment from the normal baseline health state. When using the Mahalanobis distance statistical algorithm, a health baseline distribution is first established based on the equipment's health operation data. The health operation data should come from the time period when the equipment is in normal operating conditions, without fault alarms, and with normal maintenance records. For different operating modes, health baselines are established separately, such as the vibration, current, and temperature distributions corresponding to the equipment's no-load operation, low-load operation, and high-load operation. The Mahalanobis distance is used to measure the degree of deviation of the current physical state from the health baseline distribution. The Mahalanobis distance considers the correlation between various features and the fluctuation scale of different features. For example, under normal operating conditions, an increase in motor current may occur simultaneously with an increase in load, and the two are correlated to a certain extent. If the current increases but the load does not increase in the current window, this combination relationship may be more abnormal. The Mahalanobis distance can identify this multivariate joint anomaly and convert it into a deviation, that is, a physical deviation score.
[0037] Anomaly scoring engines can also determine the mean squared error (MSE) based on the autoencoder's reconstruction error and use the MSE as a physical deviation score. The autoencoder is trained using healthy samples, enabling it to reconstruct time-series waveforms under normal conditions. If the data in the current time window deviates from the healthy mode, the autoencoder's reconstruction error increases, indicating that the device state deviates from the normal baseline. The larger the reconstruction error, the more severe the deviation from the normal baseline healthy state.
[0038] In step 5, the dynamic fusion weights are used to control how the first and second context sets are used in the fusion prompts. The nonlinear mapping function adopts a sigmoid logic function, which is a function that maps continuous input fractions to a range between 0 and 1. Its characteristic is that it outputs parameters close to 0 in the case of low deviation and parameters close to 1 in the case of high deviation. That is to say, the dynamic fusion weights are between 0 and 1. The closer the dynamic fusion weights are to 0, the closer the physical state of the device is to a healthy state, and the more likely it is to allocate context resources to user questions and static documents. The closer the dynamic fusion weights are to 1, the more dangerous the physical state of the device, and the more likely it is to allocate context resources to the first path of physical experience retrieval results and restrict or block irrelevant user input.
[0039] The critical threshold is used to determine the context intervention mode corresponding to the dynamic fusion weight. The critical threshold is initially set to 0.5, but can be dynamically adjusted according to different devices. If the dynamic fusion weight is greater than the critical threshold, it indicates that the real-time physical state of the device is already highly dangerous, triggering the extreme condition context circuit breaker mechanism. This blocks the second context set and the natural language question text, and generates fusion prompt words based on the first context set assembled in the context window. This blocking does not mean deleting the static semantic knowledge vector library, nor does it prohibit the system from using document knowledge subsequently. Rather, it means that during the current diagnostic generation process, the second context set and the natural language question text are not sent to the fusion prompt words of the large language model. When the device is in an extremely dangerous state, user input may be delayed, erroneous, irrelevant, or incomplete. For example, the device may have experienced a rapid increase in pressure or a sharp rise in bearing temperature, but the user still enters questions such as "Can it continue to run for another hour?" or "Can the alarm be ignored?" If this question is still used as the main context, the large language model may interpret the user's question in a conventional way, thus delaying emergency response. Therefore, when the dynamic fusion weight is greater than the critical threshold, physical safety logic takes precedence over semantic intent, and the context window is forced to be used to assemble similar serious fault historical cases retrieved in the first path. In the extreme working condition context circuit breaker mode, the fusion prompt words may include the current equipment physical deviation score, dangerous state description, the historical fault case with the highest similarity in the first context set, and the corresponding emergency response text.
[0040] If the dynamic fusion weight is less than the critical threshold, the regular question-and-answer mode is triggered. This blocks the historical time-series recall of the first context set and assigns the context window of the prompt word to the second context set and the natural language question text to generate the fused prompt word. Blocking the first context set prevents the historical fault time-series recall results from being injected into the large language model as the main context when the current physical state has not reached a critical level, thus avoiding over-interpreting slight fluctuations or normal operating condition changes as faults. The regular question-and-answer mode is suitable for scenarios where the equipment state is stable or the physical deviation is low. In this case, the operator may only be querying maintenance procedures, inspection steps, or operational precautions. Using the second context set and the natural language question text as the main context allows the large language model to act as a question-and-answer assistant for the equipment manual or a query tool for operation and maintenance knowledge. In the regular question-and-answer mode, the fused prompt word may include the user's natural language question text, static document slices related to the question, document version, and applicable equipment model. Because the first context set is blocked, the large language model will not output unnecessary fault warnings due to some low-similarity historical fault samples.
[0041] If the dynamic fusion weight equals the critical threshold, then the first and second context sets are proportionally allocated, which is cross-validation. This proportional allocation can be determined based on the total capacity of the context window. Assuming the allowed context window capacity for a single input to the large language model is B, the capacity allocated to the first context set is B1, and the capacity allocated to the second context set and the natural language question text is B2, then the first and second context sets are allocated in a 1:1 ratio. In cross-validation mode, the assembly order of the fusion prompts can include: the current device physical deviation score and its status description, a summary of similar historical fault cases in the first context set, a summary of relevant operation manuals or safety procedures in the second context set, and the user's natural language question text. In cross-validation mode, the large language model needs to refer to both historical fault cases similar to the current device's physical state and operation manuals, safety procedures, or specific user questions to perform predictive inference.
[0042] In step 6, the Large Language Model (LLM) can be deployed on a local industrial server, edge computing node, or cloud platform. For industrial scenarios involving data confidentiality requirements, the LLM is deployed in a local or private environment. The LLM combines the current physical perception state of the device, historical physical experience, and static guidance rules to output the final structured diagnostic results and guidance strategies. The diagnostic results include fault cause analysis and similarity descriptions of historical cases. The guidance strategies include remedial measures, troubleshooting steps, and shutdown or load reduction suggestions. It should be noted that the LLM is preferably implemented using existing technologies in the field, and it is not the focus of the improvement claimed in this application. Those skilled in the art can combine existing disclosed technologies or conventional engineering methods to complete the adaptation, replacement, or equivalent implementation without affecting the implementation of the technical solution of this application.
[0043] In one specific embodiment, this method is applied to CNC machine tool spindle fault diagnosis. The equipment is equipped with a spindle vibration sensor, a spindle temperature sensor, a motor current acquisition interface, and a spindle speed acquisition interface. The system sets the time window to 10 seconds. Each update collects vibration, temperature, current, and speed data within 10 seconds, performs normalization processing, and inputs it to the time-to-converter encoder to obtain a high-dimensional time-series feature vector. This high-dimensional time-series feature vector is used as a query condition in the dynamic physical state vector library. First, covariate filtering is performed based on the current spindle speed range and load range. Then, the first vector similarity between the candidate historical fault slice and the current high-dimensional time-series feature vector is calculated. If the first vector similarity of a retrieved historical case is 0.95, and this historical case corresponds to "early wear of the spindle bearing; the repair measure is to stop the machine, check the bearing lubrication, and replace the worn bearing," and the first vector similarity is greater than the corresponding similarity threshold of 0.9, then this historical case and its repair text are assigned to the first context set.
[0044] Simultaneously, the operator inputs "How to troubleshoot spindle noise" into the diagnostic terminal. A text feature vector is generated using a text embedding model, and its similarity is calculated between this text feature vector and document slice vectors in a static semantic knowledge vector library. If the similarity of the second vector of a retrieved document slice vector is greater than the corresponding similarity threshold, then the document slice vector is assigned to the second context set. The anomaly scoring engine calculates Mahalanobis distance based on the data within the current 10-second window and the health benchmark distribution of the same model spindle within the same speed range. If the calculated dynamic fusion weight corresponding to the physical deviation score is 0.52 and the critical threshold is 0.50, then the extreme condition context circuit breaker mechanism is triggered, blocking the second context set and the natural language question text, and generating fusion prompt words based on the first context set assembled from the context window.
[0045] In summary, by converting continuous, high-dimensional device time-series data into high-dimensional time-series feature vectors aligned with natural language text, the semantic gap between the traditional "signal-to-category" diagnostic model and natural language diagnostics is bridged. Furthermore, it can simultaneously recall similar historical fault cases and static documents, ensuring that diagnostic results are based on both physical experience and procedural text. The dynamic fusion weight control method for the two-way context in the fusion prompts avoids the traditional retrieval enhancement generation method that only allocates context based on text similarity while ignoring the device's safety status. Moreover, through an extreme operating condition context circuit breaker mechanism, irrelevant or erroneous user questions can be blocked when the device is in a dangerous state, allowing the large language model to prioritize outputting handling guidance. The reasoning generation of large language models no longer relies solely on internal model parameters or single "dead knowledge" (static operation manuals). Instead, it uses historical physical slices highly aligned with the current physical conditions of the equipment as support, improving the emergency response speed and the reliability of the underlying logic under extreme and critical conditions. This avoids excessive reliance on historical fault cases, maintains good daily operation and maintenance Q&A capabilities, and enhances the interpretability, real-time performance, security, and executability of industrial fault diagnosis. It also reduces the risk of large language models generating illusions and outputting misleading suggestions in complex industrial equipment diagnosis scenarios.
[0046] Based on another preferred embodiment described above, see [link to preferred embodiment]. Figure 2 As shown, this embodiment provides an industrial dual-path dynamic retrieval enhanced diagnostic system for applying the above-described industrial dual-path dynamic retrieval enhanced diagnostic method, including: The temporal feature cross-modal extraction module is configured to acquire device temporal data from IoT sensors, extract data from the current time window based on a sliding window and input it into the time-to-converter encoder to determine a high-dimensional temporal feature vector. The high-dimensional temporal feature vector and the natural language question text are in the same semantic latent space. Heterogeneous dual-path retrieval is configured to use high-dimensional temporal feature vectors as query conditions to search in a dynamic physical state vector library to determine the first vector similarity, and to construct a first context set based on the first vector similarity; The natural language question text is converted into a text feature vector, and the second vector similarity is determined by searching in a static semantic knowledge vector database. A second context set is then constructed based on the second vector similarity. The anomaly scoring engine is configured to obtain the physical deviation score of the data in the current time window based on the Mahalanobis distance statistical algorithm. The dynamic fusion module is configured to convert the physical deviation score into a dynamic fusion weight based on a nonlinear mapping function. If the dynamic fusion weight is greater than the critical threshold, the second context set is blocked and a fusion prompt word is generated. If the dynamic fusion weight is equal to the critical threshold, the first context set and the second context set are proportionally allocated to determine the fusion prompt word. If the dynamic fusion weight is less than the critical threshold, the first context set is blocked and a fusion prompt word is generated. The large language model reasoning generation module is configured to determine diagnostic results and guidance strategies based on fused prompt words.
[0047] It is understandable that the above-mentioned industrial dual-path dynamic retrieval enhanced diagnostic method and system have the same beneficial effects, and will not be elaborated further here.
[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An industrial dual-path dynamic retrieval enhanced diagnostic method, characterized in that, include: Acquire device time-series data from IoT sensors, extract data from the current time window based on a sliding window and input it into a time-to-converter encoder to determine a high-dimensional time-series feature vector. The high-dimensional time-series feature vector and the natural language question text are in the same semantic latent space. Using the high-dimensional temporal feature vector as the query condition, a search is performed in the dynamic physical state vector library to determine the first vector similarity, and a first context set is constructed based on the first vector similarity; The natural language question text is converted into a text feature vector, and a second vector similarity is determined by searching in a static semantic knowledge vector database. A second context set is then constructed based on the second vector similarity. The physical deviation score of the current time window data is obtained based on the Mahalanobis distance statistical algorithm; The physical deviation score is converted into a dynamic fusion weight based on a nonlinear mapping function. If the dynamic fusion weight is greater than the critical threshold, the second context set is blocked and a fusion prompt word is generated. If the dynamic fusion weight is equal to the critical threshold, the first context set and the second context set are proportionally allocated to determine the fusion prompt word. If the dynamic fusion weight is less than the critical threshold, the first context set is blocked and a fusion prompt word is generated. Based on the fusion prompts, diagnostic results and guidance strategies are determined; When constructing the first context set based on the first vector similarity, it includes: The dynamic physical state vector library includes several storage historical fault time-series slice vectors and corresponding maintenance texts. Based on the covariate perception algorithm, historical fault time-series slice vectors with the same operating conditions as the current device are matched, and similarity calculation is performed with the high-dimensional time-series feature vector to determine the similarity of the first vector; When constructing the first context set based on the first vector similarity, the method further includes: If the similarity of the first vector is greater than or equal to the corresponding similarity threshold, then the historical fault time-series slice vector and the corresponding maintenance text are constructed as the first context set; When constructing the second context set based on the second vector similarity, it includes: Obtain the user's natural language question text, and convert the natural language question text into the text feature vector based on a text embedding model; The static semantic knowledge vector base includes at least document slice vectors of equipment operation manuals and safety procedures. The text feature vector and the document slice vector are similarly calculated to determine the similarity of the second vector. If the similarity of the second vector is greater than or equal to the corresponding similarity threshold, then the document slice vector is constructed into the second context set.
2. The industrial dual-path dynamic retrieval enhanced diagnostic method according to claim 1, characterized in that, Determining high-dimensional time series feature vectors includes: The data in the current time window is normalized and then input into the time-to-converter encoder; The time-to-converter encoder is trained based on supervised contrastive learning, where fault sensor waveforms are used as anchor points, corresponding expert diagnostic text vectors are used as positive samples, and feature alignment is performed based on the InfoNCE loss function.
3. The industrial dual-path dynamic retrieval enhanced diagnostic method according to claim 2, characterized in that, When determining dynamic fusion weights, the following are included: The anomaly scoring engine calculates the physical deviation score for the data in the current time window. The anomaly scoring engine determines the mean square error based on the autoencoder of the reconstruction error or quantifies the deviation based on the Mahalanobis distance statistical algorithm. The physical deviation score is converted into the dynamic fusion weight based on the S-shaped logic function, and the dynamic fusion weight is between 0 and 1.
4. The industrial dual-path dynamic retrieval enhanced diagnostic method according to claim 3, characterized in that, When generating fusion prompts, the following are included: If the dynamic fusion weight is greater than the critical threshold, the extreme condition context circuit breaker mechanism is triggered to block the second context set and the natural language question text, and the fusion prompt words are generated by assembling the first context set based on the context window.
5. The industrial dual-path dynamic retrieval enhanced diagnostic method according to claim 4, characterized in that, When generating fusion prompts, the following is also included: If the dynamic fusion weight is less than the critical threshold, the normal question-and-answer mode is triggered, blocking the historical time-series recall of the first context set, and the context window of the prompt word is assigned to the second context set and the natural language question text to generate fusion prompt words.
6. The industrial dual-path dynamic retrieval enhanced diagnostic method according to claim 5, characterized in that, When determining the diagnostic results and guidance strategies based on the fusion prompt words, the process includes: inputting the fusion prompt words into a large language model and outputting the diagnostic results and guidance strategies.
7. An industrial dual-path dynamic retrieval enhanced diagnostic system, used to apply the industrial dual-path dynamic retrieval enhanced diagnostic method as described in any one of claims 1-6, characterized in that, include: The temporal feature cross-modal extraction module is configured to acquire device temporal data from IoT sensors, extract data from the current time window based on a sliding window and input it into the time-to-converter encoder to determine a high-dimensional temporal feature vector. The high-dimensional temporal feature vector and the natural language question text are in the same semantic latent space. Heterogeneous dual-path retrieval is configured to use the high-dimensional temporal feature vector as the query condition to search in the dynamic physical state vector library to determine the first vector similarity, and to construct a first context set based on the first vector similarity; The natural language question text is converted into a text feature vector, and a second vector similarity is determined by searching in a static semantic knowledge vector database. A second context set is then constructed based on the second vector similarity. The anomaly scoring engine is configured to obtain the physical deviation score of the data in the current time window based on the Mahalanobis distance statistical algorithm. The dynamic fusion module is configured to convert the physical deviation score into a dynamic fusion weight based on a nonlinear mapping function. If the dynamic fusion weight is greater than the critical threshold, the second context set is blocked and a fusion prompt word is generated. If the dynamic fusion weight is equal to the critical threshold, the first context set and the second context set are proportionally allocated to determine the fusion prompt word. If the dynamic fusion weight is less than the critical threshold, the first context set is blocked and a fusion prompt word is generated. The large language model reasoning generation module is configured to determine diagnostic results and guidance strategies based on the fused prompt words.
Citation Information
Patent Citations
Industrial knowledge injection method based on retrieval enhancement generation
CN122309748A
Intelligent heat supply full-dimensional perception and decision-making auxiliary system and method based on large model
CN122347218A