Cutter wear monitoring method, system and equipment based on edge calculation and medium
By employing edge computing in CNC machining, tool wear monitoring tasks are dynamically divided and executed collaboratively by edge nodes and servers. This solves the real-time and throughput problems of tool wear monitoring, achieving efficient tool wear monitoring and prediction, and improving system resource utilization and machining quality.
Patent Information
- Application Number
- CN202511533465.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-03-06
AI Technical Summary
Existing technologies for tool wear monitoring in CNC machining suffer from insufficient real-time performance and throughput. Traditional methods rely on manual judgment or cloud computing, which suffer from high latency and data privacy risks. Furthermore, edge computing has low resource utilization.
By adopting an edge computing-based approach, edge nodes are deployed on the CNC machine tool side and edge servers are deployed on the workshop side. The deep learning model is dynamically divided into multiple sub-tasks, and the optimal task splitting point is determined based on the task real-time performance and system throughput. The edge nodes and servers work together to execute tasks, achieving a balance between low latency and high throughput.
By combining task partitioning and data division into optimization mechanisms, the utilization rate of computing and communication resources is improved, the system's autonomy is enhanced, closed-loop monitoring from real-time diagnosis to prediction is realized, operation and maintenance costs are reduced, and processing quality and equipment safety are improved.
Smart Images

Figure CN121614248A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a tool wear monitoring method, system, device, and medium based on edge computing. Background Technology
[0002] In the field of CNC machining, tool wear monitoring is a crucial step in ensuring machining accuracy and equipment safety. Traditional methods mainly rely on operator experience or directly uploading sensor data to the cloud for processing. The former is highly subjective and unreliable; the latter, while utilizing the powerful computing capabilities of cloud computing, suffers from high network latency and data privacy risks, making it difficult to meet the stringent requirements of real-time monitoring and control in industrial settings. In recent years, although some research has attempted to introduce edge computing to reduce latency, these methods often employ simple task offloading strategies, focusing solely on latency as the optimization objective and neglecting the overall system throughput. This results in low utilization of edge resources and a lack of a complete intelligent monitoring loop from real-time perception to trend prediction. Therefore, there is an urgent need in this field for a new tool wear monitoring method that can balance real-time performance, throughput, and monitoring accuracy. Summary of the Invention
[0003] To address the aforementioned shortcomings of existing technologies, this invention provides a tool wear monitoring method, system, device, and medium based on edge computing to solve the aforementioned technical problems.
[0004] In a first aspect, the present invention provides a tool wear monitoring method based on edge computing, comprising: Edge nodes are deployed on the CNC machine tool side, and edge servers are deployed on the workshop side. The edge servers and multiple edge nodes form a one-to-many connection relationship. The deep learning model for tool wear monitoring is divided into multiple sequentially executed subtasks, and an optimal task splitting point j is dynamically determined based on task real-time performance and system throughput metrics. At the edge node, execute subtasks from the first to the j-th subtask; On the edge server, the tool wear monitoring results are output by executing the (j+1)th subtask to the last subtask in a pipeline manner.
[0005] In one optional implementation, the data processing task for tool wear monitoring is divided into multiple sub-tasks, including: The complete deep learning model used for tool wear monitoring is divided into multiple sequentially connected subtasks according to its network layers or logical modules.
[0006] In an optional implementation, the optimal task splitting point is determined based on task real-time performance and system throughput metrics, including: Get the i-th subtask S in the data processing taski Execution latency TN at the edge node i Execution latency (TE) on edge servers i and its output data size D i ; For each candidate split point j, calculate the total system processing delay T under this splitting strategy. j With system time slice length τ j , where τ j The maximum value among edge node execution latency, data transmission latency, and edge server execution latency is inversely proportional to the system throughput. From all satisfying T j Among the candidate split points ≤ l, choose the one that makes τ j The smallest split point is taken as the optimal task split point, where l is the maximum tolerable delay preset by the system.
[0007] In an optional implementation, on the edge node, executing subtasks from the first to the j-th subtask includes: The edge node loads and runs the segmented sub-task model deployed locally. This model is a portion of the complete deep learning model from the start of forward propagation to the optimal segmentation point j. The edge node receives real-time sensor data from the data acquisition device or CNC system and inputs it into the local subtask model for forward inference calculation; The intermediate tensor result generated when the forward inference calculation reaches the split point j is taken as the intermediate result; The intermediate results and their corresponding data size Dj are uploaded to the edge server via WebSocket or TCP communication protocols.
[0008] In an optional implementation, before the edge node receives real-time sensor data from a data acquisition device or CNC system and inputs it into the local subtask model for forward inference computation, a data partitioning step is also included: The edge node divides the cached real-time sensor data into two parts according to a preset data division ratio α; The data with a ratio of α is allocated locally and directly input into the local subtask model for processing; Data of scale 1-α is directly uploaded to the edge server for processing by the full model deployed there. The data partitioning ratio α is calculated using an optimal data allocation strategy to minimize the total data processing latency between the local and edge servers. The optimal data allocation strategy is achieved by solving the following optimization problem: The objective function is to minimize the total data processing delay Γ = max{τ} local ,τ edge}; Where, τ local For local data processing latency, τ local =α·m·d·pl,τ edge For edge server data processing latency, τ edge =m·d·p e +[(1+ξ)·β·k-1]·α·m·d·p e ; Where m is the total data volume, d is the size of a single data item, and p l With p e ξ represents the time for the terminal and edge server to process a unit of data, respectively; β represents the historical classification error probability of the terminal; k represents the scaling factor after data preprocessing; and ξ represents the penalty factor. The optimal data partitioning ratio α * The formula for calculating α is: * =1 / [(p l / p e )-(1+ξ)·β·k+1].
[0009] In an optional implementation, on the edge server, subtasks from the (j+1)th subtask to the last subtask are executed serially in a pipelined manner to output tool wear monitoring results, including: The edge server establishes a processing thread for each connected edge node and executes the subtasks that are unloaded by each node and located after the optimal split point j in a first-come, first-served or other preset scheduling strategy. The time slice length t of the pipelined processing method is determined by the edge node processing delay t. devic Data transmission delay t tran and edge server processing latency t edge The maximum value among the three determines the value, i.e., t = max{t device ,t tran ,t edge}; When the pipeline is full, the system reaches a steady state, and its throughput θ is inversely proportional to the time slice length t, i.e., θ = 1 / t.
[0010] In an optional implementation, the edge server establishes a processing thread for each connected edge node and executes the subtasks offloaded by each node after the optimal split point j sequentially, using a first-come, first-served or other preset scheduling strategy, including: Each edge node is assigned an independent processing thread, and each thread has its own dedicated memory space and model instance; Establish a multi-level scheduling queue consisting of a real-time queue, a priority queue, and a regular queue. The real-time queue uses the shortest processing time first algorithm to handle latency-sensitive tasks; the priority queue uses weighted round-robin scheduling to handle important tasks; and the regular queue uses a first-come-first-served strategy to handle batch tasks. The scheduling strategy is dynamically selected based on the real-time system load. An improved first-come-first-served strategy is adopted under normal load, the shortest job first strategy is switched under high load, and priority-based preemptive scheduling is enabled when the system is overloaded. The processing thread executes the subtasks unloaded from each edge node and located after the optimal split point j in a time-slice round-robin manner, wherein the time slice length of each thread is dynamically adjusted according to the current system load.
[0011] Secondly, the present invention provides a tool wear monitoring system based on edge computing, comprising: The basic deployment module is used to deploy edge nodes on the CNC machine tool side and edge servers on the workshop side. The edge servers form a one-to-many connection relationship with multiple edge nodes. The segmentation module is used to divide the deep learning model for tool wear monitoring into multiple sequentially executed subtasks, and dynamically determine an optimal task segmentation point j based on task real-time performance and system throughput metrics. The first execution module is used to execute subtasks from the first subtask to the j-th subtask on the edge node; The second execution module is used to serially execute from the (j+1)th subtask to the last subtask in a pipeline manner on the edge server, thereby outputting the tool wear monitoring results.
[0012] Thirdly, a device is provided, comprising: Memory for storing edge computing-based tool wear monitoring programs; A processor is configured to implement the steps of the edge computing-based tool wear monitoring method provided in the first aspect when executing the edge computing-based tool wear monitoring program.
[0013] Fourthly, a computer-readable medium is provided, on which an edge computing-based tool wear monitoring program is stored, wherein when the edge computing-based tool wear monitoring program is executed by a processor, the steps of the edge computing-based tool wear monitoring method provided in the first aspect are implemented.
[0014] The beneficial effects of this invention lie in the fact that the edge computing-based tool wear monitoring method, system, device, and medium provided by this invention, through a cloud-edge collaborative architecture, dynamically divides the deep learning model into multiple sub-tasks and optimizes their deployment between edge nodes and servers, achieving a balance between low latency and high throughput. It innovatively adopts a dual optimization mechanism combining task partitioning and data partitioning, significantly improving the utilization of computing and communication resources and enhancing the system's autonomy. By constructing a closed-loop monitoring system from real-time diagnosis to accurate prediction, it provides a reliable basis for predictive maintenance, effectively reducing operation and maintenance costs while improving processing quality and equipment safety. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic flowchart of a method according to an embodiment of the present invention.
[0017] Figure 2 This is a schematic block diagram of a system according to an embodiment of the present invention.
[0018] Figure 3 This is a schematic diagram of the structure of a device provided in an embodiment of the present invention. Detailed Implementation
[0019] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0021] The edge computing-based tool wear monitoring method provided in this embodiment of the invention is executed by a computer device, and correspondingly, the edge computing-based tool wear monitoring system runs in the computer device.
[0022] Figure 1This is a schematic flowchart illustrating a method according to an embodiment of the present invention. Wherein, Figure 1 The executing entity can be a tool wear monitoring system based on edge computing. Depending on different requirements, the order of steps in this flowchart can be changed, and some can be omitted.
[0023] like Figure 1 As shown, the method includes: S1. Deploy edge nodes on the CNC machine tool side and edge servers on the workshop side, wherein the edge servers and multiple edge nodes form a one-to-many connection relationship; S2. Divide the deep learning model used for tool wear monitoring into multiple sequentially executed sub-tasks, and dynamically determine an optimal task splitting point j based on task real-time performance and system throughput metrics. S3. On the edge node, execute subtasks from the first to the j-th subtask; S4. On the edge server, the subtasks from the (j+1)th subtask to the last subtask are executed serially in a pipeline manner to output the tool wear monitoring results.
[0024] In one embodiment of the present invention, based on step S1, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0025] In or near the control cabinet of each CNC machine tool (such as one equipped with the "Blue Sky CNC" GJ430 system), an embedded device (such as a Raspberry Pi 4B or Jetson Nano) is deployed as the edge node. It directly reads real-time machining data (such as feed axis coordinates and spindle speed) and sensor data (such as current and vibration) through the API interface (such as dynamic link library) provided by the machine tool's PLC or CNC system.
[0026] Within the workshop's local area network, a high-performance industrial computer (such as a Siemens SIMATIC NANOBOX PC) is deployed as the edge server. The edge nodes establish TCP / IP network connections with the edge server via the workshop's industrial Ethernet or high-speed Wi-Fi. One edge server can simultaneously establish communication sessions with the edge nodes corresponding to multiple CNC machine tools in the workshop (e.g., 8-16), forming a stable one-to-many connection. Data interaction can utilize the OPC UA protocol or the WebSocket protocol to ensure standardized and real-time communication.
[0027] In one embodiment of the present invention, based on step S2, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0028] S201. Task Division: First, for the tool wear monitoring task, a unified end-to-end deep learning model is constructed. The input of this model is a multi-dimensional time series containing 6 channels (3-axis vibration acceleration, spindle torque, acoustic emission signal, and spindle temperature), with an input window length of 1024 sampling points. The data undergoes mean normalization and sliding window normalization preprocessing. The model adopts a dual-branch encoder-decoder architecture, where the spatial feature branch is based on an improved ResNet-34 architecture, containing 4 residual stages with a total of 34 weight layers, using 3×1 convolutional kernels and channel attention mechanisms; the temporal feature branch is based on an 8-layer temporal convolutional network, using dilated causal convolutions with a dilation coefficient sequence [1,2,4,8,16,32,64,128], with each layer containing 256 filters and a convolutional kernel of size 3. The two branches fuse features through a multi-head attention mechanism. The 256-dimensional features output from the third stage of the ResNet module are mapped to 128 dimensions via 1×1 convolution and then used as input to the TCN module, where eight attention heads interact with the features. The diagnostic output layer outputs the current wear amount (Sigmoid activation) and wear status classification (normal / minor / severe) simultaneously through global average pooling and fully connected layers. The prediction output layer, based on the wear amount sequence over 128 historical time steps, outputs the 10%, 50%, and 90% quantile predictions for the next 32 time steps through quantile regression, achieving end-to-end learning from raw sensor data to wear diagnosis and trend prediction.
[0029] Subsequently, the distinction between feature extraction and diagnostic prediction tasks is no longer made. Instead, the unified model is treated as a whole and divided into multiple sequentially connected computational subtasks according to the inherent forward propagation order of its network layers or logical modules.
[0030] Specifically, each residual block of the ResNet module and each dilated causal convolutional layer of the TCN module are defined as an independent subtask Si.
[0031] All subtasks {S1, S2, ..., S} N The data dependencies form a continuous task chain. The optimal split point j may be located inside the ResNet module, at the junction of ResNet and TCN, or even inside the TCN module, and is determined dynamically by the algorithm based on real-time performance and throughput metrics.
[0032] This partitioning method deeply integrates the computational loads of feature extraction and intelligent decision-making, dynamically distributing them across the cloud and edge. Edge nodes execute the subtasks at the front end of the chain, completing preliminary to intermediate feature abstraction; edge servers execute the subtasks at the back end of the chain, completing advanced feature refinement and final decision-making. This effectively avoids the uneven resource utilization problem that may exist in traditional solutions due to the fixed partitioning of feature extraction and decision-making modules, maximizing computational efficiency.
[0033] S202. Parameter Initialization: During system initialization or model update, performance profiling tools (such as PyTorchProfiler) are used to measure the parameters of each subtask based on edge computing on the target hardware platform (edge nodes and edge servers). i Execution latency based on edge computing at edge nodes. i Execution latency on edge servers is based on edge computing TE i And the size of its output data tensor is based on edge computing D i These parameters are recorded in a configuration file for the segmentation algorithm to use.
[0034] S203. Splitting Point Decision: During system operation, the decision is based on the real-time monitored network bandwidth (B). device Based on edge computing B edge Based on the edge computing M and the number of currently connected edge nodes, the following dynamic splitting point decision algorithm is executed: Iterate through each possible alternative split point j (j ranges from 0 to N based on edge calculation).
[0035] For each edge computing-based j, calculate the total system processing latency T based on the edge computing according to the formula described in the manual. j Based on edge computing and system time slice length, based on edge computing τ j . Specifically, τ j = max{ t device , t tran ,t edge}, where edge computing t device t tran Based on edge computing and t edge Based on edge computing, the execution latency of edge nodes, data transmission latency, and execution latency of edge servers are calculated according to the formula.
[0036] All satisfying T j Candidate split points ≤ l (l is the preset maximum tolerable delay, such as 480ms) are included in the candidate set.
[0037] In this candidate set, select the one that makes τ jThe smallest split point j is taken as the final optimal task split point. This point is the best model unloading position that maximizes system throughput while ensuring task real-time performance.
[0038] S204. Dynamic Adjustment: The above split point decision process can be re-executed periodically or when there are significant changes in system load or network status, thereby achieving adaptive load balancing.
[0039] In one embodiment of the present invention, based on step S3, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0040] S301. Deep Technical Implementation of Model Loading and Inference Execution Edge nodes employ a phased model loading strategy to ensure that the model loading process does not affect real-time inference performance. Model slices are transmitted using a specialized serialization format that includes metadata information such as model structure description, weight parameters, input / output tensor specifications, and inter-layer dependencies. Differential compression technology is used during transmission; by comparing the parameter differences between the old and new model versions, only the changed parameters are transmitted, significantly reducing the amount of data transmitted over the network and improving model update efficiency.
[0041] The model verification mechanism employs a dual guarantee of hash verification and digital signature. Each model fragment generates a unique SHA-256 hash value on the edge server and digitally signs it using an RSA-based asymmetric encryption algorithm before transmission. Upon receiving the model fragment, the edge node first verifies the validity of the digital signature to confirm the reliability of the model's origin, and then calculates the hash value of the received data for integrity verification, ensuring that the model has not been tampered with or corrupted during transmission. This security mechanism effectively prevents malicious code injection and model parameter contamination.
[0042] Edge nodes acquire sensor data in real time through multiple data acquisition channels. The data acquisition module employs a ring buffer design, with the buffer size dynamically adjusted based on the sensor sampling frequency and data processing capabilities. For torque sensors, the acquisition frequency is set to 10kHz, for vibration acceleration sensors to 20kHz, and for acoustic emission sensors to a maximum frequency of 1MHz. Each data acquisition channel is equipped with independent signal conditioning circuitry to ensure the quality and stability of the acquired data.
[0043] The data preprocessing pipeline includes the following key steps: First, outlier detection and removal are performed, using the statistical 3σ principle to identify and remove obvious outlier data points; next, digital filtering is performed, selecting appropriate filters for different sensor characteristics. For torque data, a low-pass filter is used to remove high-frequency noise, for vibration data, a band-pass filter is used to retain characteristic frequency bands, and for acoustic emission data, wavelet denoising technology is used to eliminate background interference; finally, data standardization is performed, normalizing the data from each sensor to a unified numerical range to ensure that data with different dimensions can be effectively fused in the neural network.
[0044] Inference execution at edge nodes employs a multi-layered optimization strategy. At the hardware level, it fully utilizes the NEON SIMD instruction set of the ARM processor for vectorized computation, while simultaneously fusing operators in the computation graph to merge multiple consecutive computational operations into a single kernel function, reducing memory access frequency and data transfer overhead. At the software level, it implements a priority-based multi-level caching mechanism, storing frequently accessed model parameters in the L1 cache, intermediate computation results in the L2 cache, and historical inference data in system memory.
[0045] Memory management during inference employs a pre-allocation strategy, pre-allocating contiguous memory space based on the size of the output tensors of each layer during the model loading phase to avoid frequent memory allocation and deallocation operations during inference. Furthermore, specific optimizations are implemented for different computational layer types. For convolutional layers, an optimized implementation using im2col and matrix multiplication is employed; for fully connected layers, a weight matrix block computation strategy is used to effectively utilize the processor's cache hierarchy.
[0046] S302. Detailed Implementation of Intermediate Result Generation and Transmission S302.1 Intermediate Result Extraction and Processing When the inference computation reaches the optimal split point j, the system accurately extracts the output tensor of that layer as an intermediate result. This process involves multi-dimensional access and reconstruction of the tensor data to ensure that data integrity is not affected. The extracted intermediate result first undergoes a dimensionality check to verify that its shape conforms to the expected output specifications. Then, a data type conversion is performed, converting the high-precision floating-point numbers used in internal computation into the low-precision format required for transmission, reducing data volume while maintaining accuracy.
[0047] Tensor flattening employs a row-major order strategy, flattening multidimensional tensors into one-dimensional arrays. This process preserves the inherent logical relationships between tensor elements, facilitating subsequent serialization and transmission. For sparse tensors, the system automatically detects the distribution pattern of zero-value elements and stores them using a compressed sparse row format, significantly reducing the amount of data that needs to be transmitted. During flattening, the system simultaneously records the dimension and data type information of the original tensor, providing necessary metadata for tensor reconstruction at the receiving end.
[0048] S302.2 Data Transmission Protocol and Serialization The system uses Protocol Buffers as the data serialization format and defines a dedicated message structure to encapsulate intermediate results. This message structure contains tensor metadata and numerical data segments. The metadata segment records the tensor's dimension information, data type, timestamp, and device identifier, while the numerical data segment stores the flattened tensor element values. This structural design ensures both the self-descriptive nature of the data and efficient transmission.
[0049] WebSocket long-lived connections are maintained using a heartbeat mechanism and an automatic reconnection strategy. A heartbeat packet is sent every 30 seconds to check the connection status. When a connection anomaly is detected, an exponential backoff algorithm is automatically initiated to attempt a reconnection. The transport layer uses TLS encryption to ensure data security and prevent man-in-the-middle attacks and data leaks. To improve transmission reliability, the system implements a reliable transmission protocol based on an acknowledgment mechanism. Each data packet requires an acknowledgment signal from the receiver, and unacknowledged data packets are automatically retransmitted after a timeout.
[0050] S302.3 Data Compression and Optimization Before data transmission, the system implements a multi-layered data compression strategy. First, lossy compression is applied to floating-point tensors, reducing data size by decreasing numerical precision while ensuring the precision loss remains within acceptable limits. Next, lossless compression algorithms are applied, using differential encoding and Huffman coding to further compress the data size. For tensor data with high repetition, dictionary compression is employed, establishing a dictionary of common patterns and replacing recurring patterns with shorter codes.
[0051] During transmission, the system dynamically adjusts the compression strategy and transmission parameters based on the current network conditions. When network bandwidth is sufficient, a lower compression rate is used to ensure data quality; when the network is congested, the compression rate is increased to prioritize real-time transmission. Simultaneously, the system monitors data transmission latency and packet loss rate, dynamically adjusting the sending window size and retransmission timeout to ensure stable transmission performance under various network conditions.
[0052] S303. In-depth implementation of data partitioning strategy S303.1 Data Cache Management Mechanism Edge nodes maintain a first-in, first-out (FIFO) data buffer, implemented using a circular queue data structure. The buffer size is dynamically adjusted based on the data generation rate and processing capacity to ensure no data loss occurs during peak data periods. The buffer management module monitors the queue length and data dwell time in real time. When it detects that the buffer is about to overflow, it automatically triggers a data eviction policy, prioritizing the eviction of less important historical data.
[0053] The data in the cache is organized chronologically, with each data block accompanied by rich timestamps and metadata. The system assigns different priorities to different types of data: real-time sensor data has the highest priority, followed by historical statistics, and system status information has the lowest priority. This hierarchical management ensures that critical data can be processed promptly when resources are scarce. Simultaneously, the cache module implements a data prefetching mechanism, predicting potentially needed data based on historical access patterns and loading it into the cache in advance.
[0054] S303.2 Calculation of Dynamic Partition Parameters The optimal data allocation strategy is achieved by solving the following optimization problem: The objective function is to minimize the total data processing delay Γ = max{τ} local ,τ edge}; Where, τ local For local data processing latency, τ local =α·m·d·pl,τ edge For edge server data processing latency, τ edge =m·d·p e +[(1+ξ)·β·k-1]·α·m·d·p e ; Where m is the total data volume, d is the size of a single data item, and p l With p e ξ represents the time for the terminal and edge server to process a unit of data, respectively; β represents the historical classification error probability of the terminal; k represents the scaling factor after data preprocessing; and ξ represents the penalty factor. Optimal data partitioning ratio α * The formula for calculating α is: * =1 / [(p l / p e )-(1+ξ)·β·k+1].
[0055] Optimal data partitioning ratio α * The calculation is a continuous optimization process. The system maintains a parameter estimation module, which periodically updates the values of the various parameters required for the calculation. The terminal classification error rate β is calculated by statistically analyzing the confidence levels of local processing results over a recent period, using a sliding window mechanism to ensure the timeliness of the statistical results. The processing time ratio p... l / p e The performance monitoring module measures in real time the standard test load running on edge nodes and edge servers respectively, and compares the processing efficiency of the two.
[0056] The penalty coefficient ξ is set considering multiple factors, including the current load rate of the edge server, the stability of network transmission, and the urgency of the task. The system default value is 0.1, but when network congestion or excessive server load is detected, the penalty coefficient will be automatically increased, reducing the proportion of data allocated to the edge server. The data scaling factor k is dynamically adjusted based on the effect of data preprocessing, reflecting the change in the volume of data after preprocessing.
[0057] S303.3 Division of Execution and Quality Control The data partitioning process employs a random sampling strategy to ensure that each data batch represents the overall data distribution. The system uses a hash-based consensus allocation algorithm, calculating hash codes based on data feature values and allocating data according to a ratio α. * Data is directed to either local processing or edge server processing. This mechanism ensures that data with the same characteristics is always routed to the same processing node, maintaining data processing consistency.
[0058] Before being sent, each batch of partitioned data undergoes a quality check to verify its integrity and validity. For data allocated for local processing, its format is checked to ensure it meets model input requirements; for data sent to the edge server, the correctness of its serialization result is verified. The system records detailed logs of each partitioning decision, including partition ratios, data characteristics, and processing results. This historical data is used for subsequent algorithm improvements and parameter tuning.
[0059] S304. Complete Implementation of Adaptive Adjustment Mechanism The adaptive adjustment mechanism is built upon comprehensive system status monitoring. The monitoring module continuously tracks multiple key performance indicators, including edge node CPU utilization, memory usage, inference latency, and power consumption; edge server load balancing status, queue length, and processing latency; and network connection bandwidth utilization, transmission latency, and packet loss rate. These indicators are stored in time-series format for use by the analysis module.
[0060] A weighted scoring method is used to quantitatively evaluate the current system state. The comprehensive scoring result serves as an important basis for adjustment decisions.
[0061] The adjustment of split point j is based on the analysis results of historical performance data. The system maintains a split point performance database, recording the performance of each candidate split point in historical operation. When adjustment is required, the analysis module first filters out candidate split points that perform well under the current system state, then estimates the expected performance of each candidate point through a prediction model, and finally selects the split point with the best overall performance.
[0062] The data partitioning ratio α is adjusted using an incremental optimization strategy. The system explores a small range around the current α value, fine-tuning the partitioning ratio and observing performance trends. Based on these exploration results, a local performance model is constructed to find the optimal partitioning ratio. Simultaneously, the system considers the switching costs associated with adjustments to avoid system instability caused by overly frequent parameter changes. Major adjustments are only triggered when a significant change in the system state is detected.
[0063] In one embodiment of the present invention, based on step S4, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0064] On the edge server side, the system uses a multi-threaded pipeline architecture to efficiently process the remaining subtasks from multiple edge nodes, and finally outputs the tool wear monitoring results. The specific implementation is as follows: Implementation of a multi-threaded processing architecture: The edge server establishes an independent processing thread for each connected edge node, forming a one-to-many parallel processing capability. Each processing thread includes a complete runtime environment with independent model loading space, computation graph instance, and memory pool allocation. During thread initialization, the system pre-allocates a fixed heap memory space for each thread, the size of which is dynamically calculated based on the memory requirements of the remaining subtasks, including model parameter memory, intermediate result cache, and output buffer.
[0065] Thread scheduling employs an improved multi-level feedback queue mechanism, comprising three scheduling levels: a real-time queue serves latency-sensitive tasks and uses the shortest processing time first algorithm; a priority queue handles important tasks and uses weighted round-robin scheduling; and a regular queue implements a first-come, first-served strategy.
[0066] Pipeline processing and result generation: The edge server executes subtasks from the (j+1)th to the last subtask sequentially, following the forward propagation order of the deep learning model. When the final output subtask is reached, the system generates specific wear monitoring results. Wear diagnosis result: By executing the residual network subtask and output layer, the specific value of the current tool wear is generated. This value is normalized to the range of [0,1] by the Sigmoid function, which corresponds to the actual wear degree.
[0067] Trend prediction results: By executing the remaining subtasks of the temporal convolutional network, the wear prediction sequence for multiple future processing cycles is output, providing data support for predictive maintenance.
[0068] Time-slice mechanism and throughput optimization: The time slice length t of the pipeline processing is calculated in real time by a distributed monitoring system, using the formula: t = max{t device ,ttran ,t edge The system deploys high-precision timestamp collection points at three key nodes, employs a sliding window statistical method, and uses an exponentially weighted moving average algorithm to smooth short-term fluctuations.
[0069] When the pipeline reaches a steady state, the system throughput θ and the time slice length t satisfy an inverse relationship of θ = 1 / t. The system maintains the pipeline's steady state through a backpressure mechanism and sets buffer monitoring points at each processing stage to ensure the orderly processing of data.
[0070] Results Output and Quality Management: After the wear monitoring results are generated, the system executes a strict quality control process: Result verification: The reasonableness of the output wear amount is checked to eliminate erroneous results caused by abnormal data; Confidence assessment: The confidence level of the results calculated based on the probability distribution of the model output; Formatted output: Converts the final result into a standardized JSON data format, including fields such as timestamp, device ID, wear amount, prediction sequence, and confidence level.
[0071] The completed wear monitoring results are distributed through the following channels: Real-time push to the workshop monitoring system for visual display; Stored in a time-series database for historical querying and analysis; When abnormal wear is detected, an early warning message is automatically sent to relevant personnel.
[0072] In some embodiments, the edge computing-based tool wear monitoring system may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the edge computing-based tool wear monitoring system may be stored in the memory of a computer device and executed by at least one processor to perform (see details). Figure 1 (Description) Functionality for tool wear monitoring based on edge computing.
[0073] In this embodiment, the edge computing-based tool wear monitoring system can be divided into multiple functional modules according to its functions, such as... Figure 2 As shown. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and is stored in memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0074] The basic deployment module is used to deploy edge nodes on the CNC machine tool side and edge servers on the workshop side. The edge servers form a one-to-many connection relationship with multiple edge nodes. The segmentation module is used to divide the deep learning model for tool wear monitoring into multiple sequentially executed subtasks, and dynamically determine an optimal task segmentation point j based on task real-time performance and system throughput metrics. The first execution module is used to execute subtasks from the first subtask to the j-th subtask on the edge node; The second execution module is used to serially execute from the (j+1)th subtask to the last subtask in a pipeline manner on the edge server, thereby outputting the tool wear monitoring results.
[0075] Figure 3 The edge computing-based tool wear monitoring method provided in this application embodiment can be applied to devices. Those skilled in the art will understand that the device structure involved in the embodiments of this invention does not constitute a limitation on the device. A device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the device includes, but is not limited to, laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.
[0076] The device 300 may include a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0077] The present invention also provides a computer medium, wherein the computer medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0078] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a medium such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other medium capable of storing program code. It includes several instructions to cause a computer device (which may be a personal computer, a server, or a second device, network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0079] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0080] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules 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 systems or modules may be electrical, mechanical, or other forms.
[0081] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0082] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0083] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.
Claims
1. A method for tool wear monitoring based on edge computing, characterized in that, The application relates to a method for monitoring tool wear in a numerical control machine tool, comprising the following steps: An edge node is arranged on the side of the numerical control machine tool, and an edge server is arranged on the side of a workshop, wherein the edge server and the plurality of edge nodes form a one-to-many connection relationship; A deep learning model for tool wear monitoring is divided into a plurality of sequentially executed subtasks, and an optimal task division point j is dynamically determined according to task real-time performance and system throughput rate indexes; From the first subtask to the jth subtask is executed on the edge node; From the j+1th subtask to the last subtask is serially executed in a pipeline manner on the edge server, so as to output the tool wear monitoring result.
2. The method of claim 1, wherein, The data processing task of tool wear monitoring is divided into a plurality of subtasks, comprising: A complete deep learning model for tool wear monitoring is divided into a plurality of sequentially connected subtasks according to network levels or logic modules.
3. The method of claim 1, wherein, An optimal task division point is determined according to task real-time performance and system throughput rate indexes, comprising: Acquiring data processing task i-th subtask S i Execution delay TN of the edge node i Execution delay TE of the edge server i , and its output data size D i ; For each alternative split point j, the total processing time delay T of the system under this split strategy is calculated j where τ is the system time slice length j where τ is the system time slice length j is the maximum value among the edge node execution time delay, the data transmission time delay and the edge server execution time delay, and is inversely proportional to the system throughput rate; From all the candidate split points satisfying T j ≤ l, the split point that makes τ j minimum is selected as the optimal task split point, where l is the maximum tolerable latency preset by the system.
4. The method of claim 1, wherein, From the first subtask to the jth subtask is executed on the edge node, comprising: The edge node loads and runs a subtask model deployed locally after division, which is a part of the complete deep learning model from the beginning of forward propagation to the optimal division point j; The edge node receives real-time sensor data from a data acquisition device or a numerical control system and inputs the real-time sensor data into the local subtask model for forward inference calculation; The intermediate tensor result generated when the forward inference calculation reaches the division point j is taken as the intermediate result; The intermediate result and its corresponding data size Dj are uploaded to the edge server through a WebSocket or TCP communication protocol.
5. The method of claim 4, wherein, Before the edge node receives real-time sensor data from a data acquisition device or a numerical control system and inputs the real-time sensor data into the local subtask model for forward inference calculation, a data division step is further included: The edge node divides the buffered real-time sensor data into two parts according to a preset data division ratio alpha; Data with the ratio alpha is allocated to the local and directly input into the local subtask model for processing; Data with the ratio of 1-alpha is directly uploaded to the edge server for processing by the complete model deployed on the edge server; The data division ratio alpha is calculated by an optimal data allocation strategy to minimize the total data processing time delay of the local and the edge server; The optimal data allocation strategy is realized by solving the following optimization problem: The objective function is to minimize the total data processing latency Γ = max{τ local ,τ edge}; Wherein, τ local is a local data processing delay, τ local = α·m·d·p, τ edge is an edge server data processing delay, τ edge = m·d·p e + [(1+ξ)·β·k-1]·α·m·d·p e ; The m is total data amount, d is single data size, p l And p e Respectively, the terminal and edge server processing unit data time, β is the terminal historical classification error probability, k is the scaling coefficient after data preprocessing, and ξ is the penalty coefficient. The optimal data division ratio a * The calculation formula is: a * =1 / [(p l / p e )-(1+ξ)·β·k+1].
6. The method of claim 4, wherein, From the j+1th subtask to the last subtask is serially executed in a pipeline manner on the edge server, so as to output the tool wear monitoring result, comprising: The edge server establishes a processing thread for each connected edge node and serially executes the subtasks after the optimal division point j unloaded by each node according to a first-come-first-served or other preset scheduling strategy; The time slice length t of the pipeline processing mode is determined by the maximum value among the edge node processing delay t devic , the data transmission delay t tran , and the edge server processing delay t edge , that is, t = max{t device , t tran , t edge}; When the pipeline is full, the system reaches a stable state, and the throughput rate theta is inversely proportional to the time slice length t, that is, theta=1 / t.
7. The method of claim 6, wherein, The edge server establishes a processing thread for each connected edge node, and serially executes the sub-tasks unloaded by each node after the optimal split point j in a first-come-first-served or other preset scheduling strategy, including: An independent processing thread is allocated for each edge node, and each thread has a dedicated memory space and model instance; A multi-level scheduling queue including a real-time queue, a priority queue, and a general queue is established, wherein: the real-time queue uses the shortest processing time first algorithm to process delay-sensitive tasks; the priority queue uses weighted round-robin scheduling to process important tasks; and the general queue uses a first-come-first-served strategy to process batch tasks; The scheduling strategy is dynamically selected according to the real-time system load, and the improved first-come-first-served strategy is used under normal load, the shortest job first strategy is switched to under high load, and the priority-based preemptive scheduling is enabled under system overload; The processing thread serially executes the sub-tasks unloaded by each edge node after the optimal split point j in a time slice round-robin manner, wherein the length of the time slice of each thread is dynamically adjusted according to the current system load.
8. An edge computing based tool wear monitoring system, characterized in that, It comprises: A basic deployment module for deploying edge nodes on the side of numerical control machine tools and deploying an edge server on the side of a workshop, wherein the edge server and multiple edge nodes form a one-to-many connection relationship; A split processing module for dividing a deep learning model for tool wear monitoring into multiple sequentially executed sub-tasks, and dynamically determining an optimal task split point j according to task real-time performance and system throughput rate indicators; A first execution module for executing the first sub-task to the jth sub-task on the edge node; A second execution module for serially executing the j+1th sub-task to the last sub-task in a pipeline manner on the edge server, thereby outputting the tool wear monitoring result.
9. An edge-computing-based tool wear monitoring device, characterized by, It comprises: A memory for storing a tool wear monitoring program based on edge computing; A processor for implementing the steps of the tool wear monitoring method based on edge computing as claimed in any one of claims 1-7 when executing the tool wear monitoring program based on edge computing.
10. A computer readable medium having stored thereon a computer program, characterized in that, The readable medium stores a tool wear monitoring program based on edge computing, and the tool wear monitoring program based on edge computing implements the steps of the tool wear monitoring method based on edge computing as claimed in any one of claims 1-7 when executed by the processor.