Program code and industrial data association analysis and mining method based on large model

By using a large-model-based program code and industrial data correlation analysis method, data quality problems can be detected and repaired in real time. This solves the problem of the lack of adaptive mechanisms in existing technologies, achieves high efficiency and reliability in industrial data analysis, and improves the accuracy and stability of quality control.

CN122019983APending Publication Date: 2026-05-12BEIJING LINGYIGONG SOFT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING LINGYIGONG SOFT TECHNOLOGY CO LTD
Filing Date
2026-02-13
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies lack a deep understanding and adaptive mechanisms for industrial data quality issues, leading to inefficient analysis models and false positives and false negatives, which affects the reliability and security of quality control.

Method used

A method based on large-scale model program code and industrial data correlation analysis is adopted. Through a quality assessment module, a conditional adversarial repair network, and a quality-aware meta-controller, data missing, noise, and anomalies are detected in real time. High-fidelity data is generated under the constraints of physical laws, and adaptive adjustment is achieved by combining reinforcement learning optimization strategies.

Benefits of technology

It significantly improves the accuracy of analytical conclusions and the robustness of decision-making, ensuring stable operation of the system in complex industrial environments and reducing the risk of false alarms and missed alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019983A_ABST
    Figure CN122019983A_ABST
Patent Text Reader

Abstract

The invention relates to a program code and industrial data association analysis and mining method based on a large model, in particular to the field of industrial data association analysis and mining, and aims to perceive data missing, noise and abnormity in real time through dynamic quality evaluation and generate high-fidelity data under the constraint of a physical rule by using conditional adversarial repair. The information reliability is improved from the source, a quality perception element controller drives an analysis model to dynamically adjust parameters and strategies according to data quality, accurate and self-adaptive association mining is achieved, finally, global collaborative optimization is conducted on a quality evaluation module, a repairing module and a decision-making module through reinforcement learning, and the quality evaluation, repairing and decision-making efficiency is improved. The whole system can automatically adapt to sensor drift, process change and other complex industrial environments in long-term operation, and the accuracy of analysis conclusions, the robustness of decisions and the stability performance of the whole life cycle are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial data correlation analysis and mining, and more specifically, to a method for industrial data correlation analysis and mining based on large model program code. Background Technology

[0002] In the quality control process of smart manufacturing plants, sensor networks widely deployed on production lines continuously collect multi-dimensional time-series industrial data such as temperature, pressure, and vibration. This data is the core basis for production system status perception, process parameter optimization, and predictive maintenance of equipment. A typical control process is that the back-end analysis system relies on a preset program code model to perform real-time correlation analysis and pattern mining on these real-time incoming industrial data. The aim is to identify subtle signs of equipment performance degradation or abnormal patterns of process deviation in advance, thereby triggering early warnings or automatic adjustment commands. However, the industrial environment is complex. Internal factors such as sensor accuracy drift and data transmission network congestion, as well as external factors such as electromagnetic interference, mechanical vibration, and long-term aging of equipment in the production environment, all contribute to the fact that the collected raw data generally contains continuous missing values ​​due to data packet loss, high-frequency noise interference, and outliers unrelated to the operating conditions. These inherent data quality problems seriously challenge the input premise of the analysis models and program codes built downstream based on the assumption of clean and complete data, directly affecting the reliability of the entire quality control chain.

[0003] To address industrial data quality issues, existing technologies typically employ a separate preprocessing stage before the data enters the analysis model. Common methods include moving average filtering and median filtering based on traditional mathematical statistics to smooth noise, or applying simple threshold rules and regression interpolation to handle outliers and missing values. While these methods improve data regularity to some extent, their limitations are becoming increasingly apparent. First, they are mostly static and fixed rule-based processes, making it difficult to adaptively handle the complex contamination patterns of high-dimensional, nonlinear, and time-varying industrial data. Second, these preprocessing steps are often decoupled from the analysis program code, meaning the data cleaning strategy cannot be dynamically adjusted based on real-time feedback and performance of subsequent specific analysis tasks. For example, a filter... While wavelet algorithms may generally smooth all high-frequency signals, they inadvertently filter out characteristic frequency components crucial for warning of specific tool wear. This architecture, where preprocessing and analysis models operate independently, makes the system rigid and inefficient when faced with complex and ever-changing data quality issues. The core problem lies in the lack of a mechanism that can deeply understand the semantic context of industrial data, assess its quality status in real time, and intelligently collaborate and dynamically adapt with upper-level analysis program code. As a result, analysis programs that rely on low-quality data input are prone to false alarms and missed alarms, which not only cause preventative maintenance to fail, leading to unplanned downtime and wasted production resources, but may also cause safety accidents and significant economic losses due to the failure to identify early signs of critical equipment failure in a timely manner. Summary of the Invention

[0004] This invention addresses the technical problems existing in the prior art by providing a method for correlation analysis and mining of program code and industrial data based on a large model, thereby solving the problems mentioned in the background art.

[0005] The technical solution of this invention to solve the above-mentioned technical problems is as follows: specifically, it includes the following steps:

[0006] Step S1: In response to the input of raw industrial data stream and associated environmental context data from the sensor network, the quality assessment module performs sliding window segmentation on the raw industrial data stream to obtain the data window to be evaluated; it calculates multiple basic quality indicators of the data window in parallel, including missing rate, signal-to-noise ratio, and statistical anomaly score; it uses a lightweight prediction model pre-trained based on historical segments of the raw industrial data stream to calculate the prediction error uncertainty of the current data window as the context deviation; it combines the missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation to form the dynamic quality vector of the current data window; the dynamic quality vectors corresponding to each data window are arranged in chronological order to form a dynamic quality vector sequence.

[0007] Step S2: The dynamic quality vector obtained in step S1 and the corresponding data window segmented in step S1 are input into a conditional adversarial repair network. The conditional adversarial repair network includes a generator and a discriminator. The generator takes the data window and the dynamic quality vector as conditional inputs to generate a repaired data window. The generator generates a specific behavior pattern of the repaired data window based on the quality state represented by the dynamic quality vector, which is defined as the repair strategy. The discriminator takes the data window sample to be judged and its corresponding dynamic quality vector as conditional inputs to perform the judgment on the authenticity and rationality of the data window sample under its corresponding quality conditions. The data window sample to be judged includes the repaired data window generated by the generator and the preset real clean data sample. By introducing a physical constraint reconstruction loss function, physical law constraints based on simplified process mechanism equations are applied to the output of the generator, so that the conditional adversarial repair network outputs a repaired data window that has been corrected by quality perception and physical law under the guidance of the dynamic quality vector.

[0008] Step S3: Input the repaired data window and its corresponding dynamic quality vector output in step S2 into a quality-aware meta-controller; The quality-aware meta-controller analyzes the dynamic quality vector sequence and outputs fine-tuning parameters or strategy instructions for the correlation analysis program code model; The correlation analysis program code model, while receiving the repaired data window, loads and applies the fine-tuning parameters or strategy instructions, so that its analysis behavior is adaptively adjusted according to the quality state represented by the dynamic quality vector, and generates model performance indicators;

[0009] Step S4: The quality assessment module from Step S1, the conditional adversarial repair network from Step S2, and the quality-aware meta-controller from Step S3 are collectively constructed into a reinforcement learning agent. The reinforcement learning agent uses the dynamic quality vector sequence, model performance indicators, and its own historical actions as its state, and adjusts the threshold of the quality assessment module, the repair strategy of the conditional adversarial repair network, and the policy instructions of the quality-aware meta-controller as its actions. The total reward is the long-term cumulative reward of comprehensively analyzing accuracy and system stability indicators. By maximizing the long-term cumulative reward, the reinforcement learning algorithm is used to continuously optimize the policy of the reinforcement learning agent.

[0010] In a preferred embodiment, the specific process of parallel computing multiple basic quality indicators of the data window in step S1 is as follows:

[0011] For each data window, calculate the ratio of the number of invalid or null data points to the total number of data points to obtain the missing rate;

[0012] The raw industrial data stream in the data window is separated into a trend term representing long-term change trends and a residual term representing random fluctuations through a preset signal decomposition algorithm. The square of the value of each data point contained in the trend term is calculated, and all squares are summed to obtain the trend energy. The square of the value of each data point contained in the residual term is calculated, and all squares are summed to obtain the residual energy. Then the ratio of trend energy to residual energy is calculated, and the base-10 logarithm of the ratio is calculated and multiplied by 10 to obtain the signal-to-noise ratio.

[0013] The isolated forest algorithm is used to perform unsupervised anomaly detection on all data points within the data window, and the average anomaly score of all data points is calculated to obtain the statistical anomaly score.

[0014] The raw industrial data stream includes time-series data collected by one or more of temperature sensors, pressure sensors, and vibration sensors; the environmental context data includes equipment operating status indicators, ambient temperature data, and ambient humidity data.

[0015] In a preferred embodiment, the specific process of calculating the prediction error uncertainty of the current data window as the context deviation using a lightweight prediction model pre-trained based on historical fragments of the original industrial data stream is as follows:

[0016] A lightweight prediction model, pre-trained on historical fragments of raw industrial data streams, is used to predict each data point within the current data window, outputting the mean estimate and standard deviation estimate of the predicted value for each data point.

[0017] For each data point in the current data window, a numerical interval is determined based on the predicted mean estimate, the predicted standard deviation estimate, and a predetermined confidence level coefficient for that data point. The center of the interval is the predicted mean estimate, and the radius of the interval is the product of the predicted standard deviation estimate and the confidence level coefficient.

[0018] For each data point in the current data window, determine whether the actual observed value of the data point falls outside the corresponding numerical interval: if it falls outside the interval, generate a first judgment value; if it falls within the interval, generate a second judgment value that is different from the first judgment value.

[0019] For each data point in the current data window, calculate the quotient of the predicted standard deviation estimate and the predicted mean estimate of that data point.

[0020] Multiply the quotient corresponding to each data point in the current data window by the first or second judgment value corresponding to that data point to obtain the weighted deviation of that data point;

[0021] The weighted deviation of all data points in the current data window is summed and then divided by the total number of data points in the current data window. The result is the context deviation.

[0022] In a preferred embodiment, in step S2, the generator takes a data window and a dynamic quality vector as input conditions, and the specific operation for generating the repaired data window is as follows:

[0023] The generator contains a quality-aware routing module; this module parses the missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation contained in the dynamic quality vector, and selectively activates different processing subnetworks within the generator based on the comparison results of the missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation values ​​with corresponding preset thresholds.

[0024] When the missing rate in the dynamic quality vector is higher than a first preset threshold used to determine whether to trigger data completion, the quality-aware routing module activates the data completion sub-network. This sub-network uses the spatiotemporal correlation of valid data points within the data window to perform generative filling of missing positions.

[0025] When the reciprocal of the signal-to-noise ratio in the dynamic quality vector is higher than a second preset threshold used to determine whether to trigger noise reduction, the quality-aware routing module activates the noise reduction filtering sub-network to perform adaptive filtering on the data window.

[0026] When the value of the statistical anomaly score or the value of the context deviation in the dynamic quality vector is higher than a third preset threshold used to determine whether to trigger anomaly reconstruction, the quality-aware routing module activates the anomaly reconstruction sub-network. This sub-network reconstructs the abnormal data based on the physical laws defined by the simplified process mechanism equation and the adjacent normal pattern of the data window.

[0027] The generator synthesizes the outputs of the activated sub-networks, and the resulting output is the repaired data window. The specific behavioral pattern followed by the generator in selectively activating different processing sub-networks and synthesizing their outputs through the quality-aware routing module based on the dynamic quality vector is defined as the generator's repair strategy.

[0028] In a preferred embodiment, the specific process of imposing physical constraints based on simplified process mechanism equations on the generator output by reconstructing the loss function through the introduction of physical constraints is as follows:

[0029] A simplified mechanism equation operator is predefined to describe the physical relationships of industrial processes. The repaired data window output by the generator is input into the simplified mechanism equation operator. After calculation by the simplified mechanism equation operator, the physical residual vector corresponding to the repaired data window is output.

[0030] Calculate the square of the value of each element in the physical residual vector, then sum all these squared values ​​and use the sum as the physical constraint reconstruction loss value.

[0031] When training the conditional adversarial repair network, the physical constraint reconstruction loss value and the generator adversarial loss generated by the discriminator's judgment on the generator's output result, which is used to make the generator's output result meet the realism requirements, are weighted and summed to form the generator's total loss function.

[0032] In a preferred embodiment, the training process of the conditional adversarial repair network is specifically as follows:

[0033] The discriminator takes the data window sample to be discriminated and its corresponding dynamic quality vector as input, and performs the judgment on the authenticity and reasonableness of the data window sample under the quality conditions represented by the corresponding dynamic quality vector. The data window sample to be discriminated includes the repaired data window generated by the generator and the preset real clean data sample. In the training context, the sample is the real clean data window.

[0034] In a preferred embodiment, in step S3, the specific operation of the quality-aware meta-controller analyzing the dynamic quality vector sequence and outputting fine-tuning parameters or strategy instructions for the correlation analysis program code model is as follows:

[0035] The quality-aware meta-controller first processes a sequence of dynamic quality vectors based on an attention mechanism to generate a semantic representation of the quality state. Subsequently, the decision logic unit in the quality-aware meta-controller generates control instructions for the association analysis program code model based on the semantic representation of the quality state. The control instructions include two forms: the first form is a set of incremental values ​​for adjusting the trainable parameters inside the association analysis program code model, i.e., fine-tuning parameters. Each independent value in this set of incremental values ​​corresponds to the correction amount of the weight or bias of a network layer in the association analysis program code model. The second form is a selective instruction for controlling the operation logic of the association analysis program code model, i.e., a policy instruction. This instruction is used to select one of the multiple preset processing paths in the association analysis program code model for activation based on the quality status indicated by the dynamic quality vector, while simultaneously bypassing other paths.

[0036] In a preferred embodiment, the specific process of adaptively adjusting its analysis behavior according to the quality state represented by the dynamic quality vector and generating model performance indicators is as follows:

[0037] The correlation analysis program code model receives and applies fine-tuning parameters or strategy instructions output by the quality-aware meta-controller while receiving the repaired data window.

[0038] If the received instruction is a fine-tuning parameter, the association analysis program code model adds the corresponding values ​​in the received fine-tuning parameter to a set of basic parameters stored internally, thereby obtaining a set of updated model parameters; the association analysis program code model then uses this set of updated parameters to perform association analysis and mining tasks on the repaired data window;

[0039] If the received instruction is a policy instruction, the association analysis program code model parses the code of the policy instruction. Based on the valid bits indicated by the code, the association analysis program code model selects one or a group of functions from its internal preset, distinct feature extraction functions or data fusion functions to activate a sub-process, and reconstructs its internal data processing path accordingly. At the same time, it bypasses other feature extraction functions or data fusion functions not indicated by the code. Subsequently, the association analysis program code model performs association analysis and mining tasks on the repaired data window according to the reconstructed data processing path.

[0040] After the task is executed, a quantitative model performance metric is generated.

[0041] The quality-aware meta-controller achieves its function by optimizing its own parameters. Its optimization objective is to minimize a total loss function. This total loss function consists of two parts: the first part is called the immediate task loss, which is the loss generated by the association analysis program code model when performing association analysis and mining tasks on the repaired data window after applying the control instructions output by the quality-aware meta-controller.

[0042] The second part is called the performance stability regularization term, which is defined as the expected value of the variance of the model performance index of the correlation analysis program code model after applying the control instructions output by the quality-aware meta-controller on the dynamic quality vector sequence composed of historical dynamic quality vectors. In the total loss function, the performance stability regularization term is multiplied by a preset positive coefficient before being added.

[0043] In a preferred embodiment, in step S4, the specific operation of the reinforcement learning agent using the dynamic quality vector sequence, model performance indicators, and the reinforcement learning agent's own historical actions as states is as follows:

[0044] The state consists of three parts of information: the first part is a sequence of dynamic mass vectors from step S1, which consists of the dynamic mass vectors from the most recent L consecutive time moments;

[0045] The second part of the information is a sequence of model performance indicators from step S3, consisting of model performance indicators generated by the correlation analysis program code model in the most recent K consecutive time points.

[0046] The third part of the information consists of a sequence of historical actions performed by the reinforcement learning agent in the most recent M consecutive moments. This sequence of historical actions records the past decision-making behavior of the reinforcement learning agent.

[0047] In a preferred embodiment, the process of using the long-term cumulative return of comprehensive analysis accuracy and system stability indicators as the total reward is as follows:

[0048] The total reward is calculated from three parts:

[0049] The first part is called the real-time analysis accuracy reward, the value of which is positively correlated with the performance index of the single model newly generated by the correlation analysis program code model after the action is executed;

[0050] The second part is called the multi-scale stability reward. Its value is positively correlated with the smoothness and trend robustness of the model performance index sequence generated by the correlation analysis program code model in the most recent continuous time period after the action is executed. To calculate this reward, firstly, the model performance index sequence is smoothed for various time lengths, forming a preset set of window widths. For each window width, the moving average of the data points within that window width is calculated to obtain a smoothed sequence corresponding to that window width. Then, the degree of difference between these sequences obtained after smoothing with different window widths is calculated. Specifically, for every two different smoothed sequences, the square of the difference between their corresponding data point values ​​at the same time is calculated, and these squared values ​​at all times are summed to obtain a sum of squared differences. The sums of squared differences calculated from pairwise combinations of all different window widths are accumulated. Finally, the negative exponential function of this accumulated sum is taken, and the result is used as the value of the multi-scale stability reward.

[0051] The third part is called the action amplitude penalty term, the value of which is negatively correlated with the amplitude of the action vector performed by the reinforcement learning agent;

[0052] Ultimately, the total reward is a weighted sum of the instant analysis accuracy reward and the multi-scale stability reward, each multiplied by a first preset weighting coefficient and a second preset weighting coefficient.

[0053] The beneficial effects of this invention are as follows: By dynamically assessing data loss, noise, and anomalies in real time, and using conditional adversarial repair to generate high-fidelity data under the constraints of physical laws, the reliability of information is improved from the source. The quality-aware meta-controller drives the analysis model to dynamically adjust parameters and strategies based on data quality, achieving accurate and adaptive correlation mining. Finally, through reinforcement learning, the quality assessment, repair, and decision-making modules are globally and collaboratively optimized, enabling the entire system to automatically adapt to complex industrial environments such as sensor drift and process changes during long-term operation, significantly improving the accuracy of analysis conclusions, the robustness of decisions, and the stability of the entire life cycle. Attached Figure Description

[0054] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0055] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0056] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0057] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0058] Example 1

[0059] This embodiment provides, for example Figure 1The method for correlation analysis and mining of program code and industrial data based on a large model, shown below, specifically includes the following steps:

[0060] Step S1: In response to the input of raw industrial data stream and associated environmental context data from the sensor network, the quality assessment module performs sliding window segmentation on the raw industrial data stream to obtain the data window to be evaluated; it calculates multiple basic quality indicators of the data window in parallel, including missing rate, signal-to-noise ratio, and statistical anomaly score; it uses a lightweight prediction model pre-trained based on historical segments of the raw industrial data stream to calculate the prediction error uncertainty of the current data window as the context deviation; it combines the missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation to form the dynamic quality vector of the current data window; the dynamic quality vectors corresponding to each data window are arranged in chronological order to form a dynamic quality vector sequence.

[0061] Step S2: The dynamic quality vector obtained in step S1 and the corresponding data window segmented in step S1 are input into a conditional adversarial repair network. The conditional adversarial repair network includes a generator and a discriminator. The generator takes the data window and the dynamic quality vector as conditional inputs to generate a repaired data window. The generator generates a specific behavior pattern of the repaired data window based on the quality state represented by the dynamic quality vector, which is defined as the repair strategy. The discriminator takes the data window sample to be judged and its corresponding dynamic quality vector as conditional inputs to perform the judgment on the authenticity and rationality of the data window sample under its corresponding quality conditions. The data window sample to be judged includes the repaired data window generated by the generator and the preset real clean data sample. By introducing a physical constraint reconstruction loss function, physical law constraints based on simplified process mechanism equations are applied to the output of the generator, so that the conditional adversarial repair network outputs a repaired data window that has been corrected by quality perception and physical law under the guidance of the dynamic quality vector.

[0062] Step S3: Input the repaired data window and its corresponding dynamic quality vector output in step S2 into a quality-aware meta-controller; the quality-aware meta-controller analyzes the dynamic quality vector sequence and outputs fine-tuning parameters or strategy instructions for the correlation analysis program code model. The strategy instructions are used to directly control the running logic of the correlation analysis program code model; the correlation analysis program code model, while receiving the repaired data window, loads and applies the fine-tuning parameters or strategy instructions, so that its analysis behavior is adaptively adjusted according to the quality state represented by the dynamic quality vector, and generates model performance indicators;

[0063] Step S4: The quality assessment module from Step S1, the conditional adversarial repair network from Step S2, and the quality-aware meta-controller from Step S3 are collectively constructed into a reinforcement learning agent. The reinforcement learning agent uses the dynamic quality vector sequence, model performance indicators, and its own historical actions as states, adjusts the threshold of the quality assessment module, the repair strategy of the conditional adversarial repair network, and the policy instructions of the quality-aware meta-controller as actions, and comprehensively analyzes the long-term cumulative reward of accuracy and system stability indicators as the total reward. By maximizing the long-term cumulative reward, the reinforcement learning algorithm is used to continuously optimize the policy of the reinforcement learning agent.

[0064] In this embodiment, the specific process of parallel computing multiple basic quality indicators of the data window in step S1 is as follows:

[0065] For each data window, the missing rate is calculated as the ratio of the number of invalid or null data points to the total number of data points. The missing rate ranges from greater than or equal to zero to less than or equal to one. A value of 0 indicates that there are no missing data points in the data window, and a value of 1 indicates that all data points in the data window are invalid or null. This indicator directly reflects the integrity of the data.

[0066] The raw industrial data stream within the data window is separated into a trend term representing long-term trends and a residual term representing random fluctuations using a preset signal decomposition algorithm, such as seasonal and trend decomposition or empirical mode decomposition. The square of the value of each data point contained in the trend term is calculated, and all squares are summed to obtain the trend energy. The square of the value of each data point contained in the residual term is calculated, and all squares are summed to obtain the residual energy. Then, the ratio of trend energy to residual energy is calculated. To prevent division by zero errors, a very small positive constant, such as 1e-10, can be added to the residual energy in the denominator. The logarithm of this ratio to the base 10 is then calculated and multiplied by 10 to obtain the signal-to-noise ratio (SNR). The SNR is a positive real value in decibels. The larger the value, the clearer the signal. This indicator quantifies the relative strength of effective information and noise interference, providing a quantitative basis for noise level for subsequent data repair.

[0067] The Isolation Forest algorithm is used to perform unsupervised anomaly detection on all data points within the data window. This algorithm calculates the path length of each data point by constructing multiple isolation trees. The shorter the path, the more likely it is to be an anomaly. The average anomaly score of all data points is calculated to obtain the statistical anomaly score. The value of the statistical anomaly score is greater than or equal to zero and less than or equal to one. The anomaly score is directly output by the Isolation Forest algorithm. The closer the value is to 1, the more sparse the data point is in the feature space and the more likely it is to be an anomaly. This score reflects the degree of deviation of the data from the historical distribution.

[0068] The raw industrial data stream includes time-series data collected by one or more of temperature sensors, pressure sensors, and vibration sensors; the environmental context data includes equipment operating status indicators, ambient temperature data, and ambient humidity data.

[0069] The specific process of calculating the prediction error uncertainty of the current data window as the context deviation, using a lightweight prediction model pre-trained based on historical fragments of raw industrial data streams, is as follows:

[0070] A lightweight prediction model, which can be a long short-term memory network or a temporal convolutional network, is pre-trained based on historical fragments of raw industrial data streams. It makes predictions for each data point in the current data window and outputs the mean estimate and standard deviation estimate of the predicted value for each data point. The standard deviation estimate reflects the uncertainty of the model's prediction for that point.

[0071] For each data point in the current data window, a numerical interval is determined based on the predicted mean estimate, predicted standard deviation estimate, and a predetermined confidence level coefficient, which is usually set to 2, corresponding to approximately 95% confidence level. The center of this interval is the predicted mean estimate, and the radius of the interval is the product of the predicted standard deviation estimate and the confidence level coefficient. This interval is the predicted confidence interval for that data point.

[0072] For each data point in the current data window, determine whether the actual observed value of the data point falls outside the corresponding numerical range: if it falls outside the range, generate a first judgment value and set the first judgment value to 1; if it falls within the range, generate a second judgment value that is different from the first judgment value and set the second judgment value to 0.

[0073] For each data point in the current data window, calculate the quotient of the predicted standard deviation estimate and the predicted mean estimate of that data point. To prevent division by zero error, a very small normal number, such as 1e-10, can be added to the predicted mean estimate in the denominator. This quotient represents the proportion of the relative uncertainty of the prediction.

[0074] The quotient corresponding to each data point in the current data window is multiplied by the first or second judgment value corresponding to that data point to obtain the weighted deviation of that data point; wherein, the first judgment value is set to 1 and the second judgment value is set to zero, so that the weighted deviation is zero when the actual observed value of the data point falls within its prediction confidence interval, and equal to the quotient when it falls outside the interval;

[0075] The weighted deviations of all data points within the current data window are summed, and then divided by the total number of data points within the current data window. The result is the context deviation, which is a real number greater than or equal to zero. The larger the value, the higher the inconsistency or unexpectedness of the data window in the time series context. Its value ranges from zero to positive infinity. This indicator not only measures the uncertainty of the model prediction itself, but also captures the degree to which the actual observations violate the confidence interval of the model prediction. It comprehensively reflects the abnormal or abrupt characteristics of the data in the time series continuity, providing a more refined measure than simple prediction error for assessing the credibility of the data in the time dimension.

[0076] In this embodiment, it is particularly important to explain that in step S2, the generator takes the data window and dynamic quality vector as input conditions, and the specific operation for generating the repaired data window is as follows:

[0077] The generator contains a quality-aware routing module, which implements the logic of selecting repair strategies based on dynamic quality vectors. This module parses the missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation contained in the dynamic quality vectors, and selectively activates different processing subnetworks within the generator based on the comparison results of the missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation values ​​with corresponding preset thresholds.

[0078] The internally set preset thresholds include a first preset threshold, a second preset threshold, and a third preset threshold. Their specific values ​​are set according to the data quality distribution of the actual industrial scenario. For example, in one specific implementation, the first preset threshold can be set to 0.2, indicating that completion is triggered when the missing rate exceeds 20%; the second preset threshold can be set to 1.5, indicating that noise reduction is triggered when the reciprocal of the signal-to-noise ratio (in decibels) is greater than 1.5 (i.e., the signal-to-noise ratio is lower than about 4.4 decibels); and the third preset threshold can be set to 0.7, indicating that abnormal reconstruction is triggered when the statistical abnormal score or context deviation exceeds 0.7.

[0079] When the missing rate in the dynamic quality vector is higher than a first preset threshold used to determine whether to trigger data completion, the quality-aware routing module activates the data completion sub-network. This sub-network uses the spatiotemporal correlation of valid data points within the data window to perform generative filling of missing positions.

[0080] Generative imputation can be achieved through a sequence generation model based on an attention mechanism. This model can learn the temporal and spatial dependencies between valid data points within a data window, thereby predicting and filling in the data values ​​at missing locations.

[0081] When the reciprocal of the signal-to-noise ratio in the dynamic quality vector is higher than a second preset threshold used to determine whether to trigger noise reduction, the quality-aware routing module activates the noise reduction filtering sub-network to perform adaptive filtering on the data window.

[0082] Adaptive filtering can be implemented using wavelet threshold denoising or a denoising autoencoder based on a convolutional neural network. The filtering intensity can be adaptively adjusted according to the specific value of the signal-to-noise ratio. The lower the signal-to-noise ratio, the higher the filtering intensity.

[0083] When the value of the statistical anomaly score or the value of the context deviation in the dynamic quality vector is higher than a third preset threshold used to determine whether to trigger anomaly reconstruction, the quality-aware routing module activates the anomaly reconstruction sub-network. This sub-network reconstructs the abnormal data based on the physical laws defined by the simplified process mechanism equation and the adjacent normal pattern of the data window.

[0084] Reconstructing anomalous data specifically involves: first, using a sliding window to find the nearest normal pattern in historical data that is most similar to the current data window's pattern in the non-anomalous region; then, applying physical constraints to the anomalous points by combining simplified process mechanism equations (such as energy balance equations); and finally, using optimization algorithms to solve for a data sequence that is both close to the nearest normal pattern and satisfies the physical constraints, in order to replace the original anomalous data.

[0085] The generator synthesizes the outputs of the activated sub-networks, and the resulting output is the repaired data window. The generator selectively activates different processing sub-networks and synthesizes their outputs through a quality-aware routing module based on the dynamic quality vector. The specific behavior pattern followed by this process is defined as the generator's repair strategy. Through this quality-aware routing mechanism, the generator can call the most appropriate dedicated sub-network to process different types and degrees of quality problems in the data window, achieving precise "targeted" repair and avoiding the performance loss caused by a single processing strategy "one-size-fits-all" approach to all quality problems.

[0086] The specific process of reconstructing the loss function by introducing physical constraints and imposing physical constraints based on simplified process mechanism equations on the generator output is as follows:

[0087] A simplified mechanism equation operator is predefined to describe the physical relationship of an industrial process. This operator maps an input data window to a residual vector calculated by the operator, which characterizes the degree to which the input data window deviates from the physical relationship. This residual vector is denoted as the physical residual vector corresponding to the data window.

[0088] The operator that simplifies the mechanism equation can be, for example, a discretized mass conservation equation, energy balance equation, or momentum equation. Taking the heat exchange process as an example, this operator can calculate the residual of the heat balance equation based on the temperature and flow rate data of the inlet and outlet fluids.

[0089] The repaired data window output by the generator is input into the simplified mechanism equation operator. After calculation by the simplified mechanism equation operator, the physical residual vector corresponding to the repaired data window is output.

[0090] Calculate the square of the value of each element in the physical residual vector, then sum all these squared values ​​and use the sum as the physical constraint reconstruction loss value.

[0091] This calculation process is equivalent to taking the square of the L2 norm of the physical residual vector. The smaller this loss value, the more the repaired data window conforms to the predefined physical laws of the industrial process.

[0092] When training the conditional adversarial repair network, the physical constraint reconstruction loss value and the generator adversarial loss, which is generated by the discriminator's judgment on the generator's output and is used to make the generator's output meet the requirements of realism, are weighted and summed to form the generator's total loss function. This function is used to optimize the generator's parameters, so that when the generator outputs the repaired data window, it meets the requirements of adversarial realism and the constraints of the physical laws of the process. The weight in the weighted summation is a preset positive coefficient λ, which is used to balance the importance between the adversarial loss and the physical constraint loss. In a specific implementation, the value of λ can be adjusted between 0.1 and 1.0, for example, set to 0.5. By introducing this physical constraint reconstruction loss, it is possible to effectively prevent the generator from generating invalid or erroneous data that appears to be real in statistical characteristics but seriously violates the basic physical laws in order to "deceive" the discriminator, thereby significantly improving the engineering credibility and usability of the repaired data.

[0093] The training process of the conditional adversarial repair network is as follows:

[0094] The discriminator takes the data window sample to be discriminated and its corresponding dynamic quality vector as input, and performs the judgment on the authenticity and rationality of the data window sample under the quality conditions represented by the corresponding dynamic quality vector; wherein, the data window sample to be discriminated includes the repaired data window generated by the generator and the preset real clean data sample. In the training context, the sample is the real clean data window.

[0095] The training objective of the discriminator is to optimize its internal parameters so that, for a real, clean input data window and its corresponding dynamic quality vector, the discriminator's output value is as close to 1 as possible to confirm its authenticity; simultaneously, for a repaired data window generated by the generator and its corresponding dynamic quality vector, the discriminator's output value is as close to 0 as possible to correctly identify it as generated data.

[0096] The training objective of the generator is to optimize its internal parameters so that the discriminant outputs a discrimination value as close to 1 as possible to the generated repaired data window and its corresponding dynamic quality vector, thereby deceiving the discriminant; and at the same time minimize the physical constraint reconstruction loss value so that the repaired data window conforms to physical laws.

[0097] The joint optimization objective of the conditional adversarial repair network is to find a set of generator and discriminator parameters such that, in the sense of mathematical expectation, the sum of the logarithm of the discriminator's discrimination value for the real clean data window and the logarithm of the discriminator's discrimination value for the repaired data window output by the generator (subtracted by one) is maximized, while keeping the physical constraint reconstruction loss value small. In this process, the generator's optimization objective is the opposite, and additionally needs to minimize the physical constraint reconstruction loss value. This joint optimization is achieved by alternately optimizing the parameters of the generator and discriminator. The physical constraint reconstruction loss value is weighted by a preset positive coefficient in the generator's overall optimization objective to balance the adversarial realism requirement with the constraints of physical laws.

[0098] The aforementioned joint optimization objective can be mathematically expressed as an adversarial game problem of minimizing the generator and maximizing the discriminator. Specifically, the discriminator D attempts to maximize its ability to distinguish between real and generated data, while the generator G attempts to minimize its probability of being detected by the discriminator and simultaneously minimize the physical constraint loss. The corresponding optimization problem can be formally represented by the formula shown in the accompanying diagram. During training, an alternating iterative strategy is adopted: with the parameters of the generator G fixed, a batch of real and generated data is used to update the parameters of the discriminator D to improve its discrimination ability; subsequently, with the parameters of the discriminator D fixed, the generated data and physical constraint loss are used to update the parameters of the generator G to improve its generation quality and physical consistency. This process is repeated until the network performance converges. Through this adversarial training, the generator is ultimately able to output a repaired data window that is perceptually highly realistic and physically reasonable and credible, laying a reliable data foundation for subsequent accurate correlation analysis.

[0099] In this embodiment, it is specifically necessary to explain the following steps in step S3: the quality-aware meta-controller analyzes the dynamic quality vector sequence and outputs fine-tuning parameters or strategy instructions for the correlation analysis program code model.

[0100] The quality-aware meta-controller first uses a temporal coding module based on an attention mechanism or recurrent neural network to process the dynamic quality vector sequence. This captures the evolution patterns and trends of quality states within the sequence, as well as the correlations between different quality dimensions (such as missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation), generating a semantic representation of quality states that incorporates temporal context information. Subsequently, the decision logic unit within the quality-aware meta-controller generates control instructions for the association analysis program code model based on the semantic representation of quality states. These control instructions come in two forms: the first is a set of incremental values ​​used to adjust the trainable parameters within the association analysis program code model, i.e., fine-tuning the parameters. Each independent value in this set of incremental values ​​corresponds to a specific parameter in the association analysis program code model. The first form is the adjustment of the weights or biases of the network layers; the second form is a selective instruction, or policy instruction, used to control the operation logic of the association analysis program code model. This instruction is used to select one of the multiple pre-set processing paths within the association analysis program code model to activate based on the quality status indicated by the dynamic quality vector, while simultaneously bypassing other paths. For example, when the signal-to-noise ratio (SNR) index in the dynamic quality vector indicates a high level of data noise, the policy instruction can trigger the association analysis program code model to enable a feature extractor with a noise-resistant design and higher computational cost; conversely, when the data quality indicates a high SNR and low anomalies, a lighter and faster feature extraction path is enabled to improve efficiency. The analysis of the dynamic quality vector sequence enables the control instruction to be adaptively generated based on the historical and current state of data quality.

[0101] The specific process by which its analysis behavior adaptively adjusts according to the quality state represented by the dynamic quality vector and generates model performance indicators is as follows:

[0102] The correlation analysis program code model receives and applies fine-tuning parameters or strategy instructions output by the quality-aware meta-controller while receiving the repaired data window.

[0103] If the received instruction is a fine-tuning parameter, the association analysis program code model adds the corresponding values ​​in the received fine-tuning parameter to a set of basic parameters stored internally, thereby obtaining a set of updated model parameters; the association analysis program code model then uses this set of updated parameters to perform association analysis and mining tasks on the repaired data window;

[0104] If the received instruction is a policy instruction, the association analysis program code model parses the encoding of the policy instruction. The encoding of the policy instruction is a one-hot encoded vector, where each bit corresponds to a preset processing path. Based on the valid bit indicated by the encoding, the association analysis program code model selects one or a group of functions from its internal preset multiple, distinct feature extraction functions or data fusion functions to activate a sub-process, and reconstructs its internal data processing path accordingly, while bypassing other feature extraction functions or data fusion functions not indicated by the encoding. Subsequently, the association analysis program code model performs association analysis and mining tasks on the repaired data window according to the reconstructed data processing path.

[0105] After the task is executed, a quantitative model performance metric is generated. This model performance metric is a direct measure of the results of the association analysis task. For example, for classification tasks, it is accuracy, precision, recall, or F1 score; for regression tasks, it is mean squared error or mean absolute error.

[0106] The quality-aware meta-controller achieves its function by optimizing its own parameters. Its optimization objective is to minimize a total loss function. This total loss function consists of two parts: the first part is called the immediate task loss, which is the loss generated by the association analysis program code model performing association analysis and mining tasks on the repaired data window after applying the control instructions output by the quality-aware meta-controller. The specific form of the loss function depends on the downstream task. For example, cross-entropy loss is used for classification, and mean squared error loss is used for regression. The goal of this part is to improve the task performance of the model under the current quality state.

[0107] The second part is called the performance stability regularization term. This term is defined as the expected value of the variance of the model performance index of the association analysis program code model after applying the control instructions output by the quality-aware meta-controller on a dynamic quality vector sequence composed of historical dynamic quality vectors. Calculating this term requires statistically analyzing the dispersion of the model performance index under different historical dynamic quality vector conditions. The smaller the value, the less the model performance is affected by data quality fluctuations. The goal of minimizing this term is to force the quality-aware meta-controller to learn a control strategy that minimizes the fluctuation range of the model performance index when facing data with various historical quality states, thereby enhancing the model's ability to cope with quality fluctuations. The robustness of the dynamics is enhanced; in the total loss function, the performance stability regularization term is multiplied by a preset positive coefficient before summation. This positive coefficient is an adjustable hyperparameter used to balance the trade-off between immediate task performance optimization and long-term performance stability. In one specific implementation, the value of this coefficient can range from 0.01 to 1.0, for example, set to 0.1. By minimizing the total loss function defined above, the parameters of the quality-aware meta-controller are trained so that its output control instructions can not only optimize immediate task performance but also ensure the performance stability of the model under different quality states. This achieves intelligent adaptation of the correlation analysis program code model to dynamic and uncertain industrial data environments, improving the reliability and practicality of the entire analysis system.

[0108] In this embodiment, it is specifically necessary to explain the specific operation in step S4 where the reinforcement learning agent uses the dynamic quality vector sequence, model performance indicators, and the reinforcement learning agent's own historical actions as states:

[0109] The state consists of three parts of information: the first part is a sequence of dynamic quality vectors from step S1, which consists of dynamic quality vectors from the most recent L consecutive time moments. This sequence reflects the evolution pattern of data quality in the recent period, where L is a preset positive integer. L can be set to 5, indicating that the agent examines the data quality history of the most recent 5 time moments.

[0110] The second part of the information is a sequence of model performance indicators from step S3, which consists of model performance indicators generated by the correlation analysis program code model in the most recent K consecutive time moments. This sequence directly reflects the changing trend of the quality of the analysis task completion. K is a preset positive integer, and K can be set to 3, indicating that the agent pays attention to the performance feedback of the most recent 3 analysis cycles.

[0111] The third part of the information is a sequence of historical actions performed by the reinforcement learning agent in the most recent M consecutive moments. This sequence of historical actions records the past decision-making behavior of the reinforcement learning agent. M is a preset positive integer, which can be set to 4, indicating that the agent can trace back its own control decisions in the last 4 moments.

[0112] At each decision moment, the reinforcement learning agent makes a coordinated control decision on the quality assessment module, the conditional adversarial repair network, and the quality-aware meta-controller based on the complete state composed of the dynamic quality vector sequence of the most recent L consecutive time moments, the model performance index sequence of the most recent K consecutive time moments, and the historical action sequence of the most recent M consecutive time moments.

[0113] The specific operations, taking the adjustment of the threshold of the quality assessment module, the repair strategy of the conditional adversarial repair network, and the policy instructions of the quality-aware meta-controller as actions, are as follows:

[0114] The action performed by the reinforcement learning agent at each decision-making moment is a composite vector used to simultaneously fine-tune the quality assessment module, the conditional adversarial repair network, and the quality-aware meta-controller; this composite vector consists of three independent components:

[0115] The first component is used to adjust the dynamic threshold parameters involved in calculating statistical anomaly scores and context deviations in the quality assessment module, such as adjusting the contamination score threshold of the isolated forest algorithm or adjusting the confidence level coefficient k used when calculating context deviations. This component defines the adjustment amount of these dynamic threshold parameters, such as a scalar increment or scaling factor.

[0116] The second component is used to adjust the activation threshold of the quality-aware routing module inside the generator in the conditional adversarial repair network. For example, it can adjust the specific values ​​of the first preset threshold, the second preset threshold, or the third preset threshold, or adjust the intensity parameters (such as filtering coefficients) of each processing sub-network (such as the noise reduction sub-network) in the generator. This component defines the adjustment amount of these activation thresholds or intensity parameters.

[0117] The third component is used to adjust the tendency of the quality-aware meta-controller's output strategy instructions, such as changing the probability distribution of its selection of different processing paths, or fine-tuning the internal bias parameters of its decision logic unit. This component defines the amount of adjustment for such tendency or internal parameters.

[0118] By executing actions composed of the above three components, reinforcement learning agents can collaboratively optimize strategies in the three key areas of quality assessment, data repair, and analysis model adjustment.

[0119] The specific process of using the long-term cumulative return of comprehensive analysis accuracy and system stability indicators as the total reward is as follows:

[0120] The total reward is calculated from three parts:

[0121] The first part is called the instant analysis accuracy reward. Its value is positively correlated with the performance index of the newly generated single model after the action is executed. The higher the value of the model performance index, the larger this part of the reward is, which is used to incentivize the agent to improve the current analysis accuracy. The calculation of this part of the reward can be obtained directly by linearly scaling and normalizing the model performance index, such as classification accuracy, to the range of 0 to 1.

[0122] The second part, termed the multi-scale stability reward, is positively correlated with the smoothness and trend robustness of the model performance index sequence generated by the correlation analysis program code model over a recent continuous period after the action is executed. Calculating this reward involves first smoothing the model performance index sequence for various time lengths, forming a preset window width set (e.g., {3, 5, 7}), where moving average sequences of 3, 5, and 7 points are calculated respectively. For each window width, a smoothed sequence is obtained by calculating the moving average of the data points within that window width. Then, the degree of difference between these sequences obtained after smoothing with different window widths is calculated. The process is as follows: For every two different smoothed sequences, calculate the square of the difference between their corresponding data point values ​​at the same time, and sum these squares over all time points to obtain a sum of squared differences. Accumulate the multiple sums of squared differences calculated from pairwise combinations of all different window widths. Finally, take the negative exponential function of this sum and use the result as the value of the multi-scale stability reward. This function is of the form e^{-x}, where x is the sum, such that the smaller the difference, the closer the reward value is to 1. The smaller the difference, the more consistent and stable the model performance is across multiple time scales; correspondingly, the larger this reward value is. This reward is used to incentivize the agent to maintain the stability of system performance across multiple time scales and avoid drastic fluctuations.

[0123] The third part is called the action amplitude penalty term. Its value is negatively correlated with the amplitude of the action vector executed by the reinforcement learning agent. The action amplitude is measured by the square root of the sum of the squares of all components of the action vector. The larger this square root value is, the stronger the penalty is. For example, when this square root value is greater than 2, it can be regarded as a strong amplitude penalty, which is used to encourage the agent to adopt a fine and small parameter adjustment strategy.

[0124] Finally, the total reward is a weighted sum of the instantaneous analysis accuracy reward and the multi-scale stability reward, each multiplied by a first preset weighting coefficient and a second preset weighting coefficient. The first preset weighting coefficient is a value between 0 and 1, used to balance the contribution of the instantaneous analysis accuracy reward to the total reward. The first preset weighting coefficient can be set to 0.6. The second preset weighting coefficient is equal to one minus the first preset weighting coefficient, which is 0.4 at this time. Then, the product of the motion amplitude penalty term and a third preset weighting coefficient is subtracted. The third preset weighting coefficient is a value greater than zero, used to control the intensity of the motion amplitude penalty. The third preset weighting coefficient can be set to 0.1.

[0125] Reinforcement learning agents achieve their functions by optimizing their internal parameters. The ultimate goal of this optimization is to find an optimal decision rule that defines the probability distribution of selecting the optimal values ​​of each control component given a state consisting of a dynamic quality vector sequence, a model performance index sequence, and a historical action sequence. This optimal decision rule should maximize the expected value of the cumulative sum of rewards at all future time steps after successive decays through a discount factor between 0 and 1. To achieve this goal, policy gradient algorithms, such as proximal policy optimization or soft actor-critic algorithms, are used to continuously optimize the internal parameters of the reinforcement learning agent. The optimization process is conducted online or in a hybrid mode: in actual operation, the system collects interaction data consisting of states, executed actions, obtained rewards, and the state at the next time step and stores it in an experience storage area. This data is then used periodically to update the internal parameters of the reinforcement learning agent, enabling the entire analysis chain, composed of a quality assessment module, a conditional adversarial repair network, and a quality-aware meta-controller, to adapt to environmental changes, such as sensor characteristic drift or changes in production processes, and to continuously improve global performance. This represents a fundamental shift from a static pipeline to an intelligent analysis system with self-evolution capabilities.

[0126] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0127] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0128] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0129] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0130] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0131] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0132] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for correlation analysis and mining of program code and industrial data based on a large model, characterized in that, Specifically, the steps include the following: Step S1: In response to the input of raw industrial data stream and associated environmental context data from the sensor network, the quality assessment module performs sliding window segmentation on the raw industrial data stream to obtain the data window to be evaluated; it calculates multiple basic quality indicators of the data window in parallel, including missing rate, signal-to-noise ratio, and statistical anomaly score; it uses a lightweight prediction model pre-trained based on historical segments of the raw industrial data stream to calculate the prediction error uncertainty of the current data window as the context deviation; it combines the missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation to form the dynamic quality vector of the current data window; the dynamic quality vectors corresponding to each data window are arranged in chronological order to form a dynamic quality vector sequence. Step S2: The dynamic quality vector obtained in step S1 and the corresponding data window segmented in step S1 are input into a conditional adversarial repair network. The conditional adversarial repair network includes a generator and a discriminator. The generator takes the data window and the dynamic quality vector as conditional inputs to generate a repaired data window. The generator generates a specific behavior pattern of the repaired data window based on the quality state represented by the dynamic quality vector, which is defined as the repair strategy. The discriminator takes the data window sample to be judged and its corresponding dynamic quality vector as conditional inputs to perform the judgment on the authenticity and rationality of the data window sample under its corresponding quality conditions. The data window sample to be judged includes the repaired data window generated by the generator and the preset real clean data sample. By introducing a physical constraint reconstruction loss function, physical law constraints based on simplified process mechanism equations are applied to the output of the generator, so that the conditional adversarial repair network outputs a repaired data window that has been corrected by quality perception and physical law under the guidance of the dynamic quality vector. Step S3: Input the repaired data window and its corresponding dynamic quality vector output in step S2 into a quality-aware meta-controller; The quality-aware meta-controller analyzes the dynamic quality vector sequence and outputs fine-tuning parameters or strategy instructions for the correlation analysis program code model; The correlation analysis program code model, while receiving the repaired data window, loads and applies the fine-tuning parameters or strategy instructions, so that its analysis behavior is adaptively adjusted according to the quality state represented by the dynamic quality vector, and generates model performance indicators; Step S4: The quality assessment module from Step S1, the conditional adversarial repair network from Step S2, and the quality-aware meta-controller from Step S3 are collectively constructed into a reinforcement learning agent. The reinforcement learning agent uses the dynamic quality vector sequence, model performance indicators, and its own historical actions as states, adjusts the threshold of the quality assessment module, the repair strategy of the conditional adversarial repair network, and the policy instructions of the quality-aware meta-controller as actions, and comprehensively analyzes the long-term cumulative reward of accuracy and system stability indicators as the total reward. By maximizing the long-term cumulative reward, the reinforcement learning algorithm is used to continuously optimize the policy of the reinforcement learning agent.

2. The method for correlation analysis and mining of program code and industrial data based on a large model according to claim 1, characterized in that: In step S1, the specific process of parallel computing multiple basic quality indicators of the data window is as follows: For each data window, calculate the ratio of the number of invalid or null data points to the total number of data points to obtain the missing rate; The raw industrial data stream in the data window is separated into a trend term representing long-term change trends and a residual term representing random fluctuations through a preset signal decomposition algorithm. The square of the value of each data point contained in the trend term is calculated, and all squares are summed to obtain the trend energy. The square of the value of each data point contained in the residual term is calculated, and all squares are summed to obtain the residual energy. Then the ratio of trend energy to residual energy is calculated, and the base-10 logarithm of the ratio is calculated and multiplied by 10 to obtain the signal-to-noise ratio. The isolated forest algorithm is used to perform unsupervised anomaly detection on all data points within the data window, and the average anomaly score of all data points is calculated to obtain the statistical anomaly score. The raw industrial data stream includes time-series data collected by one or more of temperature sensors, pressure sensors, and vibration sensors; the environmental context data includes equipment operating status indicators, ambient temperature data, and ambient humidity data.

3. The method for correlation analysis and mining of program code and industrial data based on a large model according to claim 2, characterized in that: The specific process of calculating the prediction error uncertainty of the current data window as the context deviation using a lightweight prediction model pre-trained based on historical fragments of raw industrial data streams is as follows: A lightweight prediction model, pre-trained on historical fragments of raw industrial data streams, is used to predict each data point within the current data window, outputting the mean estimate and standard deviation estimate of the predicted value for each data point. For each data point in the current data window, a numerical interval is determined based on the predicted mean estimate, the predicted standard deviation estimate, and a predetermined confidence level coefficient for that data point. The center of the interval is the predicted mean estimate, and the radius of the interval is the product of the predicted standard deviation estimate and the confidence level coefficient. For each data point in the current data window, determine whether the actual observed value of the data point falls outside the corresponding numerical interval: if it falls outside the interval, generate the first judgment value; If it falls within the range, a second judgment value different from the first judgment value is generated; For each data point in the current data window, calculate the quotient of the predicted standard deviation estimate and the predicted mean estimate of that data point. Multiply the quotient corresponding to each data point in the current data window by the first or second judgment value corresponding to that data point to obtain the weighted deviation of that data point; The weighted deviation of all data points in the current data window is summed and then divided by the total number of data points in the current data window. The result is the context deviation.

4. The method for correlation analysis and mining of program code and industrial data based on a large model according to claim 3, characterized in that: In step S2, the generator takes the data window and dynamic quality vector as input conditions, and the specific operation for generating the repaired data window is as follows: The generator contains a quality-aware routing module; this module parses the missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation contained in the dynamic quality vector, and selectively activates different processing subnetworks within the generator based on the comparison results of the missing rate, signal-to-noise ratio, statistical anomaly score, and context deviation values ​​with corresponding preset thresholds. When the missing rate in the dynamic quality vector is higher than a first preset threshold used to determine whether to trigger data completion, the quality-aware routing module activates the data completion sub-network. This sub-network uses the spatiotemporal correlation of valid data points within the data window to perform generative filling of missing positions. When the reciprocal of the signal-to-noise ratio in the dynamic quality vector is higher than a second preset threshold used to determine whether to trigger noise reduction, the quality-aware routing module activates the noise reduction filtering sub-network to perform adaptive filtering on the data window. When the value of the statistical anomaly score or the value of the context deviation in the dynamic quality vector is higher than a third preset threshold used to determine whether to trigger anomaly reconstruction, the quality-aware routing module activates the anomaly reconstruction sub-network. This sub-network reconstructs the abnormal data based on the physical laws defined by the simplified process mechanism equation and the adjacent normal pattern of the data window. The generator synthesizes the outputs of the activated sub-networks, and the resulting output is the repaired data window. The specific behavioral pattern followed by the generator in selectively activating different processing sub-networks and synthesizing their outputs through the quality-aware routing module based on the dynamic quality vector is defined as the generator's repair strategy.

5. The method for correlation analysis and mining of program code and industrial data based on a large model according to claim 4, characterized in that: The specific process of reconstructing the loss function by introducing physical constraints and imposing physical constraints based on simplified process mechanism equations on the generator output is as follows: A simplified mechanism equation operator is predefined to describe the physical relationships of industrial processes. The repaired data window output by the generator is input into the simplified mechanism equation operator. After calculation by the simplified mechanism equation operator, the physical residual vector corresponding to the repaired data window is output. Calculate the square of the value of each element in the physical residual vector, then sum all these squared values ​​and use the sum as the physical constraint reconstruction loss value. When training the conditional adversarial repair network, the physical constraint reconstruction loss value and the generator adversarial loss generated by the discriminator's judgment on the generator's output result, which is used to make the generator's output result meet the realism requirements, are weighted and summed to form the generator's total loss function.

6. The method for correlation analysis and mining of program code and industrial data based on a large model according to claim 5, characterized in that: The training process of the conditional adversarial repair network is as follows: The discriminator takes the data window sample to be discriminated and its corresponding dynamic quality vector as input, and performs the judgment on the authenticity and reasonableness of the data window sample under the quality conditions represented by the corresponding dynamic quality vector. The data window sample to be discriminated includes the repaired data window generated by the generator and the preset real clean data sample. In the training context, the sample is the real clean data window.

7. The method for correlation analysis and mining of program code and industrial data based on a large model according to claim 6, characterized in that: In step S3, the quality-aware meta-controller analyzes the dynamic quality vector sequence and outputs fine-tuning parameters or strategy instructions for the correlation analysis program code model. The specific operations are as follows: The quality-aware meta-controller first processes a dynamic quality vector sequence based on an attention mechanism to generate a quality state semantic representation; then, the decision logic unit in the quality-aware meta-controller generates control instructions for the correlation analysis program code model based on the quality state semantic representation. The control instructions come in two forms: the first form is a set of incremental values ​​used to adjust the trainable parameters within the association analysis program code model, i.e., fine-tuning parameters. Each independent value in this set of incremental values ​​corresponds to the correction amount of the weights or biases of a network layer in the association analysis program code model; the second form is a selective instruction used to control the operating logic of the association analysis program code model, i.e., a policy instruction. This instruction is used to select one of the multiple preset processing paths within the association analysis program code model for activation based on the quality status indicated by the dynamic quality vector, while simultaneously bypassing other paths.

8. The method for correlation analysis and mining of program code and industrial data based on a large model according to claim 7, characterized in that: The specific process by which the analysis behavior is adaptively adjusted according to the quality state represented by the dynamic quality vector and the model performance index is as follows: The correlation analysis program code model receives and applies fine-tuning parameters or strategy instructions output by the quality-aware meta-controller while receiving the repaired data window. If the received instruction is a fine-tuning parameter, the association analysis program code model adds the corresponding values ​​in the received fine-tuning parameter to a set of basic parameters stored internally, thereby obtaining a set of updated model parameters. The association analysis program code model then uses this set of updated parameters to perform association analysis and mining tasks on the repaired data window; If the received instruction is a policy instruction, the association analysis program code model parses the code of the policy instruction. Based on the valid bits indicated by the code, the association analysis program code model selects one or a group of functions from its internal preset, distinct feature extraction functions or data fusion functions to activate a sub-process, and reconstructs its internal data processing path accordingly. At the same time, it bypasses other feature extraction functions or data fusion functions not indicated by the code. Subsequently, the association analysis program code model performs association analysis and mining tasks on the repaired data window according to the reconstructed data processing path. After the task is executed, a quantitative model performance metric is generated. The quality-aware meta-controller achieves its function by optimizing its own parameters. Its optimization objective is to minimize a total loss function. This total loss function consists of two parts: the first part is called the immediate task loss, which is the loss generated by the association analysis program code model when performing association analysis and mining tasks on the repaired data window after applying the control instructions output by the quality-aware meta-controller. The second part is called the performance stability regularization term, which is defined as the expected value of the variance of the model performance index of the correlation analysis program code model after applying the control instructions output by the quality-aware meta-controller on the dynamic quality vector sequence composed of historical dynamic quality vectors. In the total loss function, the performance stability regularization term is multiplied by a preset positive coefficient before being added.

9. The method for correlation analysis and mining of program code and industrial data based on a large model according to claim 8, characterized in that: In step S4, the specific operation of the reinforcement learning agent using the dynamic quality vector sequence, model performance indicators, and its own historical actions as states is as follows: The state consists of three parts of information: the first part is a sequence of dynamic mass vectors from step S1, which consists of the dynamic mass vectors from the most recent L consecutive time moments; The second part of the information is a sequence of model performance indicators from step S3, consisting of model performance indicators generated by the correlation analysis program code model in the most recent K consecutive time moments. The third part of the information consists of a sequence of historical actions performed by the reinforcement learning agent in the most recent M consecutive moments. This sequence of historical actions records the past decision-making behavior of the reinforcement learning agent.

10. The method for correlation analysis and mining of program code and industrial data based on a large model according to claim 9, characterized in that: The specific process of using the long-term cumulative return of comprehensive analysis accuracy and system stability indicators as the total reward is as follows: The total reward is calculated from three parts: The first part is called the real-time analysis accuracy reward, the value of which is positively correlated with the performance index of the single model newly generated by the correlation analysis program code model after the action is executed; The second part is called the multi-scale stability reward. Its value is positively correlated with the smoothness and trend robustness of the model performance index sequence generated by the correlation analysis program code model in the most recent continuous time period after the action is executed. To calculate this reward, firstly, the model performance index sequence is smoothed for various time lengths, forming a preset set of window widths. For each window width, the moving average of the data points within that window width is calculated to obtain a smoothed sequence corresponding to that window width. Then, the degree of difference between these sequences obtained after smoothing with different window widths is calculated. Specifically, for every two different smoothed sequences, the square of the difference between their corresponding data point values ​​at the same time is calculated, and these squared values ​​at all times are summed to obtain a sum of squared differences. The sums of squared differences calculated from pairwise combinations of all different window widths are accumulated. Finally, the negative exponential function of this accumulated sum is taken, and the result is used as the value of the multi-scale stability reward. The third part is called the action amplitude penalty term, the value of which is negatively correlated with the amplitude of the action vector performed by the reinforcement learning agent; Ultimately, the total reward is a weighted sum of the instant analysis accuracy reward and the multi-scale stability reward, each multiplied by a first preset weighting coefficient and a second preset weighting coefficient.