Machine Learning-Based Automated Test Anomaly Detection and Scheduling Recovery Method
By using hierarchical perceptual graph neural networks and temporal convolutional networks to generate embedded representations in a multi-test-node environment, and combining them with machine learning models trained by federated distillation, the problem of multi-source heterogeneous data fusion is solved, enabling accurate identification and rapid recovery of test anomalies, and improving the stability and efficiency of testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN XIGU MICROELECTRONICS
- Filing Date
- 2026-01-29
- Publication Date
- 2026-06-30
AI Technical Summary
In a multi-test-node environment, existing technologies struggle to integrate heterogeneous test-related data from multiple sources, resulting in insufficient accuracy and real-time performance in anomaly identification. Furthermore, the lack of personalized scheduling and recovery strategies impacts the stability and efficiency of testing.
By acquiring hierarchical sample encoding data and continuous time-series data through sensor networks, and generating embedded representations using hierarchical perceptual graph neural networks and temporal convolutional networks, and combining machine learning models trained with cross-attention mechanisms and federated distillation, accurate identification and scheduled recovery of abnormal risk levels can be achieved.
It enables accurate identification and rapid recovery of test anomalies, improves the continuity and reliability of multi-site testing, avoids the risk of data privacy leakage, and prevents the spread of anomalies through cross-site anomaly propagation analysis.
Smart Images

Figure CN121681391B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automated testing and intelligent scheduling technology, specifically a machine learning-based method for automated testing anomaly identification and scheduling recovery. Background Technology
[0002] As software systems become increasingly complex and iterate at faster paces, the stability and efficiency of automated testing have become crucial for ensuring software quality. Currently, most testing environments suffer from data fragmentation, with test case execution data and system monitoring data scattered across different test nodes and management platforms. This lack of unified, structured integration and intelligent analysis methods means that traditional methods for anomaly identification often rely on fixed threshold rules and manual checks, based on a single data source. This makes it difficult to consider multimodal information such as test case hierarchical coding and continuous system monitoring signals, impacting both the accuracy and real-time performance of anomaly identification and hindering the rapid development of personalized scheduling and recovery strategies. Furthermore, due to data heterogeneity between different test nodes and limitations imposed on model training by data privacy and access control, it is difficult to build a unified, high-quality anomaly identification and scheduling system. Therefore, how to integrate multi-source heterogeneous test-related data in a multi-test-node environment, construct a unified and efficient intelligent anomaly identification process, and achieve accurate anomaly localization and personalized scheduling and recovery configuration has become a critical technical challenge that urgently needs to be addressed. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention proposes an automated test anomaly identification and scheduling recovery method based on machine learning. It acquires hierarchical sample encoding data and continuous time-series data through sensor networks and control systems. After preprocessing, two types of embedded representations are generated using a hierarchical perceptual graph neural network encoder and a hybrid encoder combining temporal convolution and multi-head self-attention, respectively. An aligned feature set is generated by fusing a cross-attention mechanism with a residual fully connected network. A machine learning model trained using federated distillation outputs the anomaly risk level; if the level exceeds a threshold, it is marked as a task to be recovered. A scheduling recovery strategy library built based on a graph database matches the optimal recovery scheme according to the anomaly type and equipment model and generates execution instructions. Simultaneously, preventative check instructions are sent through cross-site anomaly propagation analysis. This achieves accurate anomaly identification, rapid recovery, and risk prediction, ensuring the continuity and reliability of multi-site testing.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] Machine learning-based automated test anomaly identification and scheduling recovery methods include:
[0006] Obtain a sample data set for a multi-site reliability test chamber; the sample data set includes sample coding data with hierarchical relationship that identifies sample information and continuous time-series data of the sample testing process;
[0007] The sample encoded data is processed by a first preset model to generate a first embedded representation, and the continuous time-series data is processed by a second preset model to generate a second embedded representation.
[0008] By fusing the first and second embedding representations, an aligned feature set is generated.
[0009] The machine learning model trained by federated distillation is called to process the alignment feature set and generate an abnormal indicator set of the abnormal risk level of the sample test. If the abnormal risk level reaches the preset risk threshold, it is determined to be an abnormal test task and an alarm is triggered. After verification, it is registered as a test task to be recovered.
[0010] Based on the anomaly type of the analysis results of the task to be recovered, a scheduling recovery plan is matched from the preset scheduling recovery strategy library and issued to the corresponding test box for execution. After the recovery test task is executed, recovery effect data is collected and fed back to the scheduling recovery strategy library and machine learning model.
[0011] Specifically, the steps for acquiring the sample data set include: real-time acquisition of physical parameters during sample testing through a built-in sensor network deployed at multiple sites in the reliability test chamber, forming a raw time-series stream; signal denoising and missing value interpolation of the raw time-series stream to generate preprocessed continuous time-series data, which includes at least temperature, humidity, and vibration acceleration; synchronous extraction of sample coding data from the test chamber control system, which includes the test chamber site number, sample batch number, test sub-batch sequence, and unique identifier for each sample, wherein the hierarchical relationship is a four-level tree structure of site-batch-sub-batch-sample; aligning the continuous time-series data with the sample coding data according to a time window, and marking the timestamp and device identifier of the data source to form a structured sample data set.
[0012] Specifically, the first preset model is a hierarchical perceptual graph neural network encoder, and the process of processing the sample encoded data includes:
[0013] The sample encoding data of the four-level tree structure is mapped to a directed acyclic graph, where each node represents an encoding unit and the edges represent the membership relationship. The feature vector of each node is initialized through a node embedding layer, and the hierarchical information of adjacent nodes is aggregated using a graph attention mechanism. After multi-layer propagation, the hidden state of the root node is extracted as the structured representation of the sample to generate the first embedding representation.
[0014] Specifically, the second preset model is a hybrid encoder of a temporal convolutional network and multi-head self-attention. The temporal convolutional network uses multiple causal dilated convolutional layers with different dilation rates in parallel to capture dependency patterns at different time scales. The process of processing the continuous temporal data includes:
[0015] Continuous temporal data is segmented into fixed-length temporal segments and positional encoding is added to form a set of positionally encoded temporal segments. A temporal convolutional network is used to extract local temporal dependency features from the set of positionally encoded temporal segments, and then a multi-head self-attention mechanism is used to capture long-range dependencies between temporal segments to obtain a context feature tensor representing long-range dependencies. Temporal pooling is performed on the context feature tensor to generate a second embedding representation representing the entire testing process.
[0016] Specifically, the fusion of the first embedding representation and the second embedding representation to generate an aligned feature set includes:
[0017] The first embedding representation and the second embedding representation are respectively input into the first independent fully connected layer and the second independent fully connected layer for linear transformation; the first independent fully connected layer and the second independent fully connected layer are configured to project the first embedding representation and the second embedding representation with different dimensions onto a shared common feature space with the same dimension, thereby obtaining a first projected feature vector corresponding to the sample encoded data and a second projected feature vector corresponding to the continuous time series data;
[0018] Calculate the cosine similarity matrix between the first projected feature vector and the second projected feature vector, and construct a cross-attention module based on the cosine similarity matrix, wherein the first projected feature vector is used as the query vector, and the second projected feature vector is used as the key vector and value vector. The first attention weight of the first projected feature vector relative to the second projected feature vector is calculated through the attention mechanism. At the same time, the query and key-value roles are swapped, and the second attention weight of the second projected feature vector relative to the first projected feature vector is calculated.
[0019] Specifically, the step of fusing the first embedding representation and the second embedding representation to generate an aligned feature set further includes:
[0020] The first and second projected feature vectors are weighted using the generated first and second attention weights respectively to obtain the attention-weighted first feature vector and the attention-weighted second feature vector. The attention-weighted first feature vector and the attention-weighted second feature vector are then multiplied element-wise to generate a fusion feature vector that captures the fine-grained interaction between the two.
[0021] The attention-weighted first feature vector, the attention-weighted second feature vector, and the fused feature vector are concatenated to form a high-order joint feature vector. The high-order joint feature vector is then input into a residual fully connected network, which consists of one or more fully connected layers containing skip connections. This residual fully connected network is used to perform nonlinear transformation, deep fusion, and feature dimensionality reduction on the high-order joint feature vector.
[0022] The final output layer of the residual fully connected network generates a dense vector of fixed dimensions, which is the alignment feature set representing the deep fusion and alignment of sample encoding information and test process temporal information.
[0023] Specifically, the step of calling the machine learning model trained by federated distillation to process the aligned feature set includes:
[0024] During the training phase, multiple test site sites act as federated clients. Each federated client uses its local alignment feature set and its corresponding labeled anomaly labels to independently train an initialized local anomaly detection sub-model and obtain local model parameter updates.
[0025] The central server receives local model parameter updates uploaded by each federated client, performs a weighted average aggregation of the local model parameter updates of all federated clients using a secure aggregation algorithm, generates and updates a global model parameter, and constructs a global teacher model based on the global model parameter.
[0026] The central server distributes the global teacher model to each federated client. Each federated client uses the global teacher model to perform forward inference on the local alignment feature set and generates a soft prediction output, which is a probability distribution vector.
[0027] Each client uses the soft prediction output as a supervision signal for knowledge distillation, combined with local anomaly labels, to jointly guide the lightweight student model for local training.
[0028] Each federated client uploads the updated student model parameters to the central server. The central server then aggregates the updated student model parameters from each client using a secure aggregation algorithm, generating and updating the final version of the global student model parameters.
[0029] Specifically, the step of calling the machine learning model trained by federated distillation to process the aligned feature set further includes:
[0030] During the application phase, the alignment feature set is input into the global student model, and the global student model performs the following processes sequentially:
[0031] The aligned feature set is standardized by a batch normalization layer to obtain standardized features. The standardized features are then input into a multilayer perceptron module, which includes at least one feedforward layer with a self-attention mechanism to capture the internal dependencies of the features and perform nonlinear transformations to output deep features. The deep features are then input into the final output layer and processed by a Softmax activation function. The output of the Softmax activation function is a multidimensional probability distribution vector, which is the set of anomaly indicators, defining the predicted probability of a sample belonging to each anomaly risk level.
[0032] Specifically, the step of matching a scheduling recovery scheme from a preset scheduling recovery strategy library based on the anomaly type of the task to be recovered analysis results includes:
[0033] The system extracts key query conditions from the records of the test task to be recovered; the key query conditions include the anomaly type and the equipment model identifier of the associated reliability test chamber;
[0034] The anomaly type and device model identifier are used as joint query conditions input into a preset scheduling recovery strategy library; the scheduling recovery strategy library is a knowledge graph built based on a graph database.
[0035] In the graph database, starting from the node corresponding to the anomaly type, all recovery solution nodes that have a first relationship with it are traversed, and recovery solution nodes that have a second relationship with the device model identifier are selected to form an initial candidate solution node set; the first relationship is a processable relationship; the second relationship is an applicable relationship.
[0036] For each recovery plan node in the initial candidate plan node set, extract its associated historical execution metadata; the historical execution metadata includes at least the number of historical successful executions, the total number of historical executions, and the historical average execution time;
[0037] Based on the historical execution metadata, a comprehensive matching score is calculated for each candidate solution node. The recovery solution node with the highest comprehensive matching score is selected, and its associated recovery solution template is determined as the target recovery solution template. The target recovery solution template is an instruction script template containing placeholders. The placeholders are used to replace specific task parameters.
[0038] Extract the current task parameters from the record of the test task to be recovered; the current task parameters include at least the sample code of the sample to be recovered, the test task identifier to be recovered, and the equipment identifier of the associated test chamber;
[0039] The current task parameters are filled into the corresponding placeholders in the instruction script template to generate a specific executable recovery instruction sequence; the recovery instruction sequence is the scheduling recovery scheme that matches the current test task to be recovered.
[0040] Specifically, the method further includes a cross-site anomaly propagation analysis step:
[0041] When an anomaly occurs at any site, retrieve sample data from non-sites in the same batch or using the same parameters; calculate the cross-correlation between data and the correlation of anomaly indicators between sites to construct an anomaly propagation network; if the propagation risk exceeds a preset threshold, send preventative inspection instructions to related sites.
[0042] Compared with the prior art, the beneficial effects of the present invention are:
[0043] This invention proposes an automated test anomaly identification and scheduling recovery method based on machine learning. By processing multi-dimensional data in a hierarchical manner, it achieves accurate capture of test anomalies. For sample encoded data with hierarchical relationships, a hierarchical perceptual graph neural network encoder is used to map the four-level tree structure into a directed acyclic graph and aggregate hierarchical information to fully mine structured features. For continuous time-series data, a hybrid encoder combining a temporal convolutional network and a multi-head self-attention network is used to capture both local temporal dependencies and long-range correlations, fully representing the dynamic changes in the testing process. Through a cross-attention mechanism and a residual fully connected network, the deep fusion and alignment of the two types of features are achieved, eliminating dimensional differences and information silos. Combined with a model trained by federated distillation, the output of multi-level anomaly probabilities improves the accuracy and fine granularity of anomaly identification, avoiding missed or false positives.
[0044] This invention proposes an automated test anomaly identification and scheduling recovery method based on machine learning. Relying on a knowledge graph scheduling recovery strategy library built on a graph database, it uses anomaly type and device model as joint query conditions. Through node relationship traversal and historical execution metadata scoring, it quickly matches the optimal recovery solution and automatically fills in task parameters to generate executable instructions, shortening the anomaly handling cycle and reducing test interruption losses. At the same time, the recovery effect data is fed back to the strategy library and machine learning model to continuously optimize the solution matching logic and model prediction performance, thereby continuously improving the adaptability and efficiency of scheduling recovery.
[0045] This invention proposes an automated test anomaly identification and scheduling recovery method based on machine learning. It employs a federated distillation training model, where each site independently trains its sub-model locally, uploading only the updated model parameters. A secure aggregation algorithm ensures data privacy and transmission security, avoiding the privacy leakage risks associated with multi-site data sharing. Simultaneously, it aggregates global data knowledge, enabling the trained global student model to possess strong generalization capabilities and adapt to different site testing scenarios. The newly added cross-site anomaly propagation analysis step constructs a propagation network by calculating data correlations between sites, predicting anomaly spread risks in advance and sending preventative check instructions, effectively curbing anomaly propagation and ensuring the overall continuity and stability of the multi-site testing system. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the automated test anomaly identification and scheduling recovery method based on machine learning according to the present invention;
[0047] Figure 2 This is a flowchart illustrating the principle of the automated test anomaly identification and scheduling recovery method based on machine learning in this invention. Detailed Implementation
[0048] Example 1:
[0049] Please see Figure 1 and Figure 2 The present invention provides an embodiment of an automated test anomaly identification and scheduling recovery method based on machine learning, the method comprising S1 to S5, including the following steps:
[0050] S1: Obtain the sample data set of the multi-site reliability test chamber; the sample data set includes sample coding data with hierarchical relationship that identifies sample information and continuous time-series data of the sample testing process;
[0051] The steps for acquiring the sample data set include: real-time acquisition of physical parameters during sample testing through a built-in sensor network deployed at multiple sites in the reliability test chamber, forming a raw time-series stream; signal denoising and missing value interpolation of the raw time-series stream to generate preprocessed continuous time-series data, which includes at least temperature, humidity, and vibration acceleration; simultaneous extraction of sample coding data from the test chamber control system, which includes the test chamber site number, sample batch number, test sub-batch sequence, and unique identifier for each sample, with the hierarchical relationship being a four-level tree structure of site-batch-sub-batch-sample; aligning the continuous time-series data with the sample coding data according to a time window, and marking the timestamp and device identifier of the data source to form a structured sample data set.
[0052] It's important to explain that in multi-site reliability testing scenarios, traditional methods often suffer from problems such as single data acquisition dimensions, fragmented data between sites, and delayed acquisition timing, leading to insufficient data support for anomaly identification. This invention, through a sensor network embedded in reliability test chambers deployed at multiple sites, achieves real-time acquisition of physical parameters during sample testing, forming a continuous raw time-series stream. The acquired physical parameters cover at least core test indicators such as temperature, humidity, and vibration acceleration, comprehensively covering key environmental and mechanical parameters affecting sample reliability during testing, and fully capturing the dynamic trajectory of changes during the testing process. Compared to traditional methods that only acquire single parameters or are not real-time, the deployment of this sensor network achieves comprehensive, real-time, and continuous data acquisition, ensuring the capture of any subtle abnormal signals during testing and avoiding missed anomaly detection due to missing or delayed data. Simultaneously, this invention extracts sample coding data from the test chamber control system and designs a four-level tree-structured hierarchy of site-batch-sub-batch-sample. The coding data of each sample includes the test chamber site number, sample batch number, test sub-batch sequence, and a unique identifier for each sample. This hierarchical coding design can clearly define the belonging relationship of each sample, enabling precise traceability from site to individual sample. In contrast, traditional sample coding methods often lack clear hierarchical divisions, only identifying individual samples and failing to associate them with their respective batches, sub-batches, and site information. This leads to a break in the association between samples and the test environment and test parameters in multi-site, multi-batch testing scenarios, making it difficult to accurately locate the scope of anomalies. However, the four-level tree-structured coding structure of this invention can deeply bind the sample's identity information with the test organization structure, providing a crucial data foundation for cross-site anomaly analysis and batch-level anomaly tracing. This structured coding design is extremely rare in traditional methods, and its adaptability to multi-site testing scenarios has an irreplaceable advantage.
[0053] S2: Process the sample encoded data through a first preset model to generate a first embedded representation, and process the continuous time series data through a second preset model to generate a second embedded representation;
[0054] It is important to emphasize that traditional methods for processing sample coding data often employ flattened coding or simple vector mapping, completely ignoring the hierarchical relationships between sites, batches, sub-batches, and samples. This results in insufficient structured feature representation and an inability to provide effective identity association support for anomaly identification. This invention employs a hierarchical perceptual graph neural network encoder as the first preset model, specifically designed for processing four-level tree-structured sample coding data. This achieves deep modeling of hierarchical relationships. The first preset model first maps the four-level tree-structured sample coding data into a directed acyclic graph, where each node represents a coding unit, and edges explicitly represent the hierarchical relationships between coding units. This graph structure transformation can intuitively and completely preserve the hierarchical topology of sample coding, converting abstract hierarchical information into structured data that the model can process. Traditional methods cannot achieve this visualization and structured modeling of hierarchical relationships, often only able to decompose hierarchical coding into independent feature items, leading to the loss of inter-level correlation information. Subsequently, the first pre-defined model initializes the feature vector of each node through a node embedding layer, assigning an initial feature representation to each encoding unit. Then, it aggregates the hierarchical information of adjacent nodes using a graph attention mechanism. The core advantage of this mechanism lies in its ability to adaptively assign different attention weights to different adjacent nodes, focusing on hierarchical information that significantly impacts the current node's features. For example, when aggregating the features of a sample node, it prioritizes key information about its sub-batch, batch, and site nodes, rather than averaging all hierarchical information. This adaptive information aggregation method accurately captures the core relationships within the hierarchical hierarchy, avoiding interference from irrelevant information, resulting in more targeted feature representations. After multi-layer propagation, the first pre-defined model extracts the hidden state of the root node as the structured representation of the sample, i.e., the first embedding representation. This hidden state of the root node integrates all hierarchical information from the site to the sample, including the sample's unique identifier, common information from its batch and sub-batch, and environmental characteristics of the site, forming a comprehensive and accurate structured feature vector.
[0055] It is also important to emphasize that traditional methods for processing continuous time-series data often employ models such as recurrent neural networks (RNNs) and single convolutional neural networks (CNNs), which have significant limitations: RNNs are prone to the vanishing gradient problem when processing long sequences of data, making it difficult to capture long-range temporal dependencies; single CNNs have limited receptive fields for their kernels, only capturing local dependencies at fixed time scales and failing to comprehensively cover dynamic changes at different time scales during testing. This invention employs a hybrid encoder combining a temporal convolutional network and a multi-head self-attention mechanism as the second pre-defined model, overcoming the aforementioned shortcomings of traditional models and achieving a comprehensive and in-depth representation of time-series data. The second pre-defined model first segments the continuous time-series data into fixed-length time-series segments and adds positional encoding, forming a set of time-series segments with positional encoding. The addition of positional encoding effectively preserves the sequential information of the time-series data, preventing the model from losing the temporal correlation when processing segmented data. This is a crucial step that is easily overlooked in traditional segmentation processing, ensuring that the sequential relationship between time-series segments is not disrupted. Subsequently, the second pre-defined model utilizes a temporal convolutional network to extract local temporal dependency features from a set of temporal segments with positional encoding. This network uses multiple causal dilated convolutional layers with different dilation rates in parallel. Convolutional kernels with different dilation rates can cover different time spans; for example, kernels with small dilation rates can capture rapid fluctuations in a short time, such as sudden temperature changes, while kernels with large dilation rates can capture slow changes over long time scales, such as gradual humidity shifts. This multi-dilation rate design allows the second pre-defined model to simultaneously cover dependency patterns at different time scales, comprehensively capturing various types of local dynamic features during the testing process. Based on the extracted local features, the model captures long-range dependencies between temporal segments through a multi-head self-attention mechanism. This mechanism can directly calculate the correlation strength between any two temporal segments, regardless of their distance in the time series, thus effectively capturing long-range dependencies, such as the correlation between parameter fluctuations in the early stages of testing and anomalies in the later stages. Finally, the second preset model performs temporal pooling on the context feature tensor to generate a second embedding representation that represents the entire testing process. The temporal pooling operation can integrate the local features and long-range correlation features of all temporal segments to form a compact and comprehensive temporal feature vector that fully reflects the dynamic change trajectory and inherent laws of the testing process. This hybrid encoder combines the advantages of local feature extraction of temporal convolutional networks with the long-range dependency capture capability of multi-head self-attention mechanisms, realizing multi-dimensional and deep representation of temporal data. The second embedding representation it generates far surpasses the temporal features generated by traditional single models in terms of richness and comprehensiveness.
[0056] S3: Fuse the first and second embedding representations to generate an aligned feature set;
[0057] S4: Call the machine learning model trained by federated distillation to process the aligned feature set, generate an abnormal indicator set of the abnormal risk level of the sample test, and if the abnormal risk level reaches the preset risk threshold, it is determined to be an abnormal test task and an alarm is triggered. After verification, it is registered as a test task to be recovered.
[0058] Furthermore, the triggering and judgment logic for identifying an abnormal test task and issuing an alarm is as follows: the system monitors the set of abnormal indicators in real time; when the probability value of any abnormal type exceeds its independently set dynamic risk threshold, or the weighted comprehensive score of all abnormal types exceeds a global risk threshold, an alarm is triggered; the dynamic risk threshold is adaptively adjusted according to the historical occurrence frequency and severity of the abnormal type; after the alarm is generated, the system automatically packages the current alignment feature set, the original sample encoding data, the continuous time-series data segment, and the set of abnormal indicators to create a high-priority abnormal test task instance, pushes it to the task queue of the monitoring center, and pushes the alarm information to the corresponding engineer's console interface in real time via the WebSocket protocol.
[0059] It's important to note that traditional machine learning models face two major challenges in multi-site scenarios: first, centralized training requires collecting raw data from each site, leading to data privacy risks; second, purely locally trained models lack global knowledge, have poor generalization ability, and cannot adapt to different testing environments. This invention employs federated distillation technology to train machine learning models, perfectly balancing data privacy protection and model generalization ability, while simultaneously achieving accurate prediction of anomaly risk levels. Its performance advantages are irreplaceable in multi-site scenarios.
[0060] S5: Based on the anomaly type of the analysis results of the task to be recovered, match the scheduling recovery scheme from the preset scheduling recovery strategy library and issue it to the corresponding test box for execution. After the recovery test task is executed, collect the recovery effect data and feed it back to the scheduling recovery strategy library and machine learning model.
[0061] Furthermore, the scheduling recovery scheme includes a recovery action sequence, target test chamber selection logic, and recovery parameter configuration. Its generation steps include: the recovery action sequence includes an ordered combination of atomic operations such as pausing the current test, resetting the equipment status, replacing the sample, and adjusting the temperature and humidity curve; the target test chamber selection logic dynamically calculates the priority based on the current load of each test chamber, the physical distance from the abnormal site, and equipment compatibility; the recovery parameter configuration is adaptively adjusted according to the degree of abnormality, such as temperature compensation value and test time extension ratio.
[0062] Furthermore, after the recovery test task is executed, recovery effect data is collected and fed back to the scheduling recovery strategy library and machine learning model, including:
[0063] (1) After the scheduling recovery plan is issued and executed, the system automatically triggers a recovery effect monitoring subprocess. The recovery effect monitoring subprocess collects the status monitoring data of the corresponding test box that executes the recovery plan in the next complete test cycle at a monitoring frequency higher than the normal sampling frequency. The status monitoring data includes at least continuous time-series data after the recovery operation is executed, and the recovery effect monitoring subprocess continues to run until the end of the complete test cycle.
[0064] (2) Based on the collected status monitoring data, calculate a set of predefined quantitative indicators of recovery effect; the quantitative indicators of recovery effect include at least the recovery stabilization time required for key test parameters to recover to the preset tolerance range, the maximum overshoot of parameters during the recovery process, and the binary judgment result of whether the system enters a new stable state at the end of the cycle; the recovery stabilization time, the maximum overshoot of parameters, and the stable state judgment result together constitute the structured recovery effect data;
[0065] (3) The system automatically generates a feedback record, which is fully associated with this abnormal event and includes the identifier of the test task to be recovered, the type of abnormality, the matched and executed scheduling recovery plan, and the recovery effect data;
[0066] (4) The feedback record is converted into one or more knowledge graph triples according to the preset mapping rules. The basic form of the knowledge graph triple is a triple of anomaly type node, recovery scheme node, and recovery effect index.
[0067] (5) Store the knowledge graph triples as new nodes and relations in the scheduling and recovery strategy library based on the graph database to update the connection weights and attributes of the nodes in the graph, thereby enhancing the accuracy and timeliness of scheme matching;
[0068] (6) Based on this abnormal event, construct a weighted reinforcement learning sample. The weighted reinforcement learning sample includes: the alignment feature set generated in the abnormality identification stage, the final abnormality type label after verification and confirmation, and the recovery effect score calculated based on the recovery effect data.
[0069] (7) Encrypt the weighted reinforcement learning samples to generate encrypted training samples, and upload the encrypted training samples to the federated learning central server.
[0070] (8) When the next round of federated distillation training begins, the federated learning central server will securely aggregate the encrypted training samples received from each client and use them to update the parameters of the machine learning model trained by the federated distillation, thereby realizing the continuous iterative optimization of the machine learning model based on the actual recovery effect.
[0071] It should be noted that traditional anomaly recovery methods often employ fixed recovery procedures, lacking adaptability to specific scenarios such as anomaly types and device models. This results in poorly targeted recovery solutions, low success rates, and low execution efficiency, often requiring manual intervention to complete the recovery, severely impacting the continuity of testing. This invention, based on a graph database-driven scheduling recovery strategy library, designs an intelligent and precise solution matching process. It can quickly match the optimal recovery solution and automatically generate executable instructions, achieving rapid and efficient anomaly recovery. Its functional advantages have irreplaceable value in the field of anomaly handling.
[0072] In summary, this application first uses the sensor network and control system of a multi-site reliability test chamber to collect and preprocess sample coding data with a four-level tree-like hierarchical structure and continuous time-series data such as temperature and humidity. Then, it uses a hierarchical perceptual graph neural network encoder and a hybrid encoder of temporal convolution and multi-head self-attention to generate two types of embedded representations. After processing by linear projection, cross-attention weighted fusion and residual fully connected network, an aligned feature set is obtained. The global student model trained by federated distillation outputs the anomaly risk level, and if it exceeds the threshold, it is marked as a task to be recovered. Based on the strategy library built on the graph database, the optimal recovery scheme is matched and the execution instructions are generated by using the anomaly type and equipment model as joint conditions. At the same time, anomaly propagation early warning is realized through cross-site data correlation analysis. For example, taking the reliability test chamber with site number S03 and equipment model YT-600 as an example, the samples tested in batch B202406, sub-batch B202406-02, and unique identifier S03-B202406-02-015 have high-frequency noise in the vibration acceleration time series data collected by the sensor during continuous testing. First, the sample encoded data is mapped into a directed acyclic graph by a hierarchical perceptual graph neural network, and the site-batch-sub-batch-sample hierarchical information is aggregated to generate the first embedding representation. The vibration acceleration time series data is segmented into time series segments of 10 seconds / segment and position encoding is added. Local fluctuation features are captured by a temporal convolutional network, and long-range dependencies are captured by a multi-head self-attention mechanism to generate the second embedding representation. The two types of embeddings are projected to the same feature space through independent fully connected layers, and after calculating the cosine similarity, they are passed through a cross-attention module. The system obtains bidirectional weights, weights them, fuses them, and processes them through a residual network to generate an aligned feature set. This aligned feature set is then input into the global student model. After batch normalization and multilayer perceptron processing, the Softmax output shows a vibration parameter anomaly risk level of 0.89. Assuming a preset threshold of 0.7, this is considered an abnormal task. The system extracts the vibration parameter anomaly and YT-600 as joint query conditions, searches the graph database strategy library, traverses the recovery scheme nodes that can handle vibration anomalies, and selects schemes suitable for YT-600. Combining this with its historical success rate of 92% and average execution time of 2 minutes, the optimal scheme template is determined. Sample codes, task identifiers, and other parameters are filled in, generating an execution command to pause testing, restart the vibration sensor, calibrate the vibration acceleration threshold to 5g, and resume testing. This command is then sent to the S03 site test chamber, and the sample resumes normal testing.
[0073] The method also includes a cross-site anomaly propagation analysis step:
[0074] When an anomaly occurs at any site, retrieve sample data from non-sites in the same batch or using the same parameters; calculate the cross-correlation between data and the correlation of anomaly indicators between sites to construct an anomaly propagation network; if the propagation risk exceeds a preset threshold, send preventative inspection instructions to related sites.
[0075] It's important to explain that traditional anomaly handling methods are mostly single-point processing models, focusing only on the individual site where the anomaly occurs and ignoring the correlation between multiple sites. This allows anomalies to spread across different sites, causing large-scale test interruptions and severely impacting the overall stability of multi-site testing. This invention adds a cross-site anomaly propagation analysis step, realizing a shift from passively handling anomalies to proactively preventing their spread. Its forward-looking risk control function is completely lacking in traditional methods and has irreplaceable strategic value. When an anomaly occurs at any site, the system first retrieves sample data from non-sites in the same batch or using the same parameters. Samples in the same batch often share the same materials, structure, and testing requirements, while samples using the same parameters face the same testing environment. These samples have a high correlation, and the risk of anomaly propagation is relatively high. Traditional methods lack this correlation data retrieval mechanism and cannot identify potentially affected sites, leading to reactive responses only after anomalies have spread. Subsequently, the system calculates the cross-correlation of data between sites and the correlation of anomaly indicators to construct an anomaly propagation network. The cross-correlation reflects the consistency of data change trends across different sites, while the correlation of anomaly indicators quantifies the similarity of anomaly characteristics across different sites. Through correlation analysis of these two dimensions, the system can accurately determine the probability and path of anomaly propagation between different sites, transforming abstract propagation risks into a visualized propagation network. This allows staff to clearly grasp the spread of anomalies. However, traditional methods cannot quantify the risk of cross-site anomaly propagation and rely solely on human experience, which is highly subjective, inaccurate, and difficult to effectively prevent the spread of anomalies. This invention, through scientific correlation calculation and propagation network construction, can objectively and accurately assess propagation risks. When the propagation risk exceeds a preset threshold, the system automatically sends preventative inspection instructions to related sites, guiding them to inspect and maintain relevant samples and equipment in advance, promptly eliminating potential anomalies and preventing further spread of anomalies.
[0076] Example 2:
[0077] In this embodiment, the first preset model is a hierarchical perceptual graph neural network encoder, and the process of processing the sample encoded data includes:
[0078] A1: Map the sample coding data of the four-level tree structure to a directed acyclic graph, where each node represents a coding unit and the edges represent the membership relationship;
[0079] Furthermore, the specific steps of A1 include:
[0080] (1) The system parses each unique coding unit in the sample coding data; the coding unit includes the site code, batch code, sub-batch code and sample individual code;
[0081] (2) Create a corresponding graph node for each coding unit and assign a node identifier to the graph node. At the same time, according to the level of the coding unit in the four-level tree structure, mark the corresponding level category of each graph node. The level category includes site level, batch level, sub-batch level and sample individual level.
[0082] (3) Based on the inherent subordinate relationship of the four-level tree structure, construct directed edges connecting graph nodes at different levels;
[0083] For each graph node marked as a site level, search for its subordinate batch level graph nodes among all graph nodes; the subordinate relationship is determined by the logic that the batch code belongs to the site code;
[0084] For each searched subordinate batch level graph node, starting from the graph node of the site level, create a directed edge to the graph node of the subordinate batch level, with the direction from the higher level to the lower level.
[0085] For each batch level graph node, search for its subordinate sub-batch level graph nodes among all graph nodes, and create a directed edge from the graph node of that batch level to each subordinate sub-batch level graph node.
[0086] For each sub-batch level graph node, search for its subordinate sample individual level graph nodes among all graph nodes, and create a directed edge from the graph node of that sub-batch level to each subordinate sample individual level graph node.
[0087] After this step, all directed edges that embody vertical subordination relationships are constructed, forming the backbone of the graph structure;
[0088] (4) Generate an initial feature vector for each graph node; the initial feature vector is generated by merging two types of embedding vectors: the first type is a hierarchical category embedding vector, which is obtained by querying a trainable full-level category embedding table according to the hierarchical category of the graph node; the second type is a coding semantic embedding vector, which is obtained by mapping the original coding unit value corresponding to the graph node through an embedding layer;
[0089] (5) The hierarchical category embedding vector and the encoded semantic embedding vector are concatenated to obtain the initial feature vector of the graph node, and the initial feature vectors of all graph nodes together constitute the node initial feature matrix;
[0090] (6) By analyzing the additional attributes or contextual relationships of the graph nodes, horizontal association edges are added to the main graph structure formed by the vertical directed edges. Specifically, for two or more graph nodes belonging to the same level, if the additional attributes determine that the preset association conditions are met, an undirected edge or a bidirectional edge is established between each pair of graph nodes that meet the conditions. The additional attributes include, but are not limited to, test standard identifiers, creation time windows, and physical location partitions. The preset association conditions include the same test standard identifier, creation time within the same preset time interval, or adjacent physical location partition numbers.
[0091] (7) Integrate the connection edges established between all graph nodes in (3) and (6) and the initial feature matrix of the nodes in (5) to complete the mapping from tree structure encoded data to directed acyclic graph structure data.
[0092] A2: Initialize the feature vector of each node through the node embedding layer, and aggregate the hierarchical information of adjacent nodes using the graph attention mechanism;
[0093] Furthermore, the specific steps of A2 include:
[0094] (1) Receive directed acyclic graph data; the graph data includes graph topology and node original features; the graph topology defines the set of neighboring nodes for each node; the node original features refer to the initial feature vector generated by each node based on its encoding unit and hierarchical category;
[0095] (2) The system inputs the original feature vector of each node into a trainable fully connected layer, which is the node embedding layer. The node embedding layer performs a linear transformation on the input original feature vector of the node and projects the features into a feature space with a uniform dimension, thereby generating an updated node feature vector for each node as the initial feature representation of the node in this layer.
[0096] (3) For each node in the graph that serves as the center node, obtain its node feature vector in this layer. At the same time, obtain the node feature vector of each neighbor node of the center node in this layer. The set of neighbor nodes comes from the graph topology.
[0097] (4) For a node pair consisting of the central node and any of its neighboring nodes, perform attention score calculation. The specific process of attention score calculation is as follows: First, concatenate the node feature vector of the central node with the node feature vector of the neighboring node to form a joint feature vector. Then, input the joint feature vector into a trainable fully connected layer specifically for calculating attention to obtain the original scalar output. Next, apply a non-linear activation function to the original scalar output. Finally, linearly combine the activated scalar with a trainable parameter vector to generate an original attention score for the node pair. Repeat this process to calculate the corresponding original attention score for the central node and each of its neighboring nodes.
[0098] (5) The system inputs all the original attention scores related to the current central node, namely the original attention scores of the central node and all its neighboring nodes as well as the original attention scores of the central node itself, into the Softmax normalization function. The Softmax normalization function calculates a set of input original attention scores so that each output value is greater than zero and the sum is one. Through this process, each original attention score is transformed into a normalized attention weight. The attention weight accurately represents the importance of the feature information of the corresponding neighboring node to the current central node in this aggregation process.
[0099] (6) After obtaining the attention weights of all neighboring nodes for the current central node, the system performs information aggregation operations, including: First, the system inputs the node feature vector of each neighboring node into another independent, trainable fully connected layer. This fully connected layer is used to transform the features of the neighboring nodes into the feature subspace for aggregation, thereby obtaining the transformed feature vector of the neighboring node; Then, for each neighboring node, the system multiplies its corresponding attention weight with its transformed feature vector element by element to obtain the weighted feature vector of the neighboring node; Finally, the system sums the weighted feature vectors generated by all neighboring nodes of the current central node, including the central node itself, element by element. The result is the new feature vector generated by the current central node after aggregating its neighborhood information through the graph attention mechanism of this layer, that is, the aggregated feature vector of the node.
[0100] (7) Repeat (3)-(6) for each node in the graph so that each node obtains an aggregated feature vector. The aggregated feature vectors of all nodes in the attention layer of this graph together form a new graph node feature set, which is the output of this layer, i.e., the new graph node feature set.
[0101] A3: After multi-layer propagation, the hidden state of the root node is extracted as the structured representation of the sample, generating the first embedding representation.
[0102] The second preset model is a hybrid encoder of temporal convolutional networks and multi-head self-attention. The temporal convolutional network uses multiple causal dilated convolutional layers with different dilation rates in parallel to capture dependency patterns at different time scales. The process of processing the continuous temporal data includes:
[0103] B1: Divide continuous time series data into fixed-length time series segments and add position codes to form a set of time series segments with position codes;
[0104] Furthermore, the specific steps for B1 include:
[0105] (1) The system receives continuous time-series data and performs standardization processing on the continuous time-series data to obtain standardized time-series data; the standardization processing is based on the mean and standard deviation calculated from the historical data of each sensor channel, and converts the current data value into a distribution with zero mean and unit variance;
[0106] (2) Based on the preset window length and sliding step size, the standardized time series data is segmented, wherein the window length defines the number of consecutive time steps contained in each time series segment, and the sliding step size defines the interval between the starting points of two adjacent time series segments on the time axis.
[0107] (3) With the window length as a fixed width, the first complete time series segment is extracted from the starting position of the standardized time series data as the first initial time series segment. Then, the starting position of the window is moved backward along the time axis by a sliding step distance to extract the second initial time series segment. This process is repeated until the end of the window exceeds the total length of the standardized time series data, thus forming an initial segment set.
[0108] (4) Check the actual length of each initial time segment in the initial segment set. For segments whose actual length is equal to the preset window length, retain them directly. At the same time, for the last window, extract the end segments whose actual length may be less than the preset window length and perform tail padding to make their length reach the window length, thus obtaining a set of time segments of equal length. The tail padding operation adopts a predefined padding strategy, which is selected from padding by copying the last valid sample point value, padding with zero value, or padding with global average value.
[0109] (5) For each segment in the set of equal-length time series segments, calculate the absolute position encoding vector for each time step position in the segment based on its global time index in the original continuous time series data; the calculation of the absolute position encoding vector adopts a predefined periodic function mapping; the periodic function mapping maps the scalar global time index into a high-dimensional vector by combining sine and cosine functions of different frequencies, wherein the sine and cosine functions are conventional means that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method;
[0110] (6) The position encoding vectors generated for all time steps in the segment are stacked in the order of time steps to form the absolute position encoding matrix of the segment;
[0111] (7) Input the set of equal-length time series segments into a linear projection layer; the linear projection layer projects the multivariate time series data of each segment from the original sensor channel dimension to a new higher-dimensional hidden feature space to obtain the projected feature matrix of each segment; the dimension of the projected feature matrix is consistent with the window length in the time step dimension and consistent with the dimension of the absolute position encoding vector in the feature dimension.
[0112] (8) For each segment in the set of equal-length time segments, the projected feature matrix is added element by element to the corresponding absolute position coding matrix to generate a segment feature matrix with fused position coding. The segment feature matrices with fused position coding of all segments together constitute the set of time segments with position coding.
[0113] B2: Use a temporal convolutional network to extract local temporal dependency features of a set of temporal segments with positional encoding, and then use a multi-head self-attention mechanism to capture long-range dependencies between temporal segments to obtain a context feature tensor representing long-range dependencies.
[0114] Furthermore, the specific steps of B2 include:
[0115] (1) Receive a set of time segments with position encoding; the set of time segments with position encoding is represented as a first four-dimensional tensor, whose dimensions are batch size, total number of segments, time step and feature dimension, respectively;
[0116] (2) The batch size dimension and the total number of segments dimension in the first four-dimensional tensor are merged to form a three-dimensional tensor. The dimensions of this three-dimensional tensor are the total number of samples after merging, the time step and the feature dimension, respectively. It is called the adapted three-dimensional feature tensor.
[0117] (3) Construct a multi-scale temporal convolution module. The multi-scale temporal convolution module contains multiple parallel causal dilation convolution layers. Each causal dilation convolution layer has a different dilation rate parameter to capture local dependency patterns at different time scales. All causal dilation convolution layers simultaneously receive the adapted three-dimensional feature tensor as input and perform one-dimensional convolution operations respectively. The convolution operation of each causal dilation convolution layer only slides in the time step dimension and keeps the total number of samples and feature dimension unchanged. Finally, after the convolution operation, each causal dilation convolution layer outputs a corresponding single-scale convolution feature map.
[0118] (4) The single-scale convolutional feature maps output by all parallel causal dilated convolutional layers are spliced together along the feature dimension to form a preliminary fused feature map;
[0119] (5) The preliminary fused feature map is input into a nonlinear activation function layer for processing to obtain an activated multi-scale feature map. The activated multi-scale feature map is then input into a 1×1 convolutional layer for feature compression and integration, and a multi-scale fused feature tensor is output. The nonlinear activation function is a conventional method that can be understood and implemented by those skilled in the art. This application is not limited to a specific partitioning method.
[0120] (6) The multi-scale fusion feature tensor is split in the sample dimension to restore its original two independent dimensions: batch size and total number of segments. After splitting, a four-dimensional tensor is obtained, whose dimensions are batch size, total number of segments, time step and new fusion feature dimension, respectively. This is called the segment-level fusion feature tensor.
[0121] (7) Input the fragment-level fusion feature tensor into the multi-head self-attention module; the multi-head self-attention module first divides the input fragment-level fusion feature tensor into multiple attention heads in the feature dimension. For each attention head, the following sub-steps are performed: First, the input features are linearly transformed into query vector sequences, key vector sequences and value vector sequences using trainable query weight matrices, key weight matrices and value weight matrices respectively; Second, the dot product similarity between the query vector sequence of each fragment and the key vector sequences of all fragments is calculated to obtain the original attention score matrix; Then, the original attention score matrix is scaled and normalized to obtain the attention weight matrix; Finally, the attention weight matrix is used to perform a weighted summation on all value vector sequences to generate the context-aware feature representation corresponding to the attention head. The dot product operation is a conventional means that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.
[0122] (8) The context-aware feature representations of all attention heads are concatenated along the feature dimension to form a multi-head concatenated feature tensor;
[0123] (9) The multi-head spliced feature tensor is linearly transformed through a trainable output projection weight matrix to project the feature dimension to the target dimension, resulting in a projected feature tensor. Layer normalization is applied to the projected feature tensor to stabilize the numerical distribution and accelerate training convergence. Finally, the feature tensor after layer normalization is the context feature tensor representing long-range dependencies.
[0124] Furthermore, the trainable query weight matrix, key weight matrix, value weight matrix, and output projection weight matrix are model parameters obtained automatically through the neural network training process, using optimization algorithms such as gradient descent, starting from a randomly initialized state, and iterating repeatedly on a large amount of data. Among these, neural networks and gradient descent are conventional methods that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.
[0125] B3: Perform temporal pooling on the context feature tensor to generate a second embedding representation that represents the entire testing process.
[0126] Furthermore, the specific steps for B3 include:
[0127] (1) Receive the output features of the time segment, namely the context feature tensor representing the long-range dependency, determine the target dimension of the pooling operation as the total number of segments and the time step dimension, and retain the batch size dimension and the feature dimension.
[0128] (2) Perform two pooling operations along the time step dimension of the context feature tensor:
[0129] The first operation is global average pooling, which calculates the arithmetic mean of each feature channel at all time steps for each segment, generating a segment-level average feature tensor.
[0130] The second operation is global max pooling, which calculates the maximum value of each feature channel for each segment at all time steps and generates a segment-level maximum feature tensor.
[0131] Both the fragment-level average feature tensor and the fragment-level maximum feature tensor are three-dimensional tensors, with dimensions being batch size, total number of fragments, and feature dimension.
[0132] (3) Perform global average pooling operation on the fragment-level average feature tensor along the dimension of the total number of fragments to generate the sequence-level average feature vector. At the same time, perform global max pooling operation on the fragment-level maximum feature tensor along the dimension of the total number of fragments to generate the sequence-level maximum feature vector. The sequence-level average feature vector and the sequence-level maximum feature vector are both two-dimensional tensors with the dimensions being the batch size and the feature dimension.
[0133] (4) Flatten the total number of segments and time step dimension of the received context feature tensor while retaining the batch size dimension and feature dimension, and merge them into a new time series dimension to form a recombined feature tensor;
[0134] (5) Input the recombined feature tensor into an attention weight generation network. The attention weight generation network is a feedforward neural network containing a nonlinear activation function. It outputs the attention weight score corresponding to each time step and applies a normalization function to the attention weight score to obtain the normalized attention weight.
[0135] (6) The normalized attention weights are used to perform weighted summation on the recombined feature tensor along the new time series dimension to generate an adaptive weighted feature vector. The adaptive weighted feature vector is a two-dimensional tensor with the batch size and feature dimension as the dimensions.
[0136] (7) The sequence-level average feature vector, the sequence-level maximum feature vector, and the adaptive weighted feature vector are concatenated along the feature dimension to generate a multi-strategy concatenated feature vector. The multi-strategy concatenated feature vector is then input into a fully connected layer. The fully connected layer projects the high-dimensional concatenated features into a lower-dimensional common feature space and introduces a non-linear transformation through a non-linear activation function to output a preliminary fused feature vector.
[0137] (8) Apply layer normalization processing to the preliminary fused feature vector to obtain the normalized feature vector, i.e. the second embedding representation.
[0138] The fusion of the first and second embedding representations generates an aligned feature set, including:
[0139] C1: The first embedding representation and the second embedding representation are respectively input into the first independent fully connected layer and the second independent fully connected layer for linear transformation; the first independent fully connected layer and the second independent fully connected layer are configured to project the first embedding representation and the second embedding representation with different dimensions onto a shared common feature space with the same dimension, thereby obtaining a first projected feature vector corresponding to the sample encoded data and a second projected feature vector corresponding to the continuous time series data;
[0140] Furthermore, the specific steps of C1 include:
[0141] (1) Receive the first embedding representation and the second embedding representation; the first embedding representation is a feature vector extracted from sample encoded data through a graph neural network, having a first original dimension; the second embedding representation is a feature vector extracted from continuous time-series data through a time-series neural network, having a second original dimension; compare the first original dimension and the second original dimension to confirm that the two dimension values are different;
[0142] (2) According to the model design, a target dimension value is set as the unified dimension of the shared common feature space. The target dimension value is a preset hyperparameter, and its value is greater than or equal to the minimum value of the first original dimension and the second original dimension, and less than or equal to the maximum value of the two.
[0143] (3) Create a trainable fully connected neural network layer, denoted as the first independent fully connected layer; the structure of the first independent fully connected layer is defined by its weight matrix and bias vector: the number of rows of the weight matrix is equal to the set target dimension value, and the number of columns is equal to the first original dimension; the length of the bias vector is equal to the target dimension value;
[0144] (4) Create a trainable fully connected neural network layer, denoted as the second independent fully connected layer; the structure of the second independent fully connected layer is defined by its weight matrix and bias vector: the number of rows of the weight matrix is equal to the set same target dimension value, and the number of columns is equal to the second original dimension; the length of the bias vector is equal to the same target dimension value, wherein the parameters of the second independent fully connected layer are initialized independently of the first independent fully connected layer, and its function is configured to linearly transform the input vector with the dimension of the second original dimension into an output vector with the dimension of the same target dimension value;
[0145] (5) During the forward propagation of the model, the first embedded representation is input into the first independent fully connected layer. The first independent fully connected layer performs a linear transformation operation on its input, that is, the product of the weight matrix and the input vector plus the bias vector, and outputs the transformed vector, which is denoted as the first projected feature vector; the dimension of the first projected feature vector is equal to the target dimension value.
[0146] (6) In parallel, the second embedded representation is input into the second independent fully connected layer. The second independent fully connected layer performs a linear transformation operation on its input, that is, the product of the weight matrix and the input vector plus the bias vector, and outputs the transformed vector, which is denoted as the second projected feature vector; the dimension of the second projected feature vector is equal to the target dimension value.
[0147] C2: Calculate the cosine similarity matrix between the first projected feature vector and the second projected feature vector, and construct a cross-attention module based on the cosine similarity matrix, wherein the first projected feature vector is used as the query vector, and the second projected feature vector is used as the key vector and value vector. The first attention weight of the first projected feature vector relative to the second projected feature vector is calculated through the attention mechanism. At the same time, the query and key-value roles are swapped, and the second attention weight of the second projected feature vector relative to the first projected feature vector is calculated.
[0148] Furthermore, the specific steps of C2 include:
[0149] (1) Receive the first projection feature matrix and the second projection feature matrix, wherein the first projection feature matrix and the second projection feature matrix are respectively stacked by the first projection feature vector and the second projection feature vector of each sample in the batch, and the two have the same batch size and feature dimension;
[0150] (2) Verify that the batch size of the first projection feature matrix and the second projection feature matrix is consistent, and confirm that each row vector, i.e. the feature vector of a single sample, is located in the same shared common feature space.
[0151] (3) For each sample in the batch, perform the following calculations:
[0152] Calculate the dot product of the first projected feature vector and the second projected feature vector of the sample;
[0153] The second norm of the first projected feature vector of the sample is calculated. The calculation of the second norm is a conventional method that can be understood and implemented by those skilled in the art. This application is not limited to a specific partitioning method.
[0154] Calculate the L2 norm of the second projected feature vector of the sample;
[0155] Dividing the dot product of the sample by the product of the L2 norm of its first projected feature vector and the L2 norm of its second projected feature vector yields the original cosine similarity scalar of the sample.
[0156] Repeat the above operation for all samples in the batch to obtain a similarity scalar set containing the original cosine similarity scalars of all samples;
[0157] (4) Create a two-dimensional matrix with the number of rows and columns equal to the batch size, and initialize all elements of the two-dimensional matrix to zero;
[0158] (5) Assign each scalar value in the similarity scalar set to the corresponding element on the main diagonal of the two-dimensional matrix in turn. After the assignment is completed, a diagonal similarity matrix is obtained. The off-diagonal elements of the diagonal similarity matrix are zero, and the diagonal elements are the cosine similarity of the bimodal features of the corresponding samples.
[0159] (6) Extract all elements on the main diagonal of the diagonal similarity matrix to form an original attention score vector, and input the original attention score vector into the first directional scaling and normalization unit; the first directional scaling and normalization unit performs element-wise scaling on the input vector through a trainable first temperature parameter to obtain the first scaled score vector; then, apply the Softmax function to the first scaled score vector for normalization to ensure that the sum of all elements is a constant; the output of the Softmax function is the first attention weight vector;
[0160] (7) Input the same original attention score vector into the second direction scaling and normalization unit; the second direction scaling and normalization unit is independent of the first direction unit. It first performs element-wise scaling on the input vector through a trainable second temperature parameter to obtain the second scaled score vector; then, the second scaled score vector is normalized by applying the Softmax function; the output of the Softmax function is the second attention weight vector.
[0161] C3: The first projection feature vector and the second projection feature vector are weighted by the generated first attention weight and second attention weight respectively to obtain the attention-weighted first feature vector and the attention-weighted second feature vector. The attention-weighted first feature vector and the attention-weighted second feature vector are then multiplied element-wise to generate a fusion feature vector that captures the fine-grained interaction between the two.
[0162] C4: The attention-weighted first feature vector, the attention-weighted second feature vector, and the fused feature vector are concatenated to form a high-order joint feature vector. The high-order joint feature vector is then input into a residual fully connected network, which consists of one or more fully connected layers containing skip connections. This network is used to perform nonlinear transformation, deep fusion, and feature dimensionality reduction on the high-order joint feature vector.
[0163] C5: The final output layer of the residual fully connected network generates a dense vector of fixed dimension, which is the alignment feature set that characterizes the deep fusion and alignment of sample encoding information and test process temporal information.
[0164] The process of calling the machine learning model trained by federated distillation to process the aligned feature set includes:
[0165] D1: During the training phase, multiple test site sites act as federated clients. Each federated client uses its local alignment feature set and its corresponding labeled anomaly labels to independently train an initialized local anomaly detection sub-model and obtain local model parameter updates.
[0166] Furthermore, the specific steps of D1 include:
[0167] (1) Each federated client receives the global teacher model parameters for the current training round from the central server, loads the global teacher model parameters into the local machine, initializes a local anomaly detection sub-model, and loads the client’s historical training dataset from the local storage. The historical training dataset consists of the local alignment feature set and its corresponding labeled anomaly label, forming a local training data pair set. The teacher model is a conventional means that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.
[0168] It is important to note that at the beginning of each round of federated learning, all the local anomaly detection sub-models of the clients are based on a common starting point, namely the global teacher model issued by the central server.
[0169] (2) Sample a batch of training data from the local training data set, input the alignment feature set in the batch into the local anomaly detection sub-model, perform forward propagation calculation to obtain the predicted probability distribution of the batch of samples, and then compare the predicted probability distribution with the real labeled anomaly labels in the batch, and calculate the batch loss value under the current model parameters through a preset loss function.
[0170] (3) Based on the batch loss value, execute the backpropagation algorithm: calculate the gradient of the loss function with respect to each trainable parameter in the local anomaly detection sub-model; summarize the gradient values of all parameters to form the local model gradient vector, wherein the gradient calculation formula is a conventional means that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method;
[0171] (4) Using a preset gradient optimization algorithm and learning rate, combined with the local model gradient vector, update the parameters of the local anomaly detection sub-model. Specifically, for each parameter, subtract the learning rate multiplied by the gradient value corresponding to the parameter from its current value to obtain the updated value of the parameter.
[0172] (5) Perform multiple rounds of iterative training until the preset local training stopping condition is met;
[0173] (6) Once local training is complete, obtain the trained local model parameters;
[0174] (7) Calculate the difference between the trained local model parameters and the global teacher model parameters received from the server. This difference is the update of the local model parameters.
[0175] For example, consider a multi-site collaborative optimization test procedure. Suppose a company has multiple test sites, each with a reliability test chamber. The company wants to develop a standard test procedure, i.e., a global model, that can automatically identify test anomalies and schedule recovery. However, the rule is that the specific test data of each site cannot leave its local machine. The initial procedure is provided by the central technical center (server), which publishes a standard test procedure specifying standard processes and anomaly judgment thresholds for temperature cycling, vibration testing, etc. Site A (client) downloads this procedure locally. During testing of a batch of new chips, it is found that some normal temperature fluctuations are misjudged as environmental fluctuation anomalies according to the initial procedure, leading to unnecessary test pauses. Therefore, based on historical data, the temperature fluctuation threshold is adjusted locally from ±2°C to ±3°C. However, the entire testing process is not recorded; only this modification to the original procedure, i.e., temperature fluctuation threshold: +1°C, is recorded. Site A encrypts this optimization suggestion of +1°C temperature fluctuation threshold and submits it to the central technical center. This optimization suggestion is the local model parameter update. The central technology center simultaneously received optimization suggestions from sites B, C, and D. For example, site B suggested fine-tuning the identification logic for sample failure anomalies. The center used a secure aggregation algorithm to weighted average the optimization suggestions from all sites, forming a comprehensive optimization plan. The central technology center then distributed the updated, more precise test procedures to all sites, and each site continued to run tests and optimize based on the new procedures. It's important to understand that the complete test procedures represent the complete model parameters, and optimization suggestions for the original procedures represent local model parameter updates.
[0176] (8) The calculated local model parameters are updated with security enhancement processing; the security enhancement processing includes, but is not limited to, adding random noise that meets differential privacy requirements, or performing encryption encoding;
[0177] (9) The processed data is packaged into a standard update data packet, with the client identifier and training round information attached, and is ready to be uploaded to the central server.
[0178] D2: The central server receives local model parameter updates uploaded by each federated client, performs a weighted average aggregation of the local model parameter updates of all federated clients through a secure aggregation algorithm, generates and updates a global model parameter, and constructs a global teacher model based on the global model parameter.
[0179] Furthermore, the specific steps of D2 include:
[0180] (1) The central server receives update data packets uploaded from each federated client through a secure communication channel. Each update data packet contains at least: client identifier, training round identifier, and local model parameter update. At the same time, the central server performs integrity verification and legality verification on each received update data packet to obtain an update data packet that passes the verification. The integrity verification includes verifying the signature or message authentication code of the data packet. The legality verification includes confirming that the client identifier has been registered and that the training round identifier matches the current round of the server.
[0181] (2) Unpack the updated data packet that has passed the verification and extract the local model parameter update and client metadata. The client metadata shall at least include the number of local data samples used by the client for training this time.
[0182] (3) Perform a secure decoding operation on the extracted local model parameter updates, and perform dimension alignment on the local model parameter updates of all clients after decoding;
[0183] If the local model parameter update is encrypted on the client side, it is decrypted using the server's private key to obtain the original local model parameter update;
[0184] If the local model parameter update adds differential privacy noise on the client side, then the noise is retained;
[0185] (4) According to the preset aggregation weight strategy, calculate an aggregation weight for each federated client that passes the verification. The aggregation weight strategy is usually based on the number of local data samples contributed by each client. The weight value is the proportion of the number of local data samples of the client to the total number of data samples of all participating clients in this round. Finally, an aggregation weight vector is generated, where each element corresponds to the aggregation weight of a client.
[0186] (5) Create a zero-value vector with the same dimension as the global model parameters as the accumulator;
[0187] (6) For each client participating in the aggregation, perform the following operations: multiply the local model parameter update after secure decoding and alignment by the aggregation weight corresponding to the client to obtain the weighted local parameter update, and then add the weighted local parameter updates of all clients element by element in the accumulator. After all clients have finished processing, the vector stored in the accumulator is the global parameter update vector obtained after weighted average aggregation.
[0188] (7) Add the global parameter update vector to the previous round global teacher model parameters stored on the server to obtain the preliminary new round global model parameters. Then apply the server-side security constraint mechanism to obtain the final new round global model parameters. The security constraint mechanism includes, but is not limited to, pruning parameters with excessive update magnitude and limiting them to a preset threshold range, and adding a small amount of server-side noise that meets the differential privacy requirements to the updated parameters.
[0189] (8) Load the final new round of global model parameters into a blank model framework with the same structure as the local sub-model of the federated client, instantiate the global teacher model, and then evaluate the performance of the global teacher model on a small public validation set maintained by the server.
[0190] If the evaluation results meet the preset performance threshold, the global teacher model is confirmed to be effective.
[0191] If the evaluation results do not meet the threshold, the aggregation results of this round are discarded, and the global teacher model of the previous round is used.
[0192] D3: The central server distributes the global teacher model to each federated client. Each federated client uses the global teacher model to perform forward inference on the local alignment feature set and generates a soft prediction output, which is a probability distribution vector.
[0193] Furthermore, the specific steps of D3 include:
[0194] (1) The central server serializes the parameters of the generated global teacher model, converts them into a model parameter file, and performs lossless compression on the model parameter file to generate compressed model parameter data;
[0195] (2) Package the compressed model parameter data, the current training round identifier and the model version hash value into a model distribution data packet, and then send the model distribution data packet to all registered federated clients through a secure communication channel;
[0196] (3) Each federation client receives the model distribution data packet from the central server, performs source verification and integrity verification on the received model distribution data packet, unpacks it after verification, extracts the compressed model parameter data, training round identifier and version hash value, then decompresses the compressed model parameter data, restores the serialized model parameter file, and deserializes the serialized model parameter file to obtain the specific parameter values of the global teacher model, including the weight matrix and bias vector of each layer, and finally loads the weight matrix and bias vector into the model framework that is predefined locally on the client and has the same structure as the server to complete the instantiation of the local teacher model;
[0197] (4) The federated client reads the local alignment feature set from the local storage, divides the alignment feature set into multiple consecutive data blocks according to the preset batch size, and forms a batched alignment feature data block list. For the last data block, if the number of samples it contains is less than the batch size, it is padded with a preset padding value to form a complete batch.
[0198] (5) Take out a batch of data from the batched alignment feature data block list in sequence, input the alignment feature data block of the current batch into the local teacher model that has been loaded. The local teacher model performs forward propagation calculation, and after processing by the multiple neural network layers it contains, the Softmax activation function of the output layer finally generates the probability of each sample belonging to each abnormal category, which is called batch soft prediction output. It is a two-dimensional matrix with the number of rows being the number of samples in the current batch and the number of columns being the total number of abnormal categories. Each row represents the probability distribution vector of a sample.
[0199] (6) After processing all batches in the batch-aligned feature data block list, a batch soft prediction output list is obtained. All batch output matrices in the batch soft prediction output list are concatenated in the row direction according to the original batch order to obtain a complete soft prediction output matrix.
[0200] If the last batch is filled, the redundant rows corresponding to the filled samples at the end of the batch are removed, so that the number of rows in the complete soft prediction output matrix is strictly consistent with the total number of samples in the local original alignment feature set.
[0201] (7) The complete soft prediction output matrix is associated and aligned with the original alignment feature set and the corresponding real labeled anomaly label stored locally through a unified sample index, and the associated and aligned data is stored locally as a structured distillation dataset.
[0202] D4: Each client uses the soft prediction output as a supervision signal for knowledge distillation, combined with local anomaly labels, to jointly guide the lightweight student model for local training;
[0203] Furthermore, the specific steps of D4 include:
[0204] (1) The federated client reads the local alignment feature set, the generated soft prediction output and the corresponding labeled anomaly label from the local storage, and accurately associates them through a unified sample identifier to ensure that the alignment feature, soft prediction output probability distribution and real label of each sample correspond one-to-one. The structured dataset formed after association is the local distillation training dataset.
[0205] (2) Based on the preset lightweight neural network structure, a student model is instantiated locally; the structural complexity of the student model is lower than that of the global teacher model, specifically in that it has fewer layers, fewer neurons per layer, or uses a lightweight structure such as depthwise separable convolution. Then, the parameters of the student model are randomly initialized, and the dimension of its output layer is consistent with the number of categories of the soft prediction output.
[0206] (3) Define the training objective loss function of the student model as a composite loss function, which consists of a weighted sum of two parts;
[0207] The first part is the soft target loss, which uses KL divergence to measure the difference between the output probability distribution of the student model and the soft prediction output. KL divergence is a conventional method that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.
[0208] The second part is the hard target loss, which uses cross-entropy loss to measure the difference between the output probability distribution of the student model and the true labeled anomaly label. Cross-entropy loss is a conventional method that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.
[0209] A weighting coefficient is set to balance the contributions of the soft target loss and the hard target loss to the total loss;
[0210] (4) Sample a batch of training data from the local distillation training dataset. The batch of data contains a batch of alignment features, corresponding soft prediction outputs and true labels. Then, input the alignment features in the batch into the student model to perform forward propagation to obtain the original logical value output of the student model for the batch. Then, convert the original logical value output of the student model into a probability distribution through the Softmax function to obtain the student prediction probability distribution.
[0211] (5) Calculate the soft target loss component between the student prediction probability distribution and the corresponding soft prediction output in the batch using KL divergence;
[0212] (6) The hard target loss component between the student predicted probability distribution and the corresponding true label in the batch is calculated using cross-entropy loss;
[0213] (7) The soft target loss component and the hard target loss component are weighted and summed according to the weighting coefficients to obtain the total loss value of the current batch;
[0214] (8) Based on the total loss value of the current batch, perform the backpropagation algorithm to calculate the gradient of the loss value with respect to all trainable parameters in the student model;
[0215] (9) Using the stochastic gradient descent optimization algorithm and a preset learning rate, update all parameters of the student model according to the calculated gradient. The stochastic gradient descent optimization algorithm is a conventional method that can be understood and implemented by those skilled in the art. This application is not limited to a specific partitioning method.
[0216] (10) Perform multiple iterations of (4)-(9) until the preset training stopping condition is met;
[0217] (11) After training is completed, the performance of the trained student model is evaluated on the local reserved validation set. If the performance index meets the preset threshold, the final student model parameters are saved as the local inference model. At the same time, the difference between the parameters of the trained student model and the initial parameters before training is calculated and used as the parameter update of the local student model, ready for uploading.
[0218] D5: Each federated client uploads the updated student model parameters after training to the central server. The central server then aggregates the updated student model parameters from each client again using a secure aggregation algorithm, generating and updating the final version of the global student model parameters.
[0219] D6: In the application phase, the alignment feature set is input into the global student model, and the following processes are performed sequentially within the global student model: the alignment feature set is standardized through a batch normalization layer to obtain standardized features; the standardized features are input into a multilayer perceptron module, which includes at least one feedforward layer with a self-attention mechanism to capture the internal dependencies of the features and perform nonlinear transformations to output deep features; the deep features are input into the final output layer and processed by the Softmax activation function, the output of which is a multidimensional probability distribution vector, i.e., an anomaly index set, defining the predicted probability of a sample belonging to each anomaly risk level. The nonlinear transformation and the Softmax activation function are conventional methods that can be understood and implemented by those skilled in the art, and this application is not limited to a specific partitioning method.
[0220] The step of matching a scheduling recovery scheme from a preset scheduling recovery strategy library based on the anomaly type of the task to be recovered analysis results includes:
[0221] E1: The system extracts key query conditions from the records of the test task to be recovered; the key query conditions include the anomaly type and the equipment model identifier of the associated reliability test chamber;
[0222] E2: Input the anomaly type and device model identifier as joint query conditions into the preset scheduling recovery strategy library; the scheduling recovery strategy library is a knowledge graph built based on a graph database;
[0223] E3: In the graph database, starting from the node corresponding to the anomaly type, traverse all recovery solution nodes that have a first relationship with it, and filter out the recovery solution nodes that have a second relationship with the device model identifier to form an initial candidate solution node set; the first relationship is a processable relationship; the second relationship is an applicable relationship;
[0224] E4: For each recovery plan node in the initial candidate plan node set, extract its associated historical execution metadata; the historical execution metadata includes at least the number of historical successful executions, the total number of historical executions, and the historical average execution time;
[0225] E5: Based on the historical execution metadata, calculate a comprehensive matching score for each candidate solution node, select the recovery solution node with the highest comprehensive matching score, and determine its associated recovery solution template as the target recovery solution template; the target recovery solution template is an instruction script template containing placeholders; the placeholders are used to replace specific task parameters;
[0226] Furthermore, the formula for calculating the comprehensive matching score is as follows: the comprehensive matching score is equal to the weighted sum of the first factor and the second factor, where the first factor is the ratio of the number of successful historical executions to the total number of historical executions, and the second factor is the reciprocal of the sum of the historical average execution time and 1.
[0227] E6: Extract the current task parameters from the record of the test task to be recovered; the current task parameters include at least the sample code of the sample to be recovered, the test task identifier to be recovered, and the equipment identifier of the associated test chamber;
[0228] E7: Fill the current task parameters into the corresponding placeholders of the instruction script template to generate a specific executable recovery instruction sequence; the recovery instruction sequence is the scheduling recovery scheme that matches the current test task to be recovered.
[0229] Furthermore, the specific steps for E7 include:
[0230] (1) The system receives the target recovery scheme template matched from the scheduling recovery strategy library, and at the same time receives the current task parameter set extracted from the record of the test task to be recovered;
[0231] (2) Parse the instruction script template, identify and extract all placeholders that conform to the preset syntax rules, and form a placeholder list;
[0232] (3) Organize the current task parameter set into a parameter key-value pair mapping table, where the key is the parameter name and the value is the corresponding parameter value;
[0233] (4) Associate each placeholder in the placeholder list with the corresponding parameter key in the parameter key value mapping table to form a placeholder-parameter mapping relationship;
[0234] (5) Verify and process each parameter value in the parameter key-value pair mapping table to form a verified parameter mapping table, including: verifying whether the data type of the parameter value conforms to the expectation of the placeholder; verifying whether the numeric parameter value is within the preset security and business allowable range; verifying whether the identifier parameter value conforms to the format specification;
[0235] (6) Based on the placeholder-parameter mapping relationship and the verified parameter mapping table, perform template rendering, including: traversing the instruction script template, for each identified placeholder, searching for the corresponding parameter value in the verified parameter mapping table it maps to; replacing the placeholder with the string representation of the corresponding parameter value, and for placeholders of control logic, determining whether to include or expand the corresponding template code block based on its parameter value; after rendering, generating a fully instantiated original instruction text that does not contain any placeholders;
[0236] (7) Perform syntax analysis on the original instruction text, split it into multiple independent atomic instructions according to the preset instruction delimiter, and encapsulate each atomic instruction in a structured manner, add instruction sequence number and timestamp information to it, and format it into a standard instruction message format that can be recognized by the target test chamber controller;
[0237] (8) Sort all the structured and encapsulated atomic instructions according to their logical execution order to form an ordered list of instructions, which is called a structured instruction sequence;
[0238] (9) Generate a globally unique execution session identifier for the structured instruction sequence and inject it into the metadata of the sequence. Then, digitally sign the structured instruction sequence or its digest to generate an instruction signature. The digital signature is a conventional means that can be understood and implemented by those skilled in the art. This application is not limited to a specific partitioning method.
[0239] (10) The structured instruction sequence, execution session identifier, instruction signature, and associated task identifier, device identifier, and scheme template identifier information are packaged together to generate the final scheduling recovery scheme.
[0240] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the present invention. All of these variations are within the protection scope of the present invention.
Claims
1. A machine learning-based automated test anomaly identification and scheduling recovery method, characterized in that, include: Obtain the sample data set of the multi-site reliability test chamber; The sample data set includes hierarchical sample coding data that identifies sample information and continuous time-series data of the sample testing process; The sample encoded data is processed by a first preset model to generate a first embedded representation, and the continuous time-series data is processed by a second preset model to generate a second embedded representation. By fusing the first and second embedding representations, an aligned feature set is generated. The machine learning model trained by federated distillation is called to process the alignment feature set and generate an abnormal indicator set of the abnormal risk level of the sample test. If the abnormal risk level reaches the preset risk threshold, it is determined to be an abnormal test task and an alarm is triggered. After verification, it is registered as a test task to be recovered. Based on the anomaly type of the analysis results of the task to be recovered, a scheduling recovery plan is matched from the preset scheduling recovery strategy library and issued to the corresponding test box for execution. After the recovery test task is executed, recovery effect data is collected and fed back to the scheduling recovery strategy library and machine learning model. The fusion of the first and second embedding representations generates an aligned feature set, including: The first embedding representation and the second embedding representation are respectively input into the first independent fully connected layer and the second independent fully connected layer for linear transformation; the first independent fully connected layer and the second independent fully connected layer are configured to project the first embedding representation and the second embedding representation with different dimensions onto a shared common feature space with the same dimension, thereby obtaining a first projected feature vector corresponding to the sample encoded data and a second projected feature vector corresponding to the continuous time series data; Calculate the cosine similarity matrix between the first projected feature vector and the second projected feature vector, and construct a cross-attention module based on the cosine similarity matrix, wherein the first projected feature vector is used as the query vector, and the second projected feature vector is used as the key vector and value vector. The first attention weight of the first projected feature vector relative to the second projected feature vector is calculated through the attention mechanism. At the same time, the query and key-value roles are swapped, and the second attention weight of the second projected feature vector relative to the first projected feature vector is calculated. The scheduling recovery scheme matching process includes: querying the scheduling recovery strategy library built based on the graph database according to the anomaly type and device model identifier extracted from the record of the test task to be recovered, filtering recovery scheme nodes, calculating the comprehensive matching score based on historical execution metadata, selecting the optimal target recovery scheme template, and filling in the current task parameters extracted from the record of the test task to be recovered to generate an executable recovery instruction sequence.
2. The automated test anomaly identification and scheduling recovery method based on machine learning as described in claim 1, characterized in that, The steps for acquiring the sample data set include: real-time acquisition of physical parameters during sample testing through a built-in sensor network deployed at multiple sites in the reliability test chamber, forming a raw time-series stream; signal denoising and missing value interpolation of the raw time-series stream to generate preprocessed continuous time-series data, which includes at least temperature, humidity, and vibration acceleration; simultaneous extraction of sample coding data from the test chamber control system, which includes the test chamber site number, sample batch number, test sub-batch sequence, and unique identifier for each sample, with the hierarchical relationship being a four-level tree structure of site-batch-sub-batch-sample; aligning the continuous time-series data with the sample coding data according to a time window, and marking the timestamp and device identifier of the data source to form a structured sample data set.
3. The automated test anomaly identification and scheduling recovery method based on machine learning as described in claim 2, characterized in that, The first preset model is a hierarchical perceptual graph neural network encoder, and the process of processing the sample encoded data includes: The sample encoding data of the four-level tree structure is mapped to a directed acyclic graph, where each node represents an encoding unit and the edges represent the membership relationship. The feature vector of each node is initialized through a node embedding layer, and the hierarchical information of adjacent nodes is aggregated using a graph attention mechanism. After multi-layer propagation, the hidden state of the root node is extracted as the structured representation of the sample to generate the first embedding representation.
4. The automated test anomaly identification and scheduling recovery method based on machine learning as described in claim 3, characterized in that, The second preset model is a hybrid encoder of temporal convolutional networks and multi-head self-attention. The temporal convolutional network uses multiple causal dilated convolutional layers with different dilation rates in parallel to capture dependency patterns at different time scales. The process of processing the continuous temporal data includes: Continuous temporal data is segmented into fixed-length temporal segments and positional encoding is added to form a set of positionally encoded temporal segments. A temporal convolutional network is used to extract local temporal dependency features from the set of positionally encoded temporal segments, and then a multi-head self-attention mechanism is used to capture long-range dependencies between temporal segments to obtain a context feature tensor representing long-range dependencies. Temporal pooling is performed on the context feature tensor to generate a second embedding representation representing the entire testing process.
5. The automated test anomaly identification and scheduling recovery method based on machine learning as described in claim 4, characterized in that, The process of fusing the first and second embedding representations to generate an aligned feature set further includes: The first and second projected feature vectors are weighted using the generated first and second attention weights respectively to obtain the attention-weighted first feature vector and the attention-weighted second feature vector. The attention-weighted first feature vector and the attention-weighted second feature vector are then multiplied element-wise to generate a fusion feature vector that captures the fine-grained interaction between the two. The attention-weighted first feature vector, the attention-weighted second feature vector, and the fused feature vector are concatenated to form a high-order joint feature vector. The high-order joint feature vector is then input into a residual fully connected network, which consists of one or more fully connected layers containing skip connections. This residual fully connected network is used to perform nonlinear transformation, deep fusion, and feature dimensionality reduction on the high-order joint feature vector. The final output layer of the residual fully connected network generates a dense vector of fixed dimensions, which is the alignment feature set representing the deep fusion and alignment of sample encoding information and test process temporal information.
6. The automated test anomaly identification and scheduling recovery method based on machine learning as described in claim 5, characterized in that, The process of calling the machine learning model trained by federated distillation to process the aligned feature set includes: During the training phase, multiple test site sites act as federated clients. Each federated client uses its local alignment feature set and its corresponding labeled anomaly labels to independently train an initialized local anomaly detection sub-model and obtain local model parameter updates. The central server receives local model parameter updates uploaded by each federated client, performs a weighted average aggregation of the local model parameter updates of all federated clients using a secure aggregation algorithm, generates and updates a global model parameter, and constructs a global teacher model based on the global model parameter. The central server distributes the global teacher model to each federated client. Each federated client uses the global teacher model to perform forward inference on the local alignment feature set and generates a soft prediction output, which is a probability distribution vector. Each client uses the soft prediction output as a supervision signal for knowledge distillation, combined with local anomaly labels, to jointly guide the lightweight student model for local training; Each federated client uploads the updated student model parameters to the central server. The central server then aggregates the updated student model parameters from each client using a secure aggregation algorithm, generating and updating the final version of the global student model parameters.
7. The automated test anomaly identification and scheduling recovery method based on machine learning as described in claim 6, characterized in that, The step of calling the machine learning model trained by federated distillation to process the aligned feature set further includes: During the application phase, the alignment feature set is input into the global student model, and the global student model performs the following processes sequentially: The aligned feature set is standardized by a batch normalization layer to obtain standardized features. The standardized features are then input into a multilayer perceptron module, which includes at least one feedforward layer with a self-attention mechanism to capture the internal dependencies of the features and perform nonlinear transformations to output deep features. The deep features are then input into the final output layer and processed by a Softmax activation function. The output of the Softmax activation function is a multidimensional probability distribution vector, which is the set of anomaly indicators, defining the predicted probability of a sample belonging to each anomaly risk level.
8. The automated test anomaly identification and scheduling recovery method based on machine learning as described in claim 7, characterized in that, The step of matching a scheduling recovery scheme from a preset scheduling recovery strategy library based on the anomaly type of the task to be recovered analysis results includes: The system extracts key query conditions from the records of the test task to be recovered; the key query conditions include the anomaly type and the equipment model identifier of the associated reliability test chamber; The anomaly type and device model identifier are used as joint query conditions input into a preset scheduling recovery strategy library; the scheduling recovery strategy library is a knowledge graph built based on a graph database; In the graph database, starting from the node corresponding to the anomaly type, all recovery solution nodes that have a first relationship with it are traversed, and recovery solution nodes that have a second relationship with the device model identifier are selected to form an initial candidate solution node set; the first relationship is a processable relationship; the second relationship is an applicable relationship. For each recovery plan node in the initial candidate plan node set, extract its associated historical execution metadata; the historical execution metadata includes at least the number of historical successful executions, the total number of historical executions, and the historical average execution time; Based on the historical execution metadata, a comprehensive matching score is calculated for each recovery plan node. The recovery plan node with the highest comprehensive matching score is selected, and its associated recovery plan template is determined as the target recovery plan template. The target recovery plan template is an instruction script template containing placeholders. The placeholders are used to replace specific task parameters. Extract the current task parameters from the record of the test task to be recovered; the current task parameters include at least the sample code of the sample to be recovered, the test task identifier to be recovered, and the equipment identifier of the associated test chamber; The current task parameters are filled into the corresponding placeholders in the instruction script template to generate a specific executable recovery instruction sequence; the recovery instruction sequence is the scheduling recovery scheme that matches the current test task to be recovered.
9. The automated test anomaly identification and scheduling recovery method based on machine learning as described in claim 8, characterized in that, The method also includes a cross-site anomaly propagation analysis step: When an anomaly occurs at any site, retrieve sample data from non-sites in the same batch or using the same parameters; calculate the cross-correlation between data and the correlation of anomaly indicators between sites to construct an anomaly propagation network; if the propagation risk exceeds a preset threshold, send preventative inspection instructions to related sites.