A method for industrial knowledge injection based on search augmentation generation
By constructing a correlation mapping between a temporal causal knowledge graph and document retrieval results, the problem of disconnect between industrial knowledge retrieval and real-time temporal status is solved, generating fault analysis and prediction suggestions containing temporal logic, thereby improving the accuracy and adaptability of industrial decision support systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WEIMEI TIANCHENG TECH BEIJING CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-30
Smart Images

Figure CN122309748A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial knowledge technology, and more specifically, relates to a method for injecting industrial knowledge based on retrieval enhancement generation. Background Technology
[0002] In the field of industrial intelligent decision-making, traditional retrieval-enhanced generation methods primarily rely on static document libraries for knowledge retrieval. Relevant documents are returned through semantic similarity matching and then input into the generative model to generate answers. When dealing with industrial process problems, these methods separate document retrieval from time-series data analysis, performing matching only at the textual semantic level and failing to connect the current system's real-time operating status and historical evolution path. In industrial scenarios, fault diagnosis and parameter optimization often require comprehensive analysis combining the current equipment state, parameter change trends, and historical causal relationships. Simple document retrieval cannot provide a temporal dimension for reasoning. In other words, existing technologies suffer from a lack of effective integration mechanisms between retrieved static knowledge and dynamic temporal states, resulting in generated answers that fail to accurately reflect the temporal causal logic of industrial processes. Summary of the Invention
[0003] In view of this, the present invention provides a method for injecting industrial knowledge based on retrieval enhancement, which can solve the technical problem in the prior art where industrial knowledge retrieval is disconnected from real-time temporal state, resulting in the generated answer lacking temporal causal reasoning ability.
[0004] This invention is implemented as follows: It provides a method for injecting industrial knowledge based on retrieval enhancement, including collecting multi-source heterogeneous data from industrial processes and performing timestamp alignment to establish a time-series data stream matrix; performing Granger causality tests on each monitored variable in the time-series data stream matrix to calculate the causal strength between variables and establishing directed causal edges to form a time-series causal knowledge graph; establishing an industrial knowledge document library and performing structured processing on the documents to extract semantic feature vectors and keyword feature vectors to establish a hybrid index structure; receiving industrial problem query input and performing query expansion processing to extract system state features from the time-series data stream matrix and fuse them with query text features to generate a time-series-aware query vector; performing semantic rewriting to generate an expanded query expression; and using the expanded query expression to perform hybrid detection in the hybrid index structure. The candidate document set obtained by the search operation is weighted and fused, and then input into the cross-coding and reordering module to obtain the finely ranked document sequence. The finely ranked document sequence is associated and mapped with the temporal causal knowledge graph to extract causal relationship chains and retrieve the corresponding event evolution paths. The node state change sequence is converted into temporal reasoning evidence and fused with the static knowledge in the finely ranked document sequence to generate a temporal enhanced knowledge representation. The temporal enhanced knowledge representation and the industrial problem query are input into the temporal knowledge enhancement model to generate the answer text. The quality of the answer text is evaluated. When the quality score is lower than the preset quality threshold, a re-retrieval mechanism is triggered. The answer text, the finely ranked document sequence, and the temporal reasoning evidence are combined to form a knowledge injection result, which is injected into the industrial decision support system. The knowledge injection result is stored in the feedback database for continuous optimization of the temporal knowledge enhancement model.
[0005] The multi-source heterogeneous data includes sensor time-series data, equipment operation logs, fault alarm records, and process parameter change sequences. Each row of the time-series data stream matrix corresponds to a time slice, and each column corresponds to a monitoring variable.
[0006] The Granger causality test involves obtaining the causal strength value by normalizing the mutual information within the lag time window, establishing directed causal edges for variable pairs whose causal strength values exceed a dynamic threshold, and adaptively adjusting the dynamic threshold based on the current working condition type and the stability of historical causal relationships. The time-series causal knowledge graph includes node attributes, edge weights, and timestamps.
[0007] The calculation steps for the causal strength value are as follows: for variables X and Y in the variable pair, select the lag order p, establish an autoregressive model of variable Y with respect to its own lagged terms, calculate the residual sum of squares, establish an extended regression model of variable Y with respect to its own lagged terms and the lagged terms of variable X, calculate the residual sum of squares, calculate the F statistic and normalize it to the interval between zero and one as the causal strength value.
[0008] The adaptive adjustment step of the dynamic threshold involves dividing the industrial process into three categories: steady-state operation, transitional operation, and fault operation. For each category, a historical causal relationship database is established, the distribution of causal intensity values is statistically analyzed, and quantiles are calculated as the baseline threshold. The corresponding baseline threshold is selected according to the current operation type, the stability index of the causal relationship identified in the most recent time window is calculated, and the baseline threshold is multiplied by the stability adjustment coefficient to obtain the dynamic threshold.
[0009] Specifically, the structured processing steps involve encoding the semantic feature vector using a domain-pretrained language model, extracting the keyword feature vector using the term frequency inverse document frequency method, and storing the semantic feature vector and keyword feature vector in dense vector index and sparse inverted index, respectively.
[0010] Specifically, the query expansion process involves extracting system state features from the time-series data stream matrix for the N time steps prior to the current moment. The N time steps are determined based on the response lag characteristics of different processes. The system state features are then fused with the query text features to generate a time-series-aware query vector, and the expanded query expression includes causal relationship keywords.
[0011] The system state feature extraction step involves extracting the data submatrix of the N time steps before the current moment from the time-series data stream matrix, dividing the data submatrix into sliding window segments, calculating statistical features for each segment including mean, variance, rate of change, and trend coefficient, concatenating the statistical features of each segment to form a time-series feature vector, using an attention mechanism to calculate the importance weights of each component of the time-series feature vector, performing weighted summation, and concatenating or adding element-wise with the query text features to generate a time-series-aware query vector.
[0012] The hybrid retrieval operation involves the following steps: using extended query expressions to perform semantic similarity retrieval in a dense vector index to obtain a first candidate document set; using extended query expressions to perform keyword matching retrieval in a sparse inverted index to obtain a second candidate document set; and then performing weighted fusion of the first and second candidate document sets to obtain a preliminary retrieval result set. The weight coefficients for the weighted fusion are dynamically generated by a time-series knowledge enhancement model.
[0013] After obtaining the preliminary search result set, the preliminary search result set is input into the cross-coding and re-ranking module. The cross-coding and re-ranking module calculates the deep semantic matching score between the extended query expression and the document, and sorts the documents in descending order according to the deep semantic matching score to obtain the finely ranked document sequence.
[0014] Specifically, the association mapping step involves mapping the finely ranked document sequence to the temporal causal knowledge graph to extract the causal relationship chains involved in the finely ranked document sequence, retrieving the corresponding event evolution path from the temporal causal knowledge graph, the event evolution path containing the time sequence and impact intensity of fault propagation, and converting the node state change sequence in the event evolution path into temporal reasoning evidence.
[0015] The structure of the temporal knowledge enhancement model is as follows: the input layer receives temporal enhanced knowledge representation and industrial problem query input, and the encoder adopts a spiral progressive network structure, which contains M spiral layers. Each spiral layer contains a local perceptual sublayer and an extended perceptual sublayer. The local perceptual sublayer extracts local features through one-dimensional convolution with a kernel size of three, and the extended perceptual sublayer expands the receptive field layer by layer through dilated convolution. The decoder adopts an autoregressive generative architecture to output the answer text.
[0016] The encoder part adopts a co-evolutionary network structure, which contains K parallel sub-networks. Each sub-network has a different number of attention heads and hidden layer dimensions. Each sub-network independently processes the input of the encoder part. A competitive gating mechanism is set after each spiral layer. The competitive gating mechanism assigns weights according to the feature activation intensity of the output of each sub-network. At the same time, a cooperative fusion mechanism is set to realize information exchange between sub-networks through cross-attention modules.
[0017] The quality assessment steps specifically involve calculating the factual consistency score between the response text and the refined document sequence, the temporal logical rationality score of the response text, and the domain terminology accuracy score of the response text. The factual consistency score is calculated using a textual implication model, the temporal logical rationality score is assessed based on the completeness of the causal chain and the correctness of the chronological order, and the domain terminology accuracy score is verified through matching with a professional terminology database.
[0018] The response text includes fault cause analysis, parameter change prediction, and operation suggestions. The industrial decision support system locates the source of the anomaly based on the fault cause analysis in the response text, adjusts the control strategy based on the parameter change prediction in the response text, and generates execution instructions based on the operation suggestions in the response text.
[0019] The continuous optimization steps involve storing the knowledge injection results and their corresponding industrial problem query inputs, fine-ranked document sequences, and event evolution paths in the feedback database. When the accumulated data in the feedback database reaches the update trigger threshold, the incremental training process of the model is initiated. The parameters of the model are enhanced by updating the time-series knowledge using high-quality question answers from the feedback database, while the adjustment strategies for dynamic thresholds and weight coefficients are updated.
[0020] This invention achieves a deep fusion of static knowledge and dynamic temporal states by constructing a temporal causal knowledge graph and mapping it to document retrieval results. Specifically, during the query expansion stage, system state features are introduced to generate temporally aware query vectors. After the retrieval results are refined, corresponding event evolution paths are extracted from the temporal causal knowledge graph, and the node state change sequences are converted into temporal reasoning evidence. This evidence is then fused with static document knowledge to form a temporally enhanced knowledge representation, enabling the generative model to simultaneously utilize experiential knowledge from documents and causal evolution information from the temporal graph for reasoning. This fusion mechanism allows the model to not only rely on document descriptions when answering industrial questions but also combine the historical evolution trajectory and causal propagation path of the current system state to generate fault analysis and prediction suggestions containing temporal logic. In summary, this invention solves the technical problem mentioned in the background art where the disconnect between industrial knowledge retrieval and real-time temporal states leads to a lack of temporal causal reasoning capabilities in the generated answers. Attached Figure Description
[0021] Figure 1 This is a flowchart of the method of the present invention.
[0022] Figure 2 This is a distribution chart of document matching scores for the hybrid search results in the embodiment.
[0023] Figure 3 This is a time range diagram of the receptive field coverage of different layers of the spiral progressive network in the embodiment.
[0024] Figure 4 This is a dynamic change diagram of the activation intensity of the subnetworks in the co-evolutionary network in the embodiment. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0026] like Figure 1 The diagram shown is a flowchart of a method for injecting industrial knowledge based on retrieval enhancement provided by the present invention. This method includes the following steps: S01. Collect multi-source heterogeneous data from the industrial process. The multi-source heterogeneous data includes sensor time-series data, equipment operation logs, fault alarm records, and process parameter change sequences. Perform timestamp alignment processing on the multi-source heterogeneous data to establish a time-series data stream matrix. Each row of the time-series data stream matrix corresponds to a time slice, and each column corresponds to a monitoring variable. S02. Construct a time-series causal knowledge graph. Perform Granger causality tests on each monitored variable in the time-series data stream matrix, calculate the causal strength value between variables, and obtain the causal strength value by normalizing the mutual information within the lag time window. Establish directed causal edges for variable pairs whose causal strength values exceed the dynamic threshold. The dynamic threshold is adaptively adjusted according to the current working condition type and the stability of historical causal relationships, forming a time-series causal knowledge graph containing node attributes, edge weights, and timestamps. S03. Establish an industrial knowledge document library, perform structured processing on the documents in the industrial knowledge document library, extract the semantic feature vector and keyword feature vector of the documents, the semantic feature vector is obtained by encoding through a domain pre-trained language model, and the keyword feature vector is extracted by the term frequency inverse document frequency method, and the semantic feature vector and keyword feature vector are stored in dense vector index and sparse inverted index respectively to establish a hybrid index structure; S04. Receive industrial problem query input, perform query expansion processing on the industrial problem query input, extract system state features of the previous N time steps from the time series data stream matrix, the N time steps are determined according to the response lag characteristics of different processes, fuse the system state features with query text features to generate a time series-aware query vector, perform semantic rewriting on the time series-aware query vector to generate an expanded query expression, the expanded query expression contains causal relationship keywords; S05. Perform a hybrid retrieval operation. Use the extended query expression to perform semantic similarity retrieval in the dense vector index to obtain a first candidate document set. Use the extended query expression to perform keyword matching retrieval in the sparse inverted index to obtain a second candidate document set. Perform a weighted fusion of the first candidate document set and the second candidate document set. The weight coefficients of the weighted fusion are dynamically generated through a time-series knowledge enhancement model to obtain a preliminary retrieval result set. Input the preliminary retrieval result set into the cross-coding re-ranking module. The cross-coding re-ranking module calculates the deep semantic matching score between the extended query expression and the documents. Sort the documents in descending order according to the deep semantic matching score to obtain a finely ranked document sequence. S06. Associate and map the finely ranked document sequence with the temporal causal knowledge graph, extract the causal relationship chains involved in the finely ranked document sequence, retrieve the corresponding event evolution path from the temporal causal knowledge graph, the event evolution path includes the time sequence and impact intensity of fault propagation, convert the node state change sequence in the event evolution path into temporal reasoning evidence, and fuse the temporal reasoning evidence with the static knowledge in the finely ranked document sequence to generate a temporal enhanced knowledge representation; S07. Input the time-series enhanced knowledge representation and the industrial problem query input into the time-series knowledge enhancement model. The time-series knowledge enhancement model encodes the time-series enhanced knowledge representation and generates an answer text by combining the context information of the industrial problem query input. The answer text includes fault cause analysis, parameter change prediction and operation suggestions. S08. Perform a quality assessment on the response text, calculating the factual consistency score between the response text and the refined document sequence, the temporal logical rationality score of the response text, and the domain terminology accuracy score of the response text. The factual consistency score is calculated using a textual implication model. The temporal logical rationality score is assessed based on the completeness of the causal relationship chain and the correctness of the chronological order. The domain terminology accuracy score is verified by matching with a professional terminology database. When the factual consistency score, temporal logical rationality score, or domain terminology accuracy score is lower than a preset quality threshold, a re-retrieval mechanism is triggered, adjusting the weights of causal keywords in the extended query expression, and re-executing steps S05 to S07 until the factual consistency score, temporal logical rationality score, and domain terminology accuracy score all meet the quality requirements. S09. The answer text, the finely arranged document sequence, and the temporal reasoning evidence are combined to form a knowledge injection result. The knowledge injection result is injected into the industrial decision support system. The industrial decision support system locates the source of the anomaly based on the fault cause analysis in the answer text, predicts and adjusts the control strategy based on the parameter changes in the answer text, and generates execution instructions based on the operation suggestions in the answer text. S10. Store the knowledge injection result and its corresponding industrial problem query input, the finely ranked document sequence, and the event evolution path into a feedback database. The data in the feedback database is used for the continuous optimization of the time-series knowledge enhancement model. When the amount of data accumulated in the feedback database reaches the update trigger threshold, start the model incremental training process, use the high-quality question-answer pairs in the feedback database to update the parameters of the time-series knowledge enhancement model, and at the same time update the adjustment strategies of the dynamic threshold and the weight coefficient.
[0027] The Granger causality test is a statistical test method used to determine whether one time series has a predictive effect on another time series. It determines the direction and strength of the causal relationship between variables by comparing the prediction errors of regression models that include and do not include lagged variables.
[0028] The calculation steps for the causal strength value specifically include: for variables X and Y in the variable pair, selecting a lag order p, establishing an autoregressive model of variable Y with respect to its own lagged terms, and calculating the sum of squared residuals of the autoregressive model, denoted as p. An extended regression model is established for variable Y with respect to its own lagged terms and the lagged terms of variable X. The sum of squared residuals of the extended regression model is calculated and denoted as . The F-statistic is calculated and expressed as follows: , where n is the number of samples, and the F statistic is normalized to the interval between 0 and 1 as the causal strength value.
[0029] The adaptive adjustment step of the dynamic threshold specifically includes: dividing the industrial process into three categories: steady-state operation, transitional operation, and fault operation; establishing a historical causal relationship database for each category; statistically analyzing the causal intensity distribution of the true causal relationship under each category; calculating the quantiles of each distribution as a benchmark threshold; selecting the corresponding benchmark threshold according to the current operation type during real-time detection; calculating the stability index of the causal relationship identified within the most recent time window; the stability index being the reciprocal of the coefficient of variation of the causal intensity values of the same variable pair within multiple consecutive time windows; and multiplying the benchmark threshold by a stability adjustment coefficient to obtain the dynamic threshold, wherein the stability adjustment coefficient is positively correlated with the stability index.
[0030] The query expansion processing steps specifically include: extracting data sub-matrices of the N time steps prior to the current moment from the time-series data stream matrix; dividing the data sub-matrices into sliding window segments, each segment having a length of L time steps; calculating statistical features for each segment, including mean, variance, rate of change, and trend coefficient; concatenating the statistical features of each segment to form a time-series feature vector; mapping the time-series feature vector to the same dimensional space as the query text features through a fully connected layer; calculating the importance weight of each component of the time-series feature vector to the current industrial problem query input using an attention mechanism; performing a weighted summation of the time-series feature vector according to the importance weights; concatenating it with the query text features or adding it element-wise to generate the time-aware query vector.
[0031] The structure of the temporal knowledge enhancement model is as follows: the input layer receives the temporal enhanced knowledge representation and the question query encoding of the industrial problem query input. The temporal enhanced knowledge representation includes document semantic features, causal relationship features, and event evolution features. The question query encoding includes query semantic features and temporal context features. The input is mapped to a unified dimension through an embedding layer. The encoder part adopts a spiral progressive network structure, containing M spiral layers. Each spiral layer contains a local perceptual sublayer and an expanded perceptual sublayer. The local perceptual sublayer extracts local features through a one-dimensional convolution with a kernel size of 3. The expanded perceptual sublayer expands the receptive field layer by layer through dilated convolution. The dilation rate of the i-th layer is set to a specific value. In the The receptive field of each spiral layer covers the entire input length. The output of each spiral layer is added to the input via a residual connection, and after layer normalization, it is input to the next layer. The encoder part also adopts a co-evolutionary network structure, containing K parallel sub-networks. Each sub-network has a different number of attention heads and hidden layer dimensions. Each sub-network independently processes the input of the encoder part. A competitive gating mechanism is set after each spiral layer. This competitive gating mechanism assigns weights based on the feature activation intensity of each sub-network's output. Sub-networks with higher activation intensity receive greater weights. A cooperative fusion mechanism is also set up to achieve information exchange between sub-networks through a cross-attention module. The output of the j-th sub-network is used as the query vector, and the outputs of the other sub-networks are used as the query vector. The output is used as a key-value pair. Cross-attention is calculated to obtain fusion features. The competitive weighted output and the cooperative fusion output are concatenated. The decoder part adopts an autoregressive generation architecture, which includes a multi-head self-attention layer and an encoder-decoder cross-attention layer. The number of heads in the multi-head self-attention layer is determined according to the number of variables in the temporal data stream matrix. The calculation formula is that the number of heads equals the number of variables divided by 8 and then rounded up. The keys and values of the encoder-decoder cross-attention layer come from the competitive and cooperative fusion output of the encoder part. The self-attention output from the decoder part is queried. The output of the decoder part is mapped to the vocabulary size through a linear layer and the probability distribution of the next word is generated through the softmax function.
[0032] The steps for establishing the training dataset of the time-series knowledge enhancement model specifically include: extracting cases containing complete fault handling processes from the historical database of the industrial system, each case including time-series data before the fault occurred, a description of the fault phenomenon, expert diagnosis and analysis, and handling measures; performing quality screening on the extracted cases to remove samples with missing data, incorrect labeling, and incomplete processes; preprocessing the time-series data before the fault occurred, including outlier removal, missing value imputation, and dimension normalization; constructing question-answer pairs, with the fault phenomenon description as the question and the expert diagnosis and analysis and handling measures as the answer; retrieving documents related to each question-answer pair from the industrial knowledge document library, and obtaining the retrieval document sequence for each question using the retrieval process from steps S03 to S05; extracting the corresponding causal relationship chain and event evolution path from the time-series causal knowledge graph according to the parameters involved in the question-answer pair; combining the question, the retrieval document sequence, causal relationship features, event evolution features, and answer as training samples; and dividing the training samples into a training set, a validation set, and a test set in a ratio of 8:1:1.
[0033] The specific steps for training the temporal knowledge enhancement model include: initializing model parameters using parameters from a domain-pre-trained language model as initial values; employing the Xavier initialization method for the newly added spiral progressive network structure and co-evolutionary network structure; setting training hyperparameters with a learning rate of 0.00005, a batch size of 16, and 50 training epochs, using the AdamW optimizer; performing forward propagation on the training set, calculating the cross-entropy loss between the model output and the labeled answer, and simultaneously calculating the sub-network competition loss and sub-network cooperation loss. The sub-network competition loss encourages differentiation in the outputs of each sub-network by maximizing the sub-network... The model is implemented using cosine distance between network output vectors. The sub-network cooperation loss promotes sub-network collaboration by minimizing the mean square error between the fused output and the outputs of each sub-network. The total loss is a weighted sum of the cross-entropy loss, sub-network competition loss, and sub-network cooperation loss, with a weight ratio of 1:0.1:0.1. Backpropagation is performed to update model parameters. Every 1000 training steps, the model performance is evaluated on the validation set, and perplexity, accuracy, and F1 score are calculated. An early stopping mechanism is triggered when the validation set performance does not improve after 5 consecutive evaluations. The model checkpoint with the best performance on the validation set is selected as the final model. The generalization ability of the final model is evaluated on the test set.
[0034] The technical effects of the spiral progressive network structure are as follows: by expanding the receptive field layer by layer through a spiral path, it achieves progressive feature extraction from local details to global patterns. In the shallow spiral layers, the local sensing sublayers with small receptive fields capture short-term changes in industrial parameters and local anomaly patterns, preserving key detail information. As the number of layers increases, the dilated convolutions of the expanded sensing sublayers expand the receptive field with an exponentially increasing dilation rate, gradually integrating temporal dependencies over longer time spans, capturing the medium- to long-term trends of fault evolution, and achieving a balance between local details and global trends in the intermediate layers. This enables the identification of... The incremental architecture, which addresses both sudden anomalies and the evolution of incremental failures, avoids the computational complexity issues of traditional global attention mechanisms on long sequences. It also overcomes the omission of cross-window causal relationships by the fixed window method, enabling the model to adaptively model industrial process dynamics at different time scales. It has good adaptability to industrial systems with multi-time-scale coupling effects. The residual connections ensure the effective propagation of gradients in deep networks, allowing the model to stack more spiral layers to capture dependencies over longer time spans, thus improving the modeling accuracy of temporal causal relationships.
[0035] The technical effects of the described co-evolutionary network structure are as follows: multiple sub-networks process the same input in parallel but use different architectural parameters, allowing each sub-network to extract features from different angles and granularities. The competitive gating mechanism dynamically selects the most suitable sub-network based on the current input characteristics. When facing different types of industrial problems, it automatically activates the sub-network branch best suited to handle the industrial problem, improving the model's adaptability to diverse queries. The sub-network competition loss prompts each sub-network to develop differentiated feature extraction strategies, preventing sub-networks from converging and degenerating into the same function, thus enhancing the diversity and robustness of feature representations. The cooperative fusion mechanism achieves knowledge sharing among sub-networks through the cross-attention module. When a single sub-network's extraction of certain features is insufficient, it can draw knowledge from the input of other sub-networks. By supplementing relevant information, a complementary and reinforcing effect is formed. The balance mechanism between competition and cooperation is similar to the trade-off between diversity and accuracy in ensemble learning, but a closer collaborative optimization is achieved through end-to-end joint training. Compared with simple model ensemble, the subnetworks of the co-evolutionary network structure share the underlying parameter space, reducing parameter redundancy and computational overhead. At the same time, guided by the competition loss and cooperation loss of the subnetworks, the subnetworks automatically differentiate into specialties for different knowledge types during training. For industrial knowledge injection tasks, some subnetworks focus on temporal pattern recognition, some on causal reasoning, and some on document semantic understanding. Through co-evolution, multimodal knowledge is effectively integrated, improving the recall rate of knowledge retrieval and the accuracy of generated answers.
[0036] The knowledge injection refers to integrating external knowledge retrieved from the document library and reasoning evidence extracted from the temporal causal knowledge graph, transforming it into answers to industrial problems through a generative model, and injecting it into the industrial decision support system. This enables the industrial decision support system to obtain decision-making basis based on historical knowledge and real-time status, realizing the transformation of knowledge from storage state to application state.
[0037] The cross-encoding re-ranking module is a fine-grained ranking module that takes the extended query expression and candidate documents as a whole and inputs them into a pre-trained language model. It calculates the matching degree between the extended query expression and the documents through deep semantic interaction. Compared with the method of calculating similarity after independent encoding, the cross-encoding re-ranking module can capture more granular semantic associations between the extended query expression and the documents, thereby improving ranking accuracy.
[0038] The fact consistency score is an indicator that measures the degree of consistency between the factual information in the response text and the ranked document sequence. The text entailment model determines whether the statements in the response text are supported by the ranked document sequence. The higher the fact consistency score, the more faithful the generated content is to the original knowledge source, thus reducing the risk of the model generating incorrect information.
[0039] The incremental training process refers to further optimizing the model parameters using newly collected data based on the already trained model, rather than retraining from scratch. By using a small learning rate and a partial parameter freezing strategy, the model can absorb new knowledge while retaining the knowledge it has already learned, thereby achieving continuous improvement and enhanced adaptability of the model.
[0040] The industrial decision support system refers to a system that receives the knowledge injection results and generates control instructions based on the knowledge injection results. The industrial decision support system includes an anomaly diagnosis module, a predictive control module, and an execution scheduling module. The anomaly diagnosis module locates the source of the anomaly based on the fault cause analysis in the response text. The predictive control module predicts and adjusts the control strategy based on the parameter changes in the response text. The execution scheduling module generates execution instructions based on the operation suggestions in the response text.
[0041] As an optional implementation, the present invention also provides a computer-based approach to form an industrial knowledge injection system based on retrieval enhancement generation. The computer is equipped with a readable storage medium that stores program instructions. When the program instructions are run on the computer, they execute the aforementioned industrial knowledge injection method based on retrieval enhancement generation.
[0042] The specific implementation methods of the above steps are described in detail below.
[0043] The specific implementation of step S01 is as follows: Data acquisition modules deployed at the industrial site acquire multi-source heterogeneous data, including sensor time-series data, equipment operation logs, fault alarm records, and process parameter change sequences. Network time protocols are used to synchronize the clocks of each data source, ensuring consistent timestamp references across different sources. Then, timestamp alignment is performed based on the sampling frequency of each data source. For data streams with inconsistent sampling frequencies, linear interpolation is used to unify them to the target sampling interval. The aligned data is then arranged in chronological order into a time-series data stream matrix. The row indices of the matrix correspond to discrete time slices, and the column indices correspond to different monitoring variables. The purpose of this step is to convert the original heterogeneous data into a unified time-series structured representation, providing standardized input for subsequent causal analysis and feature extraction.
[0044] The specific implementation of step S02 is as follows: For each pair of monitored variables in the time-series data stream matrix, a Granger causality test is performed. This test involves constructing two regression models for comparison. The first model contains only the lagged terms of the target variable itself, while the second model adds lagged terms of the candidate dependent variable to the first model. The difference in the sum of squared residuals between the two models is calculated. The F-statistic is used to determine whether adding lagged terms of the candidate dependent variable significantly reduces the prediction error. The F-statistic is normalized to the interval between 0 and 1 to obtain the causal strength value. Simultaneously, the mutual information between the variable pairs is calculated within the lag time window as an auxiliary indicator. The mutual information reflects the nonlinear dependency between variables. The weighted average of the normalized F-statistic and the normalized mutual information is used to obtain the final causal strength value. The weight ratio can be set to 7:3. For variable pairs whose causal strength values exceed a dynamic threshold, directed edges are established. The dynamic threshold is determined based on the operating condition class. The stability of the model and historical causal relationships is adaptively adjusted. Specifically, the industrial process is divided into steady-state operating conditions, transitional operating conditions, and fault operating conditions. The distribution of historical causal intensity values under each type of operating condition is statistically analyzed. The 75th quantile is used as the baseline threshold for steady-state operating conditions (approximately 0.35), the 60th quantile as the baseline threshold for transitional operating conditions (approximately 0.28), and the 50th quantile as the baseline threshold for fault operating conditions (approximately 0.22). The coefficient of variation of the same variable with respect to causal intensity values within the most recent time window is calculated. The reciprocal of the coefficient of variation is used as a stability index. The dynamic threshold is obtained by multiplying the baseline threshold by the stability adjustment coefficient. The stability adjustment coefficient is calculated as 1 plus 0.2 multiplied by the stability index. The purpose of this step is to mine the causal dependencies between variables from the time series data and construct a time series causal knowledge graph containing node attributes, edge weights, and timestamps, providing a causal reasoning basis for subsequent fault propagation path analysis.
[0045] The specific implementation of step S03 involves collecting documents such as operation manuals, troubleshooting cases, process flow descriptions, and expert experience reports from the industrial field to establish an industrial knowledge document library. The documents undergo structured preprocessing, including text extraction, format cleaning, and chapter segmentation. Each document paragraph is encoded using a language model pre-trained on industrial corpora. This pre-trained model employs a masked language model training method for self-supervised learning on large-scale industrial texts, extracting 768-dimensional semantic feature vectors from the documents. Simultaneously, keyword feature vectors are extracted using the term frequency inverse document frequency method. This method calculates the product of the frequency of each keyword in the current document and its reciprocal frequency in the entire document library, reflecting the keyword's ability to distinguish documents. The semantic feature vectors are stored in a dense vector index constructed based on an approximate nearest neighbor search algorithm. This index uses a hierarchical, navigable small-world graph structure to achieve efficient vector retrieval. Keyword feature vectors are stored in a sparse inverted index, which maintains a list of documents containing each keyword. The purpose of this step is to establish a hybrid index structure supporting semantic and keyword retrieval, providing a high-recall and high-precision document candidate set for subsequent knowledge retrieval.
[0046] The specific implementation of step S04 is as follows: The user inputs an industrial problem query text; data from the N time steps prior to the current moment is extracted from the time-series data stream matrix. The value of N is determined based on the response lag characteristics of different processes; for fast-response processes, N can be set to 30 to 50, and for slow-response processes, N can be set to 100 to 200. The extracted data submatrix is segmented into sliding windows, with a window length L set to 5 to 10 time steps. Statistical characteristics such as mean, variance, rate of change, and trend coefficient are calculated for each window segment. The rate of change is obtained by dividing the difference between the first and last points within the window by the time interval. The trend coefficient is obtained by performing linear regression on the data points within the window to obtain the slope. The statistical characteristics of each window are then concatenated to form a time-series feature vector. The system maps the temporal feature vector to the same dimensional space as the query text features through a fully connected layer. An attention mechanism is used to calculate the importance weight of each component of the temporal feature vector to the current query. This attention mechanism obtains the weight distribution by calculating the dot product of the query text features and each component of the temporal feature vector and normalizing it. The temporal feature vector is then weighted and summed according to the weights. The weighted temporal features are then concatenated with the query text features to generate a temporal-aware query vector. This vector is then semantically rewritten, and an extended query expression containing causal relationship keywords is generated using a sequence-to-sequence model. The purpose of this step is to combine the static query text with the dynamic system state to generate an extended query that reflects the current working condition characteristics, thereby improving the relevance of the search results to the actual problem.
[0047] The specific implementation of step S05 is as follows: Semantic similarity retrieval is performed in a dense vector index using an expanded query expression. The top 50 candidate documents are obtained by ranking them according to the cosine similarity between the expanded query vector and the document vector, serving as the first candidate document set. Exact matching retrieval is performed in a sparse inverted index using keywords from the expanded query expression. The BM25 algorithm is used to score and rank the matching results, obtaining the top 50 candidate documents as the second candidate document set. The BM25 algorithm comprehensively considers keyword frequency, document length, and inverse document frequency to calculate the relevance score between the document and the query. The two candidate sets are then weighted and fused. The fusion weight coefficients are dynamically generated by a prediction module in the time-series knowledge enhancement model. This module is based on the semantic complexity of the query and the time... The order feature strength adaptively adjusts the weights of semantic retrieval and keyword retrieval. Generally, the weight of semantic retrieval ranges from 0.6 to 0.8, and the weight of keyword retrieval ranges from 0.2 to 0.4. After fusion, a preliminary retrieval result set is obtained. This result set is input into the cross-coding and re-ranking module. This module concatenates the extended query expression and each candidate document and inputs it into the pre-trained language model. Interactive encoding is performed through a deep Transformer network. The classification vector output by the model is extracted to calculate the deep semantic matching score between the query and the document. The documents are sorted in descending order according to the score to obtain the finely ranked document sequence. The purpose of this step is to comprehensively utilize the complementary advantages of semantic retrieval and keyword retrieval, and improve the relevance and accuracy of the final document sequence through multi-stage retrieval and re-ranking.
[0048] The specific implementation of step S06 is as follows: Analyze the causal relationship descriptions involved in the finely ranked document sequence, extract the variable pairs and causal association statements mentioned in the documents, map these variable pairs to nodes in the temporal causal knowledge graph, retrieve the connection relationships of these nodes in the knowledge graph, identify the event evolution path from the source of the fault to the final manifestation, this path contains multiple nodes and directed edges, each edge is labeled with causal strength value and time lag, extract the temporal data change sequence corresponding to each node in the path, calculate the amplitude, rate and duration of node state changes, and combine these features with the causal strength value to form temporal reasoning evidence, which reflects the propagation process and impact intensity of the fault in the time dimension, fuse the quantitative information in the temporal reasoning evidence with the text description in the finely ranked document sequence, and use a gating fusion mechanism to control the contribution ratio of numerical evidence and textual knowledge to generate a temporal enhanced knowledge representation that simultaneously contains static document knowledge and dynamic causal reasoning. The role of this step is to combine the retrieved static document knowledge with the dynamic reasoning evidence extracted from the temporal causal graph to form a more comprehensive and accurate knowledge representation, providing rich input information for the generative model.
[0049] The specific implementation of step S07 is as follows: the temporal augmented knowledge representation and the industrial problem query input are simultaneously input into the temporal knowledge augmentation model. This model adopts an encoder-decoder architecture. The encoder first maps the input to a unified dimension through an embedding layer, and then encodes it through a spiral progressive network structure and a co-evolutionary network structure. The spiral progressive network contains multiple spiral layers, each containing a local perceptual sublayer and an extended perceptual sublayer. The local perceptual sublayer uses a one-dimensional convolution with a kernel size of 3 to extract short-term local features. The extended perceptual sublayer uses dilated convolutions to expand the receptive field layer by layer. The dilation rate of the i-th layer is set to 2^(i-1), and the receptive field grows exponentially with the number of layers. The co-evolutionary network contains multiple parallel subnetworks, each using a different number of attention heads. In addition to the hidden layer dimension, a competitive gating mechanism is used to dynamically allocate sub-network weights based on input characteristics. A cooperative fusion mechanism is used to achieve information exchange between sub-networks through cross-attention. The decoder part adopts an autoregressive generation method, which generates the response text step by step through a multi-head self-attention layer and an encoder-decoder cross-attention layer. The output layer obtains the probability distribution on the vocabulary through linear mapping and normalization, and samples the next word according to the probability distribution. This process is repeated until an end marker is generated. The generated response text includes an analysis of the cause of the fault, a prediction of the parameter change trend, and operational suggestions for the current problem. The purpose of this step is to use a deep generative model to convert structured and semi-structured knowledge representations into responses in natural language form, thereby achieving semantic understanding and reasoning generation of knowledge.
[0050] The specific implementation of step S08 is as follows: A natural language reasoning model is used to calculate the factual consistency score between the answer text and the refined document sequence. This model determines whether each statement in the answer text is implied by the document content. The proportion of sentences with consistent implied relationships is used as the factual consistency score, with a reference threshold of 0.85. A temporal logic reasonableness score is calculated based on the completeness of the causal relationship chain and the correctness of the chronological order involved in the answer text. It checks whether the causal relationships mentioned in the answer have corresponding paths in the temporal causal knowledge graph and whether the event sequence conforms to the time stamp sequence. The proportion of causal relationships and event sequences that pass the checks is used as the temporal logic reasonableness score, with a reference threshold of 0.80. The accuracy score of domain terminology is calculated by matching and verifying the results against a professional terminology database. Professional terms are extracted from the response text, and it is checked whether these terms exist in a pre-built industrial domain terminology database and whether the usage context of the terms is correct. The proportion of correctly used terms is used as the domain terminology accuracy score, with a reference threshold set to 0.90. When any of the three scores falls below the threshold, a re-retrieval mechanism is triggered. The weights of causal keywords in the expanded query expression are adjusted, and the retrieval and generation process is re-executed after the weights are increased. This process is repeated until all three quality scores meet the standard or the maximum number of retries is reached (3). The purpose of this step is to conduct a multi-dimensional quality assessment of the generated response and ensure the accuracy and reliability of the final output through a feedback loop mechanism.
[0051] The specific implementation of step S09 is as follows: the answer text that has passed the quality assessment is combined with the finely ranked document sequence and time-series reasoning evidence to form a complete knowledge injection result. This result includes the analysis conclusion described in natural language, the document sources that support the conclusion, and the reasoning basis based on time-series data. The knowledge injection result is transmitted to the interface of the industrial decision support system. The anomaly diagnosis module of the system parses the fault cause analysis part in the answer text to locate the equipment or process link where the anomaly occurs. The predictive control module parses the parameter change prediction part and adjusts the controller parameters or setpoints in advance according to the predicted trend. The execution scheduling module parses the operation suggestion part and generates specific execution instructions to be sent to the field control layer. The purpose of this step is to transform the results of knowledge retrieval and generation into executable decision instructions, realizing a closed loop from knowledge acquisition to practical application.
[0052] The specific implementation of step S10 is as follows: the knowledge injection result and its corresponding industrial problem query input, fine-ranked document sequence, and event evolution path are stored together in the feedback database. Each record is labeled with a timestamp, working condition type, and final execution effect. When the number of records accumulated in the feedback database reaches the update trigger threshold, the incremental training process of the model is started. This threshold can be set to 1000 to 2000 records. High-quality question-answer pairs with good execution effects are selected from the feedback database. The execution effect is verified by subsequent system operation data. Question-answer pairs that lead to shorter fault recovery time or improved control accuracy are selected as training samples and used. Incremental training is performed on the time-series knowledge enhancement model. During training, a small learning rate of approximately one-tenth of the initial training learning rate is used. The underlying parameters of the model are frozen, and only the top-level parameters are updated to avoid destroying the learned knowledge. At the same time, the dynamic threshold adjustment strategy and the calculation method of the retrieval fusion weight coefficients are updated according to the new data. Specifically, the distribution of causal strength values under different working conditions in the new data is statistically analyzed to recalculate the baseline threshold. The effectiveness of semantic retrieval and keyword retrieval in the new data is statistically analyzed to refit the weight prediction module. The purpose of this step is to realize the continuous learning and adaptive optimization of the model, so that the system can continuously improve its performance as the industrial process changes and new knowledge is accumulated.
[0053] It should be noted that one of the key technical ideas of this invention is the construction of a time-series causal knowledge graph and a dynamic threshold adaptive mechanism. This mechanism mines causal dependencies in industrial time-series data through Granger causality testing, enhances the robustness of causal strength values through mutual information normalization, and dynamically adjusts the causal relationship identification threshold based on operating condition type and historical stability. Compared to traditional fixed-threshold methods, this mechanism can adapt to the differences in causal patterns under different operating conditions of industrial processes. It uses a higher threshold to filter noise interference under steady-state conditions and a lower threshold to capture abnormal causal chains under fault conditions. This avoids the subjectivity and limitations of traditional methods in threshold setting, improves the accuracy and adaptability of causal relationship identification, and provides a reliable knowledge foundation for subsequent fault propagation path analysis.
[0054] The second key technical approach is a multi-stage retrieval architecture combining hybrid retrieval and cross-coding re-ranking. It combines semantic retrieval using dense vector indexes and keyword retrieval using sparse inverted indexes. By enhancing the model with temporal knowledge, it dynamically generates fusion weights, overcoming the limitations of single retrieval methods. Semantic retrieval can capture deep semantic relationships between queries and documents but lacks sensitivity to technical terms. Keyword retrieval can accurately match terms but ignores semantic similarity. The weighted fusion of the two achieves a balance between recall and precision. The cross-coding re-ranking module further improves ranking accuracy through deep interactive encoding. Compared to the traditional method of calculating similarity after independent encoding, cross-coding can model more fine-grained semantic interactions between queries and documents, significantly improving the relevance of the final retrieval results.
[0055] The third key technical approach is the collaborative architecture of spiral progressive networks and co-evolutionary networks. Spiral progressive networks expand the receptive field layer by layer to achieve multi-scale feature extraction from local to global, adapting to the coexistence of short-term disturbances and long-term trends in industrial processes. Co-evolutionary networks, through the competition and cooperation mechanism of multiple parallel sub-networks, enable the model to understand input information from different angles and granularities. The competition mechanism promotes the differentiated development of sub-networks and avoids functional convergence, while the cooperation mechanism achieves knowledge complementarity through cross-attention. Compared with the traditional single network structure, this collaborative architecture improves the model's adaptability to diverse industrial problems and its ability to integrate multimodal knowledge, enhancing the diversity and robustness of feature representations.
[0056] The synergistic effect of the aforementioned key technological approaches lies in the fact that the temporal causal knowledge graph provides causal relationship labels and temporal reasoning evidence for hybrid retrieval, enhancing the interpretability of retrieval results. The high-quality documents obtained from hybrid retrieval, together with the dynamic evidence in the causal graph, are input into the spiral progressive network and the co-evolutionary network, achieving a deep integration of static knowledge and dynamic reasoning. The spiral network captures multi-scale features of temporal data, while the co-evolutionary network integrates document semantics and causal reasoning. The generated response text possesses both factual basis and logical coherence. Compared to traditional independent retrieval or single-model generation methods, this collaborative architecture constructs a complete link from data collection, causal mining, knowledge retrieval to intelligent generation, realizing the efficient injection and precise application of industrial knowledge, and significantly improving the intelligence level and problem-solving capabilities of industrial decision support systems.
[0057] It should be noted that this invention also solves the following technical problem: When processing industrial queries, traditional retrieval methods struggle to balance the comprehensiveness of semantic understanding with the accuracy of key term matching using a single retrieval strategy, making it difficult to simultaneously guarantee retrieval recall and precision. This invention establishes a hybrid index structure combining dense vector indexes and sparse inverted indexes. It utilizes domain-pre-trained language models to encode semantic feature vectors for semantic similarity retrieval and employs a term frequency-inverse document frequency method to extract keyword feature vectors for keyword matching retrieval. After obtaining a first and second candidate document set, a time-series knowledge enhancement model dynamically generates weight coefficients for weighted fusion. A cross-coding re-ranking module is introduced to calculate deep semantic matching scores for fine-grained ranking. This ensures that the retrieval process captures the deep semantic intent of the query while guaranteeing accurate matching of key terms in the industrial domain. Furthermore, dynamic weight adjustment adapts to the characteristics of different query types, effectively improving the quality and relevance of retrieval results.
[0058] Furthermore, this invention addresses the technical challenges of multi-timescale feature extraction and multi-modal knowledge integration faced by generative models in industrial knowledge injection tasks. Industrial processes involve multi-timescale dynamics ranging from instantaneous fluctuations to long-term trends. Traditional fixed-receptive-field network structures cannot simultaneously capture temporal patterns at different scales, while global attention mechanisms suffer from excessive computational complexity on long sequences. The spiral progressive network structure designed in this invention expands the receptive field layer by layer with an exponentially increasing hole rate through a combination of local and extended receptive sublayers, achieving progressive feature extraction from local details to global trends and overcoming the problem of fixed windows missing cross-window causal relationships. Simultaneously, the co-evolutionary network structure employs multiple parallel sub-networks to extract features from different angles, dynamically selects suitable sub-networks through a competitive gating mechanism, and achieves knowledge sharing among sub-networks through a cooperative fusion mechanism. This enables the model to adaptively integrate multi-modal knowledge such as temporal patterns, causal relationships, and document semantics, significantly improving the accuracy and temporal logical rationality of generated responses.
[0059] Specifically, the principle of this invention is as follows: The solution to the aforementioned technical problems lies in establishing a complete link from time-series data to causal graphs and then to knowledge retrieval, and achieving the collaborative utilization of heterogeneous knowledge through a multi-stage fusion mechanism. First, causal relationships are identified in the monitoring variables of the time-series data stream matrix using Granger causality tests, constructing a time-series causal knowledge graph containing node attributes, edge weights, and timestamps. This graph explicitly encodes the causal dependencies and evolutionary patterns between parameters in the industrial process. Second, in the query processing stage, system state features of the N time steps prior to the current moment are extracted from the time-series data stream matrix. These features are then fused with query text features through an attention mechanism to generate a time-series-aware query vector, enabling the retrieval process to perceive the current system's operating state. Third, after obtaining the finely ranked document sequence, the causal relationship chains involved in the documents are mapped to the time-series causal knowledge graph. The corresponding event evolution paths are retrieved, and node state change sequences are extracted as evidence for time-series reasoning, which are then fused with the static knowledge of the documents to form a time-series enhanced knowledge representation. Finally, the temporal knowledge enhancement model achieves progressive feature extraction at multiple time scales and parallel feature fusion from multiple perspectives through spiral progressive network structure and co-evolutionary network structure, respectively. This enables the model to fully understand and utilize the causal logic and evolutionary information in the temporal enhanced knowledge representation, and generate response text that conforms to the temporal laws of industrial processes.
[0060] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0061] In this embodiment, the specific implementation of step S01 is the same as described above, and will not be repeated in detail here.
[0062] The specific implementation of step S02 is to perform a Granger causality test on each pair of monitored variables in the time-series data stream matrix, for each variable in the variable pair... and variables Choose the lag order Establish variables For an autoregressive model with its own lagged terms, the sum of squared residuals of the autoregressive model is calculated and denoted as . Establish variables For its own lagged terms and variables The extended regression model with lagged terms is calculated by denoting the sum of squared residuals as follows: The F-statistic is calculated and expressed as follows: ; In the formula, The Granger causality test statistic is dimensionless. For containing only variables Sum of squared residuals of an autoregressive model with its own lagged terms, units and variables The units squared are consistent; For containing variables Self-lag term and variable Sum of squared residuals of the extended regression model with lagged terms, units and variables The units squared are consistent; The sample size is dimensionless. It is the lag order, dimensionless; this statistic is used to determine the variable. Whether to use variables The model exhibits Granger causality. The strength of causality is determined by comparing the difference in the sum of squared residuals between the two models. Since both the numerator and denominator are in variance form, the F-statistic is dimensionless.
[0063] The parameter acquisition method is as follows: Obtained through calculation, firstly, the variables... Establish Autoregressive model ,in For a moment variables Observations, Units and Variables Consistent, For time indexing, dimensionless. For the intercept term, the unit and variable Consistent, For the first The coefficient of the first lag term is dimensionless. For lagged indexes, values range from 1 to... , For a moment variables Observations, Units and Variables Consistent, For the residual term, units and variables Consistent, the residual sequence is calculated after estimating the model parameters using the least squares method. Summing the squared residuals yields ; The data was obtained through calculation, and an extended regression model was established. ,in For the intercept term, the unit and variable Consistent, For variables No. The coefficient of the first lag term is dimensionless. For variables No. The coefficient of the first lag term, in units of variables. Unit divided by variable unit, For lagged indexes, values range from 1 to... , For variables At any moment Observations, units and variables Consistent, For the residual term, units and variables Consistent, the residual sequence is calculated after estimating the parameters using the least squares method. Summing the squared residuals yields ; This represents the total number of time slices in the time-series data stream matrix. The value of is determined according to the Akaike Information Criterion or the Bayesian Information Criterion, and is usually between 1 and 10.
[0064] The F-statistic is normalized to the interval between 0 and 1 and used as the causal strength value. The formula for calculating the normalized causal strength value is as follows: ; In the formula, For variables For variables The normalized causal strength value is dimensionless; The Granger causality test statistic calculated above is dimensionless; The normalization adjustment parameter is dimensionless and has an empirical value of 10. This formula maps the F-statistic to the interval between 0 and 1. The larger the F-statistic, the closer the causal strength value is to 1, indicating a stronger causal relationship.
[0065] The causal strength value also needs to be weighted in conjunction with mutual information. The formula for calculating mutual information is as follows: ; In the formula, For variables and variables The mutual information between them, in bits; For variables The value space, For variables The value space, For variables A specific value, For variables A specific value, For variables Value and variables Value The joint probability is dimensionless. For variables Value The marginal probability, dimensionless. For variables Value The marginal probability, dimensionless. This represents a logarithmic function to the base 2. Mutual information reflects the nonlinear dependence between variables and is calculated by estimating the probability distribution after discretizing the data.
[0066] The formula for normalizing mutual information is expressed as follows: ; In the formula, The normalized mutual information is dimensionless. Mutual information, measured in bits; For variables Information entropy, measured in bits, is calculated using the following formula: ; For variables Information entropy, measured in bits, is calculated using the following formula: ; This represents the function that takes the minimum value. The normalized mutual information value ranges from 0 to 1.
[0067] The final causal strength value is obtained by weighted averaging, and the calculation formula is as follows: ; In the formula, The final causal strength value is dimensionless. The normalized Granger causality strength value is dimensionless. The normalized mutual information is dimensionless. is the Granger causality strength weighting coefficient, which is dimensionless and usually takes a value of 0.7; The mutual information weighting coefficient is dimensionless and typically takes a value of 0.3; the weighting coefficient satisfies... This formula combines linear causality tests and nonlinear dependency measures to improve the comprehensiveness of causal relationship identification.
[0068] The adaptive adjustment formula for the dynamic threshold is expressed as follows: ; In the formula, The threshold value is dynamic and dimensionless. The baseline threshold is dimensionless. The stability index is dimensionless; the formula adjusts the threshold according to the stability of the causal relationship. The higher the stability, the higher the threshold, thus avoiding the introduction of unstable causal relationships into the knowledge graph.
[0069] The parameter acquisition method is as follows: The threshold is determined based on the type of operating condition. For steady-state operating conditions, the 75th percentile of the historical causal intensity value distribution is used as the benchmark threshold, with an empirical value of 0.35. For transitional operating conditions, the 60th percentile of the historical causal intensity value distribution is used as the benchmark threshold, with an empirical value of 0.28. For fault operating conditions, the 50th percentile of the historical causal intensity value distribution is used as the benchmark threshold, with an empirical value of 0.22. The coefficient of variation of the same variable with respect to causal strength values within the most recent time window is obtained through calculation. The formula for calculating the coefficient of variation is: ,in The standard deviation of the causal strength values is dimensionless. The mean of the causal strength values is dimensionless, and the stability index is the reciprocal of the coefficient of variation. A higher stability index indicates a more stable causal relationship.
[0070] The specific implementation method of step S03 is the same as described above, and will not be repeated in detail here.
[0071] The specific implementation of step S04 is to extract the data from the time-series data stream matrix before the current time step. A data submatrix with a time step size is divided into segments using a sliding window, with each segment having a length of [length missing]. For each time step, statistical features are calculated for each segment. The statistical features of each segment are then concatenated to form a time series feature vector. The expression for the time series feature vector is as follows: ; In the formula, This is a time-series feature vector; For the first The first segment One statistical characteristic; The number of statistical features extracted for each segment, dimensionless, usually taken as 4, including mean, variance, rate of change and trend coefficient; The total number of segments is dimensionless, and the calculation formula is: ,in The sliding step size is dimensionless and typically takes the value of . Half of This is the floor function.
[0072] The parameter acquisition method is as follows: Obtained through calculation, for the ... Divide the data into segments and extract the data sequence within each segment. ,in Indicates time The observed values of the monitoring variables For time indexing, the mean is calculated as follows: Units and monitored variables Consistent, This is the time step index within the window, with values ranging from 0 to... The variance is calculated as follows: The unit is the monitored variable. The rate of change is calculated as the unit square. The unit is the monitored variable. The unit divided by the time unit, where The sampling interval is in seconds or minutes. The trend coefficient is obtained by performing linear regression on the data within the segments to obtain the slope. The unit is the monitored variable. The unit is divided by the time unit; The value is determined based on the response lag characteristics of the process, and is dimensionless. For fast response processes, the value is 30 to 50, and for slow response processes, the value is 100 to 200. The values are typically between 5 and 10, and are dimensionless. Because the units of various statistical characteristics differ, normalization is required before splicing. The normalization formula is: ,in These are the normalized eigenvalues, dimensionless. For the first The mean of class features across all segments, in units of Consistent, For the first Standard deviation of class feature across all segments, in units of Consistent.
[0073] The formula for generating time-aware query vectors is as follows: ; In the formula, This is a time-aware query vector, dimensionless; The query text feature vector is dimensionless; The mapping weight matrix is dimensionless. The first of the time series feature vectors One component, dimensionless; For the first The attention weights of each component are dimensionless. denoted as the dimensionless temporal feature vector. This formula fuses query text features with weighted temporal features to generate a query representation that simultaneously contains semantic and temporal state information.
[0074] The parameter acquisition method is as follows: The query text is encoded using a domain-pretrained language model, with a dimension of 768. Each component of the feature vector is normalized to be dimensionless. The trainable parameter matrix has a dimension of 768 by 768 and is obtained through model training. To ensure that the output is dimensionless, the matrix elements are normalized. It is obtained through calculation, and the calculation formula is as follows: ,in The feature space dimension is dimensionless and has a value of 768. This formula calculates the correlation between the query text features and the components of the temporal features, and obtains the attention weight distribution through normalization. It is an exponential function. To query the transpose of the text feature vector. The first of the time series feature vectors One portion, This is a dimension index, with values ranging from 1 to... .
[0075] The specific implementation of step S05 is to perform semantic similarity retrieval in the dense vector index using an expanded query expression. The semantic similarity calculation formula is expressed as follows: ; In the formula, The semantic similarity score is dimensionless. This is a time-aware query vector, dimensionless; For the first One document, For document indexing, For the first The semantic feature vector of a document, dimensionless; Let L be the L2 norm of the vector. This represents the vector dot product operation. The formula calculates the cosine similarity between the query vector and the document vector; a higher similarity indicates greater semantic relevance, and the value ranges from -1 to 1.
[0076] Using expanded query expressions, keyword matching retrieval is performed in a sparse inverted index. The BM25 algorithm is used to calculate the relevance score, and the calculation formula is as follows: ; In the formula, The BM25 correlation score is dimensionless. For querying a set of keywords; Keywords in the query; Keywords In the document The word frequency in the text is dimensionless. For document The length is expressed in words. This represents the average length of all documents in the document library, expressed in words. The total number of documents in the document library, dimensionless; For keywords The number of documents, dimensionless; and To adjust the parameter, which is dimensionless, a value is typically taken as... , ; This represents the natural logarithm function. The formula comprehensively considers term frequency, document length, and inverse document frequency to calculate the relevance of a document to a query. Since the length terms in the numerator and denominator are normalized using ratios, the overall result is dimensionless.
[0077] The two candidate sets are weighted and fused, and the fusion score is calculated using the following formula: ; In the formula, To integrate fractions, dimensionless; This is the semantic retrieval weight coefficient, which is dimensionless and ranges from 0 to 1. This represents the maximum semantic similarity in the current candidate set, which is dimensionless and used for normalization. This represents the maximum BM25 score in the current candidate set, dimensionless, and used for normalization. This formula weights and fuses the results of semantic and keyword searches; the weighting coefficients are dynamically adjusted based on query characteristics. The value ranges from 0.6 to 0.8.
[0078] The specific implementation method of step S06 is the same as described above, and will not be repeated in detail here.
[0079] The specific implementation of step S07 is that the temporal knowledge enhancement model adopts an encoder-decoder architecture, and the spiral progressive network structure in the first... The formula for setting the void ratio of a layer is expressed as follows: ; In the formula, For the first The void ratio of the layer is dimensionless. The layer index is dimensionless and starts from 1. This formula causes the void ratio to increase exponentially with the number of layers, gradually expanding the receptive field.
[0080] The formula for calculating the number of heads in the multi-head self-attention layer of the decoder is as follows: ; In the formula, The number of attention heads is dimensionless; The number of variables in the time-series data stream matrix is dimensionless. This is a rounding function. The formula determines the number of attention heads based on the number of monitored variables, ensuring each head focuses on features from different variable groups.
[0081] The specific implementation of step S08 is as follows: the formula for calculating the factual consistency score is expressed as follows: ; In the formula, The factual consistency score is dimensionless. The number of declarative sentences contained in the formatted document sequence in the text is dimensionless; This score answers the question of the total number of declarative sentences in the text; it is dimensionless. The score reflects the degree of consistency between the generated content and the original document; a higher score indicates greater fidelity to the original knowledge, and the value ranges from 0 to 1.
[0082] The formula for calculating the temporal logic rationality score is as follows: ; In the formula, The temporal logic rationality score is dimensionless. The number of corresponding paths in the temporal causal knowledge graph for the causal relationships mentioned in the answer, dimensionless; The total number of causal relationships mentioned in the answer, dimensionless; The number of events in the answer that follow a timestamp sequence is dimensionless. The total number of events mentioned in the answer, dimensionless; This is the causal path weight coefficient, which is dimensionless and typically takes a value of 0.5. The time-series weighting coefficient is dimensionless and typically takes a value of 0.5; the weighting coefficient satisfies... This score assesses the reasonableness of the causal and temporal logic of the answer, and its value ranges from 0 to 1.
[0083] The formula for calculating the domain terminology accuracy score is as follows: ; In the formula, The accuracy score for domain terminology is dimensionless. The number of technical terms correctly used in the answer, dimensionless; This is the total number of technical terms used in the response, dimensionless. The score is calculated by matching the terminology against a glossary, and ranges from 0 to 1.
[0084] The specific implementation methods of steps S09-S10 are the same as those described above, and will not be repeated in detail here.
[0085] To better understand and implement this invention, the following is a specific application scenario of this invention, Example 2: A technical team applied the industrial knowledge injection method based on retrieval enhancement generation, as proposed in this invention, to an industrial polymerization reactor to achieve intelligent diagnosis and prediction of abnormal operating conditions. The polymerization reactor includes a reactor, cooling system, feeding system, and exhaust gas treatment system, equipped with monitoring devices such as temperature sensors, pressure sensors, flow meters, and concentration analyzers. The technical team first collected multi-source heterogeneous data during the reactor's operation, including time-series data for 158 monitored variables with a time resolution of 5 seconds, continuously collected for up to 6 months. These monitored variables cover reactor temperature, jacket cooling water temperature, reactor pressure, monomer feed flow rate, initiator dosage, agitator speed, cooling water flow rate, and exhaust gas... Key parameters such as concentration. The technical team performed timestamp alignment on the collected data to eliminate time discrepancies between different sensors, and established a time-series data stream matrix containing 3,110,400 time slices.
[0086] The technical team constructed a time-series causal knowledge graph and performed Granger causality tests on 158 monitored variables in the time-series data stream matrix. For each variable pair, the team selected a lag order of 12, corresponding to a 60-second time window, and established autoregressive and extended regression models. They calculated the F-statistic and normalized it to obtain the causal strength value. See Table 1 for details. Table 1. Causal strength values among core variables of the reactor.
[0087] Based on historical operating data, the technical team categorized the reaction process into three operating conditions: steady-state operation, temperature rise transition, and abnormal fault. The 75th percentile of the causal intensity distribution under each condition was used as the baseline threshold, resulting in values of 0.520, 0.485, and 0.610, respectively. In real-time monitoring, the team calculated the stability index of causal relationships identified within the most recent 10 time windows, obtained by calculating the reciprocal of the coefficient of variation. For steady-state operation, in a certain detection, the standard deviation of the causal intensity value of the reactor temperature and jacket cooling water temperature within 10 windows was 0.047, the mean was 0.782, the reciprocal of the coefficient of variation was 16.617, the stability adjustment coefficient was set to 1.15, and the dynamic threshold was adjusted to 0.598. The team established directed causal edges for variable pairs with causal intensity values exceeding the dynamic threshold, ultimately forming a time-series causal knowledge graph containing 158 nodes and 1247 directed edges, with edge weights ranging from 0.598 to 0.918.
[0088] The technical team established an industrial knowledge document repository, which includes 3,856 documents such as operating procedures for the reaction unit, troubleshooting manuals, process parameter standards, historical accident analysis reports, and equipment maintenance records. The team structured these documents, using a domain-pre-trained language model to encode each document into a 768-dimensional semantic feature vector. They also extracted keyword feature vectors with a dimension of 5,000 using a term frequency-inverse document frequency method. The semantic feature vectors are stored in a dense vector index based on an approximate nearest neighbor algorithm, while the keyword feature vectors are stored in a sparse inverted index, creating a hybrid index structure.
[0089] At 18:32 on a certain day, the reactor monitoring system received an abnormal operating condition query input. The query content was "The reactor temperature is rising abnormally, the cooling water flow is normal but the temperature control is malfunctioning." The technical team expanded the query, extracting data from the time-series data stream matrix for the 120 time steps prior to the current moment, corresponding to a 10-minute historical state. The technical team divided the 120 time-step data into 8 segments, each segmented into 15-step sliding windows. Statistical features were calculated for each segment, including the reactor temperature mean of 89.7℃, variance of 1.53, rate of change of 0.38℃ / minute, and trend coefficient of 0.64. The technical team concatenated the statistical features of the 8 segments to form a 32-dimensional time-series feature vector, mapped it to 768 dimensions through a fully connected layer, and concatenated it with the query text features to generate a time-series-aware query vector. The technical team semantically rewrote the time-series-aware query vector to generate an expanded query expression, adding causal relationship keywords such as "excessive initiator addition," "increased cooling water temperature," and "decreased heat exchange efficiency."
[0090] The technical team performed a hybrid retrieval operation, using expanded query expressions to retrieve the 50 candidate documents with the highest semantic similarity in the dense vector index and the 50 candidate documents with the highest keyword matching in the sparse inverted index. The team dynamically generated weighted coefficients using a temporal knowledge augmentation model, with a semantic retrieval weight of 0.62 and a keyword retrieval weight of 0.38. This weighted fusion of the two candidate document sets yielded 78 preliminary retrieval results. The team then input these preliminary results into a cross-coding re-ranking module to calculate the deep semantic matching score between the expanded query expressions and each document. The documents were then sorted in descending order of matching score to obtain the top 15 finely ranked documents. Figure 2 As shown, the top 5 document matching scores are 0.912, 0.887, 0.865, 0.841 and 0.829, respectively.
[0091] The technical team mapped the finely formatted document sequence to a temporal causal knowledge graph, extracting the causal chain of "initiator addition amount → reactor temperature → jacket cooling water temperature → heat exchanger scaling". The team retrieved the corresponding event evolution path from the temporal causal knowledge graph. This path showed that excessive initiator addition accelerated the reaction rate, causing a rise in reactor temperature after 25 seconds. This temperature increase was transferred to the jacket cooling water after 15 seconds, leading to a continuous rise in cooling water temperature and heat accumulation. After 180 seconds, this resulted in intensified scaling on the heat exchanger surface and a decrease in cooling efficiency. The team converted the node state change sequence in the event evolution path into temporal reasoning evidence, including an increase in initiator addition from the standard value of 1.8 kg / h to 2.3 kg / h, a rise in reactor temperature from the set value of 88℃ to 92.4℃, and a rise in cooling water outlet temperature from 35℃ to 41℃. The team then fused this temporal reasoning evidence with the static knowledge in the finely formatted document sequence to generate a temporally enhanced knowledge representation.
[0092] The technical team inputs temporal augmented knowledge representation and industrial problem queries into a temporal knowledge augmentation model. This model employs a spiral progressive network structure and a co-evolutionary network structure, with eight spiral layers. The hole ratio increases progressively from 1 in layer 1 to 128 in layer 8, achieving global input length coverage of the receptive field in layer 4. Figure 3As shown, with the increase in the number of spiral layers, the receptive field of the model gradually expands from a local 15 seconds to a global 10 minutes, achieving multi-scale feature extraction from short-term parameter fluctuations to long-term fault evolution. The co-evolutionary network contains four parallel sub-networks with 8, 12, 16, and 20 attention heads, and hidden layer dimensions of 512, 768, 1024, and 1280, respectively. In the competitive gating mechanism, the activation intensities of the four sub-networks are 0.287, 0.319, 0.245, and 0.149, respectively, with corresponding weight adjustments. The technical team uses a cross-attention module to achieve information exchange between sub-networks. The first sub-network focuses on temporal pattern recognition, the second on causal reasoning, the third on document semantic understanding, and the fourth on anomaly feature detection. The model decoder adopts an autoregressive generative architecture, with 20 heads calculated based on 158 monitored variables for the multi-head self-attention layer. The model-generated response text includes a fault cause analysis, parameter change prediction, and operational recommendations. Specifically, it states: "The fault is caused by a stuck initiator metering pump flow control valve, leading to excessive initiator dosage. This causes an accelerated reaction rate and increased heat release. Prolonged high-load operation of the cooling system has resulted in scaling on the heat exchanger, reducing cooling efficiency to 73% of the design value. It is predicted that the reactor temperature will continue to rise above 95°C within the next 30 minutes, posing a risk of overheating and explosive polymerization. The operational recommendations are to immediately reduce the initiator dosage to 1.5 kg / h, increase the cooling water flow rate to 120% of the rated value, activate the backup cooling circuit, and arrange for offline cleaning of the heat exchanger."
[0093] The technical team conducted a quality assessment of the response text, calculating a factual consistency score, a temporal logical plausibility score, and a domain terminology accuracy score. The factual consistency score, calculated using the textual entailment model, was 0.894, indicating a high degree of consistency between the statements in the response text and the sequence of ranked documents. The temporal logical plausibility score, assessed based on the completeness of the causal chain and the correctness of the chronological order, was 0.917, verifying that the causal chain of "excess initiator → increased temperature → decreased cooling efficiency" conforms to physical laws. The domain terminology accuracy score, verified through a professional terminology database, was 0.925, confirming the correct use of terms such as "explosive polymerization," "heat exchanger scaling," and "metering pump flow control valve." All three scores exceeded the preset quality threshold of 0.850, eliminating the need to trigger a re-retrieval mechanism.
[0094] The technical team combined the answer text, the finely ordered document sequence, and the temporal reasoning evidence to form a knowledge injection result, which was then injected into the industrial decision support system. The system's anomaly diagnosis module located two sources of anomalies based on fault cause analysis: the initiator metering pump flow control valve and the heat exchanger. The predictive control module adjusted the control strategies for initiator addition and cooling water flow based on parameter changes. The execution scheduling module generated equipment adjustment instructions and maintenance tasks based on operational suggestions. After the execution instructions were issued, the reactor temperature dropped to 89°C within 8 minutes, and the system returned to stable operation. The technical team stored the knowledge injection result, along with its corresponding query input, finely ordered document sequence, and event evolution path, in a feedback database for continuous optimization of the temporal knowledge enhancement model. When the feedback database accumulated 5000 high-quality question-answer pairs, the technical team initiated an incremental model training process, updating the model parameters using a learning rate of 0.00001 and a partial parameter freeze strategy, while simultaneously updating the adjustment strategies for dynamic thresholds and weight coefficients.
[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for injecting industrial knowledge based on retrieval enhancement generation, characterized in that, This process includes collecting multi-source heterogeneous data from industrial processes and performing timestamp alignment to establish a time-series data stream matrix; performing Granger causality tests on each monitored variable in the time-series data stream matrix to calculate the causal strength between variables and establishing directed causal edges to form a time-series causal knowledge graph; establishing an industrial knowledge document library and performing structured processing on the documents to extract semantic feature vectors and keyword feature vectors to establish a hybrid index structure; receiving industrial problem query inputs and performing query expansion processing to extract system state features from the time-series data stream matrix and fuse them with query text features to generate a time-series-aware query vector; performing semantic rewriting to generate an expanded query expression; and using the expanded query expression to perform hybrid retrieval operations in the hybrid index structure to obtain a candidate document set and perform weighted fusion. The input to the cross-coding and reordering module yields a finely ranked document sequence. This sequence is then mapped and associated with a temporal causal knowledge graph to extract causal relationship chains and retrieve corresponding event evolution paths. The node state change sequence is converted into temporal reasoning evidence and fused with static knowledge from the finely ranked document sequence to generate a temporal enhanced knowledge representation. This representation, along with an industrial problem query, is input into the temporal knowledge enhancement model to generate an answer text. The answer text undergoes quality assessment; if the quality score falls below a preset quality threshold, a re-retrieval mechanism is triggered. The answer text, the finely ranked document sequence, and the temporal reasoning evidence are combined to form a knowledge injection result, which is then injected into the industrial decision support system. The knowledge injection result is stored in a feedback database for continuous optimization of the temporal knowledge enhancement model.
2. The method according to claim 1, characterized in that, Multi-source heterogeneous data includes sensor time-series data, equipment operation logs, fault alarm records, and process parameter change sequences. Each row of the time-series data stream matrix corresponds to a time slice, and each column corresponds to a monitoring variable.
3. The method according to claim 2, characterized in that, The Granger causality test involves obtaining the causal strength value by normalizing the mutual information within the lag time window, establishing directed causal edges for variable pairs whose causal strength values exceed a dynamic threshold, and adaptively adjusting the dynamic threshold based on the current operating condition type and the stability of historical causal relationships. The time-series causal knowledge graph includes node attributes, edge weights, and timestamps.
4. The method according to claim 3, characterized in that, The steps for calculating the causal strength value are as follows: for variables X and Y in the variable pair, select the lag order p, establish an autoregressive model of variable Y with respect to its own lagged terms, calculate the residual sum of squares, establish an extended regression model of variable Y with respect to its own lagged terms and the lagged terms of variable X, calculate the residual sum of squares, calculate the F statistic and normalize it to the interval between zero and one as the causal strength value.
5. The method according to claim 3, characterized in that, The adaptive adjustment steps for the dynamic threshold are as follows: the industrial process is divided into three categories: steady-state operation, transient operation, and fault operation. For each category, a historical causal relationship database is established, the distribution of causal intensity values is statistically analyzed, and quantiles are calculated as the baseline threshold. The corresponding baseline threshold is selected according to the current operation type, the stability index of the causal relationship identified in the most recent time window is calculated, and the baseline threshold is multiplied by the stability adjustment coefficient to obtain the dynamic threshold.
6. The method according to claim 1, characterized in that, The structured processing steps are as follows: semantic feature vectors are obtained by encoding through a domain-pretrained language model, keyword feature vectors are extracted by the term frequency inverse document frequency method, and semantic feature vectors and keyword feature vectors are stored in dense vector index and sparse inverted index, respectively.
7. The method according to claim 1, characterized in that, The steps of query expansion processing are as follows: extract the system state features of the N time steps before the current moment from the time series data stream matrix. The N time steps are determined according to the response lag characteristics of different processes. The system state features are fused with the query text features to generate a time series-aware query vector. The expanded query expression includes causal relationship keywords.
8. The method according to claim 7, characterized in that, The steps for extracting system state features are as follows: extract the data submatrix of the N time steps before the current time from the time series data stream matrix; divide the data submatrix into segments using a sliding window; calculate statistical features for each segment, including mean, variance, rate of change, and trend coefficient; concatenate the statistical features of each segment to form a time series feature vector; use an attention mechanism to calculate the importance weights of each component of the time series feature vector and perform a weighted sum; and concatenate or add element-wise with the query text features to generate a time series-aware query vector.
9. The method according to claim 1, characterized in that, The steps of the hybrid retrieval operation are as follows: using extended query expressions to perform semantic similarity retrieval in a dense vector index to obtain a first candidate document set; using extended query expressions to perform keyword matching retrieval in a sparse inverted index to obtain a second candidate document set; and performing weighted fusion of the first and second candidate document sets to obtain a preliminary retrieval result set. The weight coefficients of the weighted fusion are dynamically generated through a time-series knowledge enhancement model.
10. The method according to claim 9, characterized in that, After obtaining the preliminary search result set, the preliminary search result set is input into the cross-coding and re-ranking module. The cross-coding and re-ranking module calculates the deep semantic matching score between the extended query expression and the document, and sorts the documents in descending order according to the deep semantic matching score to obtain the finely ranked document sequence.