A digital twin driven metrology production line fault diagnosis and scheduling optimization method and system

By combining the random forest algorithm and LSTM network with the genetic algorithm in a digital twin-driven approach, the problem of fault diagnosis and scheduling optimization in the metering production line was solved. This enabled real-time monitoring of equipment performance and intelligent optimization of task allocation, thereby improving production efficiency and product quality.

CN123160134APending Publication Date: 2026-11-24SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611415165.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-12
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing fault diagnosis methods for metering production lines cannot accurately capture the real-time evolution of equipment performance, resulting in delayed fault warnings or a high rate of misjudgment. Furthermore, production scheduling systems lack the ability to perceive the health status of equipment, making it impossible to achieve coordinated linkage between fault warnings and task adjustments, which affects production efficiency and product quality.

Method used

A random forest algorithm is used for real-time identification of equipment performance, an LSTM network is used for multi-cycle loss time series prediction, and a genetic algorithm is used to achieve global optimization of task allocation, thus constructing a digital twin-driven metering production line fault diagnosis and scheduling optimization system.

Benefits of technology

It achieves high-precision real-time classification and identification of equipment performance, identifies potential faults in advance and generates early warning signals, dynamically adjusts task allocation, and improves the operating efficiency of the production line and the product qualification rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160134A_ABST
    Figure CN123160134A_ABST
Patent Text Reader

Abstract

This invention discloses a digital twin-driven method and system for fault diagnosis and scheduling optimization of a metering production line. The method includes: acquiring physical data of metering equipment under different operating conditions and extracting multi-dimensional features to obtain a first feature set; using a random forest algorithm to classify and identify the equipment's operating status to obtain real-time evolution status; generating a first warning signal if a preset drift threshold is met, triggering a health perception mechanism to obtain health perception; using a long short-term memory network to perform time-series prediction for multiple future operating cycles to obtain a first loss sequence; generating a second warning signal if the maximum loss value exceeds a preset threshold; using a genetic algorithm to globally optimize and obtain a target task allocation instruction based on the second warning signal and the initial task allocation instruction; and allocating tasks to multiple devices according to the target task allocation instruction to obtain an updated scheduling sequence. This invention achieves real-time perception of equipment performance drift, multi-cycle loss prediction, and global optimization of task allocation driven by warnings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power equipment operation and maintenance management technology, specifically to a digital twin-driven method and system for fault diagnosis and scheduling optimization of metering production lines. Background Technology

[0002] As a core component of quality control in manufacturing, the stable operation of metrology production lines directly impacts product qualification rates and production efficiency. With the deepening of intelligent manufacturing, the complexity of metrology equipment continues to increase, and fault types are becoming increasingly diverse. Traditional periodic maintenance and experience-based judgment are no longer sufficient to meet the demands of high-efficiency production. Existing fault diagnosis methods largely rely on statistical analysis of historical data or expert knowledge bases. However, these methods often fail to accurately capture the real-time evolution of equipment performance when faced with dynamic changes in equipment operating conditions, leading to delayed fault warnings or high false alarm rates.

[0003] Failures in metrology production lines are rarely isolated events, but rather the result of a complex interplay of factors. Equipment performance varies significantly under different operating conditions; even minor fluctuations in physical parameters such as temperature, pressure, and vibration can trigger a chain reaction, making a single snapshot of data insufficient to reveal the true root cause of the malfunction. More problematic is the production scheduling system's lack of awareness of equipment health status when a metrology device malfunctions, continuing to allocate tasks according to the original plan. This not only exacerbates wear and tear on the faulty device but can also cause the entire production line to grind to a halt. For example, after continuous high-load operation, the measurement accuracy of a precision measuring instrument begins to drift, but the scheduling system fails to recognize this change in time, continuing to assign high-precision measurement tasks to the device, ultimately leading to inaccurate test results for a large batch of products and triggering a quality incident.

[0004] This information gap between equipment status and scheduling decisions prevents production lines from taking preventative measures in the early stages of faults and from dynamically optimizing task allocation based on real-time equipment health. Therefore, accurately identifying fault evolution trajectories under complex operating conditions and integrating real-time equipment health status into the scheduling decision-making process to achieve coordinated fault warnings and task adjustments has become a key issue in improving the intelligence level of metering production lines. Summary of the Invention

[0005] This invention aims to address the shortcomings of existing technologies by providing a digital twin-driven method and system for fault diagnosis and scheduling optimization of metering production lines. It can identify the performance evolution status of equipment in real time through random forest algorithm, perform multi-cycle loss time series prediction through LSTM network, and achieve global optimization of task allocation driven by early warning through genetic algorithm.

[0006] As one aspect of the present invention, a digital twin-driven method for fault diagnosis and scheduling optimization of a metering production line is provided, comprising the following steps: Step S11: Obtain physical data of multiple metering devices in the metering production line under different operating conditions, and perform multi-dimensional feature extraction processing on the physical data to obtain a first feature set. Step S12: Based on the first feature set, the random forest algorithm is used to classify and identify the operating status of the metering equipment to obtain the real-time evolution status of the metering equipment performance. Step S13: If the real-time evolution state meets the preset drift threshold, it is determined that the metering device has a performance drift risk, and a first warning signal for the metering device is obtained. Step S14: Trigger the health perception mechanism for the metering device through the first warning signal to obtain the health perception level of the metering device in the current operating cycle; Step S15: Based on the health perception, a long short-term memory network is used to perform time-series prediction processing on the state of the metering device in multiple consecutive operating cycles in the future to obtain a first loss sequence. Step S16: If the maximum value in the first loss sequence exceeds a preset loss threshold, it is determined that the metering device has a potential risk of causing a quality accident, and a second warning signal is generated for the potential risk. Step S17: Obtain the initial task allocation instruction issued by the scheduling decision system for the metering production line; and use a genetic algorithm to perform global optimization based on the second early warning signal and the initial task allocation instruction to obtain the target task allocation instruction. Step S18: Perform task allocation processing on multiple metering devices in the metering production line according to the target task allocation instruction to obtain an updated scheduling sequence.

[0007] Optionally, in step S14, the formula for calculating the health perception is:

[0008] in, The health perception level at time t is represented by K, where K represents the total number of feature dimensions of the physical data. This represents the weight coefficient of the k-th feature dimension. This represents the actual performance parameter value of the k-th feature at time t. This represents the reference value for this feature. This represents the runtime or temperature parameter of the k-th feature at the current moment. This indicates the maximum allowed value for this feature. The value represents the error deviation of the k-th feature, and α, β, and γ represent the weighting coefficients of the performance ratio, time ratio, and error ratio, respectively.

[0009] Optionally, in step S15, the step of using a long short-term memory network to perform time-series prediction processing on the state of the metering device over multiple consecutive operating cycles to obtain a first loss sequence specifically includes: Obtain the historical health perception sequence within the length of the historical time window, wherein the historical health perception sequence is represented as follows: , where n represents the length of the historical time window and t represents the current time; The historical health perception sequence is input into a Long Short-Term Memory (LSTM) network. State updates and prediction calculations are performed through the LTM network's forget gate, input gate, and output gate. The prediction calculation process is as follows:

[0010] in, Indicates the predicted future moment The device loss value, where LSTM represents the Long Short-Term Memory network function. Represents the complete set of parameters of the network. This represents the output weight matrix. σ represents the cell state at the current moment, σ represents the activation function, and tanh() represents the hyperbolic tangent function; The first loss sequence is obtained by combining the equipment loss values ​​at multiple consecutive prediction times.

[0011] Optionally, in step S16, if the maximum value in the first loss sequence exceeds a preset loss threshold, it is determined that the metering equipment has a potential risk of causing a quality accident, and a second warning signal is generated for the potential risk, specifically including: Extract the maximum value from the first loss sequence; Obtain the pre-set safe operating loss threshold; Compare the maximum value with the safe operation loss threshold. If the maximum value is greater than the safe operation loss threshold, extract the prediction time corresponding to the maximum value; Generate a potential hazard feature vector based on the predicted time corresponding to the maximum value; A second early warning signal is generated for the hazard based on the hazard feature vector.

[0012] Optionally, in step S17, the step of using a genetic algorithm to perform global optimization based on the second warning signal and the initial task allocation instruction to obtain the target task allocation instruction specifically includes: Obtain the total number M of metering equipment in the metering production line; Obtain relevant operating parameters for each metering device. These operating parameters include at least: current load, allocated new task volume, risk coefficient, safety status score, number of tasks, and cost of executing each task. Construct the following objective optimization function:

[0013] in, This represents the optimal objective function value (Optimal Fitness). This indicates the total number of metering devices in the metering production line. This represents the current load of the i-th device. This represents the amount of new tasks allocated to the i-th device. This represents the risk coefficient of the i-th device. This represents the safety status score of the i-th device. This represents the number of tasks assigned to the i-th device. λ represents the cost of the i-th device performing the j-th task; λ1, λ2, and λ3 represent the weight coefficients of the load balancing, risk control, and cost optimization items, respectively. A genetic algorithm is used to perform iterative optimization of the objective function, and the task allocation scheme corresponding to the optimal objective function value is output as the objective task allocation instruction.

[0014] Optionally, in step S18, the step of performing task allocation processing on multiple metering devices in the metering production line according to the target task allocation instruction to obtain an updated scheduling sequence specifically includes: Extract the initial task package from the target task allocation instruction; Determine the task priority order based on the initial task package; Based on the task priority order, obtain the current status values ​​of multiple devices; The real-time load of the multiple devices is calculated based on the current status value; The real-time load and the initial task package are processed using a decision tree algorithm to obtain the task-device matching degree; The task device matching degree is compared with a pre-set matching degree threshold; If the task-device matching degree is greater than the matching degree threshold, a candidate scheduling table is generated based on the task-device matching degree. A sorting operation is performed on the candidate scheduling table to obtain an updated scheduling sequence.

[0015] As another aspect of the present invention, a digital twin-driven fault diagnosis and scheduling optimization system for metering production lines is also provided, comprising: The data acquisition and feature extraction module is used to acquire physical data of multiple metering devices in the metering production line under different operating conditions, and to perform multi-dimensional feature extraction processing on the physical data to obtain a first feature set. The status classification and recognition module is used to classify and recognize the operating status of the metering equipment based on the first feature set using a random forest algorithm, so as to obtain the real-time evolution status of the performance of the metering equipment. The performance drift determination module is used to determine that the metering device has a performance drift risk if the real-time evolution state meets a preset drift threshold, and to obtain a first warning signal for the metering device. The health perception triggering module is used to trigger the health perception mechanism for the metering device through the first warning signal, and to obtain the health perception level of the metering device in the current operating cycle. The timing prediction module is used to perform timing prediction processing on the state of the metering device in multiple consecutive operating cycles in the future, based on the health perception, using a long short-term memory network, to obtain a first loss sequence. The hazard determination module is used to determine that the metering equipment has a potential hazard that could cause a quality accident if the maximum value in the first loss sequence exceeds a preset loss threshold, and to generate a second warning signal for the hazard. The task optimization module is used to obtain the initial task allocation instruction issued by the scheduling decision system for the metering production line, and to perform global optimization processing using a genetic algorithm based on the second early warning signal and the initial task allocation instruction to obtain the target task allocation instruction. The task allocation module is used to perform task allocation processing on multiple metering devices in the metering production line according to the target task allocation instruction, and obtain an updated scheduling sequence.

[0016] Optionally, in the health perception trigger module, the health perception level is calculated using the following formula:

[0017] in, The health perception level at time t is represented by K, where K represents the total number of feature dimensions of the physical data. This represents the weight coefficient of the k-th feature dimension. This represents the actual performance parameter value of the k-th feature at time t. This represents the reference value for this feature. This represents the runtime or temperature parameter of the k-th feature at the current moment. This indicates the maximum allowed value for this feature. The value represents the error deviation of the k-th feature, and α, β, and γ represent the weighting coefficients of the performance ratio, time ratio, and error ratio, respectively.

[0018] Optionally, in the time series prediction module, the first loss sequence is obtained in the following manner: Obtain the historical health perception sequence within the historical time window. The historical health perception sequence is input into a long short-term memory network, and prediction calculations are performed using the following formula:

[0019] in, Indicates the predicted future moment The device loss value, where LSTM represents the Long Short-Term Memory network function. Represents the complete set of parameters of the network. This represents the output weight matrix. σ represents the cell state at the current moment, σ represents the activation function, and tanh() represents the hyperbolic tangent function; The first loss sequence is obtained by combining the device loss values ​​at multiple consecutive prediction times.

[0020] Optionally, in the task optimization module, the genetic algorithm performs global optimization using the following objective function:

[0021] in, This represents the optimal objective function value. This indicates the total number of metering devices in the metering production line. This represents the current load of the i-th device. This represents the amount of new tasks allocated to the i-th device. This represents the risk coefficient of the i-th device. This represents the safety status score of the i-th device. This represents the number of tasks assigned to the i-th device. λ represents the cost of the i-th device performing the j-th task; λ1, λ2, and λ3 represent the weight coefficients of the load balancing, risk control, and cost optimization items, respectively. The task optimization module obtains the target task allocation instruction by minimizing the target optimization function.

[0022] Implementing the embodiments of the present invention has the following beneficial effects: This invention provides a method and system for predicting and intelligently scheduling the performance of metering production line equipment. By combining multi-dimensional feature extraction with random forest algorithm, the operating status of metering equipment is classified and identified in real time with high precision, thereby obtaining the real-time evolution status of equipment performance. When early signs of performance degradation appear, the first warning signal is triggered immediately, which significantly shortens the time delay of anomaly detection compared with the traditional periodic detection method. This invention triggers a health perception mechanism through a first early warning signal, and uses multi-dimensional feature weighted fusion to calculate the equipment health perception degree to achieve a quantitative assessment of the equipment health status; then, it uses an LSTM network to perform time-series prediction of equipment loss for multiple consecutive operating cycles in the future. Its gating mechanism can effectively capture long-range dependencies in the loss sequence, identify potential hazards in advance and generate a second early warning signal before the actual occurrence of a quality accident. This invention inputs the second early warning signal and the initial task allocation instruction into the genetic algorithm to construct a multi-objective function that integrates load balancing, risk control and cost optimization for global optimization. It establishes a complete feedback loop from equipment fault early warning to dynamic adjustment of scheduling instructions, enabling production line scheduling decisions to have the ability to perceive and respond to equipment health status in real time. This invention achieves intelligent matching between equipment workload and health status. Equipment with high health status undertakes more measurement tasks, while equipment with low health status automatically reduces its load, effectively slowing down the rate of equipment performance degradation and reducing the risk of quality accidents, thus significantly improving the overall operating efficiency and product qualification rate of the metrology production line. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, obtaining other drawings based on these drawings without creative effort still falls within the scope of the present invention. Figure 1 This is a schematic diagram of the main process of an embodiment of a digital twin-driven method for fault diagnosis and scheduling optimization of a metering production line provided by the present invention. Figure 2 A flowchart illustrating an example of processing the feature dimension in step S14 of the method provided by the present invention; Figure 3 This is a schematic flowchart of an example of step S18 in the method provided by the present invention. Figure 4 This is a schematic diagram of an embodiment of a digital twin-driven metering production line fault diagnosis and scheduling optimization system provided by the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.

[0025] I. Method Implementation Examples like Figure 1The diagram shown illustrates the main flow of an embodiment of a digital twin-driven metering production line fault diagnosis and scheduling optimization method provided by this invention. (In conjunction with...) Figure 2 and Figure 3 As shown, the method includes the following steps: Step S11: Obtain physical data of multiple metering devices in the metering production line under different operating conditions, and perform multi-dimensional feature extraction processing on the physical data to obtain a first feature set. Step S12: Based on the first feature set, the random forest algorithm is used to classify and identify the operating status of the metering equipment to obtain the real-time evolution status of the metering equipment performance. Step S13: If the real-time evolution state meets the preset drift threshold, it is determined that the metering device has a performance drift risk, and a first warning signal for the metering device is obtained. Step S14: Trigger the health perception mechanism for the metering device through the first warning signal to obtain the health perception level of the metering device in the current operating cycle; Step S15: Based on the health perception, a long short-term memory network is used to perform time-series prediction processing on the state of the metering device in multiple consecutive operating cycles in the future to obtain a first loss sequence. Step S16: If the maximum value in the first loss sequence exceeds a preset loss threshold, it is determined that the metering device has a potential risk of causing a quality accident, and a second warning signal is generated for the potential risk. Step S17: Obtain the initial task allocation instruction issued by the scheduling decision system for the metering production line; and use a genetic algorithm to perform global optimization based on the second early warning signal and the initial task allocation instruction to obtain the target task allocation instruction. Step S18: Perform task allocation processing on multiple metering devices in the metering production line according to the target task allocation instruction to obtain an updated scheduling sequence.

[0026] The steps of the method provided by the present invention will be described in detail below with reference to specific examples.

[0027] In step S11, physical data of multiple metering devices in the metering production line under different operating conditions are acquired. The physical data includes at least three or more combinations of temperature data, pressure data, vibration data, current data, and power data.

[0028] Specifically, the above physical parameters are collected in real time by sensors deployed in key parts of the metering equipment: temperature sensors (accuracy ±0.5℃, sampling frequency 1 time / second) are installed near the core heat-generating components inside the equipment; pressure sensors (accuracy ±0.1%FS, sampling frequency 10 times / second) are installed at pneumatic or hydraulic actuators; vibration sensors (accelerometers, sensitivity 100mV / g, sampling frequency 10kHz) are installed at the equipment base or spindle bearing housing; current transformers (accuracy ±0.5%, sampling frequency 1kHz) and power analyzers (accuracy ±0.2%) are installed in the equipment power supply line.

[0029] After data acquisition, preprocessing is performed first: a sliding window midpoint filtering method (window size set to 11 sampling points) is used to remove impulse noise and abnormal jump values ​​from the sensor data; cubic spline interpolation is used to fill in missing data to ensure the continuity and integrity of the data sequence; and a minimum-maximum normalization method is used to uniformly map each physical parameter to the [0,1] interval to eliminate the influence of different units on subsequent feature extraction.

[0030] After preprocessing, multi-dimensional feature extraction is performed on the physical data. This multi-dimensional feature extraction includes three dimensions: time-domain feature extraction, frequency-domain feature extraction, and time-frequency-domain feature extraction. (1) Temporal feature extraction: Calculate the mean, standard deviation, peak value, peak-to-peak value, root mean square value, kurtosis coefficient and skewness coefficient of each physical parameter within a preset time window (default window length is 60 seconds and sliding step is 30 seconds) to form a temporal feature subset; (2) Frequency domain feature extraction: Perform Fast Fourier Transform (FFT) on the time domain signal, set the spectral resolution to 1Hz, and extract frequency domain features such as energy proportion, main frequency amplitude, spectral centroid and spectral bandwidth of each frequency band to form a frequency domain feature subset; (3) Time-frequency domain feature extraction: Wavelet packet decomposition (using db4 wavelet basis, with 4 decomposition layers) is used to extract the energy and entropy values ​​of each frequency band coefficient to form a time-frequency domain feature subset.

[0031] The features from the three dimensions mentioned above are concatenated to form the first feature set F = {f1, f2, ..., f D}, where D represents the total dimension of the features (default is no less than 50 dimensions), and each feature is organized into a feature matrix form according to the device number and timestamp for subsequent state classification and recognition.

[0032] In step S12, based on the first feature set, the random forest algorithm is used to classify and identify the operating status of the metering equipment to obtain the real-time evolution status of the metering equipment performance.

[0033] The random forest algorithm is pre-trained through the following steps: The first training step is sample set construction. Collect first-feature samples from similar equipment on the metrology production line under normal operating conditions, mild performance degradation conditions, moderate performance degradation conditions, and severe performance degradation conditions. Domain experts then label each sample with a corresponding state label, resulting in at least 5000 training samples.

[0034] Training step two, Bootstrap sampling. Randomly select N samples with replacement from the training sample set (N equals the total number of samples in the training set) to form a sub-training set. Repeat the above process M times (M is the number of decision trees, the default value is 150), to obtain M sub-training sets.

[0035] Training Step 3: Decision Tree Construction. For each sub-training set, the CART algorithm is used to recursively construct the decision tree. When splitting at each node, m candidate features are randomly selected from all D features (default m = √D). The feature with the largest Gini impurity gain and the splitting threshold are selected for node splitting. Growth stops when the number of samples contained in the leaf node is less than 5 or the tree depth reaches 30 layers.

[0036] Training step four: Random Forest Ensemble. The trained M decision trees are combined into a random forest model. The final classification result is determined by majority voting, that is, each decision tree outputs a state class prediction for the input sample, and the class with the most votes from all decision trees is the final output of the random forest.

[0037] In the actual classification and recognition process, each feature vector F_t (t represents the time sampling point) in the first feature set obtained in step S11 is input into the trained random forest model. Each decision tree independently outputs the category prediction of the device's operating state at that moment. The random forest model also outputs the voting probability distribution of each state category, with the category with the highest voting probability being taken as the real-time evolution state S of the device at that moment. state(t) The real-time evolution status includes at least four status levels: "normal", "mild performance drift", "moderate performance drift" and "severe performance drift".

[0038] In step S13, if the real-time evolution state meets a preset drift threshold, it is determined that the metering device has a performance drift risk, and a first warning signal for the metering device is obtained. Specifically, this includes the following sub-steps: Sub-step S131: Extract performance deviation feature values ​​from the real-time evolution states. These performance deviation feature values ​​are extracted from the voting probabilities of each state category output by the random forest, specifically the voting probability value P for the "severe performance drift" category. severe(t) The value ranges from 0 to 1.

[0039] Sub-step S132: Calculate the absolute value of the difference between the performance deviation feature value and the benchmark performance parameter. The benchmark performance parameter is the voting probability value (usually not less than 0.85) of the random forest model for the "normal" category when the equipment is in a factory qualified state. Calculate ΔP = |P severe(t) - P severe_base |, where P severe_base The voting probability value for the "severe performance drift" category under baseline conditions (typically no higher than 0.05).

[0040] Sub-step S133 involves comparing the absolute value of the difference with a preset drift threshold. The preset drift threshold is determined based on the device accuracy level and historical false alarm rate statistics. For high-precision measuring devices of level 0.1 and above, the drift threshold is set to 0.30; for level 0.5 measuring devices, the drift threshold is set to 0.40; and for level 1.0 and below measuring devices, the drift threshold is set to 0.50.

[0041] Sub-step S134: If the absolute value of the difference is greater than the preset drift threshold, a performance drift risk identifier is generated. The performance drift risk identifier includes at least four fields: device number, risk level, drift characteristic value, and trigger time.

[0042] Sub-step S135: Generate a first warning signal for the metering device based on the performance drift risk identifier. The first warning signal is a formatted data packet containing the aforementioned risk identifier information, which is pushed to the production line monitoring system and the health awareness trigger module via a message queue (RabbitMQ), and simultaneously displayed on the production line console in the form of a visual pop-up window.

[0043] Preferably, to avoid frequent false triggers, a de-jitter mechanism is set: the first warning signal is only officially generated when the absolute value of the difference between three consecutive sampling points (each sampling point is 30 seconds apart).

[0044] In step S14, the health sensing mechanism for the metering device is triggered by the first warning signal to obtain the health sensing level of the metering device in the current operating cycle.

[0045] The health sensing mechanism is a refined assessment process activated on demand. It only activates on specific devices upon receiving the first warning signal, avoiding the high overhead of continuously performing health sensing calculations on all devices. (Health Sensing Level) The calculation formula is as follows:

[0046] in, The value represents the health perception at time t (ranging from 0 to 100, with higher values ​​indicating healthier devices), and K represents the total number of feature dimensions of the physical data (default K=5, corresponding to the five dimensions of temperature, pressure, vibration, current, and power). This represents the weight coefficient of the k-th feature dimension (determined through the analytic hierarchy process, with the sum of the weights of each dimension being 1). This represents the actual performance parameter value of the k-th feature at time t. The reference value for this feature is taken as the standard value during the factory calibration of the equipment. This represents the current runtime or temperature parameter of the k-th feature (the temperature value is used for heat-sensitive features, and the cumulative runtime is used for mechanical features). This indicates the maximum permissible value for this feature (taken as the equipment design limit or the upper limit of the standard specification). This represents the error deviation of the k-th feature (the ratio of the current measurement error to the maximum permissible error). α, β, and γ represent the weighting coefficients of the performance ratio, time ratio, and error ratio, respectively, with default values ​​of α=0.50, β=0.20, and γ=0.30.

[0047] like Figure 2 The diagram shows a flowchart of an example of processing the feature dimension in step S14, which can be referenced and combined.

[0048] In step S15, based on the health perception, a Long Short-Term Memory (LSTM) network is used to perform time-series prediction processing on the state of the metering device in multiple consecutive operating cycles in the future to obtain a first loss sequence.

[0049] The LSTM network is pre-trained through the following steps: Training Step 1: Training Set Construction. Collect health perception sequences from at least 100 similar measuring devices over a continuous 36-month period. (Monthly sampling) and the corresponding actual equipment wear values ​​(obtained through post-retirement disassembly analysis or periodic calibration error accumulation), the training set sample size is no less than 3000 time series, and the length of each series is no less than 24 months.

[0050] Training Step Two: Network Architecture Construction. A four-layer LSTM network is constructed. The input layer has a dimension of 1 (i.e., a single variable input of health awareness), and the time window length n is set to 12 months. The first LSTM layer has 128 hidden units, the second LSTM layer has 64 hidden units, and the third LSTM layer has 32 hidden units. Dropout layers are set between each layer, with a dropout rate of 0.25. The output layer is a fully connected layer with a dimension of 1 (i.e., the predicted future monthly loss value).

[0051] The third training step is model training and validation. Mean squared error (MSE) is used as the loss function, and the Adam optimizer is used for parameter optimization. The initial learning rate is set to 0.001, and it decreases to 0.9 times its original value every 100 training epochs. The batch size is set to 64, and the training epochs are 300. An early stopping strategy is used (training stops when the validation set loss does not decrease for 30 consecutive epochs) to prevent overfitting.

[0052] The actual forecasting process includes the following sub-steps: Sub-step S151: Obtain the historical health perception sequence within the historical time window length, wherein the historical health perception sequence is represented as... , where n represents the length of the historical time window (n=12, i.e., using health perception data from the past 12 months for prediction), and t represents the current moment; Sub-step S152: Obtain the complete parameter set θ and output weight matrix of the Long Short-Term Memory network. ; Sub-step S153: Obtain the cell state at the current moment. ; Sub-step S154: Input the historical health perception sequence into the long short-term memory network; Sub-step S155 involves processing the historical health perception sequence and the current cell state using the forgetting gate in the Long Short-Term Memory network to determine the historical information to be discarded. The forgetting gate outputs f. t = σ(W f ·[h t-1 , ] +b f ), where W f h is the forget gate weight matrix. t-1 This is the hidden state from the previous moment. For the current input, b f For bias terms; Sub-step S156 involves processing the historical health perception sequence through the input gate in the Long Short-Term Memory network to determine newly added candidate information. The input gate outputs i. t = σ(W i· [h t-1 , ] + b i Candidate cell status t = tanh(W C ·[h t-1 , ] + b C ); Sub-step S157: Combine the discarded historical information with the newly added candidate information to update the current cell state to obtain the updated cell state. The update formula is C. t = f t C t-1 + i t t ; Sub-step S158: Determine the hidden layer output vector by combining the output gate of the Long Short-Term Memory network with the updated cell state, and set the output gate o t = σ( ·[h t-1 , ] + b o ), hidden state h t = o t tanh(C_t); Sub-step S159 involves performing a nonlinear mapping process on the hidden layer output vector using a hyperbolic tangent function and an activation function. Sub-step S1510 involves multiplying the vector processed by the nonlinear mapping with the output weight matrix to obtain the predicted device loss value at the future time. The single-step prediction formula is summarized as follows:

[0053] in, This represents the predicted device loss value at the future time t+Δt (ranging from 0 to 100, with higher values ​​indicating more severe device loss), and LSTM stands for Long Short-Term Memory network function. Represents the complete set of parameters of the network. This represents the output weight matrix. σ represents the cell state at the current moment, σ represents the activation function (the Sigmoid function is used in this embodiment), and tanh() represents the hyperbolic tangent function; Sub-step S1511 combines the equipment loss values ​​from multiple consecutive prediction time points to obtain the first loss sequence. Specifically, using ΔT as the prediction step size (ΔT = 1 month), the equipment loss values ​​for the next 6 months (i.e., 6 time steps) are continuously predicted to obtain the first loss sequence D. seq = {D pred(t+1) D pred(t+2) , ..., D pred(t+6)}

[0054] In step S16, if the maximum value in the first loss sequence exceeds a preset loss threshold, it is determined that the metering equipment has a potential risk of causing a quality accident, and a second warning signal is generated for the potential risk. Specifically, this includes the following sub-steps: Sub-step S161: Extract the maximum value D from the first loss sequence. max = max(D seq For example, if the predicted losses for the next 6 months are {32.5, 38.7, 45.2, 53.8, 62.4, 71.6}, then D max = 71.6; Sub-step S162: Obtain the pre-set safe operating loss threshold D. threshold The safe operating loss threshold is set according to the equipment type and accuracy level. For high-precision metering equipment of level 0.1 and above, D threshold = 60; For 0.5 class metering equipment, D threshold = 70; For metering equipment of class 1.0 and below, D threshold = 80; Sub-step S163, the maximum value D max With the safe operation loss threshold D threshold Perform numerical comparison; Sub-step S164: If the maximum value is greater than the safe operation loss threshold, extract the prediction time t corresponding to the maximum value. max As in the example above, D max =71.6, if the equipment is class 0.5 (D) threshold =70), then D max If the value is >70, an early warning will be triggered, with the corresponding prediction time being the 6th month in the future. Sub-step S165: Generate a hazard feature vector based on the predicted time corresponding to the maximum value. The hazard feature vector includes the equipment number, the hazard level (divided into three levels according to the extent of exceeding the threshold: 0-20% is a general hazard, 20%-50% is a moderate hazard, and more than 50% is a serious hazard), the expected occurrence time, and the predicted maximum loss value; Sub-step S166: Generate a second early warning signal for the hazard based on the hazard feature vector. The second early warning signal is a structured JSON data packet containing all fields of the hazard feature vector, which is pushed to the scheduling decision system via a message queue as an input trigger condition for the task optimization module.

[0055] Preferably, when multiple devices on the same production line simultaneously trigger the second warning signal, the system proceeds according to D. max - D thresholdThe differences are sorted from largest to smallest, and devices with larger differences receive higher risk weights in subsequent task optimizations.

[0056] In step S17, the initial task allocation instruction issued by the scheduling decision system for the metering production line is obtained. Based on the second early warning signal and the initial task allocation instruction, a genetic algorithm is used for global optimization to obtain the target task allocation instruction. Specifically, this includes the following sub-steps: Sub-step S171: Obtain the total number M of metrology equipment in the metrology production line (in this embodiment, M is the total number of all verification / calibration equipment currently online in the production line). Sub-step S172: Obtain the relevant operating parameters of each metering device. The operating parameters include at least: current load, allocated new task quantity, risk coefficient, safety status score, number of tasks, and cost of executing each task. Sub-step S173: Construct the objective optimization function :

[0057] in, This represents the optimal objective function value (Optimal Fitness). This indicates the total number of metering devices in the metering production line. This represents the current load of the i-th device. This represents the amount of new tasks allocated to the i-th device. This represents the risk coefficient of the i-th device. This represents the safety status score of the i-th device. This represents the number of tasks assigned to the i-th device. Let represent the cost of the i-th device performing the j-th task; λ1, λ2, and λ3 represent the weight coefficients of the load balancing term, risk control term, and cost optimization term, respectively; where the risk coefficient is... Based on the second warning signal, it was determined that: Devices that did not trigger the warning... =0.1, equipment that triggers general hazard warning =0.4, equipment that triggers a moderate hazard warning. =0.7, equipment that triggers a serious hazard warning. =1.0; Safety Status Score Based on current health perception Normalization yields, = / 100, with a value range from 0 to 1; Among them, the first item The first item is the load balancing item, used to balance the task load among various devices, preventing some devices from being overloaded while others are idle; the second item... This is a risk control item used to reduce the workload of equipment in high-risk, low-safety states; the third item. This is a cost optimization item used to minimize the overall task execution cost. λ1, λ2, and λ3 represent the weight coefficients of the load balancing item, risk control item, and cost optimization item, respectively. The default values ​​are λ1=0.3, λ2=0.5, and λ3=0.2, reflecting the management principle that "risk control takes precedence over load balancing and cost optimization".

[0058] Sub-step S174 involves using a genetic algorithm to iteratively minimize the objective function value. The specific parameters of the genetic algorithm are set as follows: population size is 100, encoding is real-number encoding (each chromosome represents a task allocation scheme), the selection operator is roulette wheel selection, the crossover operator is arithmetic crossover (crossover probability 0.85), the mutation operator is non-uniform mutation (mutation probability 0.05), the maximum number of iterations is 500 generations, and the convergence condition is that the optimal fitness value of the population remains unchanged for 50 consecutive generations. In each iteration, the fitness value (i.e., the objective function value) of each individual is calculated, and elite individuals are retained and directly enter the next generation.

[0059] Sub-step S175: When the genetic algorithm reaches the convergence condition or the maximum number of iterations, it outputs the task allocation scheme corresponding to the optimal objective function value as the target task allocation instruction. The target task allocation instruction includes at least the device number, the number of tasks to be allocated, the task type, and the expected execution time window fields.

[0060] Preferably, to prevent the genetic algorithm from outputting infeasible solutions, a penalty function is introduced in the fitness calculation: for allocation schemes that exceed the maximum processing capacity of the device, a large penalty term (penalty coefficient set to 1000) is added to the objective optimization function value to ensure that the output scheme meets the hardware constraints of all devices.

[0061] In step S18, task allocation is performed on multiple metering devices in the metering production line according to the target task allocation instruction to obtain an updated scheduling sequence. Specifically, this includes the following sub-steps: Sub-step S181: Extract the initial task package from the target task allocation instruction. The initial task package contains a set of all tasks to be allocated, and each task includes a task ID, task type, required duration, priority, and precision requirement level; Sub-step S182: Determine the task priority order based on the initial task package. The priority order is determined by combining task priority and delivery deadline. The EDF (Earliest Deadline First) algorithm is used to initially sort the tasks, with tasks with higher priority and tighter delivery deadlines placed first. Sub-step S183: Based on the task priority order, obtain the current status values ​​of multiple devices. The current status values ​​include the current task queue length and current load rate of the devices. and safety status score ; Sub-step S184: Calculate the real-time load of the multiple devices based on the current state value. Real-time load. i = + (Current load + number of newly assigned tasks); Sub-step S185 involves using a decision tree algorithm to process the real-time load and the initial task package to obtain the task-device matching degree. The decision tree algorithm uses task accuracy requirements, estimated execution time, and device real-time load as input features, and a matching degree score (0-100) as output. A higher matching degree score indicates that the task is more suitable for allocation to the device. The decision tree is pre-trained using historical scheduling data, with training samples consisting of all previously successfully executed task-device pairing records and their execution results (completion time, quality pass rate, etc.). Sub-step S186: Compare the matching degree of the task device with a preset matching degree threshold (the default matching degree threshold is 70). Sub-step S187: If the task-device matching degree is greater than the matching degree threshold, a candidate scheduling table is generated based on the task-device matching degree. The candidate scheduling table contains all task-device pairing schemes that meet the matching degree requirements. Sub-step S188 involves performing a sorting operation on the candidate scheduling table to obtain an updated scheduling sequence. The sorting operation follows a multi-level sorting rule: "matching degree first, task urgency second, and device load balancing third." Pairing schemes with higher matching degree, more urgent tasks, and lower device load are ranked higher, ultimately forming an executable updated scheduling sequence.

[0062] like Figure 3 The diagram shown is a schematic flowchart of an example of step S18 in the method provided by the present invention; it can be referenced and incorporated herein by reference.

[0063] In one specific embodiment, after receiving a task allocation instruction containing the requirement to calibrate 3000 smart meters, the system parses out the urgency weight coefficient of 0.8 and the estimated completion time of 48 hours. Then, it extracts real-time status data from five automated calibration devices in the metering production line, finding that devices 1 to 3 have a current load rate of 85.5%, while devices 4 and 5 have a load rate of only 20.5%. A dynamic programming algorithm is then invoked to construct a task allocation model, using the remaining processing capacity of the devices as a constraint, and iteratively calculating to minimize the overall calibration completion time. After 50 iterations, the algorithm determines that allocating 2400 meters to devices 4 and 5, and the remaining 600 meters to devices 1 to 3, will maximize the overall efficiency of the production line. Based on this allocation result, the task queues of each device are automatically reorganized, and the newly allocated tasks are inserted after the original task nodes, thereby generating an updated scheduling sequence. This sequence clearly stipulates that device 4 will start the verification action of the first meter of the new batch at the 12th minute from the current time, and device 5 will start the corresponding verification procedure at the 15th minute.

[0064] II. System Implementation Examples like Figure 4 As shown, this embodiment of the invention also provides a digital twin-driven fault diagnosis and scheduling optimization system for metering production lines. The system 1 includes: a data acquisition and feature extraction module 10, a status classification and identification module 11, a performance drift determination module 12, a health perception trigger module 13, a time series prediction module 14, a hidden danger determination module 15, a task optimization module 16, and a task allocation module 17.

[0065] The data acquisition and feature extraction module 10 is used to acquire physical data of multiple metering devices in the metering production line under different operating conditions, and to perform multi-dimensional feature extraction processing on the physical data to obtain a first feature set. The state classification and recognition module 11 is used to classify and recognize the operating state of the metering equipment according to the first feature set using a random forest algorithm, so as to obtain the real-time evolution state of the performance of the metering equipment. The performance drift determination module 12 is used to determine that the metering device has a performance drift risk if the real-time evolution state meets a preset drift threshold, and to obtain a first warning signal for the metering device. The health perception triggering module 13 is used to trigger the health perception mechanism for the metering device through the first warning signal, and to obtain the health perception level of the metering device in the current operating cycle. The time-series prediction module 14 is used to perform time-series prediction processing on the state of the metering device in multiple consecutive operating cycles in the future based on the health perception and a long short-term memory network to obtain a first loss sequence. The hidden danger determination module 15 is used to determine that the metering equipment has a hidden danger that could cause a quality accident if the maximum value in the first loss sequence exceeds a preset loss threshold, and to generate a second warning signal for the hidden danger. The task optimization module 16 is used to obtain the initial task allocation instruction issued by the scheduling decision system for the metering production line, and to perform global optimization processing using a genetic algorithm based on the second early warning signal and the initial task allocation instruction to obtain the target task allocation instruction. The task allocation module 17 is used to perform task allocation processing on multiple metering devices in the metering production line according to the target task allocation instruction, and obtain an updated scheduling sequence.

[0066] The following will provide a detailed description of each module in the system provided by the present invention, with specific examples.

[0067] The data acquisition and feature extraction module 10 collects multi-source physical data in real time through a sensor network deployed at key parts of the metering equipment. The sensor network includes: a temperature sensor (accuracy ±0.5℃, sampling frequency 1 time / second), installed near the core heat-generating components inside the equipment; a pressure sensor (accuracy ±0.1%FS, sampling frequency 10 times / second), installed at pneumatic or hydraulic actuators; a vibration sensor (accelerometer, sensitivity 100mV / g, sampling frequency 10kHz), installed at the equipment base or spindle bearing housing; a current transformer (accuracy ±0.5%, sampling frequency 1kHz); and a power analyzer (accuracy ±0.2%), installed in the equipment's power supply line. All sensor data is aggregated to the data acquisition terminal via an industrial Ethernet network and tagged with a unified timestamp.

[0068] The collected raw data is first cleaned and standardized by the preprocessing unit: the sliding window midpoint filtering method is used to remove impulse noise (window size 11 sampling points); the cubic spline interpolation method is used to fill in missing data; and the minimum-maximum normalization method is used to uniformly map each physical parameter to the [0,1] interval.

[0069] After preprocessing, the feature extraction unit performs three-dimensional feature extraction on the data: Temporal feature extraction subunit: Calculates the mean, standard deviation, peak value, peak-to-peak value, root mean square value, kurtosis coefficient, and skewness coefficient of each physical parameter within a preset time window (window length 60 seconds, sliding step size 30 seconds); Frequency domain feature extraction subunit: Performs fast Fourier transform on the time domain signal (spectral resolution 1Hz) to extract frequency domain features such as energy proportion, dominant frequency amplitude, spectral centroid and spectral bandwidth of each frequency band; Time-frequency domain feature extraction subunit: Wavelet packet decomposition (db4 wavelet basis, 4 decomposition layers) is used to extract the energy and entropy values ​​of each frequency band coefficient.

[0070] The features from the above three dimensions are concatenated to form the first feature set F = {f1, f2, ..., f...} D (D≥50), each feature is organized into a feature matrix according to the device number and timestamp, and stored in the real-time feature database for downstream modules to call.

[0071] The state classification and recognition module 11 uses a pre-trained random forest model to classify and recognize the operating status of the metering equipment. The random forest model contains 150 decision trees, each with a maximum depth of 30 layers and a minimum of 5 samples per leaf node. When splitting a node, √D candidate features are randomly selected, using Gini impurity as the splitting criterion. The random forest model is pre-trained using no fewer than 5000 labeled samples.

[0072] In the actual classification and recognition process, each feature vector F in the first feature set is... t The random forest model is input, and each decision tree independently outputs a state category prediction. A majority voting method is used to determine the final classification result, and the voting probability distribution for each category is also output. The real-time evolving state includes at least four state levels: "normal," "mild performance drift," "moderate performance drift," and "severe performance drift." The state classification and recognition module 11 writes the classification results into the production line state monitoring database in real time for use by the performance drift determination module 12.

[0073] The performance drift determination module 12 receives the real-time evolution state and its voting probability distribution output by the state classification and recognition module 11, and performs the following operations: First, the performance deviation feature value in the real-time evolution state is extracted, specifically the voting probability value P of the "severe performance drift" category. severe(t) The value ranges from 0 to 1.

[0074] Next, the absolute value of the difference between the performance deviation feature value and the baseline performance parameter is calculated. The baseline performance parameter is the probability value of the random forest model voting for the "normal" category when the equipment is in its factory-qualified state (typically not less than 0.85), ΔP = |P severe(t) - P severe_base |, where P severe_base The voting probability value for the "severe performance drift" category under baseline conditions (typically no higher than 0.05).

[0075] Then, the absolute value of the difference is compared with a preset drift threshold. The preset drift threshold is determined based on the device accuracy level and historical false alarm rate statistics: for high-precision measuring devices of level 0.1 and above, the drift threshold is set to 0.30; for level 0.5 measuring devices, the drift threshold is set to 0.40; and for level 1.0 and below measuring devices, the drift threshold is set to 0.50.

[0076] If the absolute value of the difference is greater than the preset drift threshold, a performance drift risk identifier is generated. The performance drift risk identifier includes at least four fields: device number, risk level, drift characteristic value, and trigger time.

[0077] Finally, a first warning signal is generated for the metering equipment based on the performance drift risk identifier. The first warning signal is a formatted data packet containing the aforementioned risk identifier information, which is pushed to the production line monitoring system and the health awareness trigger module 13 via a message queue (RabbitMQ), and simultaneously displayed on the production line console in the form of a visual pop-up window.

[0078] Preferably, to avoid frequent false triggers, the performance drift determination module 12 is also equipped with a debouncing mechanism: the first warning signal is only officially generated when the absolute value of the difference between three consecutive sampling points (each sampling point is 30 seconds apart).

[0079] The health sensing trigger module 13 continuously monitors the first warning signal output by the performance drift determination module 12. When the first warning signal is received, the health sensing trigger module 13 immediately activates the health sensing mechanism for the corresponding metering device and initiates the refined calculation process of the health sensing degree.

[0080] In the health perception trigger module 13, the health perception degree The following formula is used for calculation:

[0081] in, The value represents the health perception at time t (ranging from 0 to 100, with higher values ​​indicating healthier devices), and K represents the total number of feature dimensions of the physical data (default K=5, corresponding to the five dimensions of temperature, pressure, vibration, current, and power). This represents the weight coefficient of the k-th feature dimension (determined through the analytic hierarchy process, with the sum of the weights of each dimension being 1). This represents the actual performance parameter value of the k-th feature at time t. The reference value for this feature is taken as the standard value during the factory calibration of the equipment. This represents the current runtime or temperature parameter of the k-th feature (the temperature value is used for heat-sensitive features, and the cumulative runtime is used for mechanical features). This indicates the maximum permissible value for this feature (taken as the equipment design limit or the upper limit of the standard specification). This represents the error deviation of the k-th feature (the ratio of the current measurement error to the maximum permissible error). α, β, and γ represent the weighting coefficients of the performance ratio, time ratio, and error ratio, respectively, with default values ​​of α=0.50, β=0.20, and γ=0.30.

[0082] The health perception trigger module 13 will calculate the health perception level. The data is stored in the time series database and simultaneously sent to the time series prediction module 14 as input data for subsequent predictions.

[0083] The timing prediction module 14 obtains the health perception level from the health perception triggering module 13. The first loss sequence is obtained by using a Long Short-Term Memory (LSTM) network to perform time-series prediction of the state of the metering equipment in multiple consecutive operating cycles in the future.

[0084] In the time series prediction module 14, the first loss sequence is obtained in the following manner: First, obtain the historical health perception sequence within the historical time window. , where n represents the length of the historical time window (n=12, i.e., using health perception data from the past 12 months for prediction), and t represents the current moment.

[0085] Then, the historical health perception sequence is input into the Long Short-Term Memory network, and prediction calculation is performed using the following formula:

[0086] in, This represents the predicted device loss value at the future time t+Δt (ranging from 0 to 100, with higher values ​​indicating more severe device loss), and LSTM stands for Long Short-Term Memory network function. Represents the complete set of parameters of the network. This represents the output weight matrix. σ represents the cell state at the current moment, σ represents the activation function (the Sigmoid function is used in this embodiment), and tanh() represents the hyperbolic tangent function; The LSTM network is obtained in advance through training. The specific training process can be referred to and combined with the description in the foregoing method embodiments.

[0087] The first loss sequence is obtained by combining equipment loss values ​​from multiple consecutive prediction time points. Specifically, with ΔT as the prediction step size (ΔT = 1 month), equipment loss values ​​for the next 6 months (i.e., 6 time steps) are continuously predicted to obtain the first loss sequence D. seq = {Dpred(t+1) D pred(t+2 ), ..., D pred(t+6 The timing prediction module 14 outputs the first loss sequence to the hidden danger judgment module 15.

[0088] The hidden danger determination module 15 receives the first loss sequence Dseq output by the timing prediction module 14 and performs the following operations: Extract the maximum value D from the first loss sequence. max = max(D seq ); Obtain the pre-set safe operating loss threshold D threshold The safe operating loss threshold is set according to the equipment type and accuracy level. For high-precision metering equipment of level 0.1 and above, D threshold = 60; For 0.5 class metering equipment, D threshold = 70; For metering equipment of class 1.0 and below, D threshold = 80; The maximum value D max With the safe operation loss threshold D threshold Perform numerical comparison; If the maximum value is greater than the safe operation loss threshold, extract the prediction time t corresponding to the maximum value. max ; A hazard feature vector is generated based on the predicted time corresponding to the maximum value. The hazard feature vector includes the equipment number, the hazard level (divided into three levels according to the extent of exceeding the threshold: 0-20% is a general hazard, 20%-50% is a moderate hazard, and more than 50% is a serious hazard), the expected occurrence time, and the predicted maximum loss value; A second early warning signal is generated for the hazard based on the hazard feature vector. The second early warning signal is a structured JSON data packet containing all fields of the hazard feature vector, and is pushed to the scheduling decision system and task optimization module 16 via a message queue.

[0089] Preferably, when multiple devices on the same production line simultaneously trigger the second warning signal, the hazard assessment module 15 presses D. max - D threshold The differences are sorted from largest to smallest, and devices with larger differences receive higher risk weights in subsequent task optimizations.

[0090] The task optimization module 16 obtains the initial task allocation instruction issued by the scheduling decision system for the metering production line, and at the same time receives the second early warning signal output by the hidden danger judgment module 15. It then uses a genetic algorithm to perform global optimization processing to obtain the target task allocation instruction.

[0091] In the task optimization module 16, the genetic algorithm performs global optimization using the following objective function:

[0092] in, This represents the optimal objective function value (Optimal Fitness). This indicates the total number of metering devices in the metering production line. This represents the current load of the i-th device. This represents the amount of new tasks allocated to the i-th device. This represents the risk coefficient of the i-th device. This represents the safety status score of the i-th device. This represents the number of tasks assigned to the i-th device. λ represents the cost of the i-th device performing the j-th task; λ1, λ2, and λ3 represent the weight coefficients of the load balancing, risk control, and cost optimization items, respectively. The task optimization module 16 obtains the target task allocation instruction by minimizing the target optimization function.

[0093] The specific parameters of the genetic algorithm are set as follows: the population size is set to 100, the encoding method is real number encoding, the selection operator is roulette wheel selection, the crossover operator is arithmetic crossover (crossover probability 0.85), the mutation operator is non-uniform mutation (mutation probability 0.05), the maximum number of iterations is set to 500 generations, and the convergence condition is that the optimal fitness value of the population remains unchanged for 50 consecutive generations.

[0094] To prevent the genetic algorithm from outputting infeasible solutions, the task optimization module 16 introduces a penalty function in the fitness calculation: for allocation schemes that exceed the maximum processing capacity of the device, a penalty term is added to the objective optimization function value (the penalty coefficient is set to 1000).

[0095] The task allocation module 17 performs task allocation processing on multiple metering devices in the metering production line according to the target task allocation instruction output by the task optimization module 16, and obtains an updated scheduling sequence. Specifically, it includes the following sub-steps: An initial task package is extracted from the target task allocation instruction. The initial task package contains a set of all tasks to be allocated, and each task includes a task ID, task type, required duration, priority, and precision requirement level. The task priority is determined based on the initial task package. The priority is determined by combining task priority and delivery deadline, and the EDF (Earliest Deadline First) algorithm is used to initially sort the tasks. Based on the task priority order, obtain the current status values ​​of multiple devices. The current status values ​​include the current task queue length and current load rate of the device. and safety status score ; The real-time load of the multiple devices is calculated based on the current status value. i = + ; A decision tree algorithm is used to process the real-time load and the initial task package to obtain the task-device matching degree. The decision tree algorithm takes the task accuracy requirement, the expected execution time, and the real-time load of the device as input features, and the matching degree score (0~100) as the output. The task device matching degree is compared with a preset matching degree threshold (the default matching degree threshold is 70). If the task-device matching degree is greater than the matching degree threshold, a candidate scheduling table is generated based on the task-device matching degree. The candidate scheduling table contains all task-device pairing schemes that meet the matching degree requirements. A sorting operation is performed on the candidate scheduling table to obtain an updated scheduling sequence. The sorting operation follows a multi-level sorting rule: "matching degree first, task urgency second, and device load balancing third."

[0096] The task allocation module 17 pushes the finally generated updated scheduling sequence to the production line execution system through a standardized interface (such as a RESTful API), realizing a complete automated closed loop from fault warning to scheduling optimization.

[0097] For more details, please refer to and combine with the above. Figures 1 to 3 The explanation will not be repeated here.

[0098] Implementing the embodiments of the present invention has the following beneficial effects: This invention provides a method and system for predicting and intelligently scheduling the performance of metering production line equipment. By combining multi-dimensional feature extraction with random forest algorithm, the operating status of metering equipment is classified and identified in real time with high precision, thereby obtaining the real-time evolution status of equipment performance. When early signs of performance degradation appear, the first warning signal is triggered immediately, which significantly shortens the time delay of anomaly detection compared with the traditional periodic detection method. This invention triggers a health perception mechanism through a first early warning signal, and uses multi-dimensional feature weighted fusion to calculate the equipment health perception degree to achieve a quantitative assessment of the equipment health status; then, it uses an LSTM network to perform time-series prediction of equipment loss for multiple consecutive operating cycles in the future. Its gating mechanism can effectively capture long-range dependencies in the loss sequence, identify potential hazards in advance and generate a second early warning signal before the actual occurrence of a quality accident. This invention inputs the second early warning signal and the initial task allocation instruction into the genetic algorithm to construct a multi-objective function that integrates load balancing, risk control and cost optimization for global optimization. It establishes a complete feedback loop from equipment fault early warning to dynamic adjustment of scheduling instructions, enabling production line scheduling decisions to have the ability to perceive and respond to equipment health status in real time. This invention achieves intelligent matching between equipment workload and health status. Equipment with high health status undertakes more measurement tasks, while equipment with low health status automatically reduces its load, effectively slowing down the rate of equipment performance degradation and reducing the risk of quality accidents, thus significantly improving the overall operating efficiency and product qualification rate of the metrology production line.

[0099] 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 processor, 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 and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 Units that specify functions within one or more boxes.

[0100] The above description is merely a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A digital-twin-driven metrology production line fault diagnosis and scheduling optimization method, characterized in that, Includes the following steps: Step S11: Obtain physical data of multiple metering devices in the metering production line under different operating conditions, and perform multi-dimensional feature extraction processing on the physical data to obtain a first feature set. Step S12: Based on the first feature set, the random forest algorithm is used to classify and identify the operating status of the metering equipment to obtain the real-time evolution status of the metering equipment performance. Step S13: If the real-time evolution state meets the preset drift threshold, it is determined that the metering device has a performance drift risk, and a first warning signal for the metering device is obtained. Step S14: Trigger the health perception mechanism for the metering device through the first warning signal to obtain the health perception level of the metering device in the current operating cycle; Step S15: Based on the health perception, a long short-term memory network is used to perform time-series prediction processing on the state of the metering device in multiple consecutive operating cycles in the future to obtain a first loss sequence. Step S16: If the maximum value in the first loss sequence exceeds a preset loss threshold, it is determined that the metering device has a potential risk of causing a quality accident, and a second warning signal is generated for the potential risk. Step S17: Obtain the initial task allocation instruction issued by the scheduling decision system for the metering production line; and use a genetic algorithm to perform global optimization based on the second early warning signal and the initial task allocation instruction to obtain the target task allocation instruction. Step S18: Perform task allocation processing on multiple metering devices in the metering production line according to the target task allocation instruction to obtain an updated scheduling sequence.

2. The method of claim 1, wherein, In step S14, the formula for calculating the health perception is: wherein, represents the health perception at time t, K represents the total number of characteristic dimensions of physical data, represents the weight coefficient of the kth characteristic dimension, represents the actual performance parameter value of the kth characteristic at time t, represents the reference benchmark value of the characteristic, represents the runtime or temperature parameter of the kth characteristic at the current time, represents the maximum allowable value of the characteristic, represents the error deviation of the kth characteristic, and α, β, γ respectively represent the weighting coefficients of the performance ratio term, the time ratio term, and the error term.

3. The method of claim 2, wherein, In step S15, the step of using a long short-term memory network to perform time-series prediction processing on the state of the metering device over multiple consecutive operating cycles to obtain a first loss sequence specifically includes: obtaining a historical health awareness degree sequence in a historical time window length, the historical health awareness degree sequence is represented as wherein n represents the historical time window length, and t represents the current time. The historical health perception sequence is input into a Long Short-Term Memory (LSTM) network. State updates and prediction calculations are performed through the LTM network's forget gate, input gate, and output gate. The prediction calculation process is as follows: wherein, represents a predicted future time device wear value, LSTM represents a long short-term memory network function, represents a set of all parameters of the network, represents an output weight matrix, represents a cell state of the current time, σ represents an activation function, and tanh() represents a hyperbolic tangent function. The first loss sequence is obtained by combining the equipment loss values ​​at multiple consecutive prediction times.

4. The method of claim 3, wherein, In step S16, if the maximum value in the first loss sequence exceeds a preset loss threshold, it is determined that the metering equipment has a potential risk of causing a quality accident, and a second warning signal is generated for the potential risk, specifically including: Extract the maximum value from the first loss sequence; Obtain the pre-set safe operating loss threshold; Compare the maximum value with the safe operation loss threshold. If the maximum value is greater than the safe operation loss threshold, extract the prediction time corresponding to the maximum value; Generate a potential hazard feature vector based on the predicted time corresponding to the maximum value; A second early warning signal is generated for the hazard based on the hazard feature vector.

5. The method of claim 4, wherein, In step S17, the step of using a genetic algorithm to perform global optimization based on the second warning signal and the initial task allocation instruction to obtain the target task allocation instruction specifically includes: Obtain the total number M of metering equipment in the metering production line; Obtain relevant operating parameters for each metering device. These operating parameters include at least: current load, allocated new task volume, risk coefficient, safety status score, number of tasks, and cost of executing each task. Construct the following objective optimization function: wherein, represents the optimal objective function value, represents the total number of measuring devices in the measuring production line, represents the current load of the i-th device, represents the newly added task amount allocated to the i-th device, represents the risk coefficient of the i-th device, represents the safety state score of the i-th device, represents the number of tasks allocated to the i-th device, represents the cost of the i-th device executing the j-th task; λ1, λ2, and λ3 represent the weight coefficients of the load balancing term, the risk control term, and the cost optimization term, respectively. A genetic algorithm is used to perform iterative optimization of the objective function, and the task allocation scheme corresponding to the optimal objective function value is output as the objective task allocation instruction.

6. The method according to claim 5, characterized in that, In step S18, the process of allocating tasks to multiple metering devices in the metering production line according to the target task allocation instruction to obtain an updated scheduling sequence specifically includes: Extract the initial task package from the target task allocation instruction; Determine the task priority order based on the initial task package; Based on the task priority order, obtain the current status values ​​of multiple devices; The real-time load of the multiple devices is calculated based on the current status value; The real-time load and the initial task package are processed using a decision tree algorithm to obtain the task-device matching degree; The task device matching degree is compared with a pre-set matching degree threshold; If the task-device matching degree is greater than the matching degree threshold, a candidate scheduling table is generated based on the task-device matching degree. A sorting operation is performed on the candidate scheduling table to obtain an updated scheduling sequence.

7. A digital twin-driven fault diagnosis and scheduling optimization system for a metering production line, characterized in that, include: The data acquisition and feature extraction module is used to acquire physical data of multiple metering devices in the metering production line under different operating conditions, and to perform multi-dimensional feature extraction processing on the physical data to obtain a first feature set. The status classification and recognition module is used to classify and recognize the operating status of the metering equipment based on the first feature set using a random forest algorithm, so as to obtain the real-time evolution status of the performance of the metering equipment. The performance drift determination module is used to determine that the metering device has a performance drift risk if the real-time evolution state meets a preset drift threshold, and to obtain a first warning signal for the metering device. The health perception triggering module is used to trigger the health perception mechanism for the metering device through the first warning signal, and to obtain the health perception level of the metering device in the current operating cycle. The timing prediction module is used to perform timing prediction processing on the state of the metering device in multiple consecutive operating cycles in the future, based on the health perception, using a long short-term memory network, to obtain a first loss sequence. The hazard determination module is used to determine that the metering equipment has a potential hazard that could cause a quality accident if the maximum value in the first loss sequence exceeds a preset loss threshold, and to generate a second warning signal for the hazard. The task optimization module is used to obtain the initial task allocation instruction issued by the scheduling decision system for the metering production line, and to perform global optimization processing using a genetic algorithm based on the second early warning signal and the initial task allocation instruction to obtain the target task allocation instruction. The task allocation module is used to perform task allocation processing on multiple metering devices in the metering production line according to the target task allocation instruction, and obtain an updated scheduling sequence.

8. The system according to claim 7, characterized in that, In the health perception trigger module, the health perception level is calculated using the following formula: in, The health perception level at time t is represented by K, where K represents the total number of feature dimensions of the physical data. This represents the weight coefficient of the k-th feature dimension. This represents the actual performance parameter value of the k-th feature at time t. This represents the reference value for this feature. This represents the runtime or temperature parameter of the k-th feature at the current moment. This indicates the maximum allowed value for this feature. The value represents the error deviation of the k-th feature, and α, β, and γ represent the weighting coefficients of the performance ratio, time ratio, and error ratio, respectively.

9. The system according to claim 8, characterized in that, In the time-series prediction module, the first loss sequence is obtained in the following manner: Obtain the historical health perception sequence within the historical time window. The historical health perception sequence is input into a long short-term memory network, and prediction calculations are performed using the following formula: in, Indicates the predicted future moment The device loss value, where LSTM represents the Long Short-Term Memory network function. Represents the complete set of parameters of the network. This represents the output weight matrix. σ represents the cell state at the current moment, σ represents the activation function, and tanh() represents the hyperbolic tangent function; The first loss sequence is obtained by combining the device loss values ​​at multiple consecutive prediction times.

10. The system according to claim 9, characterized in that, In the task optimization module, the genetic algorithm performs global optimization using the following objective function: in, This represents the optimal objective function value. This indicates the total number of metering devices in the metering production line. This represents the current load of the i-th device. This represents the amount of new tasks allocated to the i-th device. This represents the risk coefficient of the i-th device. This represents the safety status score of the i-th device. This represents the number of tasks assigned to the i-th device. λ represents the cost of the i-th device performing the j-th task; λ1, λ2, and λ3 represent the weight coefficients of the load balancing, risk control, and cost optimization items, respectively. The task optimization module obtains the target task allocation instruction by minimizing the target optimization function.