A method, system and laser marking machine for optimizing laser marking path planning

By analyzing the 3D point cloud data and surface grayscale image during the laser marking process, and dynamically adjusting the path, the problem of low marking accuracy caused by deformation and path offset in the traditional static path planning method is solved, achieving higher marking accuracy and quality.

CN121467949BActive Publication Date: 2026-04-03QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Traditional static path planning methods cannot perceive the dynamic changes in the laser marking process in real time, resulting in low marking accuracy, abnormal deformation caused by heat accumulation, and marking misalignment or blurring caused by path deviation.

Method used

By acquiring 3D point cloud data and surface grayscale images, the deformation feature region and scanning feature region are analyzed, and the laser marking path is dynamically adjusted in conjunction with the path adjustment index.

Benefits of technology

It improves the accuracy of laser marking, solves the marking defects caused by deformation and path offset in traditional methods, and enhances the marking quality of complex patterns and irregularly shaped workpieces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121467949B_ABST
    Figure CN121467949B_ABST
Patent Text Reader

Abstract

This invention relates to the field of laser marking path planning technology, specifically to a laser marking path planning optimization method, system, and laser marking machine. The method includes: obtaining the deformation feature region of the current scanning layer based on the differences in morphological parameters and temperature between the point cloud data of the current scanning layer and the point cloud data of adjacent historical scanning layers; obtaining the scanning feature region of the current scanning layer at the current moment based on the changes in grayscale values ​​and temperature of each pixel in the surface grayscale image of the current scanning layer at the current moment compared to historical moments; obtaining a path adjustment index based on the deviation between the movement direction of the scanning feature region of the current scanning layer at the current moment and the initial planned path, combined with the deformation characteristics of the overlapping deformation feature regions corresponding to the scanning feature region; and adjusting the planned path for future moments based on the movement direction and the path adjustment index. This invention can improve marking accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of laser marking path planning technology, specifically to a laser marking path planning optimization method, system, and laser marking machine. Background Technology

[0002] Laser marking is based on the thermal or photochemical effects of lasers. A high-energy laser beam, controlled by a galvanometer, is used to etch the surface of workpieces of different materials along a planned path. This process modifies or removes the surface properties of the workpiece, resulting in markings such as text and patterns. Common workpiece materials include metals, glass, and ceramics.

[0003] During layered or continuous laser marking, differences in workpiece surface flatness (such as irregular surfaces) and the real-time thermal accumulation effect of laser scanning can cause geometric deformation between workpiece layers and dynamic offset of the scanning path within the same layer. Traditional static path planning methods (such as line-by-line scanning and fixed contour filling) cannot detect these dynamic changes in real time, nor can they dynamically adjust the scanning path according to the degree of deformation and the amount of path offset. This ultimately leads to abnormal deformation (such as warping and ablation) caused by thermal accumulation in the marking area, and marking misalignment or blurring caused by path offset, directly reducing marking accuracy and product yield. Summary of the Invention

[0004] To address the technical problem of low marking accuracy caused by the inability of traditional static path planning methods to detect dynamic changes, the present invention aims to provide a laser marking path planning optimization method, system, and laser marking machine. The specific technical solution adopted is as follows:

[0005] In a first aspect, the present invention provides a laser marking path planning optimization method, comprising:

[0006] The initial planned path for laser marking of the workpiece to be processed is obtained, as well as the 3D point cloud data of the current scanning layer at the current moment and the surface grayscale image of the workpiece to be processed during the laser marking process.

[0007] Based on the differences in morphological parameters and temperature between the point cloud data of the current scan layer and the point cloud data of adjacent historical scan layers, the point cloud data of the current scan layer is divided to obtain the deformation feature region of the current scan layer.

[0008] Based on the changes in grayscale value and temperature of each pixel in the surface grayscale image of the current scanning layer at the current moment compared with historical moments, the surface grayscale image is divided into regions to obtain the scanning feature region of the current scanning layer at the current moment.

[0009] Based on the deviation between the movement direction of the scan feature region of the current scan layer at the current moment and the initial planned path, and combined with the deformation characteristics of the deformation feature regions that overlap with the scan feature region, the path adjustment index of the scan feature region of the current scan layer at the current moment is obtained.

[0010] The planned path for future moments is adjusted based on the movement direction and path index of the scanned feature region of the current scan layer at the current moment.

[0011] Preferably, the step of dividing the point cloud data of the current scanned layer into deformation feature regions based on the differences in morphological parameters and temperature between the 3D point cloud data of the current scanned layer and the point cloud data of adjacent historical scanned layers specifically includes:

[0012] Obtain the historical scan layers preceding the current scan layer, as well as the reflectance value and maximum principal curvature of the point cloud data in each scan layer;

[0013] Based on the differences in reflectance and maximum principal curvature between each point cloud data in the current scan layer and the corresponding point cloud data in the historical scan layers, the deformation index of each point cloud data in the current scan layer is determined.

[0014] Based on the difference in deformation index between every two point cloud data in the current scan layer, and the difference in temperature change between every two point cloud data in the current scan layer and the corresponding point cloud data in the historical scan layer, the feature similarity between every two point cloud data in the current scan layer is obtained.

[0015] The adjacent point cloud data in the current scan layer whose feature similarity is greater than or equal to a preset similarity threshold are divided into the same deformation feature region.

[0016] Preferably, the step of obtaining the feature similarity between every two point cloud data in the current scan layer based on the difference in deformation index between every two point cloud data in the current scan layer and the difference in temperature change between every two point cloud data in the current scan layer and the corresponding point cloud data in historical scan layers specifically includes:

[0017] The ratio of the temperature value between each point cloud data in the current scanned layer and the corresponding point cloud data in the historical scanned layers is used as the relative temperature feature value.

[0018] Obtain the first difference in deformation index between any two point cloud data in the current scan layer, and obtain the second difference in relative temperature feature value between any two point cloud data in the current scan layer; perform negative correlation processing on the product of the first difference and the second difference to obtain the feature similarity between any two point cloud data in the current scan layer.

[0019] Preferably, the step of dividing the surface grayscale image into regions based on the grayscale value changes of each pixel in the current scanned layer at the current moment compared to historical moments and temperature changes, to obtain the scanning feature region of the current scanned layer at the current moment, specifically includes:

[0020] For the current scanned layer, the absolute value of the difference between the gray value of the selected pixel at the current time and the gray value at a historical time is obtained as the gray value difference value of the selected pixel; the difference between the temperature value of the selected pixel at a historical time and the temperature value at the current time is obtained as the temperature difference value of the selected pixel; where the selected pixel is any pixel in the surface grayscale image at the current time.

[0021] The ratio between the grayscale difference value of the selected pixel and the average grayscale difference value of all pixels in the surface grayscale image at the current time is obtained as the first ratio. The ratio between the temperature difference value of the selected pixel and the average temperature difference value of all pixels in the surface grayscale image at the current time is obtained as the second ratio. The product of the first ratio and the second ratio is normalized to obtain the scanning feature degree of the selected pixel.

[0022] The closed region formed by the pixels in the current grayscale image that have a scanning feature degree greater than or equal to the preset scanning threshold is taken as the scanning feature region of the current scanning layer at the current moment.

[0023] Preferably, the step of obtaining the path adjustment index of the scanning feature region of the current scanning layer at the current moment based on the deviation between the movement direction of the scanning feature region of the current scanning layer at the current moment and the initial planned path, combined with the deformation characteristics of the deformation feature regions corresponding to the overlapping deformation feature regions of the scanning feature region, specifically includes:

[0024] For the current scanned layer, the direction from the scanned feature region of the previous historical moment to the corresponding scanned feature region of the current moment is taken as the actual movement direction of the current scanned layer in the scanned feature region of the current moment.

[0025] The consecutive historical moments in which the similarity to the actual movement direction of the scanned feature region at the current moment is less than a preset direction threshold constitute the reference time period of the scanned feature region at the current moment.

[0026] At the current moment, obtain the pixel point belonging to the initial planning path on the perpendicular line of the actual movement direction of the scanned feature region, and obtain the planned movement direction of the reference point on the initial planning path.

[0027] Based on the similarity between the actual and planned movement directions at each moment within the reference time period corresponding to the scanned feature region, as well as the deformation index and scan feature degree at each moment within the reference time period, the path adjustment index of the scanned feature region of the current scanned layer at the current moment is obtained.

[0028] Preferably, the step of obtaining the path adjustment index of the current scanning layer's scanning feature region at the current moment based on the similarity between the actual and planned movement directions at each moment within the reference time period corresponding to the scanning feature region, and the deformation index and scanning feature degree corresponding to each moment within the reference time period, specifically includes:

[0029] Based on the volume of the deformation feature region in the current scan layer, the mean of the deformation index of all point cloud data, and the mean of the temperature value of all point cloud data at the current moment, the influence of the deformation feature region in the current scan layer at the current moment is obtained.

[0030] For the current scanning layer, obtain the cosine similarity between the actual movement direction of the scanning feature region at each time and the planned movement direction at the corresponding time within the reference time period corresponding to the current scanning feature region. Take the earliest time corresponding to all cosine similarities less than the preset offset threshold as the initial offset time. The time period from the initial offset time to the current time is the offset time period.

[0031] The first coefficient is obtained by summing the actual movement directions at all times within the offset time period of the scanned feature region and cosine similarity between the actual movement direction and the planned movement direction; the second coefficient is obtained by summing the average of all influence levels of the scanned feature region at all times within the offset time period; and the third coefficient is obtained by summing the scanned feature degree of the scanned feature region at all times within the offset time period.

[0032] The path adjustment index of the scan feature region of the current scan layer at the current time is obtained based on the first coefficient, the second coefficient, and the third coefficient; the first coefficient is negatively correlated with the path adjustment index, and the second coefficient and the third coefficient are both positively correlated with the path adjustment index.

[0033] Preferably, adjusting the planned path for future times based on the movement direction and path adjustment index of the current scan layer's scanned feature region at the current moment specifically includes:

[0034] For the current scanning layer, the sum of the actual movement directions of the scanned feature region at the current time offset time interval is obtained as the initial movement direction of the scanned feature region at future time intervals;

[0035] Based on the actual moving speed of the laser probe and the unit time length, determine the moving distance of the scanned feature area at the current moment;

[0036] Based on the path adjustment index of the scanned feature region of the current scan layer at the current time, the initial movement direction at future time is corrected to obtain the predicted movement direction of the scanned feature region at future time.

[0037] Based on the predicted movement direction and the distance traveled, the location of the planned path at future times is determined.

[0038] Preferably, the step of correcting the initial movement direction at future times based on the path adjustment index of the scanned feature region of the current scan layer at the current time, to obtain the predicted movement direction of the scanned feature region at future times, specifically includes:

[0039] For the current scanning layer, the product of the path adjustment index and the angle corresponding to the opposite direction of the initial movement direction is rounded to obtain the direction compensation degree. The planned movement direction at the future time is obtained, and the sum of the planned movement direction at the future time and the direction compensation degree is used as the predicted movement direction of the scanning feature region at the future time.

[0040] Secondly, the present invention provides a laser marking path planning and optimization system, which is used to implement the steps of a laser marking path planning and optimization method, the laser marking path planning and optimization system comprising:

[0041] The data acquisition module is used to acquire the initial planned path for laser marking of the workpiece to be processed, as well as the three-dimensional point cloud data of the current scanning layer at the current moment and the surface grayscale image of the workpiece to be processed during the laser marking process.

[0042] The deformation analysis module is used to divide the point cloud data of the current scan layer into deformation feature regions based on the differences in morphological parameters and temperature between the point cloud data of the current scan layer and the point cloud data of adjacent historical scan layers.

[0043] The scanning analysis module is used to divide the surface grayscale image into regions based on the changes in grayscale values ​​of each pixel in the current scanning layer at the current moment and the changes in temperature at historical moments, so as to obtain the scanning feature region of the current scanning layer at the current moment.

[0044] The adjustment analysis module is used to obtain the path adjustment index of the scanning feature region of the current scanning layer at the current moment based on the deviation between the movement direction of the scanning feature region of the current scanning layer at the current moment and the initial planned path, combined with the deformation characteristics of the deformation feature region corresponding to the overlapping deformation feature region of the scanning feature region.

[0045] The path adjustment module is used to adjust the planned path for future time steps based on the movement direction and path adjustment index of the scanned feature region of the current scan layer at the current time.

[0046] Thirdly, the present invention provides a laser marking machine, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program, when executed by the processor, implements the steps of a laser marking path planning optimization method.

[0047] The embodiments of the present invention have at least the following beneficial effects:

[0048] This invention first analyzes the morphological characteristics and thermal accumulation distribution of the three-dimensional point cloud data between layers of the workpiece to be processed, and divides the deformation feature regions at the three-dimensional point cloud data level, providing a data foundation for subsequent analysis of the influence of the current scanning layer on the laser marking of future scanning layers. Then, at the two-dimensional surface grayscale image data level, the thermal accumulation at the current moment is quantified by the grayscale changes and temperature changes of pixels, dividing the scanning feature regions at the two-dimensional data level, reflecting the continuous area of ​​actual laser action at the current moment, providing a precise basis for subsequent judgment of path deviation and adjustment of the marking path. Furthermore, by combining the results of the three-dimensional deformation feature analysis and the two-dimensional scanning feature analysis, the degree of adjustment required for the planned path at the current moment can be quantified, and adjustments can be made based on the deviation between the current movement direction and the initial planned path, obtaining the path adjustment index of the scanning feature region at the current moment, reflecting the degree of adjustment required for the marking path in the current scanning feature region. Finally, based on the movement direction and the degree of path adjustment, the adjustment operation is implemented to obtain the adjusted planned path for the future moment. This invention solves the core defects of traditional solutions such as marking misalignment, deformation, and blurring, and can improve the marking accuracy of complex patterns and irregularly shaped workpieces. Attached Figure Description

[0049] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a flowchart of the steps of a laser marking path planning and optimization method provided by the present invention;

[0051] Figure 2 This is a flowchart of the steps of the method for obtaining the deformation feature region of the current scanning layer provided by the present invention. Detailed Implementation

[0052] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a laser marking path planning optimization method, system, and laser marking machine proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0054] The following description, in conjunction with the accompanying drawings, details the specific solutions for a laser marking path planning and optimization method, system, and laser marking machine provided by this invention.

[0055] Please see Figure 1 The diagram illustrates a flowchart of a laser marking path planning optimization method according to an embodiment of the present invention. The method includes the following steps:

[0056] Step S100: Obtain the initial planned path for laser marking of the workpiece to be processed, as well as the three-dimensional point cloud data of the current scanning layer at the current moment and the surface grayscale image of the workpiece to be processed during the laser marking process.

[0057] First, collecting geometric, material, and thermal state data of the workpiece at a rate of seconds during the marking process is the core data source for subsequent quantitative analysis.

[0058] It should be noted that in this embodiment, the 3D scanner, 2D camera, and thermal infrared camera are fixed at preset points on the marking workbench. The workbench's reference origin is used as the origin of the global coordinate system. Calibration images and point clouds of each device are collected using a checkerboard calibration board. The Zhang Zhengyou calibration method is then used to calculate the coordinate transformation matrix between the devices, achieving spatial coordinate unification of data from multiple devices. This method is well-known and will not be elaborated upon here.

[0059] The laser marking process for a workpiece typically involves multiple repeated scanning operations on the same plane. For example, to make the marking color darker, the same workpiece may be scanned multiple times, with each scan corresponding to a different scanning layer. After marking is completed on previous scanning layers, a 3D scanner is used to acquire full-area 3D point cloud data of the workpiece before marking the current scanning layer. During the marking process on the current scanning layer, 3D point cloud data of the current scanning area is acquired at a frequency of 10Hz. Statistical filtering for noise reduction and moving least squares smoothing are performed on the original point cloud to remove noise points and optimize the point cloud morphology.

[0060] Simultaneously, a 2D camera is used to acquire a two-dimensional surface image of the workpiece to be processed at a frequency of 10Hz. This image undergoes preprocessing operations such as filtering and grayscale conversion to obtain a surface grayscale image. A thermal infrared camera is then used to acquire a thermal infrared image of the workpiece, where pixel values ​​reflect the temperature value at the corresponding pixel location. Finally, path planning is performed on the surface grayscale image to obtain an initial planned path. The path planning method can employ existing conventional marking path planning methods, such as path planning algorithms, which will not be elaborated upon here.

[0061] It should be understood that there are multiple scanning layers in the laser marking process. Each scanning layer corresponds to a surface grayscale image and a thermal imaging image at each time. Each scanning layer corresponds to a set of three-dimensional point cloud data.

[0062] In some embodiments, before marking, the marking machine control software automatically divides the pattern into "functional attributes": for example, an outline area (such as pattern boundaries); a fill area (such as the internal area of ​​the pattern); and a detail area (such as text texture). This division is a well-known technique in the field of laser marking and will not be elaborated here. For each functional area, marking path planning is performed to obtain an initial planned path. The analysis method for each functional area is the same; this embodiment uses any one functional area as an example for explanation. It should be understood that for workpieces without division, the subsequent analysis process of this embodiment can be directly performed.

[0063] Step S200: Based on the differences in morphological parameters and temperature between the point cloud data of the current scan layer and the point cloud data of adjacent historical scan layers, the point cloud data of the current scan layer is divided to obtain the deformation feature region of the current scan layer.

[0064] The core of the analysis process of deformation feature regions is to locate continuous regions with consistent shape and temperature changes caused by heat accumulation or material modification after laser marking. It mainly involves quantifying the degree of deformation of point cloud data, judging the common origin of deformation of adjacent point clouds, and then integrating multi-dimensional features to divide feature regions with deformation potential. This provides accurate regional basis for subsequent evaluation of the impact of deformation on subsequent scanning paths and adjustment of marking paths.

[0065] Firstly, during laser marking, the deformation of the workpiece surface is reflected in both surface material modification (such as changes in reflectivity caused by oxidation) and geometric shape changes (such as changes in surface curvature caused by thermal stress). It is necessary to integrate the feature analysis results of the two dimensions through the deformation index to achieve accurate quantification of the deformation of single-point cloud data.

[0066] Secondly, single-point cloud deformation cannot reflect the homogeneity of deformation within a region. For example, deformation in the same region may be caused by the same heat accumulation. Adjacent point clouds should be classified into the same category. It is necessary to combine deformation consistency characteristics and temperature change consistency characteristics to lock adjacent point clouds with homogeneous deformation by the degree of feature similarity.

[0067] Finally, threshold filtering is used to aggregate points into regions, ensuring that the divided regions are continuous and have uniform deformation characteristics, providing a basis for subsequent regional processing of path adjustment.

[0068] In this regard, such as Figure 2 As shown, the method for obtaining the deformation feature region of the current scanning layer can be implemented by steps S201 to S203.

[0069] Step S201: Obtain the historical scan layers before the current scan layer, as well as the reflectance value and maximum principal curvature of the point cloud data in each scan layer; based on the reflectance difference and maximum principal curvature difference between each point cloud data in the current scan layer and the corresponding point cloud data in the historical scan layers, determine the deformation index of each point cloud data in the current scan layer.

[0070] In laser marking operations, the marking patterns are often complex, requiring multiple scans to achieve the desired color depth and luster in the marking area. To avoid defects such as workpiece warping and uneven color distribution in the marking area caused by uneven thermal stress distribution, a layered laser scanning process is commonly used in industrial practice. In this layered scanning process, the path planning for future scanning layers must fully consider the actual thermal deformation state of previous scanning layers. For example, irreversible thermal deformation can occur in previous scanning layers after laser irradiation, causing the actual structural state of the workpiece to deviate from the initial preset path's adaptation benchmark. This can lead to problems such as marking alignment deviation and pattern distortion in future scanning layers, severely affecting the final marking effect.

[0071] Based on this, it is necessary to rely on the quantitative analysis of interlayer deformation state to determine the degree of influence of different regions of the historical scanned layer on the marking path of the future scanned layer. Taking the current scanned layer as an example, the overall deformation degree can be accurately quantified based on the difference between the 3D scan result after the completion of the scan and the historical structural data before the scan. Furthermore, the current scanned layer can be divided into deformation partitions according to the distribution range and deformation amplitude of the deformation, reflecting the specific influence of each deformation partition of the current scanned layer on the marking path of the future scanned layer, and providing a core basis for the adaptive adjustment of the path of the future scanned layer.

[0072] As a specific example, this embodiment uses the previous scan layer adjacent to the current scan layer as the historical scan layer, and then obtains the reflectance and maximum principal curvature of each point cloud data in the current scan layer and the historical scan layer. It should be understood that point cloud data typically contains three-dimensional coordinates and intensity values. The intensity values ​​are affected by the surface features of the object (e.g., color or reflectivity) and sensor parameters. In this embodiment, the intensity values ​​of the point cloud data are used as the corresponding reflectance. The maximum principal curvature is an important indicator describing the local geometry of a surface at a certain point, representing the maximum curvature in all possible directions. High curvature indicates a high density of point clouds or a large change in direction, while low curvature indicates a sparse distribution of point clouds or a small change in direction. The methods for obtaining these values ​​are all well-known techniques and will not be elaborated upon here.

[0073] As a concrete example, based on the three-dimensional coordinates of each point cloud data in the current scan layer, the corresponding point cloud data in the historical scan layer can be determined. It should be understood that if there is no point cloud data with completely identical three-dimensional coordinates in the historical scan layer, the point cloud data with the closest Euclidean distance to the point cloud data in the current scan layer should be selected from the point cloud data in the historical scan layer to obtain the corresponding point cloud data in the historical scan layer for each point cloud data in the current scan layer.

[0074] Furthermore, taking any point cloud data in the current scan layer as the target point cloud, the absolute value of the difference between the reflectance of the target point cloud and the reflectance of the corresponding point cloud data in the historical scan layer is obtained as the first difference. The absolute value of the difference between the maximum principal curvature of the target point cloud and the maximum principal curvature of the corresponding point cloud data in the historical scan layer is normalized to obtain the second difference. It should be understood that the minimum-max normalization method can be used to normalize the absolute value of the difference between the maximum principal curvatures; this is not a restriction. Normalization can avoid the influence of different dimensions on the feature fusion results.

[0075] The sum of the reflectance of the target point cloud and the reflectance of the corresponding point cloud data in the historical scan layer is obtained as the comprehensive reflectance. The ratio between the first difference and the comprehensive reflectance is calculated, and then the product of this ratio and the second difference is calculated to obtain the deformation index of the target point cloud. It should be noted that, to ensure that the calculation results are meaningful, in this embodiment, when performing fractional operations, if the denominator is 0, a parameter tuning factor can be added to the denominator to prevent the denominator from being 0. This parameter tuning factor is a very small positive number. For example, the value of this parameter tuning factor can be 0.01. Its specific value can be set by the implementer according to the actual situation, and this application embodiment does not make specific limitations.

[0076] The first difference reflects the reflectivity difference of the same point cloud data in adjacent scanning layers. The ratio between the first difference and the overall reflectivity reflects the percentage of absolute difference in reflectivity under the combined reflectivity levels of two adjacent scanning layers. The second difference reflects the maximum principal curvature difference of the same point cloud data in adjacent scanning layers. Laser marking changes the surface material properties of the workpiece (such as oxidation and etching), and the reflectivity difference can intuitively reflect the severity of this change. The maximum principal curvature is a key parameter characterizing the geometric shape of the workpiece surface, and the difference in maximum principal curvature can accurately quantify the degree of spatial distortion of a single point. By combining the results of the difference analysis from both aspects, the deformation characteristics of a single point cloud data are reflected. Furthermore, by fusing the results of the difference analysis from both aspects through a product, it is possible to effectively characterize the stronger deformation characteristics when both feature dimensions change significantly at the same time.

[0077] Step S202: Based on the difference in deformation index between every two point cloud data in the current scan layer, and the difference in temperature change between every two point cloud data in the current scan layer and the corresponding point cloud data in the historical scan layer, the feature similarity between every two point cloud data in the current scan layer is obtained.

[0078] It should be understood that the core objective of feature similarity is to measure the comprehensive similarity between two point cloud data sets based on the differences in their deformation and temperature change trends. The smaller the difference, the stronger the similarity.

[0079] Specifically, the first step is to use the ratio of the temperature values ​​of each point cloud data in the current scan layer to the corresponding point cloud data in the historical scan layer as the relative temperature feature value.

[0080] It should be understood that, in this embodiment, based on a unified coordinate system, the temperature values ​​in the two-dimensional pixel coordinate system of the thermal infrared camera are mapped to the three-dimensional point cloud coordinate system output by the 3D scanner. For each point in the three-dimensional point cloud, its corresponding pixel in the concurrent thermal infrared image is found through spatial coordinate matching. The thermal imaging temperature value of this pixel is the temperature value of the three-dimensional point cloud data. For cases where there is a one-to-many or many-to-one relationship between the point cloud and thermal infrared pixels, the temperature assignment is completed using the mean or nearest-neighbor matching method. It should be noted that the temperature value used in the feature similarity calculation should be the temperature value in the current thermal imaging image to reflect the current temperature performance.

[0081] The second step is to obtain the first difference in deformation index between any two point cloud data in the current scanning layer, and the second difference in relative temperature feature value between any two point cloud data in the current scanning layer; and to obtain the feature similarity between any two point cloud data in the current scanning layer by performing negative correlation processing on the product of the first difference and the second difference.

[0082] As a specific example, this embodiment uses any two point cloud data points in the current scan layer as an example for illustration. The point cloud data in the current scan layer... and point cloud data The method for obtaining the feature similarity between them can be expressed by the formula:

[0083]

[0084] in, This represents the point cloud data in the current scan layer. and point cloud data The degree of feature similarity between them, where k represents the current scanned layer and k-1 represents the historical scanned layers. This indicates the point cloud data of the current scan layer. The deformation index, This indicates the point cloud data of the current scan layer. The deformation index, This indicates the point cloud data of the current scan layer. Temperature value, This indicates the point cloud data of the current scan layer. The temperature values ​​corresponding to the point cloud data in the historical scan layer. This indicates the point cloud data of the current scan layer. Temperature value, This indicates the point cloud data of the current scan layer. The temperature values ​​corresponding to the point cloud data in the historical scan layer. This represents an exponential function with the natural constant e as its base.

[0085] First difference It reflects the differences in deformation index, ensures the consistency of deformation degree within the region, and avoids misclassifying large deformation points and no deformation points into the same region. Representing point cloud data The relative temperature characteristic values ​​reflect the point cloud data. The relative temperature changes of adjacent scan layers Representing point cloud data The relative temperature characteristic values ​​reflect the point cloud data. The second difference lies in the relative temperature changes between adjacent scan layers. This reflects the differences in temperature change trends. Laser marking deformation is strongly correlated with heat accumulation. Unifying the temperature change trend can ensure the correlation between "heat and deformation" in the region and avoid the region division from deviating from the actual process.

[0086] Step S203: Divide the adjacent point cloud data in the current scanning layer that have a feature similarity greater than or equal to a preset similarity threshold into the same deformation feature region.

[0087] If the feature similarity between two point cloud data in the current scanning layer is greater, it indicates that the deformation degree and temperature cumulative product of the two point cloud data are similar, and they can be divided into the same region. Based on this, firstly, point cloud data with feature similarity greater than or equal to a similarity threshold are selected, and the region formed by continuous point cloud data is taken as the deformation feature region. In this embodiment, the similarity threshold can be 0.7, and the implementer can set it according to the specific implementation scenario. Furthermore,

[0088] Therefore, the deformation feature region is a regional division for the inter-layer dimension (from layer k-1 to layer k). Its core function is to quantify the residual impact of thermal accumulation and geometric deformation from historical scans on future scans, which is the root cause of path deviation. For example, high temperatures in historical scans can cause localized warping of the workpiece, directly resulting in spatial misalignment between the workpiece surface and the preset path during future scans. This deviation is caused by changes in the workpiece's shape and is an inherent path adaptation problem. It should be noted that this analysis step is not performed if historical scans are unavailable for the initial scan, as the initial scan does not exhibit significant changes that could affect the scanning results of subsequent scans.

[0089] Step S204: Based on the volume of the deformation feature region in the current scan layer, the mean of the deformation index of all point cloud data, and the mean of the temperature value of all point cloud data at the current moment, obtain the degree of influence of the deformation feature region in the current scan layer at the current moment.

[0090] The core of this impact level assessment is to quantify the potential interference intensity of deformation feature regions on subsequent upper-level labeling paths. The identified deformation feature regions only achieve the aggregation of regions with deformation homology, but the impact of different regions on the upper-level paths varies significantly. Some regions, although showing obvious deformation, are extremely small in scale and have negligible impact on the overall labeling; others not only experience severe deformation but also have large-area heat accumulation, which will seriously interfere with the accuracy of the upper-level paths. Therefore, it is necessary to integrate three dimensions—region size, overall deformation intensity, and relative heat accumulation degree—to construct an impact level index and achieve a comprehensive quantification of the region's interference capability.

[0091] The first step is to obtain the volume percentage of each deformation feature region in the current scanned layer as the first feature of each deformation feature region.

[0092] The volume of a deformation feature region, which can be represented by the volume of its smallest bounding cube, determines the spatial extent of its influence. A larger volume indicates a wider deformation coverage area, meaning that if a future scanning layer path passes through this region, the required path length and range for adjustment will be greater. Conversely, a small volume deformation feature region will only cause local path deviations, with limited overall impact. This parameter provides a spatial weight for the degree of influence, ensuring that large-scale deformation regions are given priority.

[0093] The second step is to calculate the mean value of the deformation index of all point cloud data in each deformation feature region in the current scanning layer, and obtain the second feature of each deformation feature region.

[0094] The mean value of the deformation index of all point clouds within a region reflects the overall degree of deformation intensity in that region. A higher mean value indicates more significant surface material modification (changes in reflectivity) and geometric curvature bending (changes in principal curvature) within the region. If the laser probe moves along a preset path during future layer scanning, discrepancies between the actual workpiece shape and the preset path can lead to problems such as marking misalignment and uneven etching depth. This parameter provides a core quantitative basis for the deformation intensity dimension, reflecting the region's inherent interference capability.

[0095] The third step is to calculate the ratio between the average temperature value of each deformation feature region in the current scanned layer and the average temperature value of all deformation feature regions, thus obtaining the third feature of each deformation feature region.

[0096] The ratio of the average temperature of a region to the average temperature of all deformed regions in the current scanned layer reflects the relative degree of heat accumulation in that region. A larger ratio indicates a more concentrated thermal stress in the deformed region. During subsequent scans of future layers, residual heat accumulation may trigger secondary deformation (such as increased thermal expansion), further amplifying the risk of path deviation. Simultaneously, high-temperature regions may also affect the laser's energy absorption efficiency, reducing marking quality. This parameter supplements the assessment of the thermal risk dimension, taking into account the potential deterioration trend of deformation.

[0097] The fourth step is to use the product of the first feature, the second feature, and the third feature as the degree of influence of each deformation feature region.

[0098] As a concrete example, the method for obtaining the degree of influence can be expressed by the formula:

[0099]

[0100] in, This indicates the influence degree of the nth deformation feature region in the current scan layer, where k represents the current scan layer. This represents the volume of the smallest bounding cube of the nth deformation feature region in the current scan layer. This represents the volume of the smallest bounding cube containing all point cloud data in the previous scan layer. This represents the mean of the deformation indexes of all point cloud data in the nth deformation feature region of the current scan layer. This represents the average temperature value of all point cloud data in the nth deformation feature region of the current scan layer at the current moment. This represents the average temperature value of all point cloud data in the current scan layer at the current moment.

[0101] The first feature is the spatial coverage of the deformation feature region, which reflects the volume ratio of the deformation feature region. The larger the volume, the wider the interference range on the future scanning layer path. The second characteristic is the average deformation of the region. It reflects the severity of the overall deformation characteristics of the deformation feature area and is the core basis for the path adjustment range. The third characteristic is the regional temperature proportion. The relative level of heat accumulation in the deformation feature region is quantified. High-temperature regions are prone to secondary deformation and should be given a higher influence weight.

[0102] The features of the above three dimensions need to be integrated into an impact index through multiplication. The larger the product value, the wider the spatial coverage of the deformation feature area, the higher the deformation intensity, and the more prominent the thermal accumulation. The stronger the interference and potential risk to the future scanning layer marking path, the more important it is to make significant adjustments to the future scanning layer path corresponding to this area (such as increasing the path offset or reducing the scanning speed). The smaller the product value, the more limited the regional impact. Only minor path corrections or maintaining the original path are necessary.

[0103] Step S300: Based on the changes in grayscale values ​​and temperature of each pixel in the surface grayscale image of the current scanning layer at the current moment compared to historical moments, the surface grayscale image is divided into regions to obtain the scanning feature region of the current scanning layer at the current moment.

[0104] The core of scanning the feature region is to locate the continuous area where the laser is actually acting at the current moment, so as to provide a precise basis for judging the path deviation and adjusting the marking path.

[0105] Firstly, during the laser marking process, the area on the workpiece surface affected by the laser will simultaneously undergo physical modification (such as etching and oxidation leading to changes in grayscale values) and thermal effects (such as energy absorption causing temperature increases). These two types of changes are the core basis for distinguishing between the scanned area and the non-scanned area, and it is necessary to extract the two-dimensional difference values ​​of the pixels to achieve preliminary screening.

[0106] Secondly, the grayscale difference value and temperature difference value of a single pixel lack a global reference. They need to be relatively quantified by the ratio with the global mean, and then integrated into the degree of scanning features to uniformly measure the scanning correlation strength of a single point.

[0107] Finally, by using a threshold to filter highly correlated points and aggregating them into closed regions, the actual spatial range of the scan can be accurately locked.

[0108] Therefore, the method for obtaining the scanned feature region of the current scanned layer at the current moment can be implemented by the following steps.

[0109] Step S301: For the current scanned layer, obtain the absolute value of the difference between the gray value of the selected pixel at the current time and the gray value at a historical time as the gray value difference value of the selected pixel; obtain the difference between the temperature value of the selected pixel at a historical time and the temperature value at the current time as the temperature difference value of the selected pixel; wherein, the selected pixel is any pixel in the surface grayscale image at the current time.

[0110] In this embodiment, the previous time adjacent to the current time is taken as the historical time. The grayscale difference value represents the grayscale difference of the same pixel in the surface grayscale image of the current scanned layer at different times. The temperature difference value represents the temperature value change of the selected pixel from the historical time to the current time. A value greater than 0 indicates that the temperature value has increased from the historical time to the current time, and a value less than 0 indicates that the temperature value has decreased from the historical time to the current time.

[0111] The essence of laser marking is to change the surface material of the workpiece through thermal and photochemical effects (such as metal oxidation, glass etching, and ceramic modification). The change in the surface material of the workpiece will be directly reflected in the fluctuation of the gray value of the image (such as the increase in roughness of the etched area leading to a decrease in gray value, and the formation of an oxide layer leading to an increase in gray value).

[0112] Step S302: Obtain the ratio between the grayscale difference value of the selected pixel and the average grayscale difference value of all pixels in the surface grayscale image at the current time as the first ratio; obtain the ratio between the temperature difference value of the selected pixel and the average temperature difference value of all pixels in the surface grayscale image at the current time as the second ratio; normalize the product of the first ratio and the second ratio to obtain the scanning feature degree of the selected pixel.

[0113] The grayscale difference value of a selected pixel directly represents the local grayscale difference at that point. The average grayscale difference value of all pixels in the surface grayscale image at the current moment reflects the overall grayscale difference at the current moment. The ratio of the two (the first ratio) is a normalization process for the local grayscale difference, quantifying the relative intensity of single-pixel material modification relative to the global level, making the material modification features at different times comparable.

[0114] The temperature difference value of a selected pixel directly represents the local heat accumulation amplitude at that point; the average temperature difference value of all pixels in the current grayscale image represents the overall thermal background at that moment. The ratio of these two (the second ratio) is a normalization process for local thermal changes, and its core function is to eliminate the interference of global thermal environment fluctuations (such as the overall temperature rise at time t due to equipment preheating, or baseline drift caused by changes in ambient temperature), highlighting the relative thermal activity of the local area. The larger the value of the second ratio, the greater the possibility that there is local heat concentration at the corresponding pixel, and that it is a region of dramatic thermal change caused by laser scanning.

[0115] By fusing the feature analysis results from both aspects through a product, the system can accurately pinpoint the actual scanning area exhibiting both material modification and thermal drastic changes when both feature analysis results are significant, thus aligning with the essential function of laser marking. In this embodiment, the normalization method can employ a minimization-max normalization method, and no specific limitation is imposed.

[0116] Step S303: The closed region formed by the pixels in the surface grayscale image at the current moment whose scanning feature degree is greater than or equal to the preset scanning threshold is taken as the scanning feature region of the current scanning layer at the current moment.

[0117] In the current scan layer, the higher the scan feature degree of a selected pixel in the current grayscale image, the greater the possibility of heat accumulation at the location of that pixel, and thus the higher the scan risk, which may have a certain offset effect on the scan result of the next scan layer. In this embodiment, the scan threshold is set to 0.5 to filter out pixels that show an upward trend in temperature and cause local accumulation. The closed region formed by pixels that meet the threshold requirement is taken as the scan feature region of the current scan layer at the current moment.

[0118] It should be noted that the corresponding scanning feature region can be obtained using the same method for each time point before the current time. Feature analysis is not performed for the initial time point because an adjacent previous time point cannot be obtained; this is because there is generally no significant heat accumulation in the initial stage of laser scanning.

[0119] The scanning feature region is the result of dividing the same scanning layer into regions along a temporal dimension. Its core is to capture and accurately lock onto the real scanning area of ​​the current scanning layer, which simultaneously exhibits material modification and dramatic thermal changes, aligning with the essential function of laser marking. The dynamic offset state within the scanning process is a direct manifestation of path deviation. For example, mechanical jitter of the laser probe or instantaneous offset caused by a sudden increase in local thermal stress during the current scan are deviations that occur in real time during the scanning process and represent sudden path control issues.

[0120] During laser marking, heat accumulation is the core cause of workpiece deformation and marking defects. The temperature distribution of the scanning feature area reflects the degree of thermal stress concentration. Scanning feature areas with high scanning feature index are often high-risk areas where thermal stress is easily out of control and subsequent deformation is likely to occur, providing spatial location of thermal risks for subsequent path adjustment.

[0121] Step S400: Based on the deviation between the movement direction of the current scan feature region of the current scan layer at the current moment and the initial planned path, and combined with the deformation characteristics of the deformation feature regions corresponding to the overlapping scan feature regions, the path adjustment index of the scan feature region of the current scan layer at the current moment is obtained.

[0122] Laser marking path offset is the result of the combined effects of historical causes of interlayer deformation and real-time dynamic factors within the same layer. By simultaneously considering the feature partitioning of both deformation feature regions and scanning feature regions, a complete basis for root cause attribution and immediate response can be provided for path adjustment. This not only solves the historical morphology adaptation problem but also responds to real-time scanning deviations, achieving precise dynamic adjustment of the path.

[0123] The core of the path adjustment index is to quantify the urgency and adjustment range of path correction in the scanning feature area, providing a core quantitative basis for subsequent dynamic correction of the laser marking path and ensuring marking accuracy.

[0124] Firstly, laser marking trajectories have continuous linear characteristics. The scanning feature area at a single moment can only reflect the instantaneous position and cannot reflect the movement trend. It is necessary to construct the actual movement direction by associating the regional positions of adjacent historical moments, so as to provide a basic reference at the trajectory level for deviation judgment.

[0125] Secondly, a single deviation in the direction of movement may be caused by accidental factors such as equipment vibration or environmental interference. It is necessary to select continuous historical moments of directional deviation and define them as reference time periods to assess the cumulative effect of path offset, rather than focusing only on the deviation at a single point in time.

[0126] Thirdly, the actual direction of movement needs to be compared with the planned path direction at the corresponding spatial location in order to accurately determine the degree of deviation. By anchoring the reference point of the planned path with a perpendicular line from the actual direction of movement, the actual trajectory and the planned trajectory can be aligned at the same location, avoiding misjudgments caused by spatial misalignment.

[0127] Finally, the path adjustment requirements also need to be considered in conjunction with dimensions such as underlying deformation interference and laser intensity. Only by integrating multiple features can the urgency and extent of the adjustment be fully assessed, avoiding one-sided adjustments that focus on the trajectory while neglecting the root cause.

[0128] Therefore, the method for obtaining the path adjustment index of the scanned feature region of the current scanned layer at the current moment can be implemented by steps S401 to S404.

[0129] Step S401: For the current scan layer, the direction from the scan feature region of the previous historical moment to the scan feature region corresponding to the current moment is taken as the actual movement direction of the current scan layer in the scan feature region at the current moment.

[0130] It should be noted that in order to accurately describe the changes in the scanning direction at adjacent moments in the current scanning layer, it is first necessary to match the scanning feature regions between the current moment and the adjacent previous historical moment, so as to construct the changes in the scanning direction at the same location through the mutually matched scanning feature regions.

[0131] Specifically, for the current scan layer, all scan feature regions from the previous historical time step are traversed, and the overlap area between each scan feature region and the selected scan region at the current time step is calculated. The scan feature region with the largest overlap area from all scan feature regions from the previous historical time step is selected as the scan feature region with a mutual matching relationship to the selected scan region at the current time step. Here, the selected scan region refers to any scan feature region in the current scan layer.

[0132] As a concrete example, for the current scanning layer, the vector direction constructed from the center point of the scanned feature region at the previous historical moment as the starting point and the center point of the scanned feature region at the current moment as the ending point is the actual movement direction at the current moment. Here, the center point of the region can be the centroid of the scanned feature region.

[0133] It should be noted that the actual movement direction is essentially a unit vector pointing in the same direction as the actual movement direction. That is, we are focusing on the characteristics of the direction, and not on the movement distance or other factors in the movement direction.

[0134] Step S402: The continuous historical moments with a similarity to the actual movement direction of the scanned feature region at the current moment that is less than a preset direction threshold are used to form the reference time period of the scanned feature region at the current moment.

[0135] It should be noted that, for the current scanned layer, the actual movement direction of the scanned feature region at each historical time before the current time can be obtained by using the same method as the actual movement direction of the scanned feature region at the current time. It should be understood that there is a corresponding matching relationship between the scanned feature regions at adjacent time points.

[0136] For the selected scanning region of the current scanning layer at the current time, according to the reverse chronological order from the current time to each previous historical time, it is determined whether the similarity between the actual movement directions of the scanning feature regions of each two adjacent times meets the threshold condition, and the continuous historical times that meet the threshold condition are divided into the reference time period.

[0137] As a concrete example, the cosine similarity between the actual movement direction of the selected scan region at the current moment and the actual movement direction of the scan feature region at the first historical moment is first calculated. If the cosine similarity is greater than or equal to a preset direction threshold, it indicates that the scan movement direction features between the current moment and the first historical moment are quite similar, so the current moment and the first historical moment are included in the reference time period. Then, the cosine similarity between the actual movement directions of the selected scan region and the corresponding scan feature regions at the first and second historical moments is calculated. If the cosine similarity is greater than or equal to a preset direction threshold, it indicates that the scan movement direction features between the first and second historical moments are quite similar, so the second historical moment is also included in the reference time period. This process continues until no consecutive moments meet the threshold requirement. It should be understood that the first and second historical moments are selected in reverse chronological order prior to the current moment.

[0138] In this embodiment, the direction threshold can be 0.5, and the implementer can set it according to the specific implementation scenario. Path offset in laser marking is mostly induced gradually by workpiece deformation caused by thermal accumulation, rather than occurring instantaneously. Defining the reference time period can accurately cover the evolution process of the offset, providing a complete time dimension basis for subsequent evaluation of the offset's impact on marking quality.

[0139] Step S403: Obtain a pixel belonging to the initial planning path as a reference point on the vertical line of the actual movement direction of the scanned feature region at the current moment, and obtain the planned movement direction of the reference point on the initial planning path.

[0140] First, for the current scan layer, on the perpendicular line passing through the center point of the scan feature region at the current moment and perpendicular to the actual movement direction of the scan feature region at the current moment, obtain a reference point that intersects with the initial planned path. The direction of the reference point along the unit vector of the initial planned path is the planned movement direction of the scan feature region at the current moment.

[0141] It should be noted that for any scanned feature region of the current scanned layer at the current time, if multiple reference points exist, the reference point with the shortest Euclidean distance to the center point of that scanned feature region is selected for subsequent feature analysis. It should be understood that each scanned feature region of the current scanned layer at the current time corresponds to only one reference point.

[0142] The purpose of using a vertical line is to establish a vertical spatial relationship between the actual scanning area and the preset path during laser marking, avoiding spatial misalignment caused by "oblique matching." The laser probe moves linearly along the actual direction of movement, and its "corresponding position" on the preset path should be located on a cross-section perpendicular to the direction of movement. This vertical line is equivalent to cutting a cross-section on the preset path that spatially matches the currently scanned feature area, providing a precise spatial range for subsequent anchoring reference points.

[0143] Furthermore, the logical purpose of determining the reference point is to establish a unique "baseline anchor point" on the preset path for the real-time scanning area, so as to achieve a one-to-one correspondence between the actual scan and the preset path. The reference point is the core basis for subsequent determination of the offset start time.

[0144] Step S404: Based on the similarity between the actual and planned movement directions at each moment within the reference time period corresponding to the scanned feature region, as well as the deformation index and scanned feature degree at each moment within the reference time period, the path adjustment index of the scanned feature region of the current scanned layer at the current moment is obtained.

[0145] It's important to note that before performing path adjustment, it's necessary to determine if there's any path offset within the reference time period. Specifically, for any scanned feature region of the current scanning layer at the current moment, the cosine similarity between the actual movement direction and the planned movement direction of that feature region at each moment within the corresponding reference time period is obtained. If the cosine similarity is less than a preset offset threshold, it indicates a path offset for that feature region within the reference time period, which may further impact the laser marking path at the current moment, thus requiring path adjustment. If all cosine similarities are greater than the preset offset threshold, it indicates no significant offset within the reference time period, and therefore no path adjustment is needed. The offset threshold can be 0.8, which the implementer can set according to the specific implementation scenario, such as through extensive experimentation or mathematical statistics based on historical data.

[0146] It should be further explained that step S100 records that the 3D scanner, 2D camera, and thermal infrared camera have been calibrated before being put into use, ensuring that the three-dimensional spatial coordinates of the deformation feature area and the surface grayscale image coordinates of the scanned feature area are in the same spatial coordinate system, eliminating the coordinate deviation of different monitoring devices and providing a basic guarantee for spatial correspondence.

[0147] When calculating the path adjustment index, the real-time scanning area needs to be spatially bound to the deformation feature areas of the historical scanning layer. Specifically, this involves: traversing all the deformation feature areas already defined in the historical scanning layer, calculating the overlap area or volume between each deformation feature area and a current scanning feature area; selecting the deformation feature area with the largest overlap area or volume as the associated deformation region corresponding to that scanning feature region; extracting the influence degree of this associated deformation region, calculating its average as a formula, and achieving a quantitative association between the "real-time scanning area" and the "root deformation region," ensuring that the path adjustment intensity matches the degree of deformation influence. It should be understood that when the deformation feature areas of the historical scanning layer are mapped to the current two-dimensional surface grayscale image using coordinates, the overlap area between the deformation feature areas and the corresponding scanning feature regions can be calculated.

[0148] The method for obtaining the degree of influence corresponding to the deformation feature region is as follows: based on the volume of the deformation feature region in the current scan layer, the average deformation index of all point cloud data, and the average temperature value of all point cloud data at the current moment, the degree of influence of the deformation feature region in the current scan layer at the current moment is obtained. It should be noted that the specific method for obtaining this information is described in detail in step S204, and will not be repeated here.

[0149] More specifically, for the current scanning layer, the cosine similarity between the actual movement direction of the scanning feature region at each time step and the planned movement direction at the corresponding time step is obtained within the reference time period corresponding to the current scanning feature region. The earliest time step corresponding to all cosine similarity values ​​less than a preset offset threshold is taken as the initial offset time step. The time period from the initial offset time step to the current time step is the offset time period. This indicates that there is a certain path offset of the scanning feature region within the offset time period.

[0150] The method for obtaining the path adjustment index of the scan feature region of the current scanning layer at the current moment is as follows: For the current scanning layer, the cosine similarity between the sum of the actual movement directions and the planned movement directions at all times within the offset time period of the scan feature region is obtained as the first coefficient; the average of all influence degrees of the corresponding scan feature region at all times within the offset time period is obtained as the second coefficient; the average of the scan feature degree of the corresponding scan feature region at all times within the offset time period is obtained as the third coefficient; the path adjustment index of the scan feature region of the current scanning layer at the current moment is obtained based on the first coefficient, the second coefficient, and the third coefficient; the first coefficient and the path adjustment index are negatively correlated, and the second coefficient and the third coefficient are both positively correlated with the path adjustment index.

[0151] As a concrete example, the method for obtaining the path adjustment index of the scanned feature region of the current scanned layer at the current moment can be expressed by the formula:

[0152]

[0153] in, This represents the path adjustment index of the scanned feature region of the current scanned layer at the current moment. It represents the average value of the scanning feature degree of the corresponding scanning feature region at all times within the offset time period of the current scanning feature region, which is also known as the third coefficient; It represents the average of all influence levels of the scanned feature region at all times within the offset time period of the current scanned feature region, which is also known as the second coefficient; This represents the cosine similarity between the sum of the actual movement directions at all times within the offset time period of the scanned feature region at the current moment and the planned movement direction at the current moment; it is also known as the first coefficient. This is the normalization function.

[0154] It should be noted that the cosine similarity value ranges from [-1, 1], and the denominator... This is to ensure that the cosine similarity value ranges from [0, 2]. Simultaneously, to guarantee the meaningfulness of the calculation results, in this embodiment, when performing fractional operations, if the denominator is 0, a parameter adjustment factor can be added to the denominator to prevent the denominator from being zero during addition. This parameter adjustment factor is a very small positive number. For example, the value of this parameter adjustment factor can be 0.01. Its specific value can be set by the implementer according to the actual situation; this application embodiment does not impose specific limitations.

[0155] The larger the value, the more severe the material modification and the more concentrated the heat accumulation in the scanned feature area during the offset time period. The more unstable the scanning state of the laser probe in this area, the more necessary it is to adjust the path to avoid defects caused by increased thermal stress. The larger the value, the stronger the interference from historical scan layer deformation (such as thermal warping or material deformation) on the current scan feature area. This is a "congenital" path adaptation defect, which requires a stronger path adjustment to offset the historical influence. It indicates the similarity between the actual offset direction and the preset path direction. The smaller the value, the greater the deviation between the actual direction and the preset direction, and the higher the adjustment intensity, realizing the logic of "the more significant the directional offset, the more prominent the deformation effect, and the more aggressive the adjustment".

[0156] Laser marking employs a layered scanning process, and deformation of historical scanning layers is one of the core causes of future scanning layer path deviations. This embodiment first quantifies the interlayer influence through deformation feature region analysis, and then converts it into a weight for adjusting the future scanning layer path. This aligns with the process logic of first addressing the influence of historical deformations and then correcting real-time deviations, avoiding the shortcomings of traditional solutions that only focus on real-time deviations and ignore interlayer correlations.

[0157] Step S500: Adjust the planned path for future time steps based on the movement direction and path adjustment index of the scanned feature region of the current scan layer at the current time.

[0158] It should be noted that the scanned feature area includes the heat-affected zone outside the probe's physical path (such as areas where the temperature rises due to heat conduction at the laser scanning edge, or areas with slight material modification). This is an "indirect effect extension" of the probe's action, a spatial spillover manifestation of the probe's energy. The movement direction of the scanned feature area (and the trajectory formed by the center points at each moment) accurately reflects the probe's effective process movement area. The directional trajectory of the scanned feature area is the movement trajectory of the probe when it "achieves an effective marking effect." If this actual movement direction deviates from the preset path movement direction, it indicates that the probe's effective marking path has shifted, requiring adjustment. The coverage area of ​​this trajectory is the area on the workpiece where the mark is actually formed, directly corresponding to the core result of the marking task, and accurately reflecting the process value area of ​​the probe's movement.

[0159] Specifically, the first step is to obtain the sum of the actual movement directions of the scanned feature region at the current time interval as the initial movement direction of the scanned feature region at future time intervals, for the current scanned layer.

[0160] The sum of the actual movement directions during the offset time period reflects the overall offset trend where offset exists. This filters out instantaneous noise, ensuring the stability and consistency of the predicted direction, which aligns with the "continuous motion" characteristic of laser scanning. It should be understood that the sum of the unit vectors representing each direction corresponds to the direction of the sum of the vectors; this is a well-known technique and will not be elaborated upon here.

[0161] The second step is to adjust the initial movement direction for future time steps based on the path adjustment index of the scanned feature region at the current time step of the current scan layer, so as to obtain the predicted movement direction of the scanned feature region at future time steps.

[0162] Specifically, for the current scanning layer, the product of the path adjustment index of the scanning feature region and the corresponding angle in the opposite direction of the initial movement direction is rounded to obtain the direction compensation degree. The planned movement direction at the future time is obtained, and the sum of the planned movement direction at the future time and the direction compensation degree is used as the predicted movement direction of the scanning feature region at the future time.

[0163] In this context, the planned movement direction at a future moment refers to the direction corresponding to the unit vector pointing from a certain pixel to the next adjacent pixel on the path in the initial planning path.

[0164] The planned movement direction at future moments represents the ideal scanning direction required for the marking pattern (such as the tangent direction of the contour area and the spiral radial direction of the filling area), which is the final anchoring reference for path correction and ensures the shape accuracy of the marking pattern.

[0165] The predicted movement direction of the scanned feature region at a future time is the actual movement direction of the initial prediction at that future time. It is predicted based on historical scanning trends. If a path deviation has occurred, the predicted movement direction will deviate from the planned movement direction at the future time, which is the deviation direction that needs to be corrected for the predicted movement direction.

[0166] The opposite direction of the initial movement direction is essentially the reverse compensation direction of the deviation direction. When there is a deviation, the direction of the opposite direction of the initial movement direction is exactly the compensation direction of "pulling back the actual direction to the preset direction", which can cancel the existing directional deviation.

[0167] The path adjustment index of the scanned feature region indicates that the greater the path correction intensity in the current scene, the higher the risk of offset and deformation, and the stronger the correction force is required.

[0168] It should be noted that the angle values ​​of the directions involved in this embodiment range from 0 to 360°. All directions involved can be regarded as unit vectors with corresponding directions, and the method of obtaining the direction can be regarded as the sum of the corresponding unit vectors. The sum of the planned movement direction at future time and the direction compensation degree can be understood as rotating and correcting the planned movement direction at future time according to the direction compensation degree to obtain the predicted movement direction.

[0169] Thus, by using the correction logic of direction compensation, the predicted movement direction at future moments is obtained, which not only eliminates the influence of historical offsets, but also ensures that the future path conforms to the preset, while taking into account process stability and avoiding new marking defects caused by correction actions.

[0170] The third step is to determine the distance the scanned feature area has moved at the current moment, based on the actual moving speed of the laser probe and the unit time length.

[0171] Specifically, the distance the laser probe moves per unit time is obtained by multiplying the actual moving speed of the laser probe at the current moment by the unit time length. This moving distance can then be used as the predicted moving distance per unit time length in the future.

[0172] The fourth step is to determine the location of the planned path at future times based on the predicted movement distance in the predicted direction of movement.

[0173] Specifically, by moving along the predicted direction and using the distance the laser probe moves as the length of its movement, the location of the planned path at future moments can be obtained.

[0174] It should be noted that by repeating the above four prediction steps using the prediction results of the next future time adjacent to the current time, the location of the planned path at several future times can be obtained. The number of future times can be set by the implementer according to the specific implementation scenario, for example, set to 5. This can, to a certain extent, ensure that the forward adjustment can fully cover the continuous range of the deviation trend, avoiding subsequent path deviations and loss of control due to insufficient prediction time.

[0175] This invention also provides a laser marking path planning and optimization system, which implements the steps of a laser marking path planning and optimization method. The laser marking path planning and optimization system includes:

[0176] The data acquisition module is used to acquire the initial planned path for laser marking of the workpiece to be processed, as well as the three-dimensional point cloud data of the current scanning layer at the current moment and the surface grayscale image of the workpiece to be processed during the laser marking process.

[0177] The deformation analysis module is used to divide the point cloud data of the current scan layer into deformation feature regions based on the differences in morphological parameters and temperature between the point cloud data of the current scan layer and the point cloud data of adjacent historical scan layers.

[0178] The scanning analysis module is used to divide the surface grayscale image into regions based on the changes in grayscale values ​​of each pixel in the current scanning layer at the current moment and the changes in temperature at historical moments, so as to obtain the scanning feature region of the current scanning layer at the current moment.

[0179] The adjustment analysis module is used to obtain the path adjustment index of the scanning feature region of the current scanning layer at the current moment based on the deviation between the movement direction of the scanning feature region of the current scanning layer at the current moment and the initial planned path, combined with the deformation characteristics of the deformation feature region corresponding to the overlapping deformation feature region of the scanning feature region.

[0180] The path adjustment module is used to adjust the planned path for future time steps based on the movement direction and path adjustment index of the scanned feature region of the current scan layer at the current time.

[0181] This invention also provides a laser marking machine, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the computer program is executed by the processor, it implements the steps of a laser marking path planning optimization method.

[0182] The main data processing flow includes: multi-dimensional monitoring of the laser marking machine's marking process and transmitting the monitoring results to a nearby data processing unit. The data processing unit analyzes interlayer differences during the scanning process and, based on these differences and the degree of deviation and deformation of the implementation path, adjusts the actual movement path of the laser probe. It then corrects the adjusted path based on the risk of overfilling, thus obtaining an accurate path adjustment result. Based on the adjustment result, control commands are generated and transmitted to the laser marking machine to adjust its movement path and improve laser marking efficiency.

[0183] It should be noted that since a laser marking path planning optimization method has already been described in detail, it will not be elaborated further here.

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

Claims

1. A laser marking path planning and optimization method, characterized in that, The method includes the following steps: The initial planned path for laser marking of the workpiece to be processed is obtained, as well as the 3D point cloud data of the current scanning layer at the current moment and the surface grayscale image of the workpiece to be processed during the laser marking process. Based on the differences in morphological parameters and temperature between the point cloud data of the current scanned layer and the point cloud data of adjacent historical scanned layers, the point cloud data of the current scanned layer is divided to obtain the deformation feature region of the current scanned layer, specifically including: Obtain the historical scan layers preceding the current scan layer, as well as the reflectance value and maximum principal curvature of the point cloud data in each scan layer; Based on the differences in reflectance and maximum principal curvature between each point cloud data in the current scan layer and the corresponding point cloud data in the historical scan layers, the deformation index of each point cloud data in the current scan layer is determined. Based on the difference in deformation index between every two point cloud data in the current scan layer, and the difference in temperature change between every two point cloud data in the current scan layer and the corresponding point cloud data in the historical scan layer, the feature similarity between every two point cloud data in the current scan layer is obtained. The adjacent point cloud data in the current scanning layer whose feature similarity is greater than or equal to a preset similarity threshold are divided into the same deformation feature region; Based on the changes in grayscale values ​​of each pixel in the current scanned layer's surface grayscale image at the current moment compared to historical moments, as well as temperature changes, the surface grayscale image is divided into regions to obtain the scanned feature regions of the current scanned layer at the current moment, specifically including: For the current scanned layer, the absolute value of the difference between the gray value of the selected pixel at the current time and the gray value at a historical time is obtained as the gray value difference value of the selected pixel; the difference between the temperature value of the selected pixel at a historical time and the temperature value at the current time is obtained as the temperature difference value of the selected pixel; where the selected pixel is any pixel in the surface grayscale image at the current time. The ratio between the grayscale difference value of the selected pixel and the average grayscale difference value of all pixels in the surface grayscale image at the current time is obtained as the first ratio. The ratio between the temperature difference value of the selected pixel and the average temperature difference value of all pixels in the surface grayscale image at the current time is obtained as the second ratio. The product of the first ratio and the second ratio is normalized to obtain the scanning feature degree of the selected pixel. The closed region formed by the pixels in the surface grayscale image at the current moment whose scanning feature degree is greater than or equal to the preset scanning threshold is taken as the scanning feature region of the current scanning layer at the current moment. Based on the deviation between the movement direction of the scanned feature region of the current scanned layer at the current moment and the initial planned path, and combined with the deformation characteristics of the overlapping deformation feature regions corresponding to the scanned feature region, the path adjustment index of the scanned feature region of the current scanned layer at the current moment is obtained, specifically including: For the current scanned layer, the direction from the scanned feature region of the previous historical moment to the corresponding scanned feature region of the current moment is taken as the actual movement direction of the current scanned layer in the scanned feature region of the current moment. The consecutive historical moments in which the similarity to the actual movement direction of the scanned feature region at the current moment is less than a preset direction threshold constitute the reference time period of the scanned feature region at the current moment. At the current moment, obtain the pixel point belonging to the initial planning path on the perpendicular line of the actual movement direction of the scanned feature region, and obtain the planned movement direction of the reference point on the initial planning path. Based on the similarity between the actual and planned movement directions at each moment within the reference time period corresponding to the scanned feature region, and the deformation index and scan feature degree at each moment within the reference time period, the path adjustment index of the scanned feature region of the current scanned layer at the current moment is obtained, including: Based on the volume of the deformation feature region in the current scan layer, the mean of the deformation index of all point cloud data, and the mean of the temperature value of all point cloud data at the current moment, the influence of the deformation feature region in the current scan layer at the current moment is obtained. For the current scanning layer, obtain the cosine similarity between the actual movement direction of the scanning feature region at each time and the planned movement direction at the corresponding time within the reference time period corresponding to the current scanning feature region. Take the earliest time corresponding to all cosine similarities less than the preset offset threshold as the initial offset time. The time period from the initial offset time to the current time is the offset time period. The first coefficient is obtained by summing the actual movement directions at all times within the offset time period of the scanned feature region and cosine similarity between the actual movement direction and the planned movement direction; the second coefficient is obtained by summing the average of all influence levels of the scanned feature region at all times within the offset time period; and the third coefficient is obtained by summing the scanned feature degree of the scanned feature region at all times within the offset time period. The path adjustment index of the scanned feature region of the current scanned layer at the current time is obtained based on the first coefficient, the second coefficient, and the third coefficient; the first coefficient and the path adjustment index are negatively correlated, while the second coefficient and the third coefficient are both positively correlated with the path adjustment index; The planned path for future moments is adjusted based on the movement direction and path index of the scanned feature region of the current scan layer at the current moment.

2. The laser marking path planning and optimization method according to claim 1, characterized in that, The feature similarity between every two point cloud data in the current scan layer is obtained based on the difference in deformation index between every two point cloud data in the current scan layer and the difference in temperature change between every two point cloud data in the current scan layer and the corresponding point cloud data in the historical scan layer. Specifically, this includes: The ratio of the temperature value between each point cloud data in the current scanned layer and the corresponding point cloud data in the historical scanned layers is used as the relative temperature feature value. Obtain the first difference in deformation index between any two point cloud data in the current scan layer, and obtain the second difference in relative temperature feature value between any two point cloud data in the current scan layer; perform negative correlation processing on the product of the first difference and the second difference to obtain the feature similarity between any two point cloud data in the current scan layer.

3. The laser marking path planning and optimization method according to claim 2, characterized in that, The step of adjusting the planned path for future times based on the movement direction and path adjustment index of the current scanning layer's scanning feature region at the current moment specifically includes: For the current scanning layer, the sum of the actual movement directions of the scanned feature region at the current time offset time interval is obtained as the initial movement direction of the scanned feature region at future time intervals; Based on the actual moving speed of the laser probe and the unit time length, determine the moving distance of the scanned feature area at the current moment; Based on the path adjustment index of the scanned feature region of the current scan layer at the current time, the initial movement direction at future time is corrected to obtain the predicted movement direction of the scanned feature region at future time. Based on the predicted movement direction and the distance traveled, the location of the planned path at future times is determined.

4. The laser marking path planning and optimization method according to claim 3, characterized in that, The step of adjusting the initial movement direction for future time steps based on the path adjustment index of the scanned feature region at the current time step of the current scan layer to obtain the predicted movement direction of the scanned feature region at future time steps specifically includes: For the current scanning layer, the product of the path adjustment index and the angle corresponding to the opposite direction of the initial movement direction is rounded to obtain the direction compensation degree; the planned movement direction at future time is obtained; the sum of the planned movement direction at future time and the direction compensation degree is used as the predicted movement direction of the scanning feature region at future time.

5. A laser marking path planning and optimization system, characterized in that, This system is used to implement the steps of a laser marking path planning and optimization method as described in any one of claims 1-4, wherein the laser marking path planning and optimization system comprises: The data acquisition module is used to acquire the initial planned path for laser marking of the workpiece to be processed, as well as the three-dimensional point cloud data of the current scanning layer at the current moment and the surface grayscale image of the workpiece to be processed during the laser marking process. The deformation analysis module is used to divide the point cloud data of the current scan layer into deformation feature regions based on the differences in morphological parameters and temperature between the point cloud data of the current scan layer and the point cloud data of adjacent historical scan layers. The scanning analysis module is used to divide the surface grayscale image into regions based on the changes in grayscale values ​​of each pixel in the current scanning layer at the current moment and the changes in temperature at historical moments, so as to obtain the scanning feature region of the current scanning layer at the current moment. The adjustment analysis module is used to obtain the path adjustment index of the scanning feature region of the current scanning layer at the current moment based on the deviation between the movement direction of the scanning feature region of the current scanning layer at the current moment and the initial planned path, combined with the deformation characteristics of the deformation feature region corresponding to the overlapping deformation feature region of the scanning feature region. The path adjustment module is used to adjust the planned path for future time steps based on the movement direction and path adjustment index of the scanned feature region of the current scan layer at the current time.

6. A laser marking machine, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the laser marking path planning optimization method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Numerical control machining intelligent monitoring control system based on industrial intelligence

    CN116224911A

  • Intelligent slicing and scanning path planning method and system for selective laser melting

    CN118859880A