Processor fault detection method, device, equipment, storage medium and program product
By combining real-time data acquisition and incremental training in the NPU cluster with Kubernetes automated orchestration, the problems of poor robustness and low iteration efficiency in NPU fault diagnosis are solved, and real-time optimization and efficient iteration of NPU fault detection are achieved.
Patent Information
- Application Number
- CN202611079837.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-11-20
AI Technical Summary
Existing NPU fault diagnosis methods rely on offline training data, which has poor robustness and low iteration efficiency, and requires manual operation for model deployment and updates.
By deploying data acquisition functionality in the NPU cluster, and utilizing container orchestration clusters for real-time data acquisition and incremental training of the fault detection model, combined with Kubernetes automated orchestration, an end-to-end closed loop is constructed to achieve automatic identification and archiving of new fault data, avoiding full retraining.
It enables real-time optimization and efficient iteration of NPU fault detection, improves the ability to identify complex faults, and enhances the stable operation of the NPU cluster without manual intervention.
Smart Images

Figure CN123138041A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of artificial intelligence and cloud computing, and in particular to a processor fault detection method, apparatus, device, storage medium, and program product. Background Technology
[0002] Currently, most training data for neural processing unit (NPU) fault diagnosis is acquired primarily through hardware sensors (such as temperature and current sensors) and software tools (such as system logs and performance counters). Related technologies typically employ offline model training combined with manual Kubernetes configuration for NPU fault diagnosis; however, this method suffers from poor robustness, relies heavily on manual operation, and has low iterative efficiency. Summary of the Invention
[0003] To address the aforementioned technical problems, embodiments of this application provide a processor fault detection method, apparatus, device, storage medium, and program product.
[0004] The processor fault detection method provided in this application includes: Data is collected based on the data acquisition function deployed on each node in the Neural Processor (NPU) cluster to obtain multi-dimensional NPU data. The first fault detection model deployed in the container orchestration cluster is used to perform fault detection on the NPU multi-dimensional data to obtain the first fault detection result of the NPU multi-dimensional data. Based on the distance between the first fault detection result and the first fault cluster center set, it is determined whether there is a target fault in the NPU multidimensional data; if so, the first fault detection model is incrementally trained based on the NPU multidimensional data to obtain a second fault detection model. If the second fault detection model passes the dual-index evaluation, the second fault detection model will be deployed to the container orchestration cluster. Based on the second fault detection model, fault detection is performed on the NPU multi-dimensional data to obtain the second fault detection result of the NPU multi-dimensional data.
[0005] The processor fault detection device provided in this application embodiment includes: The acquisition unit is used to acquire data based on the data acquisition function deployed on each node in the neural network processor (NPU) cluster, and obtain multi-dimensional NPU data. The detection unit is used to perform fault detection on the NPU multi-dimensional data based on the first fault detection model deployed in the container orchestration cluster, and obtain the first fault detection result of the NPU multi-dimensional data. The judgment unit is used to determine whether a target fault exists in the NPU multidimensional data based on the distance between the first fault detection result and the first fault cluster center set; The training unit is used to incrementally train the first fault detection model based on the NPU multidimensional data if a target fault exists in the NPU multidimensional data, so as to obtain a second fault detection model. A deployment unit is used to deploy the second fault detection model to the container orchestration cluster if the second fault detection model passes the dual-index evaluation. The detection unit is further configured to perform fault detection on the NPU multi-dimensional data based on the second fault detection model, and obtain the fault detection result of the NPU multi-dimensional data.
[0006] The processing device provided in this application includes a processor and a memory. The memory is used to store computer programs, and the processor is used to call and run the computer programs stored in the memory to execute any of the processor fault detection methods described above.
[0007] In the technical solution of this application embodiment, data is collected based on the data acquisition function deployed on each node in the Neural Processing Unit (NPU) cluster to obtain NPU multi-dimensional data; fault detection is performed on the NPU multi-dimensional data based on the first fault detection model deployed in the container orchestration cluster to obtain the first fault detection result of the NPU multi-dimensional data; based on the distance between the first fault detection result and the first fault cluster center set, it is determined whether there is a target fault in the NPU multi-dimensional data; if so, the first fault detection model is incrementally trained based on the NPU multi-dimensional data to obtain a second fault detection model; if the second fault detection model passes the dual-index evaluation, the second fault detection model is deployed to the container orchestration cluster; fault detection is performed on the NPU multi-dimensional data based on the second fault detection model to obtain the second fault detection result of the NPU multi-dimensional data. Thus, by constructing an end-to-end closed loop of "real-time data acquisition - new fault detection based on clustering algorithm - incremental model training - performance quantification evaluation", it is possible to automatically identify and archive new fault data, and quickly adapt to new fault modes while retaining historical knowledge, avoiding the waste of resources in full retraining. At the same time, relying on container orchestration capabilities, the model lifecycle management is encapsulated into an automated pipeline, which can continuously adapt to new fault scenarios without manual intervention, greatly improving iteration efficiency. This allows it to continuously learn from actual operation, gradually improve the ability to identify complex NPU faults, and significantly enhance the stable operation guarantee capability of the NPU cluster. Attached Figure Description
[0008] Figure 1 This is a schematic flowchart of a processor fault detection method provided in an embodiment of this application; Figure 2 This application provides a schematic diagram of the overall architecture of a research and improvement method for a self-trained NPU fault diagnosis model technology based on Kubernetes scheduling. Figure 3 This is a schematic diagram of the architecture of the data acquisition and feature engineering module provided in an embodiment of this application; Figure 4 This is a schematic diagram of the architecture of the model training module in an embodiment of this application; Figure 5 This is a schematic diagram of the architecture of the model inference and diagnostic service module provided in an embodiment of this application; Figure 6 This is a schematic diagram of the architecture of the model self-training / adaptive update module provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a processor fault detection device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the processing device provided in the embodiments of this application. Detailed Implementation
[0009] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0010] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application are described below. The following relevant technologies are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and they all fall within the protection scope of the embodiments of this application.
[0011] Currently, most training data for NPU fault diagnosis is acquired primarily through hardware sensors (such as temperature and current sensors) and software tools (such as system logs and performance counters). In the model building phase, diagnostic models are trained using algorithms such as Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) on labeled NPU training data (including normal and faulty samples). The models learn feature patterns from the data to determine the NPU fault state and type. At the deployment level, Kubernetes is used as the core tool. Deployment resources ensure high availability of the diagnostic service, while job resources execute model training tasks, thereby achieving automatic resource allocation, scaling, and fault self-healing for containerized applications—a standard practice for distributed system deployment and operation.
[0012] In related technologies, the technical implementation process of NPU fault diagnosis methods is as follows: First, in the data collection and preprocessing stage, staff manually collect operational data from each node of the NPU cluster at fixed intervals (e.g., quarterly), including temperature, power consumption, and system error logs. After collection, the data is manually cleaned to remove duplicate or erroneous records. Then, the fault types corresponding to the fault data are manually labeled using annotation tools. Subsequently, a normalization method is used to unify the data dimensions, and a feature selection algorithm is used to filter key features, ultimately forming a training dataset. In the model training and evaluation stage, the preprocessed dataset is input into the selected machine learning model (e.g., a Multilayer Perceptron (MLP) classification model) and trained on an offline high-performance NPU server. During this period, hyperparameters are adjusted based on metrics such as accuracy and recall on the validation set until the model performance meets the standards and the optimal version is determined. In the model deployment and usage stage, the trained model needs to be manually packaged into a container image, and a Deployment resource is manually created in the Kubernetes cluster to deploy the model to a specific node. When the NPU is running, real-time data is preprocessed and input into the model, which then outputs diagnostic results.
[0013] The above-mentioned NPU fault diagnosis method has the following drawbacks: (1) Offline training model: Most diagnostic models mainly rely on performance data collected manually in the early stage to train the model. If new fault data appears, the robustness and generalization of the previous diagnostic model will deteriorate. The new data needs to be used as the data source to train the model and then redeploy it before it can be used. (2) Low iteration efficiency: When new data appears, the model needs to be retrained. In addition, manual deployment is required in the Kubernetes configuration center—from image building and resource allocation to service restart, the whole process is strongly dependent on manual operation.
[0014] To address the aforementioned technical challenges, this application proposes a processor fault detection method. The method employs a collaborative design combining online self-training and Kubernetes automated orchestration deployment to construct an end-to-end closed loop encompassing "real-time data acquisition—new fault detection based on clustering algorithms—incremental model training—performance quantification evaluation." This approach enables automatic identification and archiving of new fault data, rapidly adapting to new fault patterns while preserving historical knowledge, avoiding the resource waste of full retraining. Furthermore, leveraging container orchestration capabilities, the model lifecycle management is encapsulated into an automated pipeline, continuously adapting to new fault scenarios without manual intervention, significantly improving iteration efficiency. This allows the method to continuously learn from actual operation, gradually enhancing its ability to identify complex NPU faults and significantly strengthening the stable operation of the NPU cluster. This method largely solves the pain points of related technologies, such as model reliance on offline data, delayed updates, and cumbersome deployment processes, enabling real-time optimization and efficient iteration of NPU fault diagnosis models, providing intelligent support for fault diagnosis with continuous optimization and low manual intervention.
[0015] To facilitate understanding of the technical solutions of the embodiments of this application, the technical solutions of this application are described in detail below through specific embodiments. The above-mentioned related technologies are optional solutions and can be arbitrarily combined with the technical solutions of the embodiments of this application, all of which fall within the protection scope of the embodiments of this application. The embodiments of this application include at least some of the following contents.
[0016] This application proposes a processor fault detection method. Figure 1 This is a flowchart illustrating a processor fault detection method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes the following steps: Step 101: Collect data based on the data acquisition function deployed on each node in the Neural Processing Unit (NPU) cluster to obtain multi-dimensional NPU data.
[0017] In this embodiment, the NPU cluster is typically deployed with one daemon process per node to ensure that the NPUs on each node are covered. Each node in the NPU cluster is equipped with a lightweight data acquisition agent service, so data can be collected based on the data acquisition functions deployed on each node in the NPU cluster, ensuring full-node data collection and obtaining multi-dimensional NPU data.
[0018] In some embodiments, NPU multidimensional data includes one or more of the following: NPU hardware performance memory, sensor monitoring data, system operation logs, and task load information.
[0019] The NPU hardware performance memory refers to a series of microarchitectural event counts provided by the hardware performance monitoring unit integrated within the NPU chip. These counts directly reflect the microscopic operational status of the computing core, cache system, data path, and interconnect interfaces, and are the core data source for locating hardware efficiency bottlenecks and abnormal behavior.
[0020] Sensor monitoring data refers to analog or digital readings that are collected by physical sensors deployed inside the NPU chip, on the substrate, or on the accelerator card, reflecting the NPU hardware operating environment and physical state.
[0021] System operation logs refer to text or structured event records generated chronologically by the operating system kernel, NPU driver, firmware, and related management daemons on the NPU node during operation. They record system-level and hardware / software interface-level state transitions, errors, and exceptions.
[0022] Task load information refers to dynamic information describing the attributes, resource requirements, and execution status of computational tasks being executed or to be executed on the NPU. It depicts a load side view of "what the NPU is doing and how well it is doing it".
[0023] In some embodiments, step 101 includes: Create a first resource object, and based on the first resource object, create a Pod instance on each node in the NPU cluster. The Pod instance on each node is equipped with data collection functionality. Data collection is performed based on the data collection function deployed on the Pod instance on each node to obtain multi-dimensional NPU data.
[0024] Here, the first resource object specifically refers to the DaemonSet, which is a workload controller in Kubernetes used to ensure that each node in the cluster runs a specified Pod instance.
[0025] Specifically, when creating the first resource object for NPU data acquisition, a acquisition Pod template needs to be configured in the resource description file. The acquisition Pod template defines the image, startup command, and runtime parameters of the acquisition container. Once the first resource object is created and submitted to the container orchestration cluster, a Pod instance will be automatically created / deployed on each node in the NPU cluster. Each Pod instance on each node has a lightweight data acquisition function deployed. Data acquisition is performed across all nodes based on the data acquisition function deployed on the Pod instances on each node to obtain multi-dimensional NPU data. Each Pod instance on each node has the ability to directly access the system resources of all NPU devices.
[0026] The first resource object continuously monitors the running status of each Pod instance. If a new node is added to the cluster (NPU node expansion), a new collection Pod instance will be automatically started on it. If a Pod instance is accidentally deleted or crashes, a Pod instance will be rebuilt on the current node immediately to ensure the coverage of data collection.
[0027] Step 102: Perform fault detection on the NPU multi-dimensional data based on the first fault detection model deployed in the container orchestration cluster, and obtain the first fault detection result of the NPU multi-dimensional data.
[0028] In this embodiment of the application, in order to provide continuous and reliable fault detection capabilities in the container orchestration cluster, the first fault detection model is encapsulated into a standard inference service and runs stably in the cluster in the form of a "high-availability inference service". The original NPU multi-dimensional data is transformed into a feature vector acceptable to the model through spatiotemporal alignment and feature engineering, and then routed to the inference Pod in the container orchestration cluster. The inference Pod performs fault detection based on the received data and outputs the first fault detection result of the NPU multi-dimensional data.
[0029] The first fault detection result includes the first fault category set corresponding to the NPU multi-dimensional data and the confidence level of the first fault category set.
[0030] In some embodiments, step 102 includes: Upload the NPU multi-dimensional data to the object storage cluster and perform feature engineering on the NPU multi-dimensional data to obtain the NPU feature matrix; Create a second resource object, and define the inference Pod template and the number of first replicas in the second resource object. The inference Pod template includes an inference service container image, and the inference service container image encapsulates the first fault detection model. Based on the inference Pod template, run a number of Pod instances in parallel, and input the NPU feature matrix into the first fault detection model for model inference in the first number of Pod instances to obtain the first fault category set and the confidence of the first fault category set.
[0031] Here, the second resource object specifically refers to Deployment. Deployment is a workload controller in Kubernetes used to manage stateless applications and is used to implement the containerized deployment of the diagnostic service in this application.
[0032] Specifically, object storage provides a highly available shared data lake, enabling downstream feature engineering and inference services to access data through a unified interface. First, the raw NPU multidimensional data is uploaded to the object storage cluster, and spatiotemporal alignment and feature engineering are performed on the NPU multidimensional data. This includes aligning the NPU multidimensional data within the same time window by timestamp, and then performing feature transformation and concatenation on the aligned NPU multidimensional data to obtain a fixed-length feature vector. The feature vector is then normalized, and dimensionality reduction algorithms such as Principal Component Analysis (PCA) are used to extract the core features from the feature vector, ultimately obtaining the NPU feature matrix.
[0033] To enable multiple inference instances to process this feature matrix in parallel, a second resource object is created. This second resource object defines the inference Pod template and the number of first replicas. The inference Pod template specifies the inference service container image containing the first fault detection model, and the inference service container image encapsulates the inference service of the first fault detection model. Once the second resource object is submitted to the container orchestration cluster, the number of Pod instances with the first replica count is immediately created according to the inference Pod template, and they are started in parallel. Each Pod instance executes the following process after startup: The inference script downloads the NPU feature matrix file from the object storage cluster to the local machine, loads the first fault detection model from the image or the mounted configuration, performs sample-by-sample inference on the NPU feature matrix based on the first fault detection model, and outputs the first fault category set (a list of fault categories for all samples) and the corresponding confidence set.
[0034] Since all Pod instances run the exact same model and process the same NPU feature matrix, their independently derived first fault category set and confidence set are theoretically consistent.
[0035] Step 103: Based on the distance between the first fault detection result and the first fault cluster center set, determine whether there is a target fault in the NPU multidimensional data; if so, perform incremental training on the first fault detection model based on the NPU multidimensional data to obtain the second fault detection model.
[0036] In this embodiment, the similarity between the NPU multidimensional data and known fault patterns can be determined by measuring the distance between the first fault category set and the first fault cluster center set in the first fault detection result of the NPU multidimensional data. This helps to determine whether there is new fault data, i.e., target fault data, in the NPU multidimensional data. Once it is determined that there is target fault data in the NPU multidimensional data, the NPU multidimensional data can be extracted from the object storage cluster to perform incremental training on the first fault detection model, update the model parameters of the first fault detection model, and obtain the updated first fault detection model, i.e., the second fault detection model.
[0037] The second fault detection model inherits the knowledge of the first fault detection model and incorporates newly confirmed target fault data, making the representation of the fault mode more accurate.
[0038] In some embodiments, determining whether a target fault exists in the NPU multi-dimensional data based on the distance between the first fault detection result and the first fault cluster center set includes: Calculate the distance between the first set of fault categories and the first set of fault cluster centers to obtain one or more fault distances; If the distance to one or more faults exceeds the distance threshold, or if the proportion of one or more faults exceeding the distance threshold exceeds the proportion threshold, then it is determined that a target fault exists in the NPU multidimensional data.
[0039] Specifically, during the batch inference phase, after the first fault detection model completes inference for each sample in the NPU feature matrix, it also outputs the distance from each sample to its assigned first fault cluster center. Each sample corresponds to a fault distance value, and these distance values of all samples form one or more fault distances. Subsequently, each fault distance is compared with a distance threshold. When the distance from a sample to its first fault cluster center exceeds the distance threshold, the sample is considered to be an "outlier" relative to the known fault pattern and may be new fault data (target fault). When one or more fault distances exceed the distance threshold, or when the proportion of one or more fault distances exceeding the distance threshold exceeds the proportion threshold, this means that the data distribution in the NPU multi-dimensional data has undergone substantial changes, and a target fault is determined to exist in the NPU multi-dimensional data.
[0040] Once a target fault is determined to exist in the NPU multidimensional data, this determination result can serve as a trigger to initiate the process of incrementally training the first fault detection model based on the NPU multidimensional data.
[0041] In some embodiments, the above method further includes: The performance of the first fault detection model is evaluated at preset intervals to obtain the accuracy of the first fault detection model for a preset number of consecutive cycles. If the average accuracy of the first fault detection model is less than the third threshold for a consecutive preset number of cycles, then the first fault detection model is incrementally trained based on NPU multidimensional data to obtain the second fault detection model.
[0042] Here, an evaluation period (preset period) can be defined based on the operating rhythm and failure frequency of the NPU cluster, such as "every 24 hours" or "every 1000 inferences completed". A scheduled task will trigger the evaluation process once every evaluation period.
[0043] Specifically, a test set can be extracted from the object storage cluster, consisting of NPU feature vectors that have been verified by experts or labeled with high confidence over a specific time period, along with their true fault categories (labels). This dataset is reserved before incremental training and has not been used for any model training to ensure the objectivity of the evaluation.
[0044] Every preset period, the performance of the first fault detection model in the current service is evaluated using a test set. This includes feeding all feature vectors in the test set into the first fault detection model in sequence, obtaining the predicted fault category for each test sample, comparing the predicted fault category with the real label and calculating the accuracy. The accuracy of the first fault detection model in a consecutive preset number of periods can be obtained.
[0045] Calculate the average accuracy of the first fault detection model over a preset number of consecutive periods and compare it with the third threshold. If the average accuracy of the first fault detection model over a preset number of consecutive periods is less than the third threshold, it indicates that the first fault detection model has performed poorly in the recent period and can no longer accurately characterize the fault mode of the current NPU data. The first fault detection model needs to be updated.
[0046] Subsequently, the trigger period and NPU multi-dimensional data saved in the previous period are extracted from the object storage cluster. The NPU multi-dimensional data are used to perform incremental training on the first fault detection model, and all updated model parameters are saved as the second fault detection model. The second fault detection model has higher accuracy for the new data distribution.
[0047] When the next preset cycle arrives, the accuracy of the second fault detection model will be recalculated to confirm whether its accuracy has rebounded above the third threshold, thus completing the closed-loop verification. If the situation still does not improve, a higher-level alarm may be triggered (such as data quality issues, the need for manual re-analysis, etc.).
[0048] Step 104: If the second fault detection model passes the dual-index evaluation, deploy the second fault detection model to the container orchestration cluster.
[0049] In this embodiment, after incrementally training the first fault detection model to obtain the second fault detection model, a dual-metric evaluation method (such as F1 score and Area Under Curve (AUC)) can be used to evaluate the second fault detection model to determine whether its performance is superior to that of the first fault detection model. If the second fault detection model passes the dual-metric evaluation, an automated deployment pipeline is triggered to update the second fault detection model to the inference service running in the container orchestration cluster. Simultaneously, all parameters of the second fault detection model are packaged into a new model file, uploaded to the model repository, and its model version is marked.
[0050] In some embodiments, the above method further includes: The performance of the first fault detection model is evaluated to obtain the first precision, first recall, and first area under the curve of the first fault detection model; the performance of the second fault detection model is evaluated to obtain the second precision, second recall, and second area under the curve of the second fault detection model. Based on the harmonic mean of the first precision and the first recall of the first fault detection model, a first evaluation index for the first fault detection model is determined; based on the harmonic mean of the second precision and the second recall of the second fault detection model, a second evaluation index for the second fault detection model is determined. If the difference between the first evaluation index and the second evaluation index is greater than or equal to the first threshold, and the difference between the area under the first curve and the area under the second curve is greater than or equal to the second threshold, then the second fault detection model is judged to have passed the dual-index evaluation.
[0051] Specifically, a test set can be extracted from the object storage cluster, consisting of NPU feature vectors that have been verified by experts or labeled with high confidence over a specific time period, along with their true fault categories (labels). This dataset is reserved before incremental training and has not been used for any model training to ensure the objectivity of the evaluation.
[0052] Subsequently, the first fault detection model and the second fault detection model are used to infer the test set to obtain the first predicted fault category and its confidence level for each test sample in the test set, as well as the second predicted fault category and its confidence level for each test sample. Then, based on the first predicted fault category and the true fault category for each test sample, true positives, false positives, and false negatives are counted, and the first precision and the first recall of the first fault detection model are calculated accordingly. Similarly, based on the second predicted fault category and the true fault category for each test sample, true positives, false negatives are counted, and the second precision and the second recall of the second fault detection model are calculated accordingly.
[0053] Next, based on the harmonic mean of the first precision and the first recall of the first fault detection model, a first evaluation metric for the first fault detection model is calculated. Similarly, based on the harmonic mean of the second precision and the second recall of the second fault detection model, a second evaluation metric for the second fault detection model is calculated. Furthermore, based on the first predicted fault category and its confidence level, and the true fault category for each test sample, a first area under the curve (AUC) is calculated, i.e., the area under the ROC curve corresponding to the first fault detection model. Likewise, based on the second predicted fault category and its confidence level, and the true fault category for each test sample, a second area under the curve (AUC) is calculated, i.e., the area under the ROC curve corresponding to the second fault detection model.
[0054] If the difference between the first evaluation index and the second evaluation index is greater than or equal to the first threshold, and the difference between the area under the first curve and the area under the second curve is greater than or equal to the second threshold, then the second fault detection model is judged to have passed the dual-index evaluation. This indicates that the second fault detection model is not only significantly better than the old model (the first fault detection model) in terms of comprehensive performance in classification accuracy and recall, but also has a substantial improvement in the ability to rank and distinguish samples of each category, and can more reliably isolate fault modes.
[0055] Step 105: Perform fault detection on the NPU multi-dimensional data based on the second fault detection model to obtain the second fault detection result of the NPU multi-dimensional data.
[0056] In this embodiment, after the second fault detection model is deployed to the container orchestration cluster and goes online, the inference Pod template defined in the second resource allocation result will be updated, and the inference service container image in the inference Pod template will be updated so that the inference service container image encapsulates the inference service of the second fault detection model. Then, the newly started Pod instance will load the second fault detection model and use the second fault detection model to perform fault detection on the NPU multi-dimensional data, and output the second fault detection result of the NPU multi-dimensional data. The second fault detection result includes the second fault category set and the corresponding confidence set.
[0057] Thus, a complete closed-loop process from model evolution, quality verification, smooth deployment to continuous inference is completed, ensuring the continuous adaptive and reliable operation of the NPU cluster's fault detection capabilities.
[0058] In some embodiments, the training process of the first fault detection model includes: Historical NPU multi-dimensional data is obtained from the object storage cluster, and feature engineering is performed on the historical NPU multi-dimensional data to obtain the historical NPU feature matrix. Create a third resource object and define the training Pod template and the number of second replicas in the third resource object. The training Pod template includes a distributed training container image and the distributed training container image has built-in model training code. Based on the training Pod template, run a second number of Pod instances in parallel. In the second number of Pod instances, perform distributed model training based on the historical NPU feature matrix to obtain the first fault detection model.
[0059] Here, the third resource object specifically refers to Job. Job is a resource object in Kubernetes used to manage one-time batch processing tasks, ensuring that one or more Pod instances exit after successful execution, and is used to implement the distributed orchestration of the model training process in this application.
[0060] Specifically, firstly, accumulated historical NPU multi-dimensional data is extracted from the object storage cluster according to a time range, and then time alignment and feature engineering are performed on the historical NPU multi-dimensional data to obtain the historical NPU feature matrix. To execute a one-time large-scale model training task, a Job resource object (a third-party resource object) needs to be created to ensure that a specified number of Pod instances successfully complete and exit.
[0061] A third resource object is created, defining the training Pod template and the number of second replicas within it. The training Pod template specifies a distributed training container image, which encapsulates the distributed training framework and model training code. Once the third resource object is submitted to the container orchestration cluster, the number of Pod instances corresponding to the second replica is immediately created based on the training Pod template, and they are started in parallel. The training scripts within each Pod instance are coordinated via environment variables or shared storage to initialize the distributed training group. Next, the historical NPU feature matrix is loaded, and a distributed data loader is used to evenly distribute the data across the Pod instances, ensuring that each Pod instance processes different mini-batch data for each training step, achieving data parallelism.
[0062] The model training code defines a neural network containing a self-attention layer. For the historical NPU feature matrix, the self-attention mechanism can capture the complex dependencies between different feature dimensions, as well as the autocorrelation of the same feature within a time window. The self-attention mechanism treats the historical NPU feature matrix as a sequence (Token), learns the interaction relationship between each feature (such as temperature) and other features (such as utilization and power consumption) through multi-head attention, and finally outputs the predicted fault category through a fully connected layer.
[0063] Subsequently, each Pod instance begins a distributed training loop, including: each Pod instance performing model forward propagation on its local mini-batch data, calculating the predicted fault category, comparing the predicted fault category with the true label, calculating cross-entropy loss or contrastive loss, and calculating the local gradient accordingly, before triggering a full reduction operation. The gradients of each Pod instance are summed and averaged on the high-speed interconnect network of the NPU cluster to keep the model replicas on all Pod instances synchronized. Then, each Pod instance updates its local model replica using the synchronized gradient. This process is repeated until the model converges.
[0064] After the distributed training converges, one Pod is selected as the master node to perform the model export operation, obtaining the first fault detection model. This first fault detection model is then uploaded to the model repository, completing the training process. Finally, the third resource object marks the number of Pod instances (replicas of the first Pod) as complete, and the training task ends.
[0065] In the technical solution of this application embodiment, data is collected based on the data acquisition function deployed on each node in the Neural Processing Unit (NPU) cluster to obtain NPU multi-dimensional data; fault detection is performed on the NPU multi-dimensional data based on the first fault detection model deployed in the container orchestration cluster to obtain the first fault detection result of the NPU multi-dimensional data; based on the distance between the first fault detection result and the first fault cluster center set, it is determined whether there is a target fault in the NPU multi-dimensional data; if so, the first fault detection model is incrementally trained based on the NPU multi-dimensional data to obtain a second fault detection model; if the second fault detection model passes the dual-index evaluation, the second fault detection model is deployed to the container orchestration cluster; fault detection is performed on the NPU multi-dimensional data based on the second fault detection model to obtain the second fault detection result of the NPU multi-dimensional data. Thus, by constructing an end-to-end closed loop of "real-time data acquisition - new fault detection based on clustering algorithm - incremental model training - performance quantification evaluation", it is possible to automatically identify and archive new fault data, and quickly adapt to new fault modes while retaining historical knowledge, avoiding the waste of resources in full retraining. At the same time, relying on container orchestration capabilities, the model lifecycle management is encapsulated into an automated pipeline, which can continuously adapt to new fault scenarios without manual intervention, greatly improving iteration efficiency. This allows it to continuously learn from actual operation, gradually improve the ability to identify complex NPU faults, and significantly enhance the stable operation guarantee capability of the NPU cluster.
[0066] This application also proposes a research and improvement method for a self-trained NPU fault diagnosis model technology based on Kubernetes scheduling, aiming to solve the following technical problems: (1) Addressing the shortcomings of offline training models: An online self-training mechanism is adopted, which can capture and add new training data in a timely manner. The model parameters are optimized through dynamic iterative training, which improves the stability and generalization of the model, enabling the model to continuously and timely adapt to new fault scenarios, thereby solving the problem of performance degradation due to the emergence of new data.
[0067] (2) To address the drawback of low iteration efficiency: relying on Kubernetes' scheduling and orchestration capabilities, the entire process of triggering and executing model training, building related images, intelligently allocating resources to services and restarting is integrated into an automated pipeline. After new data is included, the deployment of new models can be completed without manual operation, which greatly shortens the service deployment cycle and significantly improves iteration efficiency.
[0068] Figure 2 This is a schematic diagram of the overall architecture of a research and improvement method for a self-trained NPU fault diagnosis model technology based on Kubernetes scheduling, as provided in the embodiments of this application. Figure 2As shown, the architecture includes an NPU node cluster, an object storage cluster, a self-training / adaptive update layer, an MLflow model repository, an inference service, and fault detection. The self-training / adaptive update layer includes a Kubernetes training layer, a model evaluation layer, and a Kubernetes deployment layer. The method mainly includes a data acquisition and feature engineering module, a model training module, a model inference and diagnostic service module, and a model self-training / adaptive update module.
[0069] (1) Data Acquisition and Feature Engineering Module like Figure 3 The diagram shows the architecture of the data acquisition and feature engineering module provided in this embodiment. This module mainly adopts the DaemonSet deployment method to ensure that a lightweight data acquisition agent service is deployed on each node of the NPU node cluster. This agent is mainly responsible for capturing the core raw training data required for downstream model training, including but not limited to key dimensions such as NPU hardware performance counters (e.g., instruction execution efficiency, cache interaction hit rate), real-time sensor monitoring data (temperature, voltage, energy consumption parameters), system operation logs, and application layer task load information.
[0070] After data collection is completed, the collected NPU multi-dimensional data is uploaded to the object storage cluster. Relying on the multi-replica mechanism and distributed advantages of object storage, on the one hand, high fault tolerance is achieved through multi-node data backup, effectively avoiding data loss caused by single point of failure; on the other hand, the scalability of object storage alleviates the storage pressure caused by the accumulation of massive amounts of data and ensures the stability of long-term storage of original data.
[0071] For the collected raw data, the model's built-in feature engineering mechanism preprocesses the data. First, normalization is used to eliminate differences between indicators, and then the min-max normalization formula is used to round the data to the [0,1] interval. The processing formula is as follows: (1) in, These are the original eigenvalues. and These are the minimum and maximum values of the feature on the training set, respectively. These are the normalized feature values, ensuring consistent data distribution.
[0072] Secondly, dimensionality reduction algorithms such as PCA are used to extract core features, and dimensionality compression is achieved by solving the eigenvalues and eigenvectors of the feature matrix. Let the original high-dimensional data matrix be... Where n is the number of samples and d is the original dimension of the samples, the formula for calculating the covariance matrix is: (2) in, This is the sample mean vector.
[0073] Then on Perform feature decomposition. It is an eigenvalue diagonal matrix. Given an eigenvector matrix, select the eigenvectors corresponding to the k largest eigenvalues to obtain the dimensionality-reduced data matrix. This is to reduce the dimensions of the data.
[0074] Through the above processing, the original data is transformed into noise-free or highly correlated feature vectors, which not only reduces the computational complexity of model training, but also improves the model's learning efficiency of key knowledge, laying the foundation for model performance optimization.
[0075] (2) Model training module like Figure 4 The diagram shows the architecture of the model training module provided in this embodiment. This module takes the optimized feature-engineered data (dimensionality-reduced data matrix) from the data acquisition and feature engineering module as input to build an NPU fault diagnosis model training pipeline. Distributed orchestration of training tasks is achieved through Kubernetes Job resource objects, and then, relying on its resource elastic scheduling mechanism, training Pods are dynamically allocated to nodes with sufficient CPU, NPU, and memory resources, maximizing the utilization of cluster computing instances to accelerate model convergence.
[0076] The model training in this application primarily employs the Transformer architecture, whose attention mechanism can capture dependencies in multi-dimensional NPU data. The core definition formula of the attention mechanism is: (3) in, For querying the matrix, The key matrix, For value matrices, They are generated from the input features (the reduced-dimensional data matrix) through linear transformations. Using the key vector dimension, scaling avoids the gradient vanishing problem caused by excessively large vector inner products, thus preventing underfitting of the model. This mechanism enables the model to adaptively focus on the correlation between data at different times and in different dimensions. Combined with the feature-engineered training dataset, it can significantly improve the learning ability of the NPU in complex fault scenarios.
[0077] After training, stable model versions are selected based on model evaluation metrics (such as accuracy and F1 score), stored in the MLflow model repository, and archived by associating training parameters, dataset version, and evaluation report. This process provides a baseline model for subsequent model self-training / adaptive update modules, and lays the model foundation for deploying inference services on Kubernetes for the model inference and diagnostic service modules, achieving a tight link between training and deployment.
[0078] (3) Model Reasoning and Diagnostic Service Module like Figure 5 The diagram shows the architecture of the model inference and diagnosis service module provided in this application embodiment. This module focuses on the engineering deployment and real-time inference of the NPU fault diagnosis model. It uses the Kubernetes Deployment resource type to realize the containerized deployment of the diagnosis service: by defining the Pod template and the number of replicas, it ensures that the service runs with high availability in the cluster. At the same time, it relies on Kubernetes' automatic restart capability to automatically restart when the instance is abnormal, thus ensuring the stability of the diagnosis service.
[0079] During real-time inference, the feature-engineered multi-dimensional NPU data (the aforementioned dimensionality-reduced data matrix) is input into the deployed fault diagnosis model for diagnosis. The model output layer uses the softmax function to transform the original output into a normalized fault category probability distribution, the calculation formula of which is as follows: (4) in, For the input feature vector, This is the model's original output for the i-th type of fault. This represents the total number of fault categories. This represents the confidence level of the i-th type of fault (value 0-1, corresponding to 0-100%). The final output includes the specific fault category (such as overheating, multi-bit anomaly, single-bit anomaly, etc.) and the corresponding confidence level of the fault output result.
[0080] The aforementioned fault output results are synchronized to the upper-layer monitoring service, effectively improving the automation capability of operation and maintenance. On the other hand, the system automatically inputs the fault output results into the fault detection module. If they meet the prescribed new fault data evaluation criteria, the feature-engineered NPU multi-dimensional data is archived into the incremental dataset directory in the object storage cluster as the core input of the subsequent model self-training / adaptive update module. This expands the original dataset size by adding labeled samples and records the fault distribution characteristics in the actual scenario (such as high-frequency fault types and confidence fluctuation ranges) to provide targeted optimization directions for model adaptive training. Finally, a stable and continuous fault diagnosis model is constructed, forming a closed-loop enhanced adaptive training mechanism of "inference-data feedback-model iteration".
[0081] (4) Model self-training / adaptive update module like Figure 6 The diagram shown is an architectural representation of the model self-training / adaptive update module provided in this application embodiment. This module triggers condition checks or periodic checks based on performance degradation data obtained from the inference service. If the average inference service accuracy of the fault diagnosis model is less than a custom threshold over n consecutive periods, iterative updates (model retraining) of the fault diagnosis model are triggered. The defined formula is as follows: (5) in, To improve the accuracy of single-cycle inference services for fault diagnosis models, Custom threshold.
[0082] Alternatively, when new fault data is detected based on the fault output, it will also trigger the retraining of the fault diagnosis model (incremental training). The formula for determining new fault data is: (6) in, The output results are for the faults of the sample to be tested (NPU multi-dimensional data after feature engineering). As a cluster center for historical faults, The average distance, For smoothing terms, Custom clustering offset threshold. Output results when the sample to be detected has a fault. Clustering Centers for Historical Faults When the distance between them exceeds the threshold range, the NPU multi-dimensional data after feature engineering will be determined as new fault data and archived into the incremental dataset directory in the object storage cluster as the original data for subsequent incremental training of the model, providing new data support for adaptive training of the model.
[0083] During the incremental training phase of the model, the effectiveness of the new fault diagnosis model after incremental training is determined by a dual-metric approach: F1 score and AUC (a higher AUC value indicates better model performance). If both the F1 score and AUC of the new fault diagnosis model satisfy the following conditions: (7) (8) in, The F1 score of the new fault diagnosis model. The F1 score of the old fault diagnosis model The area under the ROC curve of the new fault diagnosis model on the validation set. This represents the area under the ROC curve of the old fault diagnosis model on the validation set. In other words, the new fault diagnosis model is considered superior to the old model only when both its F1 score and AUC are improved by at least 1 percentage point compared to the old model.
[0084] The above dual-index evaluation method ensures both the accuracy of the fault diagnosis model in identifying fault categories (F1 score) and its overall ability to distinguish between positive and negative samples (AUC), avoiding performance bias caused by single-index optimization and providing a more accurate quantitative standard for subsequent model iterations.
[0085] After completing incremental training and evaluation of the model, the new fault diagnosis model is stored in the MLflow model repository for version update, and the training parameters, dataset version, and evaluation report are associated to complete version archiving. Then, blue-green deployment (seamless switching) and model deployment are performed on the Kubernetes deployment layer based on the new fault diagnosis model to provide new inference services based on the new fault diagnosis model.
[0086] The technical solution provided in this application includes the following key points: (1) Online self-training closed-loop mechanism This application breaks through the traditional offline training mode and constructs an end-to-end closed loop of "real-time data acquisition - automatic detection of new faults - incremental model training - performance quantification evaluation": new fault detection based on clustering algorithm (quantifying differences through anomaly score formula) realizes automatic identification and archiving of new fault data; based on incremental training strategy (such as freezing the weights of some layers of the model), it can quickly adapt to new fault modes while retaining historical knowledge and avoid the waste of resources of full retraining.
[0087] (2) Kubernetes end-to-end automated orchestration Leveraging Kubernetes' container orchestration capabilities, model lifecycle management is encapsulated into an automated pipeline: the data acquisition layer uses DaemonSet deployment to ensure full node coverage, the model training layer uses Job to achieve distributed computing power scheduling, and the model inference layer uses Deployment to ensure high availability; integrating functions such as model training triggering, automatic image building, and blue-green deployment switching significantly reduces the cycle from data update to model effectiveness.
[0088] (3) Multi-dimensional quantitative evaluation system Establish a dual-metric evaluation standard with F1 score and AUC value as the core: F1 score (combining precision and recall) ensures the accuracy of fault identification, and AUC value reflects the model's overall discrimination ability across the entire threshold range; set clear performance improvement thresholds (such as ΔF1≥1%, ΔAUC≥1%) to avoid invalid iterations and ensure the effectiveness of model iteration.
[0089] This application also proposes a processor fault detection device. Figure 7 This is a schematic diagram of another processor fault detection device provided in an embodiment of this application, as shown below. Figure 7 As shown, the device includes: The acquisition unit 701 is used to acquire data based on the data acquisition function deployed on each node in the neural network processor (NPU) cluster, and obtain multi-dimensional NPU data.
[0090] The detection unit 702 is used to perform fault detection on NPU multi-dimensional data based on the first fault detection model deployed in the container orchestration cluster, and obtain the first fault detection result of NPU multi-dimensional data.
[0091] The judgment unit 703 is used to determine whether a target fault exists in the NPU multidimensional data based on the distance between the first fault detection result and the first fault cluster center set.
[0092] Training unit 704 is used to incrementally train the first fault detection model based on the NPU multidimensional data if a target fault exists in the NPU multidimensional data, so as to obtain the second fault detection model.
[0093] Deployment unit 705 is used to deploy the second fault detection model to the container orchestration cluster if the second fault detection model passes the dual-index evaluation.
[0094] The detection unit 702 is also used to perform fault detection on the NPU multi-dimensional data based on the second fault detection model, and obtain the fault detection results of the NPU multi-dimensional data.
[0095] In some embodiments, the acquisition unit 701 is specifically used for: Create a first resource object, and based on the first resource object, create a Pod instance on each node in the NPU cluster. The Pod instance on each node is equipped with data collection functionality. Data collection is performed based on the data collection function deployed on the Pod instance on each node to obtain multi-dimensional NPU data.
[0096] In some embodiments, NPU multidimensional data includes one or more of the following: NPU hardware performance memory, sensor monitoring data, system operation logs, and task load information.
[0097] In some embodiments, the first fault detection result includes a first fault category set corresponding to NPU multi-dimensional data and a confidence level of the first fault category set; wherein, the detection unit 702 is specifically used for: Upload the NPU multi-dimensional data to the object storage cluster and perform feature engineering on the NPU multi-dimensional data to obtain the NPU feature matrix; Create a second resource object, and define the inference Pod template and the number of first replicas in the second resource object. The inference Pod template includes an inference service container image, and the inference service container image encapsulates the first fault detection model. Based on the inference Pod template, run a number of Pod instances in parallel, and input the NPU feature matrix into the first fault detection model for model inference in the first number of Pod instances to obtain the first fault category set and the confidence of the first fault category set.
[0098] In some embodiments, the first fault detection result includes a first fault category set corresponding to NPU multi-dimensional data; wherein, the judgment unit 703 is specifically used for: Calculate the distance between the first set of fault categories and the first set of fault cluster centers to obtain one or more fault distances; If the distance to one or more faults exceeds the distance threshold, or if the proportion of one or more faults exceeding the distance threshold exceeds the proportion threshold, then it is determined that a target fault exists in the NPU multidimensional data.
[0099] In some embodiments, the device further includes: The evaluation unit is used to evaluate the performance of the first fault detection model and obtain the first precision, first recall and first area under the curve of the first fault detection model; and to evaluate the performance of the second fault detection model and obtain the second precision, second recall and second area under the curve of the second fault detection model.
[0100] The determining unit is used to determine a first evaluation index of the first fault detection model based on the harmonic mean of the first precision and the first recall of the first fault detection model; and to determine a second evaluation index of the second fault detection model based on the harmonic mean of the second precision and the second recall of the second fault detection model.
[0101] In some embodiments, the judgment unit 703 is further configured to determine that the second fault detection model passes the dual-index evaluation if the difference between the first evaluation index and the second evaluation index is greater than or equal to the first threshold and the difference between the area under the first curve and the area under the second curve is greater than or equal to the second threshold.
[0102] In some embodiments, the evaluation unit is further configured to perform performance evaluation on the first fault detection model at preset intervals to obtain the accuracy of the first fault detection model for a consecutive preset number of intervals.
[0103] In some embodiments, the training unit 704 is further configured to perform incremental training on the first fault detection model based on NPU multidimensional data to obtain a second fault detection model if the average accuracy of the first fault detection model is less than a third threshold for a consecutive preset number of cycles.
[0104] In some embodiments, the device further includes: The acquisition unit is used to retrieve historical NPU multi-dimensional data from the object storage cluster.
[0105] The feature engineering unit is used to perform feature engineering processing on historical NPU multi-dimensional data to obtain the historical NPU feature matrix.
[0106] The creation unit is used to create a third resource object, and the training Pod template and the number of second replicas are defined in the third resource object. The training Pod template includes a distributed training container image, and the distributed training container image has built-in model training code.
[0107] In some embodiments, the training unit 704 is further configured to run a second number of replica Pod instances in parallel based on the training Pod template, and to perform distributed model training based on the historical NPU feature matrix in the second number of replica Pod instances to obtain a first fault detection model.
[0108] Those skilled in the art should understand that Figure 7 The functions of each unit in the communication device shown can be understood by referring to the relevant description of the aforementioned method. Figure 7 The functions of each unit in the communication device shown can be implemented by a program running on a processor or by specific logic circuits.
[0109] Figure 8This is a schematic diagram of the processing device provided in an embodiment of this application. The processing device may be a terminal device or a network device. Figure 8 The processing device shown includes a processor 801, which can call and run computer programs from memory to implement the methods in the embodiments of this application.
[0110] Optionally, such as Figure 8 As shown, the processing device may further include a memory 802. The processor 801 can retrieve and run computer programs from the memory 802 to implement the methods described in this embodiment.
[0111] The memory 802 can be a separate device independent of the processor 801, or it can be integrated into the processor 801.
[0112] Optionally, such as Figure 8 As shown, the processing device may also include a transceiver 803, which the processor 801 can control to communicate with other devices. Specifically, it can send information or data to other devices or receive information or data sent by other devices.
[0113] The transceiver 803 may include a transmitter and a receiver. The transceiver 803 may further include an antenna, and the number of antennas may be one or more.
[0114] The processing device may specifically be the processor fault detection device of the present application embodiment, and the processing device can implement the corresponding processes of the various methods of the present application embodiment. For the sake of brevity, it will not be described in detail here.
[0115] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0116] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0117] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to the processing device in this application embodiment, and the computer program causes the computer to execute the corresponding processes implemented by the various methods in this application embodiment; for brevity, further details are omitted here.
[0118] This application also provides a computer program product, including computer program instructions. This computer program product can be applied to the processing device in this application embodiment, and the computer program instructions cause the computer to execute the corresponding processes implemented by the various methods in this application embodiment; for brevity, further details are omitted here.
[0119] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0120] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0121] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0122] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0123] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0124] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0125] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A processor fault detection method, characterized in that, The method includes: Data is collected based on the data acquisition function deployed on each node in the Neural Processor (NPU) cluster to obtain multi-dimensional NPU data. The first fault detection model deployed in the container orchestration cluster is used to perform fault detection on the NPU multi-dimensional data to obtain the first fault detection result of the NPU multi-dimensional data. Based on the distance between the first fault detection result and the first fault cluster center set, it is determined whether there is a target fault in the NPU multidimensional data; if so, the first fault detection model is incrementally trained based on the NPU multidimensional data to obtain a second fault detection model. If the second fault detection model passes the dual-index evaluation, the second fault detection model will be deployed to the container orchestration cluster. Based on the second fault detection model, fault detection is performed on the NPU multi-dimensional data to obtain the second fault detection result of the NPU multi-dimensional data.
2. The method according to claim 1, characterized in that, The data acquisition function deployed on each node of the neural network processor (NPU) cluster collects data to obtain multi-dimensional NPU data, including: A first resource object is created, and a Pod instance is created on each node in the NPU cluster based on the first resource object, wherein the data collection function is deployed on the Pod instance on each node; Data is collected based on the data collection function deployed on the Pod instance on each node to obtain the NPU multi-dimensional data.
3. The method according to claim 1, characterized in that, The first fault detection result includes a first fault category set corresponding to the NPU multi-dimensional data; determining whether a target fault exists in the NPU multi-dimensional data based on the distance between the first fault detection result and the first fault cluster center set includes: Calculate the distance between the first set of fault categories and the first set of fault cluster centers to obtain one or more fault distances; If the distance to one or more faults exceeds a distance threshold, or if the proportion of the distances to one or more faults exceeding the distance threshold exceeds a proportion threshold, then it is determined that the target fault exists in the NPU multidimensional data.
4. The method according to claim 1, characterized in that, The method further includes: The performance of the first fault detection model is evaluated to obtain the first precision, first recall, and first area under the curve of the first fault detection model; the performance of the second fault detection model is evaluated to obtain the second precision, second recall, and second area under the curve of the second fault detection model. Based on the harmonic mean of the first precision and the first recall of the first fault detection model, a first evaluation index of the first fault detection model is determined; based on the harmonic mean of the second precision and the second recall of the second fault detection model, a second evaluation index of the second fault detection model is determined. If the difference between the first evaluation index and the second evaluation index is greater than or equal to the first threshold, and the difference between the area under the first curve and the area under the second curve is greater than or equal to the second threshold, then the second fault detection model is judged to have passed the dual-index evaluation.
5. The method according to claim 1, characterized in that, The first fault detection result includes a first fault category set corresponding to the NPU multi-dimensional data and the confidence level of the first fault category set; the first fault detection model deployed in the container orchestration cluster performs fault detection on the NPU multi-dimensional data to obtain the first fault detection result of the NPU multi-dimensional data, including: The NPU multi-dimensional data is uploaded to the object storage cluster, and feature engineering is performed on the NPU multi-dimensional data to obtain the NPU feature matrix. Create a second resource object, and define the inference Pod template and the number of first replicas in the second resource object. The inference Pod template includes an inference service container image, and the inference service container image encapsulates the first fault detection model. Based on the inference Pod template, run the first number of replica Pod instances in parallel. In the first number of replica Pod instances, input the NPU feature matrix into the first fault detection model to perform model inference, and obtain the first fault category set and the confidence of the first fault category set.
6. The method according to claim 1, characterized in that, The method further includes: The performance of the first fault detection model is evaluated at preset intervals to obtain the accuracy of the first fault detection model for a preset number of consecutive cycles. If the average accuracy of the first fault detection model is less than the third threshold for a consecutive preset number of periods, then the first fault detection model is incrementally trained based on the NPU multidimensional data to obtain the second fault detection model.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Historical NPU multi-dimensional data is obtained from the object storage cluster, and feature engineering is performed on the historical NPU multi-dimensional data to obtain the historical NPU feature matrix. Create a third resource object, and define the training Pod template and the number of second replicas in the third resource object. The training Pod template includes a distributed training container image, and the distributed training container image has built-in model training code. Based on the training Pod template, run the second number of Pod instances in parallel. In the second number of Pod instances, perform distributed model training based on the historical NPU feature matrix to obtain the first fault detection model.
8. The method according to any one of claims 1 to 6, characterized in that, The NPU multi-dimensional data includes one or more of the following: NPU hardware performance memory, sensor monitoring data, system operation logs, and task load information.
9. A processor fault detection device, characterized in that, The device includes: The acquisition unit is used to acquire data based on the data acquisition function deployed on each node in the neural network processor (NPU) cluster, and obtain multi-dimensional NPU data. The detection unit is used to perform fault detection on the NPU multi-dimensional data based on the first fault detection model deployed in the container orchestration cluster, and obtain the first fault detection result of the NPU multi-dimensional data. The judgment unit is used to determine whether a target fault exists in the NPU multidimensional data based on the distance between the first fault detection result and the first fault clustering center set; The training unit is used to incrementally train the first fault detection model based on the NPU multidimensional data if a target fault exists in the NPU multidimensional data, so as to obtain a second fault detection model. A deployment unit is used to deploy the second fault detection model to the container orchestration cluster if the second fault detection model passes the dual-index evaluation. The detection unit is further configured to perform fault detection on the NPU multi-dimensional data based on the second fault detection model, and obtain the fault detection result of the NPU multi-dimensional data.
10. A processing apparatus, characterized in that, include: A processor and a memory for storing a computer program, the processor for calling and running the computer program stored in the memory to perform the method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, It includes computer program instructions that cause a computer to perform the method as described in any one of claims 1 to 8.
