Workpiece flatness measuring method and device based on industrial internet of things, medium and equipment
Through an industrial Internet of Things-based method, multimodal sensors and laser interferometers are used to generate virtual planes. Combined with deformation detection and flatness measurement models, high-precision online measurement of workpiece flatness is achieved, solving the problems of measurement error and lack of real-time performance in existing technologies.
Patent Information
- Application Number
- CN202511355417.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-09-22
AI Technical Summary
The existing workpiece flatness measurement method cannot meet the needs of online rapid measurement in mass production. In addition, the three-point online measurement method based on fixed positions has measurement errors when the roundness and verticality of the workpiece are uncertain, making it difficult to truly reflect the deformation of the workpiece cross section.
A method based on the Industrial Internet of Things is adopted to monitor the deformation of the workpiece through scanning data and multimodal sensors. A laser interferometer is used to generate a virtual plane as a reference surface. Combined with the deformation detection model and the flatness measurement model, adaptive zeroing is performed and multi-area flatness calculation is performed.
The accuracy and real-time performance of workpiece flatness measurement are improved, the deformation characteristics of the workpiece can be accurately reflected, and measurement errors can be reduced.
Smart Images

Figure CN120846255A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of machining and preparation technology, specifically relating to workpiece flatness measurement methods, devices, media and equipment based on the Industrial Internet of Things. Background Technology
[0002] Existing methods for measuring workpiece flatness mainly include two approaches: one is offline sampling inspection using a flatness meter or coordinate measuring machine, but this method cannot meet the needs of rapid online measurement in mass production; the other is the three-point online measurement method based on fixed positions, which calculates the average value of the measured values of three points in the plane as the 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 assumptions of the three-point measurement method differ significantly from the actual working conditions, resulting in technical defects of insufficient adaptability. It is difficult to truly reflect the deformation of the workpiece cross-section, which can easily lead to measurement errors and misleading conclusions. Summary of the Invention
[0003] In view of the shortcomings of the prior art, the main purpose of this application is to provide a method, device, medium and equipment for measuring the flatness of workpieces based on the Industrial Internet of Things. This application aims to improve the flatness measurement accuracy of workpieces.
[0004] To achieve the above objectives, this application provides the following technical solution: A method for measuring the flatness of a workpiece includes: scanning the workpiece to be tested to obtain scanning data; performing a first preprocessing on the scanning data; inputting the first preprocessed scanning data into a trained workpiece deformation detection model to identify potential deformation hotspot areas of the workpiece to be tested, and optimizing the sensor layout based on the identification results; activating a laser interferometer to generate a virtual plane as a reference plane, using the optimized sensor layout with reference to adaptively zero-calibrate against the reference plane, and recording the initial offset; monitoring the potential deformation hotspot areas based on the adaptively zero-calibrated sensor to obtain multimodal data, and performing a second preprocessing on the multimodal data; constructing and training a flatness measurement model, inputting the second preprocessed multimodal data and the preprocessed 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 regions based on the deformation features; calculating the flatness of each region and weighting them to obtain the flatness data of the workpiece to be tested.
[0005] Optionally, preprocessing of the scan data and the multimodal data includes: aligning the scan data and the multimodal data with timestamps; and filtering the timestamp-aligned scan data and the multimodal data for noise.
[0006] Optionally, the workpiece deformation detection model includes: a dual-modal spatiotemporal encoder, a fractal-driven feature pyramid module, and a deformation hotspot generation and interpretation module connected in sequence.
[0007] Optionally, the flatness measurement model includes: a multimodal pulse coding layer, a fractal-driven spatiotemporal graph network, and a dynamic deformation decoupling module connected in sequence.
[0008] Optionally, the flatness measurement model is trained through the following steps: collecting multimodal data and scanning data of workpieces with known flatness, and dividing them into training and validation sets according to a ratio; setting training parameters, and training the model using the training set until the training meets the maximum number of iterations; validating the trained model using the validation set. During the validation process, if the mean absolute error (MAE), mean square error (MSE), and root mean square error (RMSE), which are used as performance evaluation indicators of the model, are all less than the threshold, the model is validated; otherwise, the training parameters are adjusted or the training set sample is expanded to retrain the model until it is validated.
[0009] This application also provides a workpiece flatness measurement device based on the Industrial Internet of Things. The device includes: a scanning module for scanning the workpiece to be measured and obtaining scanning data; a preprocessing module for performing a first preprocessing on the scanning data; and 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 hotspots, so as to identify potential deformation hotspot areas of the workpiece to be measured, and optimize the sensor layout based on the identification results. The adaptive zeroing module is used to start the laser interferometer to generate a virtual plane as a reference plane, and to use the optimized sensor to perform adaptive zeroing with reference to the reference plane, and record the initial offset. The monitoring module is used to monitor the potential deformation hotspot areas based on the sensors after adaptive zeroing, obtain multimodal data, and perform a second preprocessing on the multimodal data; the model construction and training module is used to construct and train a flatness measurement model, inputting the second preprocessed multimodal data and preprocessed scan data into the flatness measurement model to extract the deformation characteristics of the workpiece under test; the segmentation module is used to divide the workpiece under test into multiple regions based on the deformation characteristics of the workpiece under test; the calculation module is used to calculate the flatness of each region and perform weighted summation to obtain the flatness data of the workpiece under test.
[0010] Optionally, the preprocessing module includes: a timestamp alignment submodule for aligning the scan data and the multimodal data with timestamps; and a noise filtering submodule for filtering the timestamp-aligned scan data and the multimodal data with noise.
[0011] This application also provides a storage medium including instructions that, when executed on a computer, cause the computer to perform the method as described in the preceding claim.
[0012] This application also provides an electronic device, the electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method as described in any of the preceding methods. Attached Figure Description
[0013] Figure 1 This is a flowchart illustrating a workpiece flatness measurement method based on the Industrial Internet of Things provided in one embodiment of this application; Figure 2 This is a schematic diagram of the structure of a workpiece flatness measuring device based on the Industrial Internet of Things provided in another embodiment of this application; Figure 3 This is a schematic diagram of the structure of a storage medium provided in another embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0015] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0016] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0017] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the meaning of "and / or" throughout the text includes three parallel solutions; for example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0018] Figure 1 This is a schematic flowchart of a workpiece flatness measurement method provided in an exemplary embodiment of this application, as shown below. Figure 1 As shown, the method includes the following steps: S100: Scans the workpiece to be measured to obtain scan data; In this step, different types of sensors are deployed on the measuring axis of the workpiece to be tested. These sensors include, for example, low-resolution laser sensors, high-resolution laser sensors, contact sensors, and micro-vibration sensors. First, the workpiece to be tested is scanned 360° by low-resolution laser sensors and contact sensors to initially identify scanning data of the workpiece to be tested, including geometric contours, surface roughness distribution, and pressure distribution time series data (such as contact pressure values and contact point displacements).
[0019] S200: Perform a first preprocessing on the scanned data; S300: Input the first pre-processed scanning data into the trained workpiece deformation detection model to identify potential deformation hotspots in the workpiece under test, and optimize the sensor layout based on the identification results; In this step, the present application uses a trained workpiece deformation detection model to analyze scanning data in real time and dynamically adjust the sensor deployment strategy according to the recognition results output by the model. For example, high-resolution laser sensors and micro-vibration sensors are deployed from non-hotspot deformation areas to deformation hotspot areas, and the deployment density of contact sensors is increased in deformation hotspot areas to improve the real-time performance and accuracy of surface deformation monitoring of the workpiece under test.
[0020] It should be noted that the deformation hotspot areas refer to parts of the workpiece where, during processing or measurement, the deformation is significantly higher than in other areas due to factors such as material stress concentration, uneven distribution of processing force, and structural weak points. These areas typically exhibit characteristics such as highly complex surfaces (e.g., fractal dimension > 1.2), local depressions, dense ripple distribution, or abnormal vibration spectra. The non-deformation hotspot areas refer to regions of the workpiece surface with lower deformation and higher geometric stability. These areas have low surface complexity (fractal dimension ≤ 1.2), gentle deformation gradients, and small fluctuations in multimodal data (e.g., laser displacement, contact pressure), indicating that they are less affected by processing or environmental interference.
[0021] S400: Start the laser interferometer to generate a virtual plane as a reference plane, use the optimized sensor layout with the reference plane as a reference for adaptive zeroing, and record the initial offset; S500: Based on the sensor after adaptive zeroing, the potential deformation hotspot region is monitored to obtain multimodal data, and the multimodal data is subjected to a second preprocessing. The multimodal data includes contact sensor data (e.g., contact pressure time-series changes, displacement changes, and contact point location information in the deformation hotspot region), laser sensor data (e.g., non-contact displacement measurements and high-resolution point clouds in the deformation hotspot region), and micro-vibration sensor data (e.g., vibration spectrum characteristics of the deformation hotspot region, including frequency, amplitude, waveform, etc.).
[0022] S600: Construct and train a flatness measurement model. Input the pre-processed multimodal data and the pre-processed scanning data into the flatness measurement model to extract the deformation features of the workpiece to be measured. The deformation features include macroscopic features and microscopic features. The macroscopic features include, for example, the ellipticity, axial curvature and overall tilt of the workpiece. The microscopic features include, for example, the local depression depth and surface ripple distribution of the workpiece.
[0023] S700: Divide the workpiece under test into multiple regions based on its deformation characteristics; In this step, the workpiece can be divided into, for example, a core deformation zone, a transition zone, and a stable zone.
[0024] S800: Calculate the flatness of each region separately and perform weighted summation to obtain the flatness data of the workpiece to be tested.
[0025] In another exemplary embodiment, steps S200 and S500, including the first preprocessing of the scan data and the second preprocessing of the multimodal data, both include the following steps: Step 1: Timestamp alignment of the scan data and the multimodal data, specifically including the following steps: Step 1.1: Determine the synchronization signal source: Use a unified hardware trigger signal (such as a pulse signal or digital trigger line) to control all sensors to start acquiring data simultaneously, so as to eliminate the initial time deviation from the source; 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 it receives the synchronization signal, so as to ensure that each sensor can accurately start the data recording process according to the synchronization signal.
[0026] Step 1.3: Mark and record the timestamp of the event: When the workpiece passes through the measurement area or a specific event (such as deformation) is detected, mark the occurrence of the event on all relevant sensors and record the current timestamp.
[0027] Step 1.4: Perform data interpolation and resampling: Interpolate low-frequency data (e.g., 500Hz micro-vibration data) using methods such as linear interpolation or cubic spline interpolation to match the sampling rate of high-frequency data (e.g., 1kHz laser data). Perform averaging or decimation operations on the high-frequency data to match the sampling rate of the low-frequency data. For example, if the laser sensor has a sampling rate of 1kHz and the micro-vibration sensor has a sampling rate of 500Hz, the micro-vibration data can be upsampled to 1kHz, or the laser data can be downsampled to 500Hz. Through these processes, the original signal characteristics can be preserved, and false information introduced by interpolation can be avoided.
[0028] Step 1.5: Verify the accuracy of timestamp alignment: It is necessary to verify whether the results of timestamp alignment meet the expected accuracy requirements. Specifically, it is necessary to check whether there is logical continuity and consistency in data collected from different sensors at the same time point. If any mismatch is found, it is necessary to return to the previous steps for adjustments, such as reconfiguring the sensor response synchronization signal or optimizing the data interpolation and resampling strategies.
[0029] Step 2: Perform noise filtering on the timestamp-aligned scan data and the multimodal data, specifically including the following steps: Step 2.1: Perform characteristic analysis on the scanned data and the multimodal data to determine the noise source and type, specifically including: Spectrum analysis: High-frequency noise, low-frequency drift, or random noise in the scanned data and the multimodal data are identified by Fast Fourier Transform (FFT).
[0030] Statistical characteristic analysis: Calculate the mean, variance, standard deviation and other statistical indicators of the scan data and the multimodal data to evaluate the distribution characteristics of noise (such as Gaussian noise, impulse noise, etc.).
[0031] Sensor characteristic correction: Develop targeted filtering strategies based on the known characteristics of each sensor (such as scattering noise of laser sensors and mechanical vibration noise of contact sensors).
[0032] Step 2.2: Remove high-frequency noise, for example, through wavelet transform. Specifically, this includes: first, performing wavelet decomposition on the scanned data and the multimodal data to divide the data into detail and approximate components at multiple scales; second, setting a threshold in the high-frequency components and discarding coefficients below the threshold (assuming these coefficients are mainly composed of noise); and finally, reconstructing the signal through inverse wavelet transform.
[0033] Step 2.3: Eliminate low-frequency drift, for example, by fitting the long-term trend of the scan data and the multimodal data (such as using polynomial fitting or moving average), and then subtracting the trend term from the original data to eliminate low-frequency drift.
[0034] Step 2.4: Suppress random noise. For example, the Kalman filter algorithm can be used to recursively estimate the scan data and the multimodal data. The Kalman filter can combine the prediction and observation values, thereby effectively suppressing random noise while preserving the variation characteristics of the real signal.
[0035] In another exemplary embodiment, in step S300, the workpiece deformation detection model includes: a dual-modal spatiotemporal encoder, a fractal-driven feature pyramid module, and a deformation hotspot generation and interpretation module. The dual-modal spatiotemporal encoder includes a first branch and a second branch. The first branch is used to input the low-resolution geometric contour (point cloud or depth map) and surface roughness distribution of the workpiece under test. The first branch includes a multi-scale sparse convolutional network and a surface roughness attention module. The multi-scale sparse convolutional network extracts the geometric features of the workpiece under test by using sparse convolutional kernels of different scales (e.g., 3×3, 5×5, 7×7, sparsity = 0.6, indicating that 60% of the weights in the convolutional kernel are set to zero, retaining only the weights of key regions, thereby focusing on the macroscopic deformation trend of the geometric contour) to capture deformation information at different levels (such as macroscopic tilt, local concavity). The surface roughness attention module dynamically adjusts the response weights of the multi-scale sparse convolutional network to rough regions according to the surface roughness distribution of the workpiece under test. For example, regions with high roughness (such as Ra values exceeding a threshold) are given higher weights to enhance the sensitivity to potential deformation hotspots. The surface roughness attention module uses the fractal dimension (Ra-FD) of the roughness distribution as a weighting factor to weight and amplify the feature map of rough regions while suppressing the response of smooth regions. Ultimately, the first branch outputs geometric features. The geometric features include the macroscopic deformation trend of the workpiece under test (such as the overall tilt and the location of the recessed area) and the weighted information of the surface roughness distribution.
[0036] The second branch is used to input the time-series data of the pressure distribution of the workpiece under test (such as the contact pressure value obtained by the contact sensor and the time-series changes in the displacement of the contact point), and to capture the dynamic patterns of pressure changes (such as sudden changes and periodic fluctuations) by combining a time-series fractal encoder with the fractal dimension calculation of a sliding window. Specifically, the time-series fractal encoder first applies a sliding window (e.g., a window size of 100 time steps) to the pressure distribution time-series data to calculate the fractal dimension of the pressure change within each window. Among these, a higher fractal dimension indicates a more complex dynamic pattern of pressure changes (such as abrupt changes or periodic fluctuations), potentially reflecting localized stress concentration in the workpiece or external disturbances. Secondly, a long short-term memory network is used to capture the long-term dependencies and abrupt change characteristics of pressure changes. Finally, the time-series characteristics of the pressure are output. The time series characteristics include the dynamic patterns of pressure distribution (such as abrupt change points and periodic fluctuation frequencies) and the corresponding fractal dimension.
[0037] The dual-modal spatiotemporal encoder also includes a fusion module, which is based on geometric features. and pressure time series characteristics The fractal dimension difference is used to dynamically adjust the fusion weights of the two modal features and generate fused features. The fusion feature It can be calculated using the following formula:
[0038] in, Indicates fusion characteristics; The weights represent the geometric features, with values ranging from (0,1). The weights represent the time-series features of pressure, and we have:
[0039] It represents the fractal dimension of the workpiece surface roughness, used to quantify the complexity of the rough regions on the workpiece surface. It represents the pressure time-series fractal dimension, used to characterize the dynamic complexity of changes in contact pressure on the workpiece surface.
[0040] The above formula achieves intelligent fusion of geometric features and pressure time-series features through dynamic weight allocation driven by fractal dimensions. This not only compensates for the lack of detail in low-resolution laser sensors but also enhances the deformation perception capability of key areas, providing a theoretical guarantee for high-precision detection under limited data conditions.
[0041] The fractal-driven deformable pyramid module is used for fusion features. To further refine the design and enhance the ability to locate deformation hotspots, the fractal-driven deformable pyramid module includes a roughness-fractal convolutional layer and a deformable pressure response layer. The roughness-fractal convolutional layer dynamically adjusts the receptive field of the convolutional kernel based on the surface roughness fractal dimension (Ra-FD). For example, in high-roughness regions (Ra-FD>1.1), a small kernel (3×3) is used to focus on details and capture local depressions or ripple distributions; in low-roughness regions, a large kernel (7×7) is used to capture global trends, avoiding over-focusing on irrelevant details. In regions of abrupt pressure changes (e.g., pressure gradient > threshold), the deformable pressure response layer introduces deformable convolutional kernels. By learning the offset, it adaptively adjusts the position and shape of the convolutional kernels to adaptively fit the pressure distribution contour, thereby enhancing the ability to capture local pressure abrupt changes.
[0042] The deformation hotspot generation and interpretation module includes an output head and a self-supervised optimization mechanism. The output head uses a lightweight deconvolutional network (such as a U-Net structure) to map the fused high-dimensional features back to a pixel-level deformation probability distribution, generating a two-dimensional probability map of deformation hotspots that reflects local deformation risk. This map visually displays highly sensitive areas on the workpiece surface due to changes in geometry and stress, i.e., potential deformation hotspot areas. In this way, the model can not only achieve visual localization of hotspot areas but also classify and interpret their causes based on probability intensity. Furthermore, the output head also outputs deformation causation analysis results, such as roughness-dominated (… Furthermore, the pressure fluctuations are gradual, indicating the presence of machining defects on the workpiece surface; pressure-dominated type ( Furthermore, the low surface roughness indicates that there is assembly stress concentration in the workpiece, and the composite type (both exceed the threshold and require priority intervention).
[0043] The self-supervised optimization mechanism introduces a fractal consistency loss, specifically expressed as follows:
[0044] in, This represents the fractal dimension of the model output. This represents the actual fractal dimension of the input data.
[0045] By introducing fractal consistency loss, the fractal dimension output by the workpiece deformation detection model can be constrained to be consistent with the calculated value of the input data, thus avoiding overfitting and improving the model's generalization ability to complex deformation patterns.
[0046] In another exemplary embodiment, in step S400, the step of activating the laser interferometer to generate a virtual plane as a reference plane, adaptively zeroing the sensor with the optimized layout using the reference plane as a reference, and recording the initial offset includes the following steps: S401: Select a high-precision laser interferometer to perform holographic scanning on the surface of the workpiece under test. Generate high-precision point cloud data through interference fringe analysis to construct the theoretical reference surface of the workpiece (such as an ideal cylindrical surface or plane). If the workpiece under test has slight deformation or installation error, the laser interferometer can adjust the parameters of the reference surface (such as plane tilt angle and curvature) through real-time feedback to ensure optimal matching between the reference surface and the actual geometric features of the workpiece.
[0047] S402: Based on the optimized sensor layout scheme in step S200, the high-resolution laser sensor, contact sensor, and micro-vibration sensor are installed on the surface of the workpiece to be measured or on a nearby support. Through the three-dimensional coordinate system of the laser interferometer, the physical position of each sensor (such as contact point, laser emitting / receiving end) is mapped to the reference plane coordinate system to ensure that the measurement direction of the sensor is consistent with the normal direction of the reference plane.
[0048] S403: Perform initial offset measurement: For contact sensors, record the initial pressure, displacement, and position coordinates when the sensor contacts the workpiece surface under no external force, as the zero-point reference. For laser sensors, calculate the distance deviation (e.g., flatness error) from the laser rangefinder to the reference surface using high-precision planar data from a laser interferometer, and adjust its zero point. For micro-vibration sensors, record the baseline noise level (e.g., frequency, amplitude) of the vibration spectrum under static conditions, as the vibration zero point.
[0049] In another exemplary embodiment, in step S600, the flatness measurement model includes: a multimodal pulse coding layer, a fractal-driven spatiotemporal graph network, and a dynamic deformation decoupling module connected in sequence. The multimodal pulse coding layer is used to convert preprocessed multimodal data and preprocessed scan data into pulse sequences to simulate the transmission mechanism of biological neural signals. Specifically, the multimodal pulse coding layer includes a first branch, a second branch, and a third branch. The first branch is used to process laser point cloud data and specifically includes a first input layer, a first pulse encoder, and a first fractal dimension adjuster. The first input layer is used to input the laser point cloud data. The first pulse encoder is a sparse convolutional pulse encoder used to convert the laser point cloud data into a pulse sequence, and the first fractal dimension adjuster dynamically adjusts the pulse trigger threshold based on the surface roughness fractal dimension (e.g., the higher the surface roughness fractal dimension, the lower the threshold, to enhance the sensitivity of rough areas). The second branch processes contact pressure time-series data, specifically including a second input layer, a second pulse encoder, and a second fractal dimension adjuster. The second input layer receives the contact pressure time-series data, the second pulse encoder extracts the pressure gradient using a time-series sliding window (window length = 10ms), and the second fractal dimension adjuster dynamically adjusts the pulse trigger threshold based on the fractal dimension of the pressure time series—for example, when pressure changes exhibit high-frequency abrupt changes or complex fluctuations (high fractal dimension), the threshold is lowered to capture more details. The third branch processes micro-vibration spectra, specifically including a third input layer, a third pulse encoder, and a third fractal dimension adjuster. The third input layer receives the micro-vibration spectrum, the third pulse encoder extracts the dominant frequency band energy in the micro-vibration spectrum through wavelet transform, and the third fractal dimension adjuster dynamically adjusts the pulse trigger threshold based on the fractal dimension of the vibration spectrum (such as the proportion of high-frequency components or waveform irregularities)—for example, when the vibration signal exhibits high complexity (such as random noise or multi-frequency interference), the threshold is lowered to enhance the response to subtle vibration modes.
[0050] In summary, the core function of the three fractal dimension regulators is to quantify the data complexity through fractal dimensions and dynamically adjust the sensitivity of pulse coding accordingly. This ensures that key deformation features of different modal data (such as rough regions, pressure mutations, and high-frequency vibrations) are accurately encoded in the form of pulse sequences, providing high-fidelity input for subsequent spatiotemporal graph networks and dynamic decoupling modules.
[0051] The fractal-driven spatiotemporal graph network includes a fractal-aware graph construction layer, a spatiotemporal graph convolutional layer, and a physical constraint loss layer. The fractal-aware graph construction layer constructs an initial fractal-aware graph based on the output of the multimodal pulse coding layer. The specific construction process is as follows: 1. Define nodes: including laser point nodes and pressure sampling point nodes. Laser point nodes are composed of point cloud data from laser sensors, and each node corresponds to a sampling point on the workpiece surface. Pressure sampling point nodes are composed of pressure time-series data from contact sensors, and each node corresponds to a pressure sampling point at a certain moment.
[0052] 2. Calculate edge weights based on the fractal dimension similarity formula shown below:
[0053] in, and These represent nodes in the spatiotemporal graph network. and nodes The fractal dimension value, Indicates scaling factor ( ), used for control and The strength of the impact of the difference on the weight.
[0054] The above calculation process includes: Step 1: Traverse all node pairs, for each pair of nodes... and nodes Calculate its fractal dimension difference
[0055] Step 2: Normalize all edge weights to [0,1] to ensure the stability of the graph structure; Step 3: Organize all normalized edge weights into an adjacency matrix .
[0056] The spatiotemporal graph convolutional layer includes spatial convolution and temporal convolution. Spatial convolution is used to aggregate the fractal features of adjacent nodes in the fractal-aware graph to capture spatial correlations. Specifically, the spatial convolution can fuse the fractal features (such as roughness and pressure gradient) of adjacent nodes into the target node through weighted summation. For example:
[0057] in, Represents a node In the The feature vector of the layer; Representing neighboring nodes In the The feature vector of the layer; Represents a node and Edge weights between them; Represents a node The set of neighboring nodes.
[0058] 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.
[0059] 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).
[0060] 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.
[0061] 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:
[0062] 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).
[0063] The dynamic deformation decoupling module includes a dual-channel attention mechanism and a causal inference head. The dual-channel attention mechanism includes a macro-channel (global attention) and a micro-channel (locally deformable convolution). The macro-channel is used to calculate the correlation weights of all nodes, focusing on the overall trend (such as the workpiece tilt direction), and calculates the output axial curvature based on the following formula:
[0064] in, Axial curvature refers to the degree of bending of the workpiece along the axial direction (e.g., the Z-axis), measured in radians. rad ) or angle (°); Indicates the first The contribution weight of each measurement point in the overall bending is in the range of [0,1]. Let be the change in axial displacement, representing the first... The height deviation of a measurement point relative to a theoretical reference plane (such as a virtual plane generated by a laser interferometer) in the Z-axis direction, in micrometers. μm ).
[0065] Microchannels are used to adjust the shape of the receptive field according to local gradients and calculate the local indentation depth and waviness density of the output workpiece surface based on the following formulas:
[0066] in, This indicates the maximum depth of a depression in a localized area on the workpiece surface, reflecting the degree of machining defects or stress concentration, and is measured in micrometers (µm). μm ); It represents the set of displacement values of each measurement point in a local area, usually a two-dimensional matrix or a subset of point cloud.
[0067]
[0068] in, Ripple density represents the number of ripple peaks per unit area, reflecting the density of periodic undulations on the surface, and is measured in ripples per mm. 2 ; This represents the total number of ripple peaks detected within a local area; This represents the surface area of a local region, in mm. 2 .
[0069] The causal inference head is used to stitch together macroscopic and microscopic features and output the deformation features of the workpiece under test through a fully connected layer.
[0070] In another exemplary embodiment, in step S600, the flatness measurement model is trained through the following steps: S601: Collect multimodal data and scanning data of workpieces with known flatness, and divide them into training set and validation set according to a ratio, such as 7:3. S602: Set training parameters. For example, the booster defaults to the tree-based model gbtree, learning_rate is set to 0.01, max_depth is set to 3, and the model is trained using the training set until the training meets the maximum number of iterations. S603: Validate the trained model using a validation set. If the mean absolute error (MAE), mean squared error (MSE), and root mean squared error (RMSE), which are used as performance evaluation metrics for the model, are all less than the thresholds (MAE threshold is set to 0.05, and MSE threshold is set to 0.001), then the model is validated. Otherwise, adjust the training parameters (e.g., adjust learning_rate to 0.005 and max_depth to 5) or expand the training set sample (e.g., adjust the split ratio to 8:2) and retrain the model until the model is validated.
[0071] In another exemplary embodiment, this application also provides a workpiece flatness measuring device based on the Industrial Internet of Things, such as... Figure 2 As shown, the device includes: a scanning module 100 for scanning the workpiece to be tested and obtaining scanning data; and a preprocessing module 200 for performing a first preprocessing on the scanning data. The identification module 300 is used to input the first preprocessed scanning data into the trained workpiece deformation detection model to generate a two-dimensional probability map of deformation hotspots for identifying potential deformation hotspot areas of the workpiece under test, and to optimize the sensor layout based on the identification results; the adaptive zeroing module 400 is used to start the laser interferometer to generate a virtual plane as a reference plane, and to perform adaptive zeroing of the optimized sensor with reference to the reference plane, and record the initial offset; the monitoring module 500 is used to monitor the potential deformation hotspot areas based on the adaptively zeroed sensor, obtain multimodal data, and perform a second preprocessing on the multimodal data; the model construction and training module 600 is used to construct and train a flatness measurement model, input the second preprocessed multimodal data and the preprocessed scanning data into the flatness measurement model to extract the deformation features of the workpiece under test; the division module 700 is used to divide the workpiece under test into multiple regions based on the deformation features of the workpiece under test; the calculation module 800 is used to calculate the flatness of each region and perform weighted summation to obtain the flatness data of the workpiece under test.
[0072] Optionally, the preprocessing module 200 includes: a timestamp alignment submodule for aligning the scan data and the multimodal data with timestamps; and a noise filtering submodule for filtering the timestamp-aligned scan data and the multimodal data with noise.
[0073] Based on the above embodiments, refer to Figure 3 The computer-readable storage medium of exemplary embodiments of this application will be described below. Please refer to [link / reference]. Figure 3The computer-readable storage medium shown is an optical disc 40, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it performs the steps described in the above method implementation, such as: performing a 360° scan of the workpiece to be tested to obtain scan data; preprocessing the scan data; inputting the preprocessed scan data into a trained workpiece deformation detection model to identify potential deformation hotspots in the workpiece to be tested, and optimizing the sensor layout based on the identification results; and activating a laser interferometer to generate a virtual plane as a reference plane for layout optimization. The sensor, after optimization, undergoes adaptive zeroing with a reference plane and records the initial offset. The sensor, after adaptive zeroing, monitors the potential deformation hotspot area to obtain multimodal data, which is then preprocessed. A flatness measurement model is constructed and trained. The preprocessed multimodal data and preprocessed scan data are input into the flatness measurement model to extract the deformation characteristics of the workpiece under test. Based on the deformation characteristics, the workpiece is divided into multiple regions. The flatness of each region is calculated and weighted to obtain the flatness data of the workpiece under test. The specific implementation methods of each step will not be repeated here.
[0074] It should be noted that the computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be described in detail here.
[0075] Based on the above embodiments, this application also provides an electronic device, which is described below with reference to... Figure 4 An electronic device for file downloading according to an exemplary embodiment of this application will be described.
[0076] Figure 4 A block diagram is shown of an exemplary electronic device 50 suitable for implementing embodiments of the present application. The electronic device 50 may be a computer system or a cloud server. Figure 4 The electronic device 50 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0077] like Figure 4 As shown, the electronic device 50 includes, but is not limited to: one or more processors or processing units 501, system memory 502, and bus 503 connecting different system components (including system memory 502 and processing unit 501).
[0078] Electronic device 50 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 50, including volatile and non-volatile media, removable and non-removable media.
[0079] System memory 502 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 5021 and / or cache memory 5022. Electronic device 50 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, ROM 5023 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 4 (Not shown in the image, usually referred to as "hard drive"). Although not shown in... Figure 4 The diagram illustrates that a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) can be provided. In these cases, each drive can be connected to bus 503 via one or more data media interfaces. System memory 502 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0080] A program / utility 5025 having a set (at least one) of program modules 5024 may be stored, for example, in system memory 502, and such program modules 5024 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment. Program modules 5024 typically perform the functions and / or methods described in the embodiments of this application.
[0081] Electronic device 50 can also communicate with one or more external devices 504 (such as a keyboard, pointing device, display, etc.). This communication can be performed through input / output (I / O) interface 505. Furthermore, electronic device 50 can also communicate with one or more networks (such as local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 506. Figure 4 As shown, network adapter 506 communicates with other modules of electronic device 50 (such as processing unit 501) via bus 503. It should be understood that, although... Figure 4 As not shown, it can be used in conjunction with electronic device 50 with other hardware and / or software modules.
[0082] The processing unit 501 executes various functional applications and data processing by running programs stored in the system memory 502. For example, it performs a 360° scan of the workpiece to be tested to obtain scan data; preprocesses the scan data; inputs the preprocessed scan data into a trained workpiece deformation detection model to identify potential deformation hotspot areas of the workpiece and optimizes the sensor layout based on the identification results; activates a laser interferometer to generate a virtual plane as a reference plane, uses the optimized sensor layout with the reference plane for adaptive zeroing, and records the initial offset; monitors the potential deformation hotspot areas with the adaptively zeroed sensor to obtain multimodal data, and preprocesses the multimodal data; constructs and trains a flatness measurement model, inputs the preprocessed multimodal data and preprocessed scan data into the flatness measurement model to extract the deformation characteristics of the workpiece; divides the workpiece into multiple regions based on the deformation characteristics; calculates the flatness of each region and performs weighted summation to obtain the flatness data of the workpiece. The specific implementation methods 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 download device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to the embodiments of this 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 and embodied by multiple units / modules.
[0083] In the description of this application, it should be noted that the terms "first", "second", and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0084] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0085] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0086] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0087] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0088] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions that enable a computer device (which may be a personal computer, a cloud server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0089] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for measuring workpiece flatness based on the Industrial Internet of Things, characterized in that, The method includes: The workpiece to be tested is scanned to obtain scan data; The scanned data undergoes a first preprocessing step; The first preprocessed scanning data is input into the trained workpiece deformation detection model to generate a two-dimensional probability map of deformation hotspots, so as to identify potential deformation hotspot areas of the workpiece under test, and optimize the sensor layout based on the identification results. The laser interferometer is activated to generate a virtual plane as a reference plane. The optimized sensor is then used to perform adaptive zeroing with reference to the reference plane, and the initial offset is recorded. Based on the sensor after adaptive zeroing, the potential deformation hotspot region is monitored to obtain multimodal data, and the multimodal data is then subjected to a second preprocessing. A flatness measurement model is constructed and trained. The pre-processed multimodal data and the pre-processed scanning data are input into the flatness measurement model to extract the deformation characteristics of the workpiece to be measured. The workpiece to be tested is divided into multiple regions based on its deformation characteristics; The flatness of each region is calculated separately and weighted to obtain the flatness data of the workpiece under test.
2. The method according to claim 1, characterized in that, Preprocessing of both the scan data and the multimodal data includes: The scan data and the multimodal data are timestamped and aligned. Noise filtering is performed on the timestamp-aligned scan data and the multimodal data.
3. The method according to claim 1, characterized in that, The workpiece deformation detection model includes: a dual-modal spatiotemporal encoder, a fractal-driven feature pyramid module, and a deformation hotspot generation and interpretation module connected in sequence.
4. The method according to claim 1, characterized in that, The flatness measurement model includes: a multimodal pulse coding layer, a fractal-driven spatiotemporal graph network, and a dynamic deformation decoupling module connected in sequence.
5. The method according to claim 1, characterized in that, The flatness measurement model is trained through the following steps: Multimodal data and scanning data of workpieces with known flatness are collected and divided into training set and validation set according to proportion; Set the training parameters and train the model using the training set until the training meets the maximum number of iterations. The trained model is validated using a validation set. During the validation process, if the mean absolute error (MAE), mean square error (MSE), and root mean square error (RMSE), which are used as performance evaluation indicators for the model, are all less than the threshold, the model is validated. Otherwise, the training parameters are adjusted or the training set is expanded to retrain the model until it is validated.
6. A workpiece flatness measuring device based on the Industrial Internet of Things, characterized in that, The device includes: The scanning module is used to scan the workpiece to be measured and obtain scan data; A preprocessing module is used to perform a first preprocessing on the scanned data; The identification module is used to input the first pre-processed scanning data into the trained workpiece deformation detection model, generate a two-dimensional probability map of deformation hotspots, identify potential deformation hotspot areas of the workpiece under test, and optimize the sensor layout based on the identification results. The adaptive zeroing module is used to start the laser interferometer to generate a virtual plane as a reference plane, and to use the optimized sensor to perform adaptive zeroing with reference to the reference plane, and record the initial offset. The monitoring module is used to monitor the potential deformation hotspot area based on the sensor after adaptive zeroing, obtain multimodal data, and perform a second preprocessing on the multimodal data; The model building and training module is used to build and train the flatness measurement model. The pre-processed multimodal data and the pre-processed scanning data are input into the flatness measurement model to extract the deformation features of the workpiece to be measured. The segmentation module is used to divide the workpiece under test into multiple regions based on the deformation characteristics of the workpiece under test; The calculation module is used to calculate the flatness of each region separately and perform weighted summation to obtain the flatness data of the workpiece under test.
7. The apparatus according to claim 6, characterized in that, The preprocessing module includes: The timestamp alignment submodule is used to align the scan data and the multimodal data with timestamps. The noise filtering submodule is used to perform noise filtering on the timestamp-aligned scan data and the multimodal data.
8. A storage medium, characterized in that, It includes instructions that, when executed on a computer, cause the computer to perform the method described in any one of claims 1 to 5.
9. An electronic device, characterized in that, The electronic device includes: Memory, processor, and computer programs stored in memory and executable on the processor, wherein, When the processor executes the program, it implements the method as described in any one of claims 1 to 5.
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
Photovoltaic panel flatness detection method and system in photovoltaic construction
CN119006467A
Pavement flatness detection method and system
CN119642752A
External wall insulation falling risk prediction method and system based on deep learning model
CN120296561A