Workpiece flatness measurement method, device, medium and equipment based on industrial internet of things
By using an industrial IoT-based method for measuring workpiece flatness, a virtual plane is generated by a deformation detection model and a laser interferometer. The sensor layout is optimized, and a flatness measurement model is constructed. This solves the problem of large measurement errors in existing technologies and achieves high-precision workpiece flatness measurement.
Patent Information
- Application Number
- CN202511355417.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-09-22
AI Technical Summary
Existing methods for measuring workpiece flatness cannot meet the needs of rapid online measurement in mass production. Furthermore, the three-point online measurement method based on fixed positions has measurement errors when the roundness and perpendicularity of the workpiece are uncertain, making it difficult to accurately reflect the deformation of the workpiece cross-section.
An industrial IoT-based method for measuring workpiece flatness is adopted. By scanning the workpiece to be measured, a trained workpiece deformation detection model is used to identify potential deformation hotspots, optimize the sensor layout, and use a laser interferometer to generate a virtual plane as a reference plane for adaptive zeroing. Multimodal data is monitored, and a flatness measurement model is constructed to extract the deformation characteristics of the workpiece and calculate the flatness.
It improves the accuracy and real-time performance of workpiece flatness measurement, accurately reflects the deformation of the workpiece, reduces measurement errors, and adapts to the deformation monitoring of workpieces under different production conditions.
Smart Images

Figure CN120846255B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of mechanical processing preparation, and particularly relates to a workpiece flatness measurement method and device based on an industrial Internet of Things, a medium and equipment. BACKGROUND
[0002] Existing workpiece flatness measurement mainly includes two methods: one is to use a flatness meter or a three-coordinate measuring machine for offline sampling inspection, but this method cannot meet the online rapid measurement demand of mass production; the other is a three-point online measurement method based on a fixed position, which calculates the average value of the measurement values of three points in a plane as a flatness deviation value. This method can meet the flatness measurement requirements of general accuracy when the roundness and perpendicularity of the workpiece are ideal. However, due to the uncertainty of the roundness and perpendicularity of the workpiece in actual production conditions, the theoretical assumption of the three-point measurement method is significantly different from the actual working condition, and there is a technical defect of insufficient adaptability, which is difficult to truly reflect the cross-section deformation of the workpiece and is easy to cause measurement errors and misleading conclusions. SUMMARY
[0003] In view of the deficiencies in the prior art, the main purpose of the present application is to provide a workpiece flatness measurement method and device based on an industrial Internet of Things, a medium and equipment, which aims to improve the flatness measurement precision of the workpiece.
[0004] To achieve the above purpose, the present application provides the following technical scheme:
[0005] A workpiece flatness measurement method, the method comprising: scanning a workpiece to be measured to obtain scanning data; first preprocessing the scanning data; inputting the first preprocessed scanning data into a trained workpiece deformation detection model to identify potential deformation hot spot areas of the workpiece to be measured, and optimizing the sensor layout according to the identification result; starting a laser interferometer to generate a virtual plane as a reference surface, and performing self-adaptive zero calibration of the sensor with the reference surface after layout optimization, and recording the initial offset; monitoring the potential deformation hot spot areas according to the self-adaptively calibrated sensor, obtaining multi-modal data, and second preprocessing the multi-modal data; constructing a flatness measurement model and training, inputting the second preprocessed multi-modal data and the preprocessed scanning data into the flatness measurement model to extract the deformation features of the workpiece to be measured; dividing the workpiece to be measured into multiple regions according to the deformation features of the workpiece to be measured; calculating the flatness of each region and weighting to obtain the flatness data of the workpiece to be measured.
[0006] Optionally, the scanning data and the multi-modal data are preprocessed, which both include: time stamp alignment of the scanning data and the multi-modal data; noise filtering of the time stamp aligned scanning data and the multi-modal data.
[0007] Optionally, the workpiece deformation detection model comprises: a double-modal spatio-temporal encoder, a fractal-driven feature pyramid module, a deformation hot spot generation and interpretation module connected in sequence.
[0008] Optionally, the flatness measurement model comprises: a multi-modal pulse coding layer, a fractal-driven spatio-temporal graph network and a dynamic deformation decoupling module connected in sequence.
[0009] Optionally, the flatness measurement model is trained by the following steps: collecting multi-modal data and scanning data of workpieces with known flatness, and dividing them into a training set and a validation set in proportion; setting training parameters, training the model through the training set until the training meets the maximum number of iterations; using the validation set to verify the trained model, and in the verification process, if the mean absolute error (MAE), mean square error (MSE) and root mean square error (RMSE) as the model performance evaluation indicators are all less than the threshold value, the model verification is passed; otherwise, adjust the training parameters or expand the training set samples to retrain the model until the verification is passed.
[0010] The application also provides a workpiece flatness measurement device based on industrial Internet of Things, comprising: a scanning module for scanning a workpiece to be measured to obtain scanning data; a preprocessing module for preprocessing the scanning data; an identification module for inputting the first preprocessed scanning data into a trained workpiece deformation detection model to generate a two-dimensional probability map of deformation hot spots, so as to identify the potential deformation hot spot area of the workpiece to be measured, and optimize the sensor layout according to the identification result;
[0011] An adaptive zero calibration module is configured to start a laser interferometer to generate a virtual plane as a reference surface, and to perform adaptive zero calibration on the sensor with the reference surface, and to record the initial offset;
[0012] A monitoring module is configured to monitor the potential deformation hot spot area according to the sensor after adaptive zero calibration, to obtain multi-modal data, and to perform second preprocessing on the multi-modal data; a model construction and training module is configured to construct a flatness measurement model and train it, to input the second preprocessed multi-modal data and the preprocessed scanning data into the flatness measurement model to extract the deformation features of the workpiece to be measured; a division module is configured to divide the workpiece to be measured into multiple regions according to the deformation features of the workpiece to be measured; and a calculation module is configured to calculate the flatness of each region and perform weighting to obtain the flatness data of the workpiece to be measured.
[0013] Optionally, the preprocessing module comprises: a timestamp alignment sub-module for timestamp alignment of the scanning data and the multi-modal data; and a noise filtering sub-module for noise filtering of the timestamp-aligned scanning data and multi-modal data.
[0014] The application also provides a storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any one of the preceding.
[0015] The application also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of the preceding when executing the program. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 is a flowchart of a workpiece flatness measurement method based on industrial Internet of Things provided by an embodiment of the application;
[0017] Figure 2 is a structural schematic diagram of a workpiece flatness measurement device based on industrial Internet of Things provided by another embodiment of the application;
[0018] Figure 3 is a structural schematic diagram of a storage medium provided by another embodiment of the application;
[0019] Figure 4 is a structural schematic diagram of an electronic device provided by another embodiment of the application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the application.
[0021] It should be noted that all directionality indications (such as up, down, left, right, front, back, etc.) in the embodiments of the application are only used to explain the relative positional relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directionality indications also change accordingly.
[0022] In the application, unless otherwise explicitly specified and limited, the terms “connection”, “fixation” and the like should be understood in a broad sense, for example, “fixation” can be fixed connection, or detachable connection, or integral; can be mechanical connection, or electrical connection; can be direct connection, or indirect connection through an intermediate medium; can be internal connection of two elements or interaction relationship between two elements, unless otherwise explicitly limited. For those skilled in the art, the specific meanings of the above terms in the application can be understood according to the specific circumstances.
[0023] In addition, if the description of "first", "second" and the like is involved in the embodiments of the present application, the description of "first", "second" and the like is only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features limited by "first", "second" can be explicitly or implicitly included at least one of the features. In addition, the meaning of "and / or" appearing throughout the text includes three parallel schemes. For example, "A and / or B" includes A scheme, or B scheme, or A and B scheme. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of the ordinary skilled in the art. When the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, and is not within the protection scope required by the present application.
[0024] Figure 1 is a flowchart of a workpiece flatness measurement method provided by an exemplary embodiment of the present application, as shown in Figure 1 The method comprises the following steps:
[0025] S100: scanning the workpiece to be measured to obtain scanning data;
[0026] In this step, different types of sensors are deployed on the measurement axis of the workpiece to be measured, including low-resolution laser sensors, high-resolution laser sensors, contact sensors and micro-vibration sensors. First, the low-resolution laser sensor and the contact sensor are used to scan the workpiece to be measured 360° to preliminarily identify the scanning data of the workpiece to be measured, including geometric profile, surface roughness distribution, and pressure distribution time series data (such as contact pressure value, contact point displacement).
[0027] S200: first preprocessing of the scanning data;
[0028] S300: inputting the first preprocessed scanning data into the trained workpiece deformation detection model to identify the potential deformation hot spot area of the workpiece to be measured, and optimizing the sensor layout according to the identification result;
[0029] In this step, the trained workpiece deformation detection model can analyze the scanning data in real time and dynamically adjust the deployment strategy of the sensor according to the identification result output by the model, such as deploying the high-resolution laser sensor and the micro-vibration sensor from the non-hot deformation area to the deformation hot spot area, and increasing the deployment density of the contact sensor in the deformation hot spot area, to improve the real-time performance and accuracy of the surface deformation monitoring of the workpiece to be measured.
[0030] It should be noted that the deformation hot spot region refers to a part of the workpiece where the local deformation is significantly higher than other regions due to factors such as material stress concentration, uneven distribution of machining force, structural weakness, etc. These regions usually exhibit characteristics such as high complexity surface (fractal dimension > 1.2), local depression, dense corrugation distribution, or abnormal vibration spectrum. The non-deformation hot spot region refers to a region of the workpiece surface with lower deformation and higher geometric stability. These regions have low surface complexity (fractal dimension ≤ 1.2), gentle deformation gradient, and small fluctuations in multi-modal data (such as laser displacement, contact pressure), indicating that they are less affected by machining or environmental interference.
[0031] S400: Start the laser interferometer to generate a virtual plane as a reference surface, and use the reference surface to layout the optimized sensors for adaptive zero calibration, and record the initial offset;
[0032] S500: Monitor the potential deformation hot spot region based on the adaptive zero calibrated sensors, obtain multi-modal data, and perform second preprocessing on the multi-modal data, wherein the multi-modal data includes contact sensor data (such as contact pressure time series change, displacement change, and contact point position information in the deformation hot spot region), laser sensor data (such as non-contact displacement measurement value and high-resolution point cloud in the deformation hot spot region), and micro-vibration sensor data (such as vibration spectrum characteristics in the deformation hot spot region, including frequency, amplitude, and waveform).
[0033] S600: Construct a flatness measurement model and train it, input the second preprocessed multi-modal data and preprocessed scanning data into the flatness measurement model to extract the deformation characteristics of the workpiece to be measured, which include macroscopic characteristics and microscopic characteristics. The macroscopic characteristics include, for example, the ovality, axial curvature, and overall inclination of the workpiece, and the microscopic characteristics include, for example, the local depression depth and surface corrugation distribution of the workpiece.
[0034] S700: Divide the workpiece to be measured into multiple regions based on its deformation characteristics.
[0035] In this step, the workpiece can be divided into a core deformation region, a transition region, and a stable region.
[0036] S800: Calculate the flatness of each region and perform weighting to obtain the flatness data of the workpiece to be measured.
[0037] In another exemplary embodiment, the first preprocessing of the scanning data in step S200 and the second preprocessing of the multi-modal data in step S500 both include the following steps:
[0038] Step 1: Time stamp alignment of the scan data and the multi-modal data, comprising the following steps:
[0039] Step 1.1: Determine the synchronization signal source: use a unified hardware trigger signal (such as a pulse signal or a digital trigger line) to control all sensors to start acquisition at the same time, to eliminate the initial time deviation from the source;
[0040] Step 1.2: Configure each sensor to respond to the synchronization signal: configure each sensor (including but not limited to sampling frequency, trigger mode, etc.) so that each sensor can start data acquisition when receiving the synchronization signal, to ensure that each sensor can accurately start the data recording process according to the synchronization signal.
[0041] Step 1.3: Mark and record the time stamp of the event occurrence: when the workpiece passes through the measurement area or a specific event (such as deformation occurrence) is detected, mark the occurrence of the event on all related sensors and record the current time stamp.
[0042] Step 1.4: Implement data interpolation and resampling: interpolate (such as linear interpolation, cubic spline interpolation) low-frequency data (such as 500Hz micro-vibration data) to match the sampling rate of high-frequency data (such as 1kHz laser data). Perform mean or decimation operation on high-frequency data to match the sampling rate of low-frequency data. For example, if the laser sensor sampling rate is 1kHz and the micro-vibration sensor is 500Hz, the micro-vibration data can be upsampled to 1kHz, or the laser data can be downsampled to 500Hz. Through the above processing, the original signal characteristics can be preserved and false information introduced by interpolation can be avoided.
[0043] Step 1.5: Verify the accuracy of time stamp alignment: it is necessary to verify whether the result of time stamp alignment meets the expected accuracy requirements. Specifically, it is necessary to check whether the data from different sensors but collected at the same time point has logical continuity and consistency. If any mismatch is found, the previous steps need to be adjusted, for example, the sensor response to the synchronization signal can be reconfigured, or the data interpolation and resampling strategy can be optimized.
[0044] Step 2: Noise filtering of the time-stamped scan data and multi-modal data, comprising the following steps:
[0045] Step 2.1: Characteristic analysis of the scan data and the multi-modal data to determine the source and type of noise, comprising:
[0046] Spectrum analysis: identify high-frequency noise, low-frequency drift or random noise in the scan data and the multi-modal data through Fast Fourier Transform (FFT).
[0047] Statistical property analysis: Calculate the mean, variance, standard deviation, etc. of the scanning data and the multi-modal data, evaluate the distribution characteristics of the noise (such as Gaussian noise, impulse noise, etc.).
[0048] Sensor property correction: According to the known characteristics of each sensor (such as scattering noise of laser sensor, mechanical vibration noise of contact sensor), formulate targeted filtering strategy.
[0049] Step 2.2: Remove high-frequency noise, for example, denoising can be done through wavelet transform, which specifically includes: first, wavelet decomposition is performed on the scanning data and the multi-modal data, and the data is divided into detail and approximation components at multiple scales; second, set a threshold in the high-frequency component, discard the coefficients below the threshold (assuming that these coefficients are mainly composed of noise); finally, reconstruct the signal through inverse wavelet transform.
[0050] Step 2.3: Eliminate low-frequency drift, for example, the long-term trend of the scanning data and the multi-modal data can be fitted (such as using polynomial fitting or moving average method), and then the trend term is subtracted from the original data, so as to eliminate the low-frequency drift.
[0051] Step 2.4: Suppress random noise, for example, Kalman filter algorithm can be used to recursively estimate the scanning data and the multi-modal data, Kalman filter can combine prediction and observation values, so as to effectively suppress random noise while preserving the change characteristics of the true signal.
[0052] In another example embodiment, in step S300, the workpiece deformation detection model comprises: a dual-modal spatio-temporal encoder, a fractal-driven feature pyramid module, a deformation hotspot generation and interpretation module. Wherein, the dual-modal spatio-temporal encoder comprises a first branch and a second branch, wherein the first branch is used to input the low-resolution geometric profile (point cloud or depth map) and surface roughness distribution of the workpiece to be measured, the first branch comprises a multi-scale sparse convolution network and a surface roughness attention module, wherein the multi-scale sparse convolution network extracts geometric features of the workpiece to be measured by using sparse convolution kernels of different scales (for example, 3x3, 5x5, 7x7, sparse rate = 0.6, which means that 60% of the weights in the convolution kernel are set to zero, only the weights of the key area are reserved, so as to focus on the macro deformation trend of the geometric profile, to capture deformation information at different levels (such as macro tilt, local depression); the surface roughness attention module dynamically adjusts the response weight of the multi-scale sparse convolution network to the rough area according to the surface roughness distribution of the workpiece to be measured, for example, the area with high roughness (such as Ra value exceeding the threshold value) is given higher weight to enhance the sensitivity to the potential deformation hotspot area. The surface roughness attention module calculates the fractal dimension (Ra-FD) of the roughness distribution as a weight factor to weight and enlarge the feature map of the rough area, and suppress the response of the smooth area. Finally, the first branch can output geometric features , which includes the macro deformation trend (such as overall tilt, depression area position) of the workpiece to be measured and the weight information of the surface roughness distribution.
[0053] The second branch is used to input the pressure distribution time series data (such as the contact pressure value measured by the contact sensor, the time series change of the contact point displacement) of the workpiece to be measured, and capture the dynamic mode (such as mutation, periodic fluctuation) of the pressure change through a time series fractal encoder combined with sliding window fractal dimension calculation. Specifically, the time series fractal encoder first applies a sliding window (such as a window size of 100 time steps) to the pressure distribution time series data to calculate the fractal dimension of the pressure change in each window , wherein the higher the fractal dimension, the more complex the dynamic mode of the pressure change (such as mutation, periodic fluctuation), which may reflect the local stress concentration or external interference of the workpiece. Secondly, the long short-term memory network is used to capture the long-term dependence and mutation characteristics of the pressure change. Finally, the pressure time series features , which include the dynamic mode (such as mutation point, periodic fluctuation frequency) of the pressure distribution and the corresponding fractal dimension.
[0054] The dual-modal spatio-temporal encoder further comprises a fusion module, which dynamically adjusts the fusion weight of the two modal features based on the difference in fractal dimension of the geometric features and the pressure time series features , and generates fusion features , the fusion feature can be calculated by the following formula:
[0055]
[0056] wherein, represents the fusion feature; represents the weight of the geometric feature, with a value range (0, 1), represents the weight of the pressure time sequence feature, and has:
[0057]
[0058] represents the fractal dimension of the workpiece surface roughness, which is used to quantify the complexity of the rough area of the workpiece surface; represents the pressure time sequence fractal dimension, which is used to represent the dynamic complexity of the change of the contact pressure of the workpiece surface.
[0059] The above formula realizes the intelligent fusion of the geometric feature and the pressure time sequence feature through the dynamic weight distribution driven by the fractal dimension, which not only makes up for the lack of details of the low-resolution laser sensor, but also strengthens the deformation perception ability of the key area, and provides a theoretical guarantee for high-precision detection under limited data conditions.
[0060] The fractally driven deformable pyramid module is used to further refine the fusion feature to enhance the positioning ability of the deformation hot spot area, and the fractally driven deformable pyramid module comprises a roughness-fractal convolution layer and a deformable pressure response layer, wherein the roughness-fractal convolution layer dynamically adjusts the receptive field of the convolution kernel according to the surface roughness fractal dimension (Ra-FD), for example, in the high roughness area (Ra-FD>1.1), a small kernel (3×3) is used to focus on details to capture local concave or corrugated distribution; in the low roughness area, a large kernel (7×7) is used to capture the global trend, avoiding excessive attention to irrelevant details. The deformable pressure response layer introduces a deformable convolution kernel in the pressure mutation area (such as pressure gradient>threshold value), and adaptively adjusts the position and shape of the convolution kernel by learning the offset, so as to adapt to the pressure distribution profile, thereby enhancing the capture ability of local pressure mutation.
[0061] The deformation hotspot generation and interpretation module includes an output head and a self-supervised optimization mechanism, wherein the output head adopts a lightweight deconvolution network (such as a U-Net structure) to map the fused high-dimensional features back to a pixel-level deformation probability distribution, and generate a two-dimensional probability map of deformation hotspots that can reflect the local deformation risk. The map can intuitively show the high-sensitive area of the workpiece surface in terms of geometric shape and stress change, i.e., the potential deformation hotspot area. In this way, the model not only realizes the visualization and positioning of the hotspot area, but also classifies and explains the causes of the hotspot area according to the probability intensity. In addition, the output head also outputs deformation cause analysis results, which may include roughness dominant type (R > 0.5 and σ < 0.5, indicating that the workpiece surface exists machining defects), stress dominant type (σ > 0.5 and R < 0.5, indicating that the workpiece exists assembly stress concentration), and composite type (both R > 0.5 and σ > 0.5, which needs to be intervened first). and the pressure fluctuation is gentle, indicating that the workpiece surface exists machining defects), stress dominant type (σ > 0.5 and R < 0.5, indicating that the workpiece exists assembly stress concentration), and composite type (both R > 0.5 and σ > 0.5, which needs to be intervened first). and the pressure fluctuation is gentle, indicating that the workpiece surface exists machining defects), stress dominant type (σ > 0.5 and R < 0.5, indicating that the workpiece exists assembly stress concentration), and composite type (both R > 0.5 and σ > 0.5, which needs to be intervened first).
[0062] The self-supervised optimization mechanism introduces a fractal consistency loss, which is specifically represented as follows:
[0063]
[0064] wherein, represents the fractal dimension of the model output, represents the actual fractal dimension of the input data.
[0065] By introducing the fractal consistency loss, the fractal dimension of the workpiece deformation detection model output can be consistent with the calculated value of the input data, avoiding overfitting and improving the generalization ability of the model to complex deformation patterns.
[0066] In another exemplary embodiment, in step S400, the laser interferometer generates a virtual plane as a reference surface, and the sensor after layout optimization is adaptively zeroed with the reference surface as the reference, and the initial offset is recorded, including the following steps:
[0067] S401: Select a high-precision laser interferometer to perform holographic scanning on the surface of the workpiece to be measured, generate high-precision point cloud data through interference fringe analysis, and construct a theoretical reference surface (such as an ideal cylindrical surface or a plane) of the workpiece. If the workpiece to be measured has slight deformation or installation error, the laser interferometer can adjust the parameters of the reference surface (such as the inclination angle of the plane and the curvature) through real-time feedback to ensure that the reference surface is optimally matched with the actual geometric characteristics of the workpiece.
[0068] S402: According to the optimized sensor layout scheme in step S200, high-resolution laser sensors, contact sensors, and micro-vibration sensors are installed on the surface of the workpiece to be measured or nearby supports. Through the three-dimensional coordinate system of the laser interferometer, the physical position (such as the contact point, the laser emission / receiving end) of each sensor is mapped to the reference surface coordinate system, ensuring that the measurement direction of the sensor is consistent with the normal direction of the reference surface.
[0069] S403: Perform initial offset measurement: For contact sensors, record the initial pressure value, displacement value, and position coordinates when the sensor is in contact with the workpiece surface under the action of no external force as the zero reference. For laser sensors, calculate the distance deviation (such as flatness error) from the reference surface through the high-precision plane data of the laser interferometer, and adjust its zero point. For micro-vibration sensors, record the baseline noise level (such as frequency, amplitude) of the vibration spectrum in the static state as the vibration zero point.
[0070] In another example embodiment, in step S600, the flatness measurement model comprises: a multimodal pulse coding layer, a fractal-driven spatiotemporal graph network, and a dynamic deformation decoupling module connected in turn. Wherein, the multimodal pulse coding layer is used to convert the preprocessed multimodal data and the preprocessed scanning data into pulse sequences to simulate the transmission mechanism of biological neural signals. Specifically, the multimodal pulse coding layer comprises a first branch, a second branch and a third branch. The first branch is used to process laser point cloud data, specifically comprising a first input layer, a first pulse encoder and a first fractal dimension adjuster. The first input layer is used to input laser point cloud data. The first pulse encoder adopts a sparse convolution pulse encoder to convert the laser point cloud data into a pulse sequence, and the first fractal dimension adjuster is used to dynamically adjust the pulse trigger threshold based on the surface roughness fractal dimension. For example, the higher the surface roughness fractal dimension, the lower the threshold, so as to enhance the sensitivity of rough areas. The second branch is used to process contact pressure time series data, specifically comprising a second input layer, a second pulse encoder and a second fractal dimension adjuster. The second input layer is used to input contact pressure time series data. The second pulse encoder extracts the pressure gradient by using a time series sliding window (window length = 10 ms). The second fractal dimension adjuster dynamically adjusts the pulse trigger threshold according to the fractal dimension of the pressure time series. For example, when the pressure change presents high-frequency mutations or complex fluctuations (high fractal dimension), the threshold is lowered to capture more details. The third branch is used to process micro-vibration spectrum, specifically comprising a third input layer, a third pulse encoder and a third fractal dimension adjuster. The third input layer is used to input micro-vibration spectrum. The third pulse encoder extracts the main frequency band energy in the micro-vibration spectrum by wavelet transform. The third fractal dimension adjuster dynamically adjusts the pulse trigger threshold according to the fractal dimension of the vibration spectrum (such as the proportion of high-frequency components or the irregularity of the waveform). For example, when the vibration signal presents high complexity (such as random noise or multi-frequency interference), the threshold is lowered to enhance the response to subtle vibration patterns.
[0071] In summary, the core function of the three fractal dimension adjusters is to quantify the complexity of the data through fractal dimension, and dynamically adjust the sensitivity of pulse coding accordingly, to ensure that the key deformation features of different modal data (such as rough areas, pressure mutations, high-frequency vibrations) are accurately coded in the form of pulse sequences, providing high-fidelity input for the subsequent spatiotemporal graph network and dynamic decoupling module.
[0072] The fractal-driven spatiotemporal graph network comprises a fractal perception graph construction layer, a spatiotemporal graph convolution layer and a physical constraint loss layer. The fractal perception graph construction layer constructs an initial fractal perception graph based on the output of the multimodal pulse coding layer, and the specific construction process is as follows:
[0073] 1. Define nodes: including laser point nodes and pressure sampling point nodes, wherein the laser point node is composed of point cloud data of a laser sensor, and each node corresponds to a sampling point on the surface of a workpiece; the pressure sampling point node is composed of pressure time series data of a contact sensor, and each node corresponds to a pressure sampling point at a certain moment.
[0074] 2. Calculate edge weights based on the fractal dimension similarity formula as follows:
[0075]
[0076] wherein, and respectively represent the fractal dimension values of nodes and nodes in the space-time graph network, represents a scaling factor (D) for controlling the influence strength of the difference between and on the weight.
[0077] The above calculation process includes:
[0078] Step 1, traverse all node pairs, for each pair of nodes and nodes , calculate the fractal dimension difference
[0079] Step 2: normalize all edge weights to [0, 1] to ensure the stability of the graph structure;
[0080] Step 3: organize all normalized edge weights into an adjacency matrix .
[0081] The space-time graph convolution layer includes a spatial convolution and a temporal convolution, the spatial convolution is used to aggregate the fractal features of adjacent nodes in the fractal perception graph to capture spatial correlation, specifically, the spatial convolution can fuse the fractal features (such as roughness, pressure gradient) of adjacent nodes into the target node through weighted summation, for example:
[0082]
[0083] wherein, represents the feature vector of node at the layer; represents the feature vector of neighbor node at the layer; represents the edge weight between nodes and ; and represents the node The set of neighboring nodes.
[0084] Temporal convolution is used to slide along the time axis of a pulse sequence to capture its dynamic patterns (such as pressure wave diffusion and vibration propagation). Specifically, the temporal convolution can apply a convolution kernel to the temporal features (such as a pressure pulse sequence) of each node through one-dimensional operations.
[0085]
[0086] in, Indicates time step Convolutional output features at the location; Indicates the kernel length. Indicates the convolution kernel at time offset Weight parameters at the location; Indicates time step Input characteristics at the location (such as pressure pulse value or vibration spectrum energy).
[0087] Furthermore, the temporal convolution employs a dynamic extraction mode, capturing sudden pressure changes or periodic fluctuations through a sliding window (e.g., window length = 10ms), and dynamically adjusting the convolution kernel response in conjunction with the fractal dimension. For example, when a sudden pressure change is detected (a sharp increase in fractal dimension), the convolution kernel stride is increased to quickly locate the event; when pressure fluctuations are gradual (low fractal dimension), the stride is decreased to refine the trend analysis.
[0088] The physical constraint loss layer constrains the model output through mechanical simulation data (e.g., through finite element analysis (FEA)) to ensure that the deformation prediction conforms to physical laws (such as elasticity and material stress distribution). The physical constraint loss is expressed as follows:
[0089]
[0090] in, Nodes representing model predictions The deformation value; The nodes obtained from the simulation The deformation value; Indicates stress distribution constraint terms; Indicates the weighting coefficient of the stress constraint; This represents the total number of nodes in the graph (e.g., the sum of laser point nodes and pressure sampling point nodes).
[0091] The dynamic deformation decoupling module includes a dual-channel attention mechanism and a causal reasoning head, wherein the dual-channel attention mechanism includes a macroscopic channel (global attention) and a microscopic channel (locally deformable convolution), the macroscopic channel is used to calculate the correlation weight of all nodes, focus on the overall trend (such as the direction of workpiece tilt), and calculate the output axial curvature based on the following formula:
[0092]
[0093] wherein, is the axial curvature, which represents the bending degree of the whole workpiece along the axial direction (such as Z-axis), and the unit is radian ( rad ) or angle (°); represents the contribution weight of the th measurement point in the overall bending, and the value range is [0, 1]; is the axial displacement change, which represents the height deviation of the th measurement point relative to the theoretical reference surface (such as the virtual plane generated by the laser interferometer) in the Z-axis direction, and the unit is microns ( μm ).
[0094] The microscopic channel is used to adjust the receptive field shape according to the local gradient, and the output local concave depth and ripple density of the workpiece surface are calculated based on the following formula:
[0095]
[0096] wherein, represents the maximum concave depth in the local area of the workpiece surface, which reflects the degree of processing defects or stress concentration, and the unit is microns ( μm ); represents the displacement value set of each measurement point in the local area, which is usually a two-dimensional matrix or a subset of point cloud.
[0097]
[0098] wherein, is the ripple density, which represents the number of ripple peaks per unit area, and reflects the density of surface periodic undulations, and the unit is pieces / mm 2 ; represents the total number of detected ripple peaks in the local area; represents the surface area of the local area, and the unit is mm 2 .
[0099] The causal reasoning head is used to splice the macroscopic features and the microscopic features, and outputs the deformation features of the workpiece to be tested through a fully connected layer.
[0100] In another example embodiment, in step S600, the flatness measurement model is trained by the following steps:
[0101] S601: Collecting multi-modal data and scanning data of workpieces with known flatness, and dividing them into a training set and a validation set in a certain proportion, for example, 7:3;
[0102] S602: Setting training parameters, for example, the default booster selects a tree-based model gbtree, the learning_rate is set to 0.01, and the max_depth is set to 3. The model is trained by the training set until the training meets the maximum number of iterations;
[0103] S603: The trained model is verified by the validation set. If the mean absolute error (MAE), the mean square error (MSE), and the root mean square error (RMSE) as the model performance evaluation indicators are all less than the threshold value (the threshold value of MAE is set to 0.05, and the threshold value of MSE is set to 0.001), the model verification is passed. Otherwise, adjust the training parameters (for example, adjust the learning_rate to 0.005 and the max_depth to 5) or expand the training set sample (for example, adjust the division ratio to 8:2) to retrain the model until the model verification is passed.
[0104] In another example embodiment, the present application also provides an industrial internet of things-based workpiece flatness measurement device, as shown in Figure 2 The device comprises a scanning module 100 for scanning a workpiece to be measured to obtain scanning data; and a preprocessing module 200 for performing first preprocessing on the scanning data.
[0105] The recognition module 300 is configured to input the first preprocessed scanning data into the trained workpiece deformation detection model to generate a two-dimensional probability map of the deformation hot spot, so as to identify a potential deformation hot spot area of the workpiece to be measured, and to optimize the sensor layout according to the identification result; the adaptive zero calibration module 400 is configured to start the laser interferometer to generate a virtual plane as a reference surface, to calibrate the zero of the sensor after layout optimization with the reference surface as a reference, and to record an initial offset; the monitoring module 500 is configured to monitor the potential deformation hot spot area according to the sensor after adaptive zero calibration, to obtain multi-modal data, and to perform second preprocessing on the multi-modal data; the model construction and training module 600 is configured to construct a flatness measurement model and to train the model, to input the second preprocessed multi-modal data and the preprocessed scanning data into the flatness measurement model, so as to extract deformation features of the workpiece to be measured; the division module 700 is configured to divide the workpiece to be measured into a plurality of regions according to the deformation features of the workpiece to be measured; and the calculation module 800 is configured to calculate the flatness of each region respectively and to perform weighting, so as to obtain flatness data of the workpiece to be measured.
[0106] Optionally, the preprocessing module 200 includes a timestamp alignment sub-module configured to perform timestamp alignment on the scanning data and the multi-modal data, and a noise filtering sub-module configured to perform noise filtering on the scanning data and the multi-modal data after timestamp alignment.
[0107] On the basis of the above-mentioned embodiments, reference is made to Figure 3 The computer readable storage medium of the exemplary embodiments of the present application is described as follows Figure 3 The computer readable storage medium shown in the figure is an optical disc 40, and a computer program (i.e., a program product) is stored on the optical disc 40. When the computer program is run by a processor, each step described in the above-mentioned method embodiments is implemented, for example, 360° scanning of a workpiece to be measured is performed to obtain scanning data; the scanning data is preprocessed; the preprocessed scanning data is input into a trained workpiece deformation detection model to identify a potential deformation hot spot area of the workpiece to be measured, and the sensor layout is optimized according to the identification result; a laser interferometer is started to generate a virtual plane as a reference surface, and the sensor after layout optimization is calibrated with the reference surface as a reference, and an initial offset is recorded; the potential deformation hot spot area is monitored with the sensor after adaptive zero calibration to obtain multi-modal data, and the multi-modal data is preprocessed; a flatness measurement model is constructed and trained, and the preprocessed multi-modal data and the preprocessed scanning data are input into the flatness measurement model to extract deformation features of the workpiece to be measured; the workpiece to be measured is divided into a plurality of regions according to the deformation features of the workpiece to be measured; and the flatness of each region is calculated respectively and weighted to obtain flatness data of the workpiece to be measured. The specific implementation methods of each step are not repeated here.
[0108] It should be noted that computer readable storage mediums include but are not limited to phase-change RAM (PRAM), static RAM (SRAM), dynamic RAM (DRAM), other type of RAM, read-only memory (ROM), electrically erasable programmable ROM (EEPROM), flash memory or other optical, magnetic, storage mediums, etc. which are not listed here one by one.
[0109] Based on the above-mentioned embodiments, the present application further provides an electronic device, which is described below with reference to Figure 4 The electronic device for file downloading according to the exemplary embodiments of the present application is described.
[0110] Figure 4 A block diagram of an exemplary electronic device 50 suitable for implementing exemplary embodiments of the present application is shown, which can be a computer system or a cloud server. Figure 4 The electronic device 50 shown is merely an example and should not bring any limitation to the functions and usage range of the embodiments of the present application.
[0111] As shown in Figure 4 The electronic device 50 includes but is not limited to one or more processors or processing units 501, system memory 502, and a bus 503 that couples various system components including the system memory 502 and the processing unit 501.
[0112] The electronic device 50 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by the electronic device 50 and includes both volatile and non-volatile media, removable and non-removable media.
[0113] The system memory 502 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 5021 and / or cache memory 5022. The electronic device 50 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, ROM 5023 can be used to read-only memory (ROM) 5023 can be used to store instructions and perhaps data which are read during program execution. By way of further example, a removable, non-removable memory, or both, can be used for a computer system readable storage medium 5024, such as a magnetic disk that provides persistent storage for a given data or instructions. Implementations of the present application provided herein can be used with computer system readable media that is external to the electronic device 50. Figure 4 not shown in the Figure 4As shown in FIG. 10, a disk drive 505a can be provided that can read from or write to a removable, nonvolatile magnetic media (e.g., a "floppy drive" within the disk drive 505a). Additionally, a CD-ROM drive 505b can also be provided that can read from or write to a removable, nonvolatile optical medium (e.g., a CD-ROM). In both cases, the disk drives 505a, 505b can be connected to the bus 503 by one or more data media interfaces. The system memory 502 can include at least one program product having a set (e.g., at least one) of program modules that configure the processor 501 to perform the functions of the embodiments of the application.
[0114] With reference to FIG. 10, the exemplary environment 500 for implementing various aspects of this disclosure can also include a system 500a as shown in FIG. 10. The system 500a can include a computer 500, the components of which are located within a housing 500c. For example, the computer 500 can include a processor 501, memory 502, an input / output (I / O) interface 505, a communications interface 506, and a bus 503 (which can include one or more bus lines enabling communications among the components of the computer 500). The bus 503 can include any interconnection or technology that facilitates communication between the components of the computer 500. The processor 501 can be any hardware device capable of processing instructions and data, such as a central processing unit (CPU), a graphical processing unit (GPU), a hardware logic circuit, or the like. The processor 501 can be a single processor or multiple processors.
[0115] The electronic device 50 can also communicate with one or more external devices 504 such as a keyboard or a pointing device, displays, etc. through an input / output (I / O) interface 505. Further, the electronic device 50 can communicate with one or more networks such as a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet, through a network adapter 506. As Figure 4 illustrated, the network adapter 506 communicates with the other modules of the electronic device 50 (e.g., the processing unit 501, etc.) through the bus 503. It should be appreciated that the network adapter 506 can also be connected to the other modules of the electronic device 50 through a Figure 4 other bus type (e.g., a PCI Express bus, etc.). Further, it should be appreciated that the bus 503 can be configured to operate at one or more clock speeds.
[0116] The processing unit 501 performs various functional applications and data processing by running programs stored in the system memory 502, such as performing 360° scanning on a workpiece to be tested to obtain scanning data, pre-processing the scanning data, inputting the pre-processed scanning data into a trained workpiece deformation detection model to identify a potential deformation hotspot area of the workpiece to be tested, and optimizing a sensor layout according to an identification result; starting a laser interferometer to generate a virtual plane as a reference surface, and performing self-adaptive zero calibration on the sensor with the reference surface as a reference, and recording an initial offset; monitoring the potential deformation hotspot area by the sensor after self-adaptive zero calibration to obtain multi-modal data, and pre-processing the multi-modal data; constructing a flatness measurement model and training, inputting the pre-processed multi-modal data and the pre-processed scanning data into the flatness measurement model to extract deformation features of the workpiece to be tested; dividing the workpiece to be tested into multiple regions according to the deformation features of the workpiece to be tested; and calculating the flatness of each region and weighting to obtain flatness data of the workpiece to be tested. The specific implementation of each step will not be repeated here. It should be noted that although several units / modules or sub-units / sub-modules of the file concurrent downloading device are mentioned in the foregoing detailed description, such division is only exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules.
[0117] In the description of the present application, it should be noted that the terms "first", "second", "third" are only for the purpose of description and cannot be understood or implied as indicating or implying relative importance.
[0118] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0119] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interfaces, devices or units, and can be electrical, mechanical or other forms.
[0120] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0121] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit.
[0122] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for executing all or part of the steps of the method described in each embodiment of the present application by a computer device (which can be a personal computer, a cloud server, or a network device, etc.). The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various program code storage media.
[0123] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A workpiece flatness measurement method based on industrial internet of things, characterized in that, The method comprises: scanning the workpiece to be tested to obtain scanning data, wherein the scanning data comprises the geometric profile, surface roughness distribution and pressure distribution time series data of the workpiece to be tested, and the pressure distribution time series data comprises contact pressure value and contact point displacement; firstly pre-processing the scanning data; inputting the first pre-processed scanning data into the trained workpiece deformation detection model to generate a two-dimensional probability map of deformation hot spots, so as to identify the potential deformation hot spot area of the workpiece to be tested, and optimize the sensor layout according to the identification result; starting the laser interferometer to generate a virtual plane as a reference surface, and performing self-adaptive zero calibration on the sensor after layout optimization with the reference surface as the reference, and recording the initial offset; monitoring the potential deformation hot spot area according to the self-adaptive zero calibrated sensor, obtaining multi-modal data, and secondly pre-processing the multi-modal data; constructing a flatness measurement model and training, inputting the second pre-processed multi-modal data and the pre-processed scanning data into the flatness measurement model to extract the deformation features of the workpiece to be tested; dividing the workpiece to be tested into multiple areas according to the deformation features of the workpiece to be tested; calculating the flatness of each area respectively and weighting to obtain the flatness data of the workpiece to be tested.
2. The method of claim 1, wherein, The pre-processing of the scanning data and the multi-modal data comprises: timestamp alignment of the scanning data and the multi-modal data; noise filtering of the timestamp aligned scanning data and multi-modal data.
3. The method of claim 1, wherein, The workpiece deformation detection model comprises: a bimodal spatio-temporal encoder, a fractal driven feature pyramid module, a deformation hot spot generation and interpretation module connected in sequence.
4. The method of claim 1, wherein, The flatness measurement model comprises: a multi-modal pulse coding layer, a fractal driven spatio-temporal graph network, and a dynamic deformation decoupling module connected in sequence.
5. The method of claim 1, wherein, The flatness measurement model is trained by the following steps: collecting multi-modal data and scanning data of workpieces with known flatness, and dividing them into training set and validation set in proportion; setting training parameters, training the model through the training set until the training meets the maximum iteration number; using the validation set to verify the trained model, during the verification process, if the mean absolute error MAE, mean square error MSE and root mean square error RMSE as the model performance evaluation indicators are all less than the threshold value, the model verification is passed; otherwise, adjust the training parameters or expand the training set samples to retrain the model until the verification is passed.
6. A workpiece flatness measuring device based on industrial internet of things, characterized in that, The device comprises: a scanning module for scanning the workpiece to be tested to obtain scanning data; wherein the scanning data comprises the geometric profile, surface roughness distribution and pressure distribution time series data of the workpiece to be tested, and the pressure distribution time series data comprises contact pressure value and contact point displacement; a pre-processing module for firstly pre-processing the scanning data; an identification module for inputting the first pre-processed scanning data into the trained workpiece deformation detection model to generate a two-dimensional probability map of deformation hot spots, so as to identify the potential deformation hot spot area of the workpiece to be tested, and optimize the sensor layout according to the identification result; An adaptive zero calibration module is configured to start a laser interferometer to generate a virtual plane as a reference plane, to arrange the optimized sensors to perform adaptive zero calibration with the reference plane as a reference, and to record an initial offset; A monitoring module is configured to monitor the potential deformation hotspot area according to the sensors after adaptive zero calibration, to obtain multi-modal data, and to perform second preprocessing on the multi-modal data; A model construction and training module is configured to construct a flatness measurement model and training, to input the second preprocessed multi-modal data and the preprocessed scanning data into the flatness measurement model, and to extract deformation features of the workpiece to be measured; A division module is configured to divide the workpiece to be measured into multiple areas according to the deformation features of the workpiece to be measured; A calculation module is configured to calculate the flatness of each area and perform weighting to obtain flatness data of the workpiece to be measured.
7. The apparatus of claim 6, wherein, The preprocessing module comprises: A timestamp alignment sub-module is configured to perform timestamp alignment on the scanning data and the multi-modal data; A noise filtering sub-module is configured to perform noise filtering on the scanning data and the multi-modal data after timestamp alignment.
8. A storage medium, characterized by The instructions, when executed on a computer, cause the computer to perform the method of any one of claims 1-5.
9. An electronic device, comprising: The electronic device comprises: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein The processor implements the method of any one of claims 1-5 when executing the program.
Citation Information
Patent Citations
Three-dimensional modeling method and system thereof
CN109840944A
Method and device for detecting defects on surface of mirror-like workpiece
CN115457034A