A screwdriver service life prediction method and system based on artificial intelligence
Patent Information
- Application Number
- CN202610768802.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-30
- Publication Date
- 2026-08-28
AI Technical Summary
[0004]本发明的目的在于提出一种基于人工智能的螺丝刀使用寿命预测方法以及系统,旨在解决现有技术中边缘部署条件下螺丝刀寿命预测模型工况泛化能力差的问题,在电动螺丝刀有限的硬件资源限制下实现高精度、强适应性的离线剩余使用寿命预测
本发明公开的发明,通过以主轴编码器脉冲为基准对多源异步传感数据进行角域重采样并标准化预处理,消除转速波动带来的时序数据差异,为后续工况不变特征提取提供统一基准的输入数据;通过采用集成梯度反转层的轻量级域自适应特征提取器,在适配边缘有限计算资源的前提下,提取与螺丝规格、工件材质、拧紧扭矩等工况因素无关的纯退化特征,从特征层面根源性解决模型对工况变化敏感的核心问题;通过动态权重融合预测头对多个针对不同典型工况优化的基础预测器输出进行加权融合,根据实时工况自动调整各基础预测器的贡献权重,实现对复杂多变工业工况的自适应匹配,进一步提升模型的跨工况泛化能力;通过采用“实验室源域有标签预训练+工厂目标域无标签域自适应微调”的两阶段训练策略,仅需少量工厂实际工况下的无标签样本即可完成模型适配,解决工业现场螺丝刀全寿命周期失效标注数据获取成本极高、难以支撑传统迁移学习的难题;通过对训练完成的模型进行INT8量化和算子优化,将模型参数量和推理时间控制在电动螺丝刀内置低功耗MCU的资源限制范围内,使其可直接部署在工具本地,实现完全离线的实时寿命预测,同时满足工业现场对系统稳定性、数据安全和实时性的三大刚性需求。
Smart Images

Figure CN122654812A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial tool life prediction, specifically to an artificial intelligence-based method and system for predicting the lifespan of screwdrivers. Background Technology
[0002] With the rapid development of intelligent manufacturing, electric screwdrivers, as core tools in fields such as electronic assembly, automotive manufacturing, and aerospace, directly impact product quality and production efficiency due to their reliability. Traditional screwdriver lifespan prediction methods mainly include accelerated life testing, failure physics-based methods, and statistical modeling methods. These methods rely on laboratory test data and physical models, making them difficult to adapt to the complex and ever-changing actual working conditions in industrial settings. In recent years, artificial intelligence-based screwdriver lifespan prediction methods have gradually become a research hotspot. Existing technologies are mainly divided into two categories: one is high-precision prediction methods based on large cloud models, employing complex deep learning architectures such as LSTM and Transformer, which can fuse multi-source sensor data to achieve high-precision lifespan prediction; the other is lightweight prediction methods based on edge computing, using simple machine learning algorithms or small neural networks that can run locally on the screwdriver. For example, Chinese patent CN120408961A discloses an artificial intelligence-based screwdriver lifespan prediction method that obtains the screwdriver's working parameters and attribute information, uses an artificial intelligence model to calculate wear parameters, and predicts the remaining lifespan.
[0003] However, existing AI-based screwdriver lifespan prediction methods generally suffer from a trade-off between generalization capability and edge deployment capability. Poor generalization capability under edge deployment conditions is the core issue hindering the large-scale industrial application of this technology. Industrial environments have a rigid demand for edge deployment of screwdriver lifespan prediction systems: factory network environments are complex, frequently experiencing network latency and outages, and cloud-based solutions cannot guarantee system stability; simultaneously, enterprises have extremely high requirements for production data security and are unwilling to upload core production data to the cloud; furthermore, the real-time requirements of the tightening process dictate that predictions must be completed locally. Existing technologies attempt to address this issue through methods such as model compression and transfer learning, but model compression further reduces the model's generalization capability, while transfer learning requires a large amount of labeled target domain data. Obtaining screwdriver failure data throughout its entire lifespan in industrial settings is extremely costly and cannot meet practical application needs. Summary of the Invention
[0004] The purpose of this invention is to propose an artificial intelligence-based method and system for predicting the lifespan of screwdrivers, aiming to solve the problem of poor generalization ability of screwdriver lifespan prediction models under edge deployment conditions in existing technologies. This invention achieves high-precision and highly adaptable offline remaining lifespan prediction under the limited hardware resources of electric screwdrivers. The technical solution of the present invention is as follows: An artificial intelligence-based method for predicting the lifespan of a screwdriver includes the following steps: Multi-source asynchronous sensor data is collected during the operation of the electric screwdriver. All sensor data are resampled in the angular domain based on the spindle encoder pulse to generate a synchronized multi-source data sequence. The synchronized multi-source data sequence is preprocessed to obtain preprocessed synchronized multi-source data. The preprocessed synchronized multi-source data is input into a lightweight domain adaptive feature extractor to extract degenerate features with operating condition invariance. The degradation features with invariant operating conditions are input into the dynamic weighted fusion prediction head, and the remaining service life prediction value of the screwdriver is output. The lightweight domain adaptive feature extractor and dynamic weight fusion prediction head are trained in two stages. In the first stage, source domain data is collected under standard laboratory conditions to train the basic predictor in the feature extractor and dynamic weight fusion prediction head. In the second stage, a small amount of unlabeled target domain data is collected under actual factory conditions, the parameters of the feature extractor and the basic predictor are fixed, and only the domain adaptive related module is trained. The trained model is quantized and operator optimized. The optimized model is then deployed to the low-power microcontroller unit built into the electric screwdriver. Real-time screwdriver operation data is collected, and the above-mentioned remaining service life prediction process is executed to achieve offline remaining service life prediction.
[0005] In one possible implementation, the multi-source asynchronous sensing data includes motor three-phase current, bus voltage, motor temperature, three-axis vibration, spindle speed, output torque, and rotation angle; the preprocessing includes removing outliers using the 3σ criterion and performing Z-score normalization on the data from each sensor.
[0006] In one possible implementation, the lightweight domain adaptive feature extractor employs a cascaded structure of depthwise separable convolutional blocks, channel attention modules, and gradient inversion layers. The depthwise separable convolutional block is used to extract multi-scale local degradation features, the channel attention module is used to automatically learn the importance weights of different feature channels, and the gradient inversion layer is used to invert the gradient signal during training so that the feature extractor learns degradation features that are independent of the working conditions. The depthwise separable convolutional block consists of three consecutive depthwise separable convolutional layers, each followed by a batch normalization layer and a ReLU activation function; the channel attention module adopts a lightweight squeeze-excitation structure; the gradient inversion layer is connected to the output of the channel attention module.
[0007] In one possible implementation, the dynamic weighted fusion prediction head includes K basic predictors for different typical operating conditions and one lightweight operating condition classifier; the operating condition classifier outputs the probability distribution of K typical operating conditions based on the operating condition invariant degradation features obtained in step 2, and the outputs of the K basic predictors are weighted and summed according to the probability distribution to obtain the final remaining service life prediction value. The K typical operating conditions include high-torque hard-connection operating conditions, medium-torque mixed-connection operating conditions, low-torque soft-connection operating conditions, and high-frequency cyclic operating conditions; each basic predictor is a 2-layer fully connected neural network, and the operating condition classifier is a 1-layer fully connected neural network.
[0008] In one possible implementation, the first-stage source domain data includes operating data of different screwdriver models under different loads and corresponding remaining service life labels; the second-stage target domain data consists of 30-100 samples and does not require remaining service life labels.
[0009] In one possible implementation, the quantization is INT8 quantization, the quantized model parameter size is less than 64kB, and the single inference time is less than 10ms; the low-power microcontroller has a main frequency of ≤100MHz, RAM ≤64kB, and Flash ≤512kB.
[0010] In one possible implementation, the dynamic weighted fusion prediction head simultaneously performs independent remaining service life predictions for three key components: the motor, gearbox, and bit, and takes the minimum value among the three as the predicted remaining service life value for the entire machine.
[0011] An artificial intelligence-based screwdriver lifespan prediction system includes: The multi-source data synchronization preprocessing module collects multi-source asynchronous sensor data during the operation of the electric screwdriver, performs angular domain resampling on all sensor data based on the spindle encoder pulse, generates a synchronized multi-source data sequence, and preprocesses the synchronized multi-source data sequence to obtain preprocessed synchronized multi-source data. The domain adaptive feature extraction module inputs the preprocessed synchronized multi-source data into the lightweight domain adaptive feature extractor to extract degenerative features with operating condition invariance. The dynamic weighted fusion prediction module inputs degradation features with invariant operating conditions into the dynamic weighted fusion prediction head and outputs the predicted value of the screwdriver's remaining service life. The two-stage model training module performs two-stage model training on the lightweight domain adaptive feature extractor and the dynamic weight fusion prediction head. In the first stage, source domain data is collected under standard laboratory conditions to train the basic predictor in the feature extractor and the dynamic weight fusion prediction head. In the second stage, a small amount of unlabeled target domain data is collected under actual factory conditions, the parameters of the feature extractor and the basic predictor are fixed, and only the domain adaptive related module is trained. The edge deployment and offline prediction module quantizes and optimizes the trained model, deploys the optimized model to the low-power microcontroller unit built into the electric screwdriver, collects the screwdriver's operating data in real time, and executes the above-mentioned remaining service life prediction process to achieve offline remaining service life prediction.
[0012] A computer device, including A memory that stores computer-readable instructions; A processor, when executing the computer-readable instructions, implements the steps of the artificial intelligence-based screwdriver lifespan prediction method as described above.
[0013] A computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps of the above-described artificial intelligence-based screwdriver lifespan prediction method.
[0014] Compared with the prior art, the embodiments of the present invention have the following main advantages: The invention disclosed herein eliminates temporal data differences caused by speed fluctuations by performing angular domain resampling and standardization preprocessing on multi-source asynchronous sensing data based on spindle encoder pulses, providing a unified benchmark input data for subsequent extraction of condition-invariant features. By employing a lightweight domain-adaptive feature extractor with an integrated gradient inversion layer, it extracts purely degenerate features unrelated to operating condition factors such as screw specifications, workpiece material, and tightening torque, while adapting to limited edge computing resources, thus fundamentally addressing the core issue of model sensitivity to operating condition changes at the feature level. Furthermore, a dynamic weighted fusion prediction head weights and fuses the outputs of multiple basic predictors optimized for different typical operating conditions, automatically adjusting the contribution weights of each basic predictor according to real-time operating conditions, thereby achieving the ability to handle complex and variable operating conditions. Adaptive matching of industrial operating conditions further enhances the model's cross-condition generalization ability. By adopting a two-stage training strategy of "labeled pre-training in the laboratory source domain + adaptive fine-tuning in the unlabeled target domain of the factory," only a small number of unlabeled samples from actual factory operating conditions are needed to complete model adaptation. This solves the problem of extremely high cost of acquiring failure labeling data for the entire life cycle of screwdrivers in industrial sites, which is difficult to support traditional transfer learning. By performing INT8 quantization and operator optimization on the trained model, the number of model parameters and inference time are controlled within the resource limitations of the low-power MCU built into the electric screwdriver, allowing it to be directly deployed on the tool's local machine. This enables fully offline real-time life prediction while meeting the three rigid requirements of system stability, data security, and real-time performance in industrial sites. Attached Figure Description
[0015] To more clearly illustrate the solutions in this invention, the accompanying drawings used in the description of the embodiments of this invention will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0016] Figure 1 This is a flowchart of the method in Example 1; Figure 2 This is a basic system structure block diagram of Example 2; Figure 3 This is a basic structural block diagram of the computer device in Example 3. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0018] Example 1 like Figures 1-2As shown in Example 1, an artificial intelligence-based method for predicting the lifespan of a screwdriver is proposed, including the following steps: S100: Collect multi-source asynchronous sensor data during the operation of the electric screwdriver, resample all sensor data in the angular domain based on the spindle encoder pulse, generate a synchronized multi-source data sequence, preprocess the synchronized multi-source data sequence, and obtain the preprocessed synchronized multi-source data. Step S100 uses the spindle encoder pulse as a reference to perform angular domain resampling on the asynchronously acquired multi-source sensor data, converting the time domain data into angular domain data synchronized with the spindle rotation angle, completely eliminating the time series data length and phase differences caused by different tightening speeds. Then, outlier removal and standardization preprocessing are used to filter noise interference, providing a unified benchmark and high-quality input data for subsequent feature extraction, avoiding feature extraction deviations caused by speed fluctuations, and ensuring the accuracy and consistency of life prediction from the data source.
[0019] S200: Input the preprocessed synchronized multi-source data into a lightweight domain adaptive feature extractor to extract degenerate features with operating condition invariance; Step S200 employs a lightweight domain adaptive feature extractor with an integrated gradient inversion layer. While ensuring extremely low model parameter and computational costs, it forces the feature extractor to ignore working condition-related information such as screw specifications, workpiece material, and tightening torque through a domain adversarial training mechanism, retaining only the essential features reflecting the performance degradation of the screwdriver itself. This fundamentally solves the core problem of existing lightweight models being sensitive to changes in working conditions from the feature level. At the same time, it fully adapts to the hardware resource limitations of the low-power MCU built into the electric screwdriver, achieving a preliminary balance between generalization ability and edge deployment capability.
[0020] S300: Input the degradation features with invariant operating conditions into the dynamic weighted fusion prediction head, and output the predicted value of the remaining service life of the screwdriver; Step S300 uses a dynamic weight fusion prediction head to determine the current working condition type in real time based on the invariant degradation characteristics of the input working condition, and automatically adjusts the output weights of multiple basic predictors optimized for different typical working conditions. This further enhances the model's cross-working condition generalization ability, enabling it to seamlessly adapt to various working conditions commonly found in industrial sites, such as high-torque hard connections, medium-torque mixed connections, and low-torque soft connections. It can handle working condition switching without retraining the model, significantly improving the practicality and robustness of the prediction system.
[0021] S400. Perform two-stage model training on the lightweight domain adaptive feature extractor and dynamic weight fusion prediction head. In the first stage, source domain data is collected under standard laboratory conditions to train the basic predictor in the feature extractor and dynamic weight fusion prediction head. In the second stage, a small amount of unlabeled target domain data is collected under actual factory conditions, the parameters of the feature extractor and the basic predictor are fixed, and only the domain adaptive related module is trained. Step S400 adopts a two-stage training strategy: labeled pre-training in the laboratory source domain and unlabeled adaptive fine-tuning in the factory target domain. In the first stage, a large amount of labeled data that is easy to obtain in the laboratory environment is used to train the basic model. In the second stage, only a small amount of unlabeled data under actual factory working conditions is needed to complete the domain adaptive adaptation. This completely solves the problem that the cost of obtaining failure labeling data for the entire life cycle of screwdrivers in industrial sites is extremely high and it is difficult to support traditional transfer learning. It significantly reduces the time and economic costs of model deployment and can quickly adapt to new application scenarios and working conditions.
[0022] S500 quantizes and optimizes the trained model, deploys the optimized model to the low-power microcontroller unit built into the electric screwdriver, collects the screwdriver's operating data in real time and executes the above-mentioned remaining service life prediction process to achieve offline remaining service life prediction. Step S500 performs INT8 quantization and operator optimization on the trained model to further compress the number of model parameters and improve inference speed, enabling it to run smoothly on the low-power MCU built into the electric screwdriver. This achieves fully offline real-time life prediction, completely eliminating the dependence on cloud servers. At the same time, it meets the three rigid requirements of industrial sites for system stability, production data security, and real-time tightening process, providing a feasible hardware deployment solution for the large-scale industrial application of this technology.
[0023] In this embodiment, the multi-source asynchronous sensing data in step S100 includes motor three-phase current, bus voltage, motor temperature, three-axis vibration, spindle speed, output torque and rotation angle; the preprocessing includes using the 3σ criterion to remove outliers and performing Z-score normalization on the data of each sensor.
[0024] Specifically, the preprocessing process is implemented as follows: Outlier removal: For each sensor's 1024 data points, calculate its arithmetic mean μ and standard deviation σ. All data points that exceed the range [μ-3σ, μ+3σ] are identified as outliers and replaced with the arithmetic mean of the two valid data points before and after that point.
[0025] Z-score standardization: For data after outlier removal, it is applied according to the formula... The data is standardized, where μ is the average value of the tightening data from this sensor, and σ is the standard deviation. The standardized data has a mean of 0 and a standard deviation of 1, eliminating dimensional differences between different sensors.
[0026] The specific execution process of angle domain resampling in step S100 is as follows: taking the Z-phase pulse output by the magnetic encoder as the starting point of each revolution, and interpolating and sampling the current data of all other sensors once for each received A-phase pulse. Regardless of how the spindle speed fluctuates between 100rpm and 2000rpm, each tightening process will eventually generate a synchronized multi-source data sequence with a fixed length of 1024 points, completely eliminating the influence of speed changes on the data length.
[0027] In this embodiment, the lightweight domain adaptive feature extractor in step S200 adopts a cascaded structure of depthwise separable convolutional blocks + channel attention modules + gradient inversion layers.
[0028] The depthwise separable convolutional block is used to extract multi-scale local degradation features, the channel attention module is used to automatically learn the importance weights of different feature channels, and the gradient inversion layer is used to invert the gradient signal during training, so that the feature extractor learns degradation features that are independent of the operating conditions.
[0029] The depthwise separable convolutional block consists of three consecutive depthwise separable convolutional layers, each followed by a batch normalization layer and a ReLU activation function; the channel attention module adopts a lightweight squeeze-excitation structure; the gradient inversion layer is connected to the output of the channel attention module.
[0030] Specifically, the input to the lightweight domain adaptive feature extractor is a 1024×7-dimensional synchronized multi-source data sequence (1024 sampling points, 7 sensor channels) output from the S100. The overall structure adopts an end-to-end cascaded structure, and the specific parameters and implementation of each module are as follows: Depthwise separable convolutional blocks: The depthwise separable convolutional block consists of three consecutive depthwise separable convolutional layers stacked together. Each convolutional layer adopts a split structure of "depthwise convolution + pointwise convolution". All convolutional kernels are one-dimensional to adapt to temporal data. Specifically: First layer: Depthwise convolution kernel size 3×1, stride 2, 8 output channels; Pointwise convolution kernel size 1×1, 8 output channels; followed by batch normalization layer and ReLU activation function, output feature map size 512×8. The second layer consists of a depthwise convolutional kernel of size 5×1, a stride of 2, and 16 output channels; a pointwise convolutional kernel of size 1×1, also with 16 output channels; followed by a batch normalization layer and a ReLU activation function, resulting in an output feature map size of 256×16. The third layer consists of a depthwise convolution kernel of size 7×1, a stride of 2, and 32 output channels; a pointwise convolution kernel of size 1×1, also with 32 output channels; followed by a batch normalization layer and a ReLU activation function, resulting in an output feature map size of 128×32. By employing a stacked structure of three layers with different kernel sizes, it can simultaneously capture the degradation characteristics of short-cycle (such as motor current fluctuations) and long-cycle (such as gearbox vibration) processes during tightening, and the computational cost is only about 1 / 8 of that of standard convolution.
[0031] Lightweight squeeze-excitation (SE) channel attention module: The lightweight squeeze-excitement (SE) channel attention module takes a 128×32-dimensional feature map as input, and the specific implementation process is as follows: Compression layer: Global average pooling is used to compress the 128×32 dimensional feature map into a 1×32 dimensional channel feature vector. Activation layer: Two consecutive fully connected layers are used. The first fully connected layer compresses the 32-dimensional features into 4-dimensional features (compression ratio 8:1), and the second fully connected layer restores the 4-dimensional features to 32-dimensional features. Finally, the weight coefficients of each channel are output through the Sigmoid activation function. Weighting operation: The output 32-dimensional weight coefficients are multiplied channel-by-channel by the original 128×32-dimensional feature map to obtain the weighted feature map. This lightweight SE module has only 288 parameters. It can automatically suppress the characteristics of noise channels and condition-related channels and enhance the characteristics of key channels related to degradation without increasing the computational burden.
[0032] Gradient inversion layer: The gradient reversal layer is directly connected to the output of the SE module. During training, it directly transmits the input features during forward propagation and multiplies the gradient by -λ (λ is the gradient scaling factor, set to 0.5 in this embodiment) before transmitting it to the previous layer during backward propagation. In this way, two objectives are optimized simultaneously during training: first, to enable the feature extractor to accurately predict the remaining service life; and second, to prevent the domain discriminator from distinguishing which operating condition the data comes from based on the extracted features, thereby forcing the feature extractor to learn degradation features unrelated to the operating condition.
[0033] In this embodiment, the dynamic weight fusion prediction head in step S300 includes K basic predictors for different typical operating conditions and one lightweight operating condition classifier. The operating condition classifier outputs the probability distribution of K typical operating conditions based on the operating condition invariant degradation features obtained in step 2. The outputs of the K basic predictors are weighted and summed according to this probability distribution to obtain the final remaining service life prediction value. The dynamic weight fusion prediction head structure uses dedicated basic predictors and a dynamic weight adjustment mechanism, which can not only ensure the prediction accuracy under each typical operating condition, but also smoothly adapt to the transition state between different operating conditions, avoiding the problem of a sudden drop in accuracy of a single predictor when crossing operating conditions.
[0034] The K typical operating conditions include high-torque hard-connection conditions, medium-torque mixed-connection conditions, low-torque soft-connection conditions, and high-frequency cyclic conditions. Each basic predictor is a two-layer fully connected neural network, and the operating condition classifier is a one-layer fully connected neural network. The modular design based on typical operating conditions divides the complex and varied tightening conditions in industrial settings into several representative categories. A dedicated predictor is trained separately for each category, reducing the training difficulty and complexity of the model while improving its interpretability and maintainability.
[0035] The dynamic weighted fusion prediction head simultaneously performs independent remaining service life predictions for three key components: the motor, gearbox, and screwdriver bit, taking the minimum value among the three as the overall remaining service life prediction value for the machine. This multi-component independent life prediction mechanism predicts the remaining service life of the three key failure components of the electric screwdriver independently, more accurately reflecting the actual health status of the entire machine. This avoids the problem of a single overall prediction failing to locate specific failure components, and also provides data support for subsequent targeted maintenance and spare parts management.
[0036] Specifically, the input to the dynamic weight fusion prediction head is the 128×32-dimensional feature map output by the S200. First, a global average pooling operation is used to compress the feature map into a 32-dimensional one-dimensional feature vector, which is then input into the subsequent prediction network. The prediction head adopts a multi-component independent prediction architecture, predicting the remaining service life of three key components: the motor, gearbox, and bit. Specific parameters and implementation are as follows: Basic predictor design: For each key component, four basic predictors corresponding to different typical operating conditions are set up. Each basic predictor is a two-layer fully connected neural network structure: First layer: Input dimension 32, hidden layer dimension 16, using ReLU activation function. The second layer has 16 input dimensions and 1 output dimension. It has no activation function and directly outputs the predicted remaining service life of the corresponding component under this working condition.
[0037] Lightweight operating condition classifier design: For each key component, a separate lightweight operating condition classifier is set up. The classifier is a one-layer fully connected neural network with an input dimension of 32 and an output dimension of 4. It is followed by a Softmax activation function to output the probability distribution of four typical operating conditions.
[0038] Dynamic weight fusion process: For each critical component, the four operating condition probability values output by the operating condition classifier are multiplied by the output values of the corresponding four basic predictors and then summed to obtain the final remaining service life prediction value of the component.
[0039] The lifespan of the entire machine is determined: After obtaining the predicted remaining service life values of the three components—motor, gearbox, and bit—the minimum value among them is taken as the predicted remaining service life value of the entire electric screwdriver.
[0040] In this embodiment, the first stage source domain data in step S400 includes the operating data of different screwdriver models under different loads and the corresponding remaining service life labels; the second stage target domain data consists of 30-100 samples, without the need for remaining service life labels.
[0041] Specifically, the first phase of source domain data collection and annotation process is as follows: All source domain data were collected under standard laboratory conditions to eliminate the influence of external factors such as temperature, humidity, and electromagnetic interference. Three mainstream industrial-grade brushless electric screwdriver models were selected, with 20 brand-new samples prepared for each model. For each screwdriver, five different load levels were set, covering 50%-120% of the rated torque.
[0042] The screwdriver was continuously cyclically run under a set load. Every 100 tightening operations, a complete set of multi-source sensor data was recorded, and the actual output torque was measured. When the output torque decreased to 80% of its initial value, the screwdriver was considered to have failed, and the experiment was stopped. Using the failure point as zero, the remaining service life label corresponding to each data point was calculated in reverse, ultimately forming a complete source domain dataset containing different models and loads. This dataset was used to train the feature extractor and all basic predictors.
[0043] The second phase of target domain data acquisition process is as follows: The target domain data is collected directly from the actual production line in the factory, without running the screwdrivers until they fail. Select 3-5 screwdrivers of the same model that are in normal use, and randomly collect their operating data during daily production. Collect 10-20 samples from each screwdriver, with the total sample size controlled between 30-100.
[0044] During the data collection process, it is not necessary to record any remaining lifespan tags; only the multi-source sensor data itself needs to be saved, and the normal operation of the production line does not need to be interrupted.
[0045] The two-stage training process is as follows: Phase 1: Simultaneously train all base predictors in the lightweight domain adaptive feature extractor and dynamic weight fusion prediction head using the source domain dataset, and optimize the model parameters using the mean squared error loss function until the model's prediction accuracy on the source domain validation set converges.
[0046] The second stage involves fixing the parameters of the feature extractor and all base predictors. The gradient inversion layer and the working condition classifier are trained using only the collected unlabeled target domain data, optimized using a domain adversarial loss function. The number of training iterations is set to 50-100. After training, the model can be adapted to the actual working conditions of the factory.
[0047] In this embodiment, the quantization in step S500 is INT8 quantization. The quantized model parameter size is less than 64kB, and the single inference time is less than 10ms. The low-power microcontroller unit has a main frequency of ≤100MHz, RAM ≤64kB, and Flash ≤512kB. By specifically selecting the INT8 training quantization scheme, the model size and computational load can be significantly compressed with almost no loss of prediction accuracy, enabling the local deployment of domain adaptive models that were originally unable to run on low-power MCUs.
[0048] Specifically, the INT8 quantization calibration process is as follows: One hundred representative samples from the source domain validation set during the first stage of training were selected as the quantization calibration set to perform post-training INT8 quantization on the trained FP32 precision model. During quantization, the model's weights and activation values were mapped to 8-bit integers, while retaining the floating-point precision of the prediction head output layer to avoid significant deviations in the final lifetime prediction. After quantization, the model was exported as a static array file in C language format.
[0049] The validation process for the quantized model parameters is as follows: The total number of parameters in the quantized model is 52kB, the peak RAM usage required for a single inference is 18kB, and the Flash storage usage is 45kB, both of which are far below the hardware resource limitations of the target MCU.
[0050] The firmware integration and flashing process is as follows: The quantized model C file is integrated into the existing control firmware of the electric screwdriver. After the main program's tightening cycle ends, the model inference interface is called, passing in the multi-source data collected and preprocessed during the tightening process to obtain the predicted remaining service life. The integrated firmware is then compiled into a hex file, which is then burned into the screwdriver's MCU via serial port to complete the deployment.
[0051] The offline verification process is as follows: After deployment, disconnect the screwdriver from all external devices and run it continuously for 72 hours in the actual production environment of the factory. The model can stably perform offline life prediction without any lag, crashes or data loss.
[0052] The embodiments of this invention can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0053] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0054] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0055] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0056] Example 2 like Figure 2 As shown, Example 2 proposes an artificial intelligence-based screwdriver lifespan prediction system, including: The multi-source data synchronization preprocessing module collects multi-source asynchronous sensor data during the operation of the electric screwdriver, performs angular domain resampling on all sensor data based on the spindle encoder pulse, generates a synchronized multi-source data sequence, and preprocesses the synchronized multi-source data sequence to obtain preprocessed synchronized multi-source data. The domain adaptive feature extraction module inputs the preprocessed synchronized multi-source data into the lightweight domain adaptive feature extractor to extract degenerative features with operating condition invariance. The dynamic weighted fusion prediction module inputs degradation features with invariant operating conditions into the dynamic weighted fusion prediction head and outputs the predicted value of the screwdriver's remaining service life. The two-stage model training module performs two-stage model training on the lightweight domain adaptive feature extractor and the dynamic weight fusion prediction head. In the first stage, source domain data is collected under standard laboratory conditions to train the basic predictor in the feature extractor and the dynamic weight fusion prediction head. In the second stage, a small amount of unlabeled target domain data is collected under actual factory conditions, the parameters of the feature extractor and the basic predictor are fixed, and only the domain adaptive related module is trained. The edge deployment and offline prediction module quantizes and optimizes the trained model, deploys the optimized model to the low-power microcontroller unit built into the electric screwdriver, collects the screwdriver's operating data in real time, and executes the above-mentioned remaining service life prediction process to achieve offline remaining service life prediction.
[0057] The screwdriver lifespan prediction system based on artificial intelligence provided in Embodiment 2 of the present invention can realize all the processes of the screwdriver lifespan prediction method based on artificial intelligence in Embodiment 1 above. The functions and technical effects of each module in the screwdriver lifespan prediction system based on artificial intelligence correspond to the functions and technical effects of the screwdriver lifespan prediction method based on artificial intelligence in Embodiment 1 above, and will not be repeated here.
[0058] Example 2 To address the aforementioned technical problems, embodiments of the present invention also provide a computer device. Please refer to [link / reference needed]. Figure 3 .
[0059] The computer device 3 includes a memory 31, a processor 32, and a network interface 33 that are interconnected via a system bus. It should be noted that only the computer device 3 with components 31-33 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0060] The computer device 3 can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device 3 can interact with the user through a keyboard, mouse, remote control, touchpad, or voice control device.
[0061] The memory 31 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 31 may be an internal storage unit of the computer device 3, such as the hard disk or memory of the computer device 3. In other embodiments, the memory 31 may also be an external storage device of the computer device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 3. Of course, the memory 31 may also include both the internal storage unit and its external storage device of the computer device 3. In this embodiment, the memory 31 is typically used to store the operating system and various application software installed on the computer device 3, such as computer-readable instructions for a screwdriver lifespan prediction method based on artificial intelligence. In addition, the memory 31 can also be used to temporarily store various types of data that have been output or will be output.
[0062] In some embodiments, the processor 32 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 32 is typically used to control the overall operation of the computer device 3. In this embodiment, the processor 32 is used to execute computer-readable instructions stored in the memory 31 or to process data, for example, to execute the computer-readable instructions of the artificial intelligence-based screwdriver lifespan prediction method.
[0063] The network interface 33 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 3 and other electronic devices.
[0064] Example 4 The present invention also provides another embodiment, namely, a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the above-described artificial intelligence-based screwdriver lifespan prediction method.
[0065] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0066] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting the lifespan of a screwdriver based on artificial intelligence, characterized in that, Includes the following steps: Multi-source asynchronous sensor data is collected during the operation of the electric screwdriver. All sensor data are resampled in the angular domain based on the spindle encoder pulse to generate a synchronized multi-source data sequence. The synchronized multi-source data sequence is preprocessed to obtain preprocessed synchronized multi-source data. The preprocessed synchronized multi-source data is input into a lightweight domain adaptive feature extractor to extract degenerate features with operating condition invariance. The degradation features with invariant operating conditions are input into the dynamic weighted fusion prediction head, and the remaining service life prediction value of the screwdriver is output. The lightweight domain adaptive feature extractor and dynamic weight fusion prediction head are trained in two stages. In the first stage, source domain data is collected under standard laboratory conditions to train the basic predictor in the feature extractor and dynamic weight fusion prediction head. In the second stage, a small amount of unlabeled target domain data is collected under actual factory conditions, the parameters of the feature extractor and the basic predictor are fixed, and only the domain adaptive related module is trained. The trained model is quantized and operator optimized. The optimized model is then deployed to the low-power microcontroller unit built into the electric screwdriver. Real-time screwdriver operation data is collected, and the above-mentioned remaining service life prediction process is executed to achieve offline remaining service life prediction.
2. The method for predicting the lifespan of a screwdriver based on artificial intelligence according to claim 1, characterized in that, The multi-source asynchronous sensing data includes motor three-phase current, bus voltage, motor temperature, three-axis vibration, spindle speed, output torque, and rotation angle; the preprocessing includes removing outliers using the 3σ criterion and performing Z-score normalization on the data from each sensor.
3. The method for predicting the lifespan of a screwdriver based on artificial intelligence according to claim 1, characterized in that, The lightweight domain adaptive feature extractor adopts a cascaded structure of depthwise separable convolutional blocks, channel attention modules, and gradient inversion layers. The depthwise separable convolutional block is used to extract multi-scale local degradation features, the channel attention module is used to automatically learn the importance weights of different feature channels, and the gradient inversion layer is used to invert the gradient signal during training so that the feature extractor learns degradation features that are independent of the working conditions. The depthwise separable convolutional block consists of three consecutive depthwise separable convolutional layers, each followed by a batch normalization layer and a ReLU activation function; the channel attention module adopts a lightweight squeeze-excitation structure; the gradient inversion layer is connected to the output of the channel attention module.
4. The method for predicting the lifespan of a screwdriver based on artificial intelligence according to claim 1, characterized in that, The dynamic weighted fusion prediction head includes K basic predictors for different typical working conditions and 1 lightweight working condition classifier. The working condition classifier outputs the probability distribution of K typical working conditions based on the working condition invariant degradation features obtained in step 2. The outputs of the K basic predictors are weighted and summed according to the probability distribution to obtain the final remaining service life prediction value. The K typical operating conditions include high-torque hard-connection operating conditions, medium-torque mixed-connection operating conditions, low-torque soft-connection operating conditions, and high-frequency cyclic operating conditions; each basic predictor is a 2-layer fully connected neural network, and the operating condition classifier is a 1-layer fully connected neural network.
5. The method for predicting the lifespan of a screwdriver based on artificial intelligence according to claim 1, characterized in that, The first stage source domain data includes operating data of different screwdriver models under different loads and corresponding remaining service life labels; the second stage target domain data consists of 30-100 samples, without remaining service life labels.
6. The method for predicting the lifespan of a screwdriver based on artificial intelligence according to claim 1, characterized in that, The quantization is INT8 quantization, the number of quantized model parameters is less than 64kB, and the single inference time is less than 10ms; the main frequency of the low-power microcontroller is ≤100MHz, RAM ≤64kB, and Flash ≤512kB.
7. The method for predicting the lifespan of a screwdriver based on artificial intelligence according to claim 1, characterized in that, The dynamic weighted fusion prediction head simultaneously performs independent remaining service life predictions for three key components: the motor, gearbox, and bit, and takes the minimum value among the three as the predicted remaining service life value for the entire machine.
8. A screwdriver lifespan prediction system based on artificial intelligence, characterized in that, include: The multi-source data synchronization preprocessing module collects multi-source asynchronous sensor data during the operation of the electric screwdriver, performs angular domain resampling on all sensor data based on the spindle encoder pulse, generates a synchronized multi-source data sequence, and preprocesses the synchronized multi-source data sequence to obtain preprocessed synchronized multi-source data. The domain adaptive feature extraction module inputs the preprocessed synchronized multi-source data into the lightweight domain adaptive feature extractor to extract degenerative features with operating condition invariance. The dynamic weighted fusion prediction module inputs degradation features with invariant operating conditions into the dynamic weighted fusion prediction head and outputs the predicted value of the screwdriver's remaining service life. The two-stage model training module performs two-stage model training on the lightweight domain adaptive feature extractor and the dynamic weight fusion prediction head. In the first stage, source domain data is collected under standard laboratory conditions to train the basic predictor in the feature extractor and the dynamic weight fusion prediction head. In the second stage, a small amount of unlabeled target domain data is collected under actual factory conditions, the parameters of the feature extractor and the basic predictor are fixed, and only the domain adaptive related module is trained. The edge deployment and offline prediction module quantizes and optimizes the trained model, deploys the optimized model to the low-power microcontroller unit built into the electric screwdriver, collects the screwdriver's operating data in real time, and executes the above-mentioned remaining service life prediction process to achieve offline remaining service life prediction.
9. A computer device, characterized in that, include A memory that stores computer-readable instructions; A processor, which, when executing the computer-readable instructions, implements the steps of an artificial intelligence-based screwdriver lifespan prediction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the artificial intelligence-based screwdriver lifespan prediction method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for predicting service life of screwdriver based on artificial intelligence
CN120408961A
