Equipment abnormity prediction method and electronic equipment

By collecting and analyzing multi-source operating data of processing equipment, and using anomaly prediction models to extract the temporal and global characteristics of the equipment, the probability of equipment failure is predicted. This solves the problem of inaccurate prediction of equipment failure, reduces production costs, and improves product quality.

CN121834590APending Publication Date: 2026-04-10FUTAIHUA PRECISION ELECTRONICS (ZHENGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies cannot accurately predict equipment failures before they occur, resulting in equipment being in a "processing with faults" state for a long time before alarms are triggered. This leads to increased production costs and unstable product quality. Furthermore, when multiple devices fail simultaneously, maintenance resources are severely strained, affecting production plans.

Method used

Multi-source operating data of processing equipment is collected. Through the time-series feature extraction module and encoder module of the anomaly prediction model, long-term dependency features and global dependencies are extracted, feature data are fused, and the probability of anomaly occurrence of the equipment in the current batch is predicted.

Benefits of technology

It enables accurate prediction of early equipment failures, reduces the risk of "processing with faults," improves production efficiency and product quality, and provides timely maintenance and management support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834590A_ABST
    Figure CN121834590A_ABST
Patent Text Reader

Abstract

The invention provides an equipment abnormity prediction method and electronic equipment, and the method comprises the steps: collecting processing data when a processing device processes a current batch of products, and determining a feature parameter corresponding to the processing data; constructing input data according to the feature parameters, and performing first feature extraction on the input data by using a time sequence feature extraction module of an anomaly prediction model to obtain first feature data; converting the first feature data into an embedded vector, and performing second feature extraction on the embedded vector by using an encoder module of the anomaly prediction model to obtain second feature data; and according to fused feature data of the first feature data and the second feature data, determining an anomaly occurrence probability of the processing equipment after the current batch by using the anomaly prediction model. According to the invention, the equipment abnormity prediction efficiency and accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of anomaly prediction technology in the manufacturing industry, specifically to a method and electronic device for predicting equipment anomalies. Background Technology

[0002] In modern industrial production systems, the stable operation of processing equipment is fundamental to ensuring production efficiency and product quality. However, traditional monitoring methods often only detect equipment anomalies after an actual fault alarm is issued, lacking the ability to accurately predict impending failures before they occur. In fact, before an alarm is triggered, the equipment may have already been operating under fault conditions for some time. During this period, the quality of products produced is inconsistent, resulting in waste of raw materials and energy, and potentially leading to decreased customer satisfaction. Furthermore, when multiple pieces of equipment fail simultaneously and are out of service, maintenance resources are easily strained, leading to significantly extended repair cycles, severely disrupting production plans, increasing operating costs, and weakening market competitiveness. Therefore, achieving accurate early prediction of equipment failures and avoiding the inherent drawbacks of operating under fault conditions and reactive emergency response has become a critical issue that urgently needs to be addressed in the intelligent transformation of industrial production. Summary of the Invention

[0003] In view of the above, it is necessary to propose a method and electronic device for predicting equipment anomalies, which can solve the technical problem that it is difficult for related technologies to achieve accurate prediction of equipment failures in advance.

[0004] A first aspect of this application provides a method for predicting equipment anomalies, comprising: collecting processing data of a processing equipment processing a current batch of products, and determining feature parameters corresponding to the processing data; constructing input data based on the feature parameters, and performing a first feature extraction on the input data using a temporal feature extraction module of an anomaly prediction model to obtain first feature data; converting the first feature data into an embedding vector, and performing a second feature extraction on the embedding vector using an encoder module of the anomaly prediction model to obtain second feature data; and determining the probability of anomaly occurrence of the processing equipment in the current batch using the anomaly prediction model based on the fused feature data of the first feature data and the second feature data.

[0005] According to an embodiment of this application, the processing data includes multiple processing data corresponding to multiple time points when the preset part of the processing equipment processes each product. The preset part includes a spindle, and each time point corresponds to multiple processing data. The multiple processing data includes a combination of one or more of the following data: vibration data, sound data, temperature data, rotational speed data, and torque data.

[0006] According to an embodiment of this application, before determining the feature parameters corresponding to the processed data, the method further includes preprocessing the various processed data, wherein the preprocessing includes any one or more of the following processing methods: missing value processing, outlier processing, standardization processing, and data denoising processing.

[0007] According to an embodiment of this application, determining the feature parameters corresponding to the processing data includes: determining multiple first data indicators of the k-th type of processing data corresponding to the i-th product in the current batch, where i represents an integer in the range [1, n], n represents the number of products in the current batch, and k represents the number of products in the range [1, n]. The data is an integer within the range [m], where m represents the quantity of the various processing data. The various first data indicators include maximum value, minimum value, mean, standard deviation, variance, kurtosis, and skewness. Based on the various first data indicators of the k-th processing data corresponding to the i-th product, the various first data indicators of the k-th processing data corresponding to all products in the current batch are determined. Based on the various first data indicators of the k-th processing data corresponding to the i-th product, the various second data indicators corresponding to the i-th product are determined, including vibration range between vibration data, temperature range between temperature data, and speed range between speed data. Based on the various second data indicators corresponding to the i-th product, the various third data indicators corresponding to all products in the current batch are determined, including maximum vibration range, average vibration range, maximum temperature range, average temperature range, maximum speed range, and average speed range. Based on the various first data indicators and the various third data indicators, the feature parameter is obtained.

[0008] According to an embodiment of this application, constructing input data based on the feature parameters includes: sorting the data in the feature parameters in a preset order to obtain the data sequence corresponding to the current batch; and obtaining the input data based on the data sequence corresponding to the current batch.

[0009] According to an embodiment of this application, the temporal feature extraction module includes a Long Short-Term Memory (LSTM) layer. The temporal feature extraction module using the anomaly prediction model performs a first feature extraction on the input data to obtain the first feature data, which includes: using the gating mechanism of the LSTM layer to filter noise in the input data; and using the time-step-based recursive computation structure of the LSTM layer to extract the temporal change features of the processing equipment status in the current batch as the processing progresses based on the noise-filtered input data, thereby obtaining the first feature data.

[0010] According to an embodiment of this application, the encoder module includes a Transformer layer. The encoder module using the anomaly prediction model performs second feature extraction on the embedded vector to obtain second feature data, including: extracting features from the embedded vector using the multi-head attention mechanism of the Transformer layer, and encoding the extracted features at positions; and processing the position-encoded features through a feedforward neural network and a normalization layer to obtain the second feature data.

[0011] According to an embodiment of this application, determining the probability of an anomaly occurring in the current batch of the processing equipment using the anomaly prediction model based on the fused feature data of the first feature data and the second feature data includes: performing a nonlinear transformation mapping on the fused feature data according to a preset activation function to obtain the probability of anomaly occurring.

[0012] According to an embodiment of this application, the method further includes training the anomaly prediction model, comprising: collecting historical processing data of the processing equipment; constructing a sample dataset based on the historical processing data; determining a time parameter for anomaly prediction based on abnormal sample data in the sample dataset; performing data augmentation on the sample dataset based on the abnormal sample data to obtain a data-augmented sample dataset; and training the anomaly prediction model based on the time parameter and the data-augmented sample dataset.

[0013] According to an embodiment of this application, the processing equipment includes multiple processing devices of the same model. The step of collecting historical processing data from the processing devices and constructing a sample dataset based on the historical processing data includes: obtaining the equipment number of each processing device, the batch processing time of each batch of products processed by each processing device, and the batch number corresponding to each batch; establishing a first association relationship between the corresponding equipment number, the batch processing time, and the batch number; obtaining historical processing data of each processing device when processing each batch of products, and determining the feature parameters corresponding to the historical processing data; establishing a second association relationship between the corresponding feature parameters and the first association relationship; determining the data corresponding to each batch based on the second association relationship; using the data sequence formed by the data corresponding to each batch as a sample data; and obtaining the sample dataset based on the sample data corresponding to all batches.

[0014] According to an embodiment of this application, the historical processing data further includes the time of occurrence of the anomaly for each processing device, and the abnormal sample data represents the sample data corresponding to the time of occurrence of the anomaly. The step of determining the time parameter for anomaly prediction based on the abnormal sample data in the sample dataset includes: performing abrupt data detection on the sample data before the time of occurrence of the anomaly based on the zero-mean normal distribution assumption; determining the anomaly latency time based on the time difference between the time point corresponding to the detected abrupt data and the time of occurrence of the anomaly; and obtaining the time parameter based on the preset quantile of the data distribution of all anomaly latency times corresponding to all sample data.

[0015] According to an embodiment of this application, the historical processing data further includes the time of occurrence of the anomaly for each processing device, and the abnormal sample data represents the sample data corresponding to the time of occurrence of the anomaly. The step of performing data augmentation on the sample dataset based on the abnormal sample data to obtain a data-augmented sample dataset includes: clustering the sample data in the sample dataset with each abnormal sample data as a cluster center to obtain a cluster set corresponding to each abnormal sample data; selecting a cluster set in the cluster set where the number of abnormal sample data is less than a preset threshold, and deleting the abnormal sample data corresponding to the cluster center of the selected cluster set from the sample dataset to obtain a filtered sample dataset; determining multiple nearest neighbor abnormal sample data for each abnormal sample data in the filtered sample dataset; performing interpolation between each abnormal sample data and each nearest neighbor abnormal sample data in the filtered sample dataset based on a linear interpolation algorithm to generate newly added abnormal sample data; and obtaining the data-augmented sample dataset based on the sample dataset and the newly added abnormal sample data.

[0016] According to an embodiment of this application, the time parameter is used to indicate the number of predictable batches of the anomaly prediction model. Training the anomaly prediction model based on the time parameter and the data-augmented sample dataset includes: inputting sample data corresponding to the j-th batch in the data-augmented sample dataset into the anomaly prediction model; using the anomaly prediction model to predict the anomaly occurrence probability of the (j+1)-th to (j+p)-th batches, where j represents an integer greater than or equal to 1, and p represents the number of predictable batches; determining the loss value of the anomaly prediction model based on the probability predicted by the anomaly prediction model and the actual anomaly occurrence probability of the (j+1)-th to (j+p)-th batches; and adjusting the parameters of the anomaly prediction model based on the loss value until an anomaly prediction model that meets preset requirements is obtained.

[0017] A second aspect of this application provides an equipment anomaly prediction device, comprising: a data acquisition module for acquiring processing data of a processing equipment processing a current batch of products, and determining feature parameters corresponding to the processing data; a feature extraction module for constructing input data based on the feature parameters, and performing a first feature extraction on the input data using a temporal feature extraction module of an anomaly prediction model to obtain first feature data; the feature extraction module further for converting the first feature data into an embedding vector, and performing a second feature extraction on the embedding vector using an encoder module of the anomaly prediction model to obtain second feature data; and a probability prediction module for determining the probability of anomaly occurrence of the processing equipment in the current batch based on the fused feature data of the first feature data and the second feature data using the anomaly prediction model.

[0018] A third aspect of this application provides an electronic device, including: a memory and a processor, wherein the processor executes computer-readable instructions stored in the memory to implement the device anomaly prediction method.

[0019] The equipment anomaly prediction method provided in this application collects multi-source operational data of the equipment during the processing of the current batch of products to determine the corresponding temporal feature parameters. The method then extracts long-term dependency features from these temporal feature parameters using the temporal feature extraction module of the anomaly prediction model, generating first feature data. This first feature data is converted into an embedding vector and input into an encoder module to capture global dependencies, generating second feature data. Finally, the two types of feature data are fused using a multi-head attention mechanism. The model output layer is then used to determine the probability of equipment failure after completing the current batch of processing, providing a quantitative basis for preventative maintenance decisions. Thus, through the temporal-spatial feature fusion mechanism, accurate prediction of early equipment failures can be achieved, providing timely and effective maintenance and management support for equipment anomaly managers, thereby significantly reducing the risk of "processing with faults" and improving production efficiency and product quality. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating the device anomaly prediction method provided in an embodiment of this application.

[0022] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0023] Figure 3 This is a flowchart illustrating the training method for the anomaly prediction model provided in this application embodiment.

[0024] Figure 4 This is a flowchart illustrating a method for determining time parameters for anomaly prediction provided in an embodiment of this application.

[0025] Figure 5 This is a flowchart illustrating a method for data augmentation of a sample dataset provided in an embodiment of this application.

[0026] Figure 6 This is a schematic diagram illustrating the specific process of step S304 provided in the embodiments of this application.

[0027] Figure 7 This is a schematic diagram of a device for predicting equipment malfunctions, provided in an embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0029] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.

[0030] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Unless otherwise specified, the following embodiments and features described herein can be combined with each other.

[0031] In modern industrial production systems, the stable operation of processing equipment is a core element in ensuring production efficiency and product quality. However, related equipment monitoring and maintenance methods have significant limitations, mainly relying on the equipment issuing actual fault alarms before repairs or inspections are carried out. This method cannot accurately predict impending equipment failures before they occur, resulting in the equipment potentially being in a "processing with a fault" state for an extended period before alarms are triggered.

[0032] During the "processing with malfunctions" stage, although the equipment is not completely broken, its performance is affected to varying degrees, resulting in inconsistent product quality. This not only wastes raw materials and energy and increases production costs, but may also lead to decreased customer satisfaction and damage the company's reputation due to unstable product quality. More seriously, when multiple pieces of equipment malfunction simultaneously and are out of service for repair, it easily leads to a strain on maintenance resources, significantly extending the repair cycle, disrupting production plans, further increasing the company's operating costs, and weakening its competitiveness in the market.

[0033] For example, in the field of Computerized Numerical Control (CNC) machine tool machining, the spindle, as a critical production component, directly affects the machining quality and production efficiency of the equipment. Wear on the spindle bearings often adversely impacts machining quality, such as decreased machining accuracy and increased surface roughness. However, existing spindle fault monitoring methods typically only detect existing faults and cannot provide early warnings of spindle bearing wear, thus missing the optimal repair window.

[0034] Furthermore, most related fault prediction technologies are based on single sensor data or limited historical fault records, resulting in limited data dimensions and making it difficult to comprehensively reflect the actual operating status of the equipment. At the same time, the disparity between faulty and normal samples often leads to a significant imbalance in the sample size, further impacting the accuracy and reliability of fault prediction.

[0035] Therefore, achieving accurate prediction of CNC machine tool spindle failures in advance and avoiding the inherent drawbacks of "machining with problems" and post-event emergency handling has become a key issue that urgently needs to be addressed in the intelligent transformation of industrial production.

[0036] To address the aforementioned issues, the equipment anomaly prediction method provided in this application collects multi-source operational data from the equipment during the processing of the current batch of products, determining the corresponding temporal feature parameters. The method then extracts long-term dependency features from these temporal feature parameters using the temporal feature extraction module of the anomaly prediction model, generating first feature data. This first feature data is converted into an embedding vector and input into an encoder module to capture global dependencies, generating second feature data. Finally, the two types of feature data are fused using a multi-head attention mechanism, and the model output layer is used to determine the probability of equipment failure after completing the current batch of processing, providing a quantitative basis for preventative maintenance decisions. Thus, through the temporal-spatial feature fusion mechanism, accurate prediction of early equipment failures can be achieved, providing timely and effective maintenance and management support for equipment anomaly managers, thereby significantly reducing the risk of "processing with faults" and improving production efficiency and product quality.

[0037] Please see Figure 1 The diagram shown is a flowchart illustrating the device anomaly prediction method provided in this application embodiment. The device anomaly prediction method of this application embodiment is applied to electronic devices (such as...) Figure 2 The electronic device 10 shown includes the following steps. Depending on different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0038] Step S101: Collect processing data of the current batch of products processed by the processing equipment, and determine the characteristic parameters corresponding to the processing data.

[0039] In some embodiments of this application, the processing equipment may be a computerized numerical control (CNC) machine tool that requires equipment anomaly prediction.

[0040] The processing data includes various processing data at multiple time points corresponding to preset parts of the processing equipment when processing each product in the current batch. The preset parts include the spindle, and the current batch can be the current processing shift, which can be, for example, one shift per day. Each time point corresponds to multiple processing data, which include combinations of one or more of the following: vibration data, sound data, temperature data, rotational speed data, and torque data. The processing data may also include power data, current data, etc.

[0041] In one example, multiple sensors, such as vibration sensors, temperature sensors, and current sensors, can be used to collect various operational data at multiple time points during the machining of each product in the current batch of products by the CNC machine tool spindle. This allows the acquisition of machining data for the current batch of products.

[0042] In some embodiments of this application, after obtaining the original processed data, various preprocessing methods can be performed on the processed data to ensure data quality. Preprocessing includes any one or more of the following methods: missing value handling, outlier handling, standardization, and data denoising.

[0043] In one example, missing value handling includes filling missing values ​​in time series data using methods such as linear interpolation; outlier handling includes identifying and replacing outliers using the three-standard-deviation rule; standardization includes mapping the data to a uniform range using the maximum-minimum standardization method; and data denoising includes using Fourier transform to remove high-frequency noise components and retain the valid signal.

[0044] In some embodiments of this application, corresponding feature parameters can be determined based on preprocessed processing data. In one example, multiple first data indicators can be determined for the k-th type of processing data corresponding to the i-th product in the current batch. Here, i represents an integer in the range [1, n], n represents the number of products in the current batch, k represents an integer in the range [1, m], and m represents the number of multiple processing data. These multiple first data indicators include, but are not limited to, one or more of the following indicators: maximum value, minimum value, mean, standard deviation, variance, kurtosis, and skewness.

[0045] Furthermore, based on the various first data indicators of the k-th processing data corresponding to the i-th product, the various first data indicators of the k-th processing data corresponding to all products in the current batch can be determined, thus obtaining the overall first data indicators of the k-th processing data corresponding to all products in the current batch.

[0046] Simultaneously, for the i-th product, multiple second data indicators can be determined based on multiple first data indicators of the k-th type of processing data corresponding to the i-th product, to reflect the fluctuations during the processing. These multiple second data indicators include, but are not limited to, one or more of the following: vibration range between vibration data, temperature range between temperature data, and rotational speed range between rotational speed data.

[0047] Then, based on the various second data indicators corresponding to the i-th product, various third data indicators corresponding to all products in the current batch can be determined. These various third data indicators include the maximum vibration range, the average vibration range, the maximum temperature range, the average temperature range, the maximum rotational speed range, and the average rotational speed range. Feature parameters are obtained based on multiple primary and secondary data indicators. Thus, by combining these primary and secondary data indicators, a set of feature parameters reflecting the equipment's operating status can be constructed, providing input data support for subsequent anomaly prediction models.

[0048] Step S102: Construct input data based on feature parameters, and use the time-series feature extraction module of the anomaly prediction model to extract the first feature from the input data to obtain the first feature data.

[0049] In some embodiments of this application, when constructing input data based on feature parameters, the data in the feature parameters can be sorted according to a preset order to obtain the data sequence corresponding to the current batch. Input data is then obtained based on the data sequence corresponding to the current batch.

[0050] In one example, the preset order can be chronological, product processing order, etc. Sorting the data in the feature parameters according to the preset order yields an ordered data sequence corresponding to the current batch. Based on this sorted data sequence, the input data for the anomaly prediction model is constructed. Thus, the input data contains feature information that comprehensively reflects the equipment's processing status, ensuring that the subsequent time-series feature extraction module of the model can effectively capture the dynamic changes in the equipment's status.

[0051] In some embodiments of this application, the anomaly prediction model represents a pre-trained model, and the training method of the model can be referred to the description in the following embodiments. The temporal feature extraction module of the anomaly prediction model includes a Long Short-Term Memory (LSTM) layer. The LSTM layer is used to process temporal data and capture long-term dependencies in the data.

[0052] In some embodiments of this application, the gating mechanism of the LSTM layer can be used to filter noise in the input data; the time-step-based recursive calculation structure of the LSTM layer can be used to extract the temporal change features of the processing equipment status in the current batch as the processing progress is carried out based on the noise-filtered input data to obtain the first feature data.

[0053] In one example, the gating mechanisms of the LSTM layer (such as input gates, forget gates, and output gates) can be used to effectively filter out noise and irrelevant information in the input data while retaining features that have an important impact on device state prediction.

[0054] Based on a time-step recursive computation structure using LSTM layers, the noise-filtered input data is processed step-by-step. By capturing the changes in device state at each time step and the correlation between these changes across different time steps, the temporal variation characteristics of the processing device state within the current batch as the processing progresses are extracted.

[0055] After processing by the LSTM layer, the first feature data reflecting the dynamic changes in the device state is obtained. The first feature data not only contains instantaneous information about the device state, but also captures the trend and pattern of state changes over time, providing strong support for subsequent anomaly prediction.

[0056] Step S103: Convert the first feature data into an embedding vector, and use the encoder module of the anomaly prediction model to extract the second feature from the embedding vector to obtain the second feature data.

[0057] In some embodiments of this application, the first feature data extracted by the LSTM layer can be converted into an embedding vector form. For example, the conversion of the embedding vector can be achieved using a pre-trained embedding layer or through a trained embedding matrix, ensuring that the converted vector retains the key information of the original feature data. This step aims to map high-dimensional temporal feature data to a low-dimensional vector space so that the subsequent encoder module can process it more efficiently.

[0058] In some embodiments of this application, the encoder module includes a Transformer layer, which is used to capture global dependencies and complex patterns in the sequence data. The multi-head attention mechanism of the Transformer layer can be used to extract features from the embedded vector and to encode the extracted features at their positions. The position-encoded features are then processed through a feedforward neural network and a normalization layer to obtain second feature data.

[0059] In one example, the multi-head attention mechanism of the Transformer layer can be used to extract features from the embedded vector. The multi-head attention mechanism can focus on different parts of the input sequence in parallel, capture long-distance dependencies in the sequence, and encode the extracted features positionally, preserving the order information in the sequence.

[0060] High-level features can be further extracted by performing nonlinear transformations on the location-encoded features using a feed-forward network (FFN). Subsequently, normalization layers (such as Layer Normalization) are used to normalize the features, ensuring data stability and model convergence.

[0061] After processing by the Transformer layer, second feature data is obtained, which reflects the global characteristics and complex patterns of the device state. The second feature data not only captures the local dependencies in the sequence, but also reveals the overall structure and patterns of the sequence, providing a richer and more accurate feature representation for subsequent anomaly prediction.

[0062] Step S104: Based on the fused feature data of the first feature data and the second feature data, use the anomaly prediction model to determine the probability of anomalies occurring in the processing equipment after the current batch.

[0063] In some embodiments of this application, after obtaining the first feature data (temporal variation features extracted through the LSTM layer) and the second feature data (global dependency features extracted through the Transformer layer), the two can be fused. For example, the fusion method can employ concatenation, weighted summation, or other feature fusion techniques to obtain fused feature data that comprehensively reflects the multidimensional information of the device status.

[0064] In some embodiments of this application, anomaly prediction models can be used to further process the fused feature data to determine the probability of anomalies occurring after the processing equipment completes the current batch. For example, the probability of anomalies can be obtained by performing a nonlinear transformation mapping on the fused feature data according to a preset activation function.

[0065] In one example, the fused feature data can be non-linearly transformed and mapped according to a preset activation function (such as Sigmoid, Softmax, etc.). The activation function can be selected based on the model output requirements and task characteristics to ensure that the fused feature data can be mapped to a reasonable probability space.

[0066] After a nonlinear transformation using an activation function, the probability of an anomaly occurring after the current batch of processing equipment is obtained. This probability reflects the likelihood of an anomaly occurring within a future period, providing crucial decision-making support for equipment maintenance and management.

[0067] The equipment anomaly prediction method provided in this application collects multi-source operational data of the equipment during the processing of the current batch of products to determine the corresponding temporal feature parameters. The method then extracts long-term dependency features from these temporal feature parameters using the temporal feature extraction module of the anomaly prediction model, generating first feature data. This first feature data is converted into an embedding vector and input into an encoder module to capture global dependencies, generating second feature data. Finally, the two types of feature data are fused using a multi-head attention mechanism. The model output layer is then used to determine the probability of equipment failure after completing the current batch of processing, providing a quantitative basis for preventative maintenance decisions. Thus, through the temporal-spatial feature fusion mechanism, accurate prediction of early equipment failures can be achieved, providing timely and effective maintenance and management support for equipment anomaly managers, thereby significantly reducing the risk of "processing with faults" and improving production efficiency and product quality.

[0068] The above embodiments describe a device anomaly prediction method based on an anomaly prediction model. The training method for this anomaly prediction model will be described next. Please refer to [link / reference]. Figure 3 The diagram shown is a flowchart illustrating the training method for the anomaly prediction model provided in this application. The training method for the anomaly prediction model in this application is applied to electronic devices (such as...). Figure 2The electronic device 10 shown includes the following steps. Depending on different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0069] Step S301: Collect historical processing data from the processing equipment and construct a sample dataset based on the historical processing data.

[0070] In some embodiments of this application, the processing equipment in step S301 includes multiple processing equipment of the same model as the processing equipment in step S101, in order to ensure the breadth and representativeness of the sample dataset.

[0071] Historical processing data includes various historical processing data corresponding to multiple time points when pre-set parts of processing equipment (e.g., each processing equipment) were processed for each product. The pre-set parts include the spindle, and each time point corresponds to multiple historical processing data. The historical processing data includes combinations of one or more of the following: historical vibration data, historical sound data, historical temperature data, historical speed data, and historical torque data.

[0072] In one example, a specific embodiment for obtaining historical processing data can be found in the embodiment for obtaining processing data in step S101.

[0073] In one example, after obtaining historical processing data, the historical processing data can be preprocessed by referring to the embodiment on processing data preprocessing in step S101, including missing value imputation, outlier handling, standardization, etc., to improve data quality and model training effect.

[0074] In some embodiments of this application, a sample dataset is constructed based on historical processing data, including the following process.

[0075] (1) Obtain the equipment number of each processing equipment, the batch processing time of each batch of products in multiple batches processed by each processing equipment, and the batch number corresponding to each batch, and establish the first association relationship between the corresponding equipment number, batch processing time, and batch number.

[0076] In one example, establishing a primary association between the device number, batch processing time, and batch number ensures that the data for each batch can be accurately traced back to the specific processing device and processing time.

[0077] (2) Obtain historical processing data of each batch of products processed by each processing equipment, and determine the characteristic parameters corresponding to the historical processing data, and establish a second association between the corresponding characteristic parameters and the first association.

[0078] In one example, the characteristic parameters corresponding to the processing data determined in step S101 can be used to determine the characteristic parameters corresponding to historical processing data. The characteristic parameters corresponding to historical processing data should be able to comprehensively reflect the operating status and potential fault information of the equipment during the processing.

[0079] Establishing a second association between the feature parameter and the first association ensures that each feature parameter corresponds to a specific processing equipment, batch processing time, and batch number.

[0080] (3) Determine the data corresponding to each batch based on the second association relationship, and take the data sequence formed by the data corresponding to each batch as a sample data.

[0081] In one example, a data sequence corresponding to each batch is determined based on a second association. This data sequence contains historical processing data and corresponding characteristic parameters for all time points during the batch's processing. Using the data sequence corresponding to each batch as a sample data point ensures that the sample data contains complete information about the equipment during the batch's processing.

[0082] (4) Obtain the sample dataset based on the sample data corresponding to all batches.

[0083] In one example, sample datasets are constructed by aggregating sample data from all batches. These datasets can contain a sufficient number of samples to cover various situations under different processing conditions and equipment states, providing ample data support for subsequent model training.

[0084] Step S302: Determine the time parameters for anomaly prediction based on the abnormal sample data in the sample dataset.

[0085] In some embodiments of this application, historical processing data includes not only parameters during normal equipment operation but also the time of anomaly occurrence for each processing device. Anomaly sample data represents sample data corresponding to the actual anomaly occurrence time and is crucial for determining the timing parameters for anomaly prediction.

[0086] In some embodiments of this application, based on the zero-mean normal distribution assumption, appropriate methods (such as the CUSUM algorithm, Changepoint detection, isolated forest, and other statistical or machine learning algorithms) can be used to detect abrupt changes in sample data prior to the anomaly occurrence time to identify early warning signals of equipment failure. Then, the time of each detected abrupt change data point is recorded, and the time difference between it and the anomaly occurrence time is calculated to determine the anomaly latency reflecting the development process of the equipment failure. Finally, the anomaly latency of all samples is collected, its data distribution is analyzed, and a time parameter is determined based on a preset quantile (such as 95%, 99%, etc., which can be adjusted according to the scenario). This parameter indicates that the anomaly prediction model can predict the number of batches of equipment failures in advance. In one example, the method for determining the time parameter for anomaly prediction can refer to... Figure 4 Description of the illustrated embodiment.

[0087] Based on the above embodiments, abnormal sample data can be identified by the time of anomaly occurrence in historical processing data, and this can be used as a key basis to determine the time parameters for anomaly prediction. By using various statistical or machine learning algorithms based on the zero-mean normal distribution assumption to detect abrupt changes in data before the anomaly occurrence time to capture fault warning signals, the difference between the abrupt change point and the anomaly occurrence time is calculated to obtain the anomaly latency time. Finally, the time parameters are determined based on the distribution of the anomaly latency times of all samples and the preset quantiles. These parameters can clearly indicate in advance the number of batches of equipment failures that the anomaly prediction model can predict, providing important time guidance for equipment failure prediction.

[0088] Step S303: Perform data augmentation on the sample dataset based on the abnormal sample data to obtain the data-augmented sample dataset.

[0089] In some embodiments of this application, when performing data augmentation on the sample dataset, clustering can be performed first using a clustering algorithm (such as K-Means) with each abnormal sample data as the cluster center to obtain the corresponding cluster set for analyzing sample distribution; then, relevant abnormal samples in the cluster set where the number of abnormal samples is less than a preset threshold are filtered and deleted to obtain a filtered sample dataset to remove low-quality samples; then, a distance metric method is used to determine the multiple nearest neighbor abnormal samples of each abnormal sample in the filtered dataset; then, a linear interpolation algorithm is used to interpolate between the abnormal sample and its nearest neighbor to generate new abnormal sample data; finally, the new data is added to the original sample dataset to obtain the data-augmented sample dataset, improving sample balance and enhancing the model's ability to identify and generalize abnormal situations.

[0090] In one example, the method for data augmentation of the sample dataset can be found in [reference]. Figure 5 Description of the illustrated embodiment.

[0091] Step S304: Train the anomaly prediction model based on the time parameters and the data-augmented sample dataset.

[0092] In some embodiments of this application, the time parameter is used to indicate the number of predictable batches of the anomaly prediction model, i.e. how many batches in advance the model can predict possible anomalies in the processing equipment.

[0093] In some embodiments of this application, when training the anomaly prediction model, the j-th batch of data from the data augmentation sample dataset can be input into the anomaly prediction model. The model uses an LSTM layer to filter noise and extract temporal variation features to obtain the first feature data. The second feature data is then obtained through feature extraction, encoding, and further processing by a Transformer layer. After fusion, a nonlinear transformation is applied to predict the probability of anomalies occurring in batches j+1 to j+p. Here, j represents an integer greater than or equal to 1, and p represents the number of predictable batches. Next, loss functions such as cross-entropy are used to compare the predicted and actual probabilities, calculating the loss components for each batch and summing them to obtain the overall loss value, thus reflecting the degree of deviation in the model's prediction. Finally, based on the loss value, the model parameters are adjusted using an optimization algorithm. After multiple iterations of training and monitoring of validation set metrics, the model is trained until it meets preset requirements. At this point, the model can accurately predict the probability of future batch anomalies, assisting in equipment maintenance and management.

[0094] In one example, the sample dataset can be further divided as needed, such as into training, validation, and test sets, to support the model's training, validation, and testing processes respectively. For instance, the sample dataset can be divided into training, validation, and test sets according to a preset ratio (e.g., 8:1:1), and the model can be trained using the training set. By continuously adjusting the model's parameters, such as weights and biases in the neural network, the model learns the inherent patterns and features in the data, aiming to minimize the loss function and gradually improve its performance on the training data. The model is validated using the validation set. During training, the model's generalization ability is periodically evaluated using the validation set. Based on the evaluation metrics on the validation set, such as accuracy, recall, and F1 score, the model's hyperparameters, such as learning rate and regularization coefficient, are adjusted to prevent overfitting and ensure good performance even on unseen data. Finally, the final model, after training and validation adjustments, is comprehensively evaluated using a test set. The test set data is not involved in the model's training and hyperparameter tuning process, and its evaluation results can truly reflect the model's performance level in real-world application scenarios, providing a reliable basis for model deployment and application.

[0095] In one example, the specific process of step S304 can be found by referring to Figure 6 Description of the illustrated embodiment.

[0096] The model training method provided in this application first collects historical processing data from multiple processing equipment of the same model to construct a sample dataset, covering various types of data and establishing multi-level correlations to ensure data integrity and traceability. Then, it identifies abnormal sample data based on the time of anomaly occurrence, uses various algorithms to detect mutation data and calculate the anomaly latency time based on the zero-mean normal distribution assumption, and determines the anomaly prediction time parameter according to the preset quantile of the distribution. Then, it performs data augmentation on the sample dataset through operations such as clustering, filtering, finding nearest neighbors, and interpolation to improve the balance. Finally, it trains the anomaly prediction model with the augmented data based on the time parameter, and through iterative operations such as input, prediction, loss calculation, and parameter tuning, it makes the model meet the requirements, realizes accurate prediction of the probability of future batch anomalies of equipment, and provides strong support for equipment maintenance and management.

[0097] In one example, methods for determining the time parameters of anomaly prediction include, for example... Figure 4 The process is shown below.

[0098] S401, based on the assumption of zero-mean normal distribution, performs mutation data detection on sample data prior to the time of an anomaly occurrence.

[0099] In one example, performing abrupt change detection on sample data prior to the time of the anomaly can identify hidden abnormal fluctuations or abrupt changes in the data even when the equipment appears to be operating normally. These points are often early warning signals that the equipment is about to enter a faulty state, and are crucial for early detection and prevention of failures.

[0100] In one example, mutation data detection can employ statistical methods (such as Cumulative Sum Control Chart (CUSUM) algorithm, Changepoint detection, etc.) or machine learning algorithms (such as Isolation Forest, a type of Support Vector Machine, etc.). The mutation data detection method can be selected based on the characteristics, complexity, and actual needs of the data to ensure the accuracy and reliability of the detection results.

[0101] S402, determine the latency of the anomaly based on the time difference between the time point corresponding to the detected mutation data and the time of the anomaly occurrence.

[0102] In one example, for each detected mutation data point, its corresponding time point is recorded, and the time difference between that time point and the time when the anomaly occurred is calculated. This time difference is used to indicate the anomaly latency, reflecting the time interval between the occurrence of an anomaly in the device's state and the actual occurrence of a failure.

[0103] Determining the latency of anomalies helps in understanding the development process of equipment failures and provides an important time reference for subsequent anomaly prediction.

[0104] S403, obtain the time parameters based on the preset quantiles of the data distribution of all abnormal latency times corresponding to all sample data.

[0105] In one example, the anomaly latency times corresponding to all sample data can be collected, and the data distribution over these times can be analyzed. For instance, the anomaly latency times can be sorted from largest to smallest, and a time parameter can be determined from the data distribution based on a preset quantile (such as the 95th quantile, 99th quantile, etc.) in the sorted sequence. For example, if the anomaly latency time corresponding to the 95th quantile in the sorted sequence is 10 days, then the time parameter is 10 days.

[0106] In one example, the choice of preset quantiles can be adjusted according to the actual application scenario and requirements. For example, in scenarios requiring high prediction accuracy, a higher quantile can be selected as the time parameter; while in scenarios requiring earlier warnings, a lower quantile can be selected.

[0107] The time parameter indicates the number of batches that the anomaly prediction model can predict. For example, how many batches of equipment failures the model can predict in advance. For instance, if the time parameter corresponds to the 95th percentile anomaly latency of 10 days, and each day corresponds to one batch, then the model can predict the occurrence of equipment failures in 10 batches in advance. For example, it can predict the probability of equipment failure on October 11th based on October 1st, or it can predict the probability of equipment failure occurring each day from October 2nd to October 11th.

[0108] The following example illustrates how to determine time parameters. Taking the Changepoint detection method applied to machine fault prediction as an example, thresholds can be set based on its algorithmic principles to accurately identify data mutation points. The core principle of the Changepoint algorithm is: for a time series with a fixed zero mean, its cumulative sum converges probabilistically to a zero-mean normal distribution. During normal machine operation, the time series of key parameters such as spindle temperature usually satisfy this condition, and the cumulative sum fluctuates randomly around the zero mean.

[0109] When equipment malfunctions, such as an initial abnormal rise in spindle temperature, the statistical characteristics of the time series change, and the cumulative sum gradually deviates from a zero-mean normal distribution. A set threshold is used as the judgment criterion. When the statistical characteristics change significantly before and after a certain point in the data series, that is, when the degree of deviation of the cumulative sum from the zero-mean normal distribution exceeds the threshold, this point is determined to be a breakpoint, corresponding to the start time t1 of the initial abnormal rise in spindle temperature.

[0110] The Changepoint detection method for detecting abrupt changes includes the following steps: First, it collects anomalous sample data (e.g., historical machine samples of malfunctions) and their corresponding anomalous occurrence times (e.g., alarm timestamps) t2, representing the moment the malfunction is detected. Then, it uses the Changepoint algorithm to analyze the spindle temperature time series of each anomalous sample data, accurately calculating t1. Next, it calculates the predictable time range δt = t2 - t1 for each malfunction sample, reflecting the time interval from the first abnormal increase in spindle temperature to the detection of the malfunction.

[0111] Considering the existence of abnormal production batches (e.g., shifts) in actual production, whose data may interfere with the analysis results, shifts k that did not operate normally within the time ranges t2 and t1 can be removed to ensure that the analyzed data truly reflects the normal production status of the equipment. After removing shifts, the δt-k distribution of the processed fault samples is analyzed. Through statistical analysis of the δt-k data of a large number of fault samples, the 0.95 quantile of δt is taken as the prediction range threshold. The time range corresponding to this threshold is the predictable range of faults (e.g., time parameters). This indicates that with a 95% probability, signs of equipment failure can be detected in advance within this time range, providing data support for equipment maintenance and fault prevention, and reducing the impact of equipment failures on production.

[0112] Based on the above embodiments, based on scientific algorithm principles and rigorous operating procedures, abnormal data fluctuations can be effectively captured, providing a reliable basis for equipment failure analysis and prediction.

[0113] In one example, methods for data augmentation of the sample dataset include, for example... Figure 5 The process is shown below.

[0114] Step S501: Cluster the sample data in the sample dataset using each abnormal sample data as the cluster center to obtain the cluster set corresponding to each abnormal sample data.

[0115] In one example, clustering algorithms (such as K-Means) can be used to cluster the sample data in the sample dataset, with each outlier sample as a cluster center. Clustering groups the samples in the dataset according to their similarity to each outlier sample, resulting in a cluster set for each outlier sample. This helps in analyzing the distribution of sample data around the outliers.

[0116] Step S502: Select cluster sets in which the number of abnormal sample data is less than a preset threshold, and delete the abnormal sample data corresponding to the cluster centers of the selected cluster sets from the sample dataset to obtain the filtered sample dataset.

[0117] In one example, you can select clusters where the number of outlier data is less than a preset threshold. The preset threshold can be set according to the actual data situation and model requirements, such as 3, 5, 7, etc.

[0118] When the number of outliers in a cluster is too small, it may indicate that the outlier represented by that cluster center is unusual or that there are data quality issues. Removing the outlier data corresponding to the cluster centers of the selected clusters from the sample dataset results in a filtered sample dataset. This removes low-quality outliers that could potentially interfere with data augmentation.

[0119] Step S503: Determine the multiple nearest neighbor abnormal sample data for each abnormal sample data in the filtered sample dataset.

[0120] In one example, distance metrics (such as Euclidean distance, Manhattan distance, etc.) can be used to calculate the similarity between outlier data points, thereby finding the nearest neighbors of each outlier data point. The number of nearest neighbors can be determined based on the actual situation, such as 3, 4, 5, etc., to ensure that local relationships between outlier data points can be captured.

[0121] Step S504: Based on the linear interpolation algorithm, interpolation is performed between each abnormal sample data and each nearest neighbor abnormal sample data in the filtered sample dataset to generate newly added abnormal sample data.

[0122] In one example, a linear interpolation algorithm can be used to interpolate between each outlier sample and each nearest-neighbor outlier sample in the filtered sample dataset.

[0123] Linear interpolation algorithms increase the number of outlier data points by generating new data points between two known points at a certain ratio. For example, for two outlier data points A and B, several new outlier data points can be generated between them, and these new points retain the characteristics of the original outlier data to some extent.

[0124] Step S505: Based on the sample dataset and the newly added abnormal sample data, obtain the data-enhanced sample dataset.

[0125] In one example, new anomalous sample data can be added to the original sample dataset to obtain a data-enhanced sample dataset.

[0126] Based on the above embodiments, firstly, each anomalous sample data is used as a cluster center, and clustering algorithms such as K-Means are applied to cluster the samples in the sample dataset to obtain corresponding cluster sets. This helps to analyze the distribution of samples around the anomalous samples. Next, relevant anomalous samples in cluster sets with fewer than a preset threshold are filtered and deleted to obtain a filtered sample dataset, removing low-quality anomalous samples that may interfere with data augmentation. Then, a distance metric method is used to determine the multiple nearest neighbor anomalous samples of each anomalous sample in the filtered dataset to capture the local relationships between anomalous samples.

[0127] Unlike related Smote methods based on nearest neighbor algorithms, the embodiments of this application have significant advantages in generating fault samples. Samples synthesized by related Smote methods are often difficult to classify, while the embodiments of this application, based on operations such as clustering, generate new abnormal sample data between each abnormal sample data and each nearest neighbor abnormal sample data in the filtered sample dataset using a linear interpolation algorithm. Fault samples synthesized in this way have more obvious fault characteristics and higher distinguishability. For example, for two abnormal sample data points A and B, the new abnormal sample data points generated between them can better remove the interference of low-quality abnormal samples and retain the original abnormal sample characteristics. Through such data augmentation operations, the number of abnormal samples in the sample dataset is increased, improving the sample balance and helping to improve the ability of the anomaly prediction model to identify abnormal situations and its generalization performance, enabling the model to more accurately predict abnormal situations of processing equipment.

[0128] In one example, step S304 includes, for example... Figure 6 The process is shown below.

[0129] Step S601: Input the sample data corresponding to the j-th batch in the data-enhanced sample dataset into the anomaly prediction model, and use the anomaly prediction model to predict the probability of anomaly occurrence from the (j+1)-th to the (j+p)-th batches.

[0130] In one example, the sample data corresponding to the j-th batch in the data-augmented sample dataset is used as input data to the anomaly prediction model, where j represents an integer greater than or equal to 1, and p represents the number of predictable batches.

[0131] Referring to step S102, the anomaly prediction model has a specific structure, and its temporal feature extraction module includes a Long Short-Term Memory (LSTM) layer. When processing input data, the LSTM layer utilizes its own gating mechanism to effectively filter noise interference in the input data, ensuring the data quality for subsequent analysis. Subsequently, based on a recursive computation structure along time steps, the model accurately extracts the temporal variation features of the processing equipment status within the current batch as the processing progresses, based on the noise-filtered input data, thus obtaining the first feature data.

[0132] Referring to step S103, the encoder module of the anomaly prediction model includes a Transformer layer. When processing the embedded vectors, the Transformer layer uses a multi-head attention mechanism to extract features from the embedded vectors and performs positional encoding on the extracted features to preserve temporal information in the data. Then, the positionally encoded features are further processed through a feedforward neural network and a normalization layer to finally obtain the second feature data.

[0133] Referring to step S104, the anomaly prediction model fuses the first feature data and the second feature data, and performs a nonlinear transformation mapping on the fused feature data according to a preset activation function, thereby determining the probability of anomaly occurrence of the processing equipment in the (j+1)th batch to the (j+p)th batch, where j is an integer greater than or equal to 1, and p represents the number of predictable batches determined by the time parameter.

[0134] In another example, the anomaly prediction model can also perform a nonlinear transformation mapping on the fused feature data according to a preset activation function, thereby determining the probability of anomalies occurring in the processing equipment in the (j+p)th batch.

[0135] Step S602: Determine the loss value of the anomaly prediction model based on the probability predicted by the anomaly prediction model and the actual anomaly occurrence probability from the (j+1)th batch to the (j+p)th batch.

[0136] In one example, the probability of anomalies predicted by the anomaly prediction model can be compared with the actual probability of anomalies occurring from the (j+1)th batch to the (j+p)th batch to calculate the difference between the two, thereby determining the loss value of the anomaly prediction model.

[0137] A pre-defined loss function can be used to calculate the loss between the predicted and actual probabilities. For example, the cross-entropy loss function can be used, which effectively measures the degree of inconsistency between two probability distributions. For each batch, the predicted anomaly probability distribution and the actual anomaly probability distribution are substituted into the loss function for calculation to obtain the loss component corresponding to each batch.

[0138] The loss components of batches j+1 to j+p can be summarized, for example, by summation or weighted summation. If it is believed that prediction batches further away from the current batch are relatively less important, a weighted summation method can be used to give higher weights to more recent batches. Through this summation method, the overall loss value of the anomaly prediction model is finally determined.

[0139] Based on the above embodiments, the loss value can comprehensively reflect the degree of deviation between the model's prediction results and the actual situation throughout the entire prediction interval, providing a key basis for subsequent adjustment of model parameters and optimization of model performance.

[0140] Step S603: Adjust the parameters of the anomaly prediction model according to the loss value until an anomaly prediction model that meets the preset requirements is obtained.

[0141] In one example, the parameters of the anomaly prediction model can be adjusted using an optimization algorithm based on the calculated loss value. For example, optimization algorithms include, but are not limited to, stochastic gradient descent and its variants (such as Adagrad, Adadelta, Adam, etc.). These algorithms can gradually update the parameters at a preset learning rate based on the gradient information of the loss value relative to the model parameters, optimizing the model in the direction of reducing the loss value.

[0142] The model then enters the iterative training phase, a continuous and iterative optimization process. This involves repeatedly performing the following steps: inputting data, predicting probabilities, calculating the loss value, and adjusting the parameters. In each iteration, the model predicts the input data based on the new parameters, calculates the corresponding loss value, and then the optimization algorithm further adjusts the parameters based on the new loss value. As the number of iterations increases, the model's performance gradually improves.

[0143] During the iteration process, the model's performance can be continuously monitored. For example, metrics such as loss or accuracy on the validation set can be used to determine whether the model meets preset requirements. These preset requirements can be determined based on the actual application scenario and needs, such as achieving a preset accuracy threshold for prediction accuracy or reducing the loss value to below a preset loss threshold.

[0144] If the model meets the preset requirements on the validation set, it can be considered that the model has been trained. At this time, the anomaly prediction model has the ability to accurately predict the probability of anomalies occurring in future batches of processing equipment, which can provide reliable support for equipment maintenance and management, help enterprises to formulate maintenance plans in advance, and reduce production losses caused by equipment failures.

[0145] Figure 7 This is a structural diagram of an equipment anomaly prediction device provided in an embodiment of this application.

[0146] In some embodiments, the device malfunction prediction device 70 may include a plurality of functional modules composed of computer program segments. The computer programs for each program segment in the device malfunction prediction device 70 may be stored in the memory of the electronic device and executed by at least one processor to perform (see details). Figure 2 (Description) The function of predicting equipment anomalies.

[0147] In this embodiment, the equipment anomaly prediction device 70 can be divided into multiple functional modules according to its functions. These functional modules may include: a data acquisition module 701, a feature extraction module 702, and a probability prediction module 703. The term "module" in this application refers to a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory. In this embodiment, the functional implementation of each module in the equipment anomaly prediction device 70 can be found in the above description of the equipment anomaly prediction method, and will not be repeated here.

[0148] The data acquisition module 701 is used to acquire processing data when the processing equipment processes the current batch of products, and to determine the characteristic parameters corresponding to the processing data.

[0149] The feature extraction module 702 is used to construct input data based on the feature parameters, and to perform first feature extraction on the input data using the time series feature extraction module of the anomaly prediction model to obtain first feature data.

[0150] The feature extraction module 702 is further configured to convert the first feature data into an embedding vector, and use the encoder module of the anomaly prediction model to perform second feature extraction on the embedding vector to obtain second feature data.

[0151] The probability prediction module 703 is used to determine the probability of an anomaly occurring in the current batch of the processing equipment based on the fused feature data of the first feature data and the second feature data, using the anomaly prediction model.

[0152] Please see Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 2 As shown, the device anomaly prediction method provided in this application embodiment can be applied to electronic device 10. Electronic device 10 can be mobile phone, tablet computer, smart wearable device, augmented reality (AR) / virtual reality (VR) device, laptop computer, netbook, energy storage device, power distribution equipment, vehicle equipment, self-moving device, scanner and other electronic devices. This application embodiment does not impose any restrictions on the specific type of electronic device.

[0153] like Figure 2 As shown, the electronic device 10 may include a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104, and a bus 105. The processor 103 is coupled to the communication module 101, the memory 102, and the I / O interface 104 via the bus 105.

[0154] Communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB) and Controller Area Network (CAN). The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR).

[0155] Memory 102 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 103, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0156] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 103. Non-volatile memory can include disk storage devices and flash memory.

[0157] Memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by processor 103. The one or more computer programs include multiple instructions that, when executed by processor 103, enable a device anomaly prediction method to be executed on electronic device 10.

[0158] In other embodiments, the electronic device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 10.

[0159] Processor 103 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0160] The processor 103 provides computing and control capabilities, for example, the processor 103 is used to execute computer programs stored in the memory 102 to implement the device anomaly prediction method described above.

[0161] I / O interface 104 is used to provide a channel for user input or output. For example, I / O interface 104 can be used to connect various input / output devices, such as a mouse, keyboard, touch device, display screen, etc., so that users can enter information or visualize information. In addition, I / O interface 104 can also be used to connect processing equipment, such as processing equipment 2, to obtain the required processing data and other data.

[0162] Bus 105 is used at least to provide a channel for communication between communication modules 101, memory 102, processor 103, and I / O interface 104 in electronic device 10.

[0163] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 10. In other embodiments of this application, the electronic device 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0164] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the methods in the above embodiments of this application.

[0165] The computer-readable storage medium can be the internal memory of the electronic device described in the above embodiments, such as the hard disk or memory of the electronic device. Alternatively, the computer-readable storage medium can be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., provided on the electronic device.

[0166] In some embodiments, a computer-readable storage medium may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of the electronic device, etc.

[0167] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0168] 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.

[0169] In the embodiments provided in this application, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or 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 devices or units may be electrical, mechanical, or other forms.

[0170] 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.

[0171] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for predicting equipment anomalies, characterized in that, The method includes: Collect processing data when the processing equipment processes the current batch of products, and determine the characteristic parameters corresponding to the processing data; Input data is constructed based on the aforementioned feature parameters, and the first feature is extracted from the input data using the time-series feature extraction module of the anomaly prediction model to obtain the first feature data. The first feature data is converted into an embedding vector, and the encoder module of the anomaly prediction model is used to extract the second feature from the embedding vector to obtain the second feature data. Based on the fused feature data of the first feature data and the second feature data, the probability of an anomaly occurring in the processing equipment after the current batch is determined using the anomaly prediction model.

2. The equipment anomaly prediction method according to claim 1, characterized in that, The processing data includes multiple processing data corresponding to multiple time points when the preset part of the processing equipment processes each product. The preset part includes a spindle, and each time point corresponds to multiple processing data. The multiple processing data includes a combination of one or more of the following data: vibration data, sound data, temperature data, rotational speed data, and torque data.

3. The equipment anomaly prediction method according to claim 2, characterized in that, Before determining the feature parameters corresponding to the processed data, the method further includes preprocessing the various processed data, the preprocessing including any one or more of the following processing methods: missing value processing, outlier processing, standardization processing, and data denoising processing.

4. The equipment anomaly prediction method according to claim 2, characterized in that, The step of determining the feature parameters corresponding to the processing data includes: Determine multiple first data indicators for the k-th processing data corresponding to the i-th product in the current batch, where i represents an integer in the range [1, n], n represents the number of products in the current batch, k represents an integer in the range [1, m], and m represents the number of multiple processing data; the multiple first data indicators include maximum value, minimum value, mean, standard deviation, variance, kurtosis, and skewness; Based on the multiple first data indicators of the k-th type of processing data corresponding to the i-th product, determine the multiple first data indicators of the k-th type of processing data corresponding to all products in the current batch; Based on the multiple first data indicators of the k-th type of processing data corresponding to the i-th product, multiple second data indicators corresponding to the i-th product are determined. The multiple second data indicators include the vibration range between vibration data, the temperature range between temperature data, and the speed range between speed data. Based on the multiple second data indicators corresponding to the i-th product, multiple third data indicators corresponding to all products in the current batch are determined. The multiple third data indicators include the maximum vibration range, the average vibration range, the maximum temperature range, the average temperature range, the maximum rotational speed range, and the average rotational speed range. The feature parameters are obtained based on the various first data indicators and the various third data indicators.

5. The equipment anomaly prediction method according to claim 1, characterized in that, The temporal feature extraction module includes a Long Short-Term Memory (LSTM) layer. The temporal feature extraction module using the anomaly prediction model performs a first feature extraction on the input data to obtain the first feature data, which includes: The noise in the input data is filtered out using the gating mechanism of the LSTM layer. Using the time-step-based recursive computation structure of the LSTM layer, the temporal variation features of the processing equipment status in the current batch as the processing progress are extracted from the noise-filtered input data to obtain the first feature data.

6. The equipment anomaly prediction method according to claim 1, characterized in that, The encoder module includes a Transformer layer. The encoder module using the anomaly prediction model performs a second feature extraction on the embedding vector to obtain second feature data, including: The multi-head attention mechanism of the Transformer layer is used to extract features from the embedding vector, and the extracted features are then encoded at their positions. The second feature data is obtained by processing the position-encoded features through a feedforward neural network and a normalization layer.

7. The equipment anomaly prediction method according to claim 1, characterized in that, The method further includes training the anomaly prediction model, including: Collect historical processing data from the processing equipment, and construct a sample dataset based on the historical processing data; Based on the abnormal sample data in the sample dataset, determine the time parameters for anomaly prediction; The sample dataset is augmented based on the abnormal sample data to obtain the augmented sample dataset. The anomaly prediction model is trained based on the time parameters and the data-enhanced sample dataset.

8. The equipment anomaly prediction method according to claim 7, characterized in that, The processing equipment includes multiple processing devices of the same model. The step of collecting historical processing data from the processing devices and constructing a sample dataset based on the historical processing data includes: Obtain the equipment number of each processing equipment, the batch processing time of each batch of products processed by each processing equipment in multiple batches, and the batch number corresponding to each batch; and establish a first association relationship between the corresponding equipment number, the batch processing time, and the batch number. Obtain historical processing data of each batch of products processed by each processing equipment, and determine the feature parameters corresponding to the historical processing data, and establish a second association relationship between the corresponding feature parameters and the first association relationship; Based on the second association relationship, the data corresponding to each batch is determined, and the data sequence formed by the data corresponding to each batch is taken as a sample data. The sample dataset is obtained based on the sample data corresponding to all batches.

9. The equipment anomaly prediction method according to claim 8, characterized in that, The historical processing data also includes the time of occurrence of the anomaly for each processing device, and the anomaly sample data represents the sample data corresponding to the time of occurrence of the anomaly. Determining the time parameter for anomaly prediction based on the anomaly sample data in the sample dataset includes: Based on the assumption of a zero-mean normal distribution, mutation data detection is performed on sample data prior to the time of the anomaly occurrence. The latency period of the anomaly is determined based on the time difference between the time point corresponding to the detected mutation data and the time of the anomaly occurrence. The time parameter is obtained by using the preset quantile of the data distribution of all abnormal latency times corresponding to all sample data.

10. The equipment anomaly prediction method according to claim 8, characterized in that, The historical processing data also includes the time of occurrence of the anomaly for each processing device, and the abnormal sample data represents the sample data corresponding to the time of occurrence of the anomaly. The step of performing data augmentation on the sample dataset based on the abnormal sample data to obtain the data-augmented sample dataset includes: Cluster the sample data in the sample dataset using each abnormal sample data as the cluster center to obtain the cluster set corresponding to each abnormal sample data. Select clusters in the cluster set whose number of abnormal sample data is less than a preset threshold, and delete the abnormal sample data corresponding to the cluster center of the selected cluster set from the sample dataset to obtain the filtered sample dataset. Identify the nearest neighbor abnormal sample data for each abnormal sample data in the filtered sample dataset; Based on the linear interpolation algorithm, interpolation is performed between each abnormal sample data and each nearest neighbor abnormal sample data in the filtered sample dataset to generate new abnormal sample data. The augmented sample dataset is obtained by combining the sample dataset with the newly added abnormal sample data.

11. The equipment anomaly prediction method according to claim 9, characterized in that, The time parameter is used to indicate the number of predictable batches of the anomaly prediction model. Training the anomaly prediction model based on the time parameter and the data-augmented sample dataset includes: The sample data corresponding to the j-th batch in the data-enhanced sample dataset is input into the anomaly prediction model, and the anomaly prediction model is used to predict the probability of anomalies occurring from the (j+1)-th to the (j+p)-th batches, where j represents an integer greater than or equal to 1, and p represents the number of predictable batches. The loss value of the anomaly prediction model is determined based on the probability predicted by the anomaly prediction model and the actual anomaly occurrence probability of the (j+1)th batch to the (j+p)th batch. The parameters of the anomaly prediction model are adjusted based on the loss value until an anomaly prediction model that meets the preset requirements is obtained.

12. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the processor is configured to implement the device anomaly prediction method as described in any one of claims 1 to 11 when executing a computer program stored in the memory.