Unattended laser spherical surface internal engraving method and system combined with AI intelligence

By generating a curvature distribution model, calculating laser focusing deviation, and optimizing laser parameters, the challenges of unattended operation and intelligent operation in laser spherical engraving technology have been solved, achieving high-precision and high-efficiency spherical material engraving.

CN121069777AInactive Publication Date: 2025-12-05DONGGUAN GUANGWEI LASER TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511243346.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-02
Publication Date
2025-12-05
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing laser spherical engraving technology has significant shortcomings in terms of unattended operation and intelligence. It is difficult to adapt to the complex geometry of spherical materials, resulting in low processing efficiency and poor consistency. Furthermore, it lacks the ability to adapt to changes in material properties and processing environment, which affects the engraving accuracy.

Method used

By acquiring geometric data of the spherical material, a curvature distribution model is generated, laser focusing deviation is calculated, and machine learning is used to analyze the material properties and the influence of ambient temperature. A genetic algorithm is then used to optimize laser parameters, dynamically adjust the focusing depth and spot size, generate an optimized focusing path, and image processing is used to detect the engraving accuracy and iteratively optimize the parameters.

Benefits of technology

It achieves high-precision and high-efficiency laser engraving of complex curved surfaces, reduces the impact of environmental and material differences on processing quality, and is suitable for high-efficiency internal engraving of diverse spherical materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121069777A_ABST
    Figure CN121069777A_ABST
Patent Text Reader

Abstract

The invention provides an unattended laser spherical surface internal engraving method and system combined with AI intelligence, and the method comprises the steps: S1, obtaining geometric data of a spherical surface material, generating a spherical surface curvature distribution model through a three-dimensional scanning technology, and obtaining curvature change data; s2, according to the curvature change data, the focusing deviation of the laser at different depths is calculated, and a focusing deviation distribution diagram is obtained; s5, adjusting the weight according to the parameters, optimizing the laser power and the pulse frequency, and obtaining self-adaptive parameter configuration; s6, dynamically adjusting the laser focusing depth and the spot size through adaptive parameter configuration to obtain an optimized focusing path; s7, according to the optimized focusing path, a laser is controlled to execute three-dimensional carving operation, and a preliminary carving pattern is generated; and S9, if the level precision does not meet the requirement, adjusting iteration parameters according to a detection result, and generating new adaptive parameter configuration. According to the method, the precision and adaptability of laser internal engraving of the complex curved surface are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of laser engraving technology, and in particular to an unattended laser spherical engraving method and system that combines with AI intelligence. Background Technology

[0002] Laser processing technology plays a vital role in modern manufacturing, especially in the field of high-precision 3D engraving, where its applications are widespread and crucial for enhancing product added value. Spherical internal engraving, as a complex 3D processing method, can create exquisite patterns within transparent materials and is widely used in artworks, decorations, and high-end industrial components.

[0003] However, existing laser spherical engraving methods have significant shortcomings in achieving unattended and intelligent operation. Traditional techniques often rely on manual adjustment of laser parameters, which is difficult to adapt to the complex geometry of spherical materials, resulting in low processing efficiency and poor consistency. In addition, existing systems lack the ability to adapt to changes in material properties and processing environment, and are prone to focusing deviations due to changes in the curvature of the spherical surface, affecting engraving accuracy.

[0004] In this field, the core challenge lies in achieving precise focusing control of the laser within a sphere. The curvature differences in the spherical material cause deviations when the laser is focused at different depths. These deviations not only affect the layering of the pattern but can also lead to unstable processing quality. To address this issue, the system needs to dynamically adjust the laser focusing parameters to adapt to changes in the spherical geometry. However, simple focusing adjustments are insufficient for processing complex three-dimensional patterns, as the layering requirements are closely related to material properties, necessitating real-time analysis and optimization of parameter configurations using intelligent algorithms. If the synergistic problem of focusing deviation and parameter adaptation cannot be effectively resolved, achieving high standards of engraving accuracy and efficiency will be difficult.

[0005] Therefore, how to dynamically compensate for the focusing deviation caused by the curvature of the sphere through intelligent algorithms, and adaptively adjust the laser parameters according to the pattern layers and material properties, has become a key issue in realizing unattended laser spherical engraving. Summary of the Invention

[0006] The first aspect of this invention provides an unattended laser spherical engraving method combined with AI intelligence, mainly comprising: S1. Obtain the geometric data of the spherical material, generate a spherical curvature distribution model through three-dimensional scanning technology, and obtain curvature change data; S2, Based on the curvature change data, calculate the focusing deviation of the laser at different depths to obtain the focusing deviation distribution map; S3, extract the focus deviation value from the focus deviation distribution map, determine whether the focus deviation exceeds the allowable range by using the preset focus threshold, and determine the focus parameters that need to be adjusted; S4: Obtain material properties and processing environment data, analyze the influence of material refractive index and ambient temperature on focusing, and obtain parameter adjustment weights; S5, adjust the weights according to the parameters, optimize the laser power and pulse frequency, and obtain an adaptive parameter configuration; S6, through adaptive parameter configuration, dynamically adjusts the laser focusing depth and spot size to obtain an optimized focusing path; S7, based on the optimized focusing path, controls the laser to perform a three-dimensional engraving operation and generate a preliminary engraving pattern; S8: Obtain the layer data of the preliminary engraved pattern, check the accuracy of the pattern layer, and determine whether it meets the design requirements; S9. If the hierarchical accuracy does not meet the requirements, adjust the iteration parameters according to the detection results and generate a new adaptive parameter configuration.

[0007] Optionally, step S1 involves acquiring the geometric data of the spherical material, generating a spherical curvature distribution model using 3D scanning technology, and obtaining curvature variation data, including: Step S11: Obtain point cloud data of the spherical material using a 3D scanner to generate an initial geometric dataset containing spatial coordinates; Step S12: Extract point cloud data from the initial geometric dataset, and generate a continuous surface model of the spherical material based on the point cloud data; Step S13: Select surface points from the continuous surface model, calculate the principal curvature of each point, and obtain curvature distribution data; Step S14: If the noise level of the curvature distribution data is higher than the preset noise threshold, then the curvature distribution data is denoised to obtain smooth curvature distribution data. Step S15: Calculate the gradient data of curvature change from the smooth curvature distribution data to determine the curvature change trend; Step S16: Extract the peak and valley positions from the curvature change trend to generate a spatial distribution dataset describing the curvature change; Step S17: Convert the spatial distribution dataset into CSV output format to obtain the final curvature change data.

[0008] Optionally, step S13 involves selecting surface points from the continuous surface model, calculating the principal curvature of each point, and obtaining curvature distribution data, including: the principal curvature includes the maximum principal curvature and the minimum principal curvature.

[0009] Optionally, step S15, calculating the gradient data of curvature change from the smooth curvature distribution data and determining the curvature change trend, includes: obtaining the gradient data by calculating the curvature difference between adjacent points using the finite difference method.

[0010] Optionally, step S2, based on the curvature change data, uses an optical path simulation algorithm to calculate the focusing deviation of the laser at different depths, obtaining a focusing deviation distribution map, including: Step S21: Obtain curvature change data, extract curvature parameters from the preset optical system, and obtain curvature dataset; Step S22: Based on the curvature dataset, calculate the optical propagation path of the laser at different depths to obtain a set of propagation paths; Step S23: Extract the focal point coordinates for each depth from the propagation path set to determine the focal point dataset; Step S24: For the focal point dataset, calculate the deviation between the laser focal point and the ideal focal point to obtain a set of focal deviation values; Step S25: Based on the set of focus deviation values, if the focus deviation value exceeds the preset deviation value threshold, adjust the curvature influence factor, recalculate the optical path propagation path, and obtain the updated propagation path set. Step S26: Extract the focal point coordinates for each depth from the updated propagation path set to determine the updated focal point dataset; Step S27: For the updated focus point dataset, calculate the deviation between the laser focus point and the ideal focus point to obtain the updated set of focus deviation values; Step S28: Generate a focus deviation distribution map based on the updated set of focus deviation values, and determine the distribution map data.

[0011] Optionally, step S24, for the focal point dataset, calculates the deviation between the laser focal point and the ideal focal point to obtain a set of focal deviation values, including: The deviation between the laser focal point and the ideal focal point is calculated using the following formula: ,in, It is the deviation between the laser's focal point and the ideal focal point. , , ) are the coordinates of the laser focal point, ( () are the coordinates of the ideal point.

[0012] Optionally, step S5, adjusting weights according to parameters and using a genetic algorithm to optimize laser power and pulse frequency to obtain adaptive parameter configuration, includes: Step S51: Initialize the population using Python's DEAP library to generate an initial parameter combination containing laser power and pulse frequency, thus obtaining the population parameter set; Step S52: Evaluate the laser processing performance of the population parameter set according to the preset fitness function, and determine the fitness value; Step S53: If the maximum value in the fitness values ​​is less than the preset fitness threshold, a new parameter combination is generated to obtain the updated parameter set; Step S54: For the updated parameter set, repeat the fitness function evaluation to obtain new fitness values; Step S55: If the maximum value among the new fitness values ​​reaches the preset fitness threshold, then select the parameter with the highest fitness from the population as the final adaptive parameter configuration. Step S56: Control the laser equipment through final adaptive parameter configuration, process the sample and measure the performance indicators to obtain the optimized parameter results.

[0013] Optionally, step S52, which evaluates the laser processing performance of the population parameter set according to a preset fitness function and determines the fitness value, includes: The fitness calculation function is: F = w1(1-Ra) + w2Eff, Where F is the fitness value, Ra represents the surface roughness, Eff represents the processing efficiency, and w1 and w2 are set weights.

[0014] Optionally, in step S53, if the maximum value in the fitness values ​​is less than a preset fitness threshold, a new parameter combination is generated to obtain an updated parameter set, including setting the fitness threshold to 0.95.

[0015] A second aspect of the present invention provides an unattended laser spherical engraving system integrated with AI intelligence, wherein the laser spherical engraving is performed using the method described above, and the system includes: The geometric data acquisition module is used to acquire the geometric data of the spherical material, generate a spherical curvature distribution model through three-dimensional scanning technology, and obtain curvature change data. The curvature model generation module is used to calculate the focusing deviation of the laser at different depths based on the curvature change data and the optical path simulation algorithm, and obtain the focusing deviation distribution map. The optical path simulation module is used to extract the focus deviation value from the focus deviation distribution map, determine whether the focus deviation exceeds the allowable range by using a preset focus threshold, and determine the focus parameters that need to be adjusted. The deviation analysis module is used to acquire material properties and processing environment data, and analyzes the influence of material refractive index and ambient temperature on focusing through machine learning algorithms to obtain parameter adjustment weights; The parameter weight calculation module is used to adjust the weights according to the parameters and optimize the laser power and pulse frequency using a genetic algorithm to obtain an adaptive parameter configuration. The parameter optimization module is used to dynamically adjust the laser focusing depth and spot size through adaptive parameter configuration to obtain an optimized focusing path; The focus adjustment module is used to control the laser to perform 3D engraving operations and generate a preliminary engraving pattern based on the optimized focus path. The engraving execution module is used to acquire the layer data of the initial engraving pattern, detect the accuracy of the pattern layer through image processing algorithms, and determine whether it meets the design requirements. The accuracy detection module is used to adjust the iteration parameters of the genetic algorithm and generate a new adaptive parameter configuration if the hierarchical accuracy does not meet the requirements.

[0016] The technical solution provided by this invention has the following beneficial effects: This invention discloses a method and system for unattended laser spherical engraving combined with AI intelligence. Addressing the focusing deviation problem caused by curvature changes, material refractive index, and ambient temperature during the engraving of complex spherical materials, this invention generates a spherical curvature distribution model by integrating 3D scanning technology, calculates the laser focusing deviation distribution using an optical path simulation algorithm, extracts the deviation values, determines whether they exceed thresholds, and identifies the focusing parameters that need adjustment. This invention analyzes the influence of material properties and environmental factors on focusing through machine learning, generates parameter adjustment weights, and uses a genetic algorithm to optimize laser power and pulse frequency, forming an adaptive parameter configuration. It dynamically adjusts the focusing depth and spot size, generating an optimized focusing path. This invention controls the laser to perform 3D engraving, generates a preliminary pattern, and detects the layer accuracy through image processing. If the requirements are not met, the parameters are iteratively optimized, ultimately achieving high-precision engraving.

[0017] This invention significantly improves the precision and adaptability of laser engraving on complex curved surfaces, reduces the impact of environmental and material differences on processing quality, and is suitable for efficient internal engraving of diverse spherical materials. Attached Figure Description

[0018] Figure 1 This is a flowchart of the unattended laser spherical engraving method combining AI intelligence according to the present invention.

[0019] Figure 2 This is a schematic diagram of the unattended laser spherical engraving method combining AI intelligence according to the present invention.

[0020] Figure 3 This is another schematic diagram of the unattended laser spherical engraving method combining AI intelligence according to the present invention.

[0021] Figure 4 This is a schematic diagram of the unattended laser spherical engraving system that combines AI intelligence, according to the present invention. Detailed Implementation

[0022] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0023] like Figure 1-3 As shown, the first aspect of the present invention provides a method and system for unattended laser spherical engraving combined with AI intelligence, which may specifically include: S1: Obtain the geometric data of the spherical material, generate a spherical curvature distribution model through three-dimensional scanning technology, and obtain curvature change data.

[0024] Optionally, this step also includes: Step S11: Obtain point cloud data of the spherical material using a 3D scanner to generate an initial geometric dataset containing spatial coordinates.

[0025] Step S12: Extract point cloud data from the initial geometric dataset, process the point cloud data using the Poisson surface reconstruction tool, and generate a continuous surface model of the spherical material.

[0026] Step S13: Select surface points from the continuous surface model, calculate the principal curvature of each point using the finite difference method, and obtain curvature distribution data.

[0027] Preferably, the principal curvature includes at least the maximum principal curvature K1 and the minimum principal curvature K2.

[0028] Step S14: If the noise level of the curvature distribution data is higher than the preset noise threshold, then the Gaussian filter tool is used to denoise the curvature distribution data to obtain smooth curvature distribution data.

[0029] Step S15: Calculate the gradient data of curvature change from the smooth curvature distribution data. The gradient data is obtained by calculating the curvature difference between adjacent points using the finite difference method to determine the curvature change trend.

[0030] Step S16: Extract the peak and valley positions from the curvature change trend to generate a spatial distribution dataset describing the curvature change.

[0031] Step S17: Use the Pandas tool to convert the spatial distribution dataset into CSV output format to obtain the final curvature change data.

[0032] Specifically, acquiring point cloud data of spherical materials using a 3D scanner is the foundation for generating the initial geometric dataset.

[0033] For example, a laser scanner can be used to scan a metal sphere with a diameter of 1 meter to obtain point cloud data containing 1 million points, each point containing x, y, and z spatial coordinates with an accuracy of 0.1 millimeters. This high-precision point cloud data provides a reliable foundation for subsequent surface reconstruction.

[0034] It should be noted that uniform lighting must be ensured during the scanning process to avoid reflection interference and guarantee the integrity of the point cloud data. After extracting the point cloud data from the initial geometric dataset, the Poisson surface reconstruction tool is used to generate a continuous surface model.

[0035] For example, point cloud data can be imported into MeshLab software, and the Poisson algorithm can be used to reconstruct the sphere, generating a continuous mesh model containing triangular facets.

[0036] Preferably, in the algorithm parameter settings, the octree depth is set to 10 to balance model accuracy and computational efficiency. The reconstructed surface model can smoothly transition noise points in the point cloud, effectively restore the spherical geometric characteristics, and provide high-quality input for subsequent curvature calculations. Surface points are selected from the continuous surface model, and the principal curvatures are calculated using the finite difference method. The principal curvatures include at least the maximum principal curvature K1 and the minimum principal curvature K2.

[0037] For example, 10,000 points are uniformly selected on a spherical model. Based on the coordinate differences between adjacent points, the maximum principal curvature K1 and minimum principal curvature K2 at each point are calculated using the finite difference method. For an ideal sphere, theoretically, K1 and K2 should be equal, approximately 1 / 0.5 = 2 m^-1. However, in reality, due to minute defects on the material surface, the curvature value may fluctuate between 1.95 m^-1 and 2.05 m^-1. This curvature distribution data reflects the local geometric characteristics of the sphere and helps in detecting surface defects. If the noise level of the curvature distribution data is higher than a preset noise threshold, for example, if the standard deviation exceeds 0.1 m^-1, Gaussian filtering is required for noise reduction.

[0038] For example, a filter kernel with a radius of 3 mm is used to smooth the curvature data, generating smooth curvature distribution data. This denoising process effectively reduces curvature fluctuations caused by point cloud noise, improves data reliability, and provides a more accurate curvature distribution for subsequent analysis. The gradient data of curvature changes are calculated from the smoothed curvature distribution data, and the curvature difference between adjacent points is obtained using the finite difference method.

[0039] For example, if the curvature difference between two adjacent points exceeds 0.05 m^-1, it indicates a significant change in curvature, which may correspond to uneven or defective areas on the surface.

[0040] It should be noted that the spatial distribution of gradient data can intuitively reflect the curvature change trend, which helps to locate abnormal areas on the surface, such as micro-cracks or deformations. Peak and valley locations are extracted from the curvature change trend to generate a spatial distribution dataset.

[0041] For example, by analyzing gradient data, curvature peaks (which may correspond to convexities) and valleys (which may correspond to concaveities) can be located, generating a dataset containing the coordinates of the peaks and valleys, as well as the curvature values. This dataset can clearly describe the morphological features of a spherical surface, supporting subsequent defect detection and quality assessment. The spatially distributed dataset is converted to CSV format using Pandas tools.

[0042] For example, import a collection containing the coordinates, curvature values, and gradient data of 10,000 points into Pandas and generate a CSV file containing fields such as x, y, z, K1, K2, and gradient.

[0043] Preferably, the file uses UTF-8 encoding to ensure cross-platform compatibility. This CSV output facilitates subsequent data analysis and visualization, improving data processing efficiency.

[0044] Specifically, the above method achieves high-precision analysis of surface features of spherical materials through a complete process from point cloud to curvature distribution. Denoising and gradient calculation effectively improve the accuracy of defect detection, while CSV output facilitates data sharing and further processing, providing technical support for material quality control.

[0045] S2. Based on the curvature change data, the focusing deviation of the laser at different depths is calculated using an optical path simulation algorithm to obtain a focusing deviation distribution map.

[0046] Optionally, this step also includes: Step S21: Obtain curvature change data, extract curvature parameters from the preset optical system, and obtain curvature dataset.

[0047] Step S22: Based on the curvature dataset, calculate the optical propagation path of the laser at different depths in the Zemax software to obtain a set of propagation paths.

[0048] Step S23: Extract the focal point coordinates for each depth from the propagation path set to determine the focal point dataset.

[0049] Step S24: For the focal point dataset, calculate the deviation between the laser focal point and the ideal focal point to obtain a set of focal deviation values.

[0050] Preferably, the focus deviation is calculated using the following formula: ,in, It is a focusing deviation. , , ) are the coordinates of the laser focal point, ( () are the coordinates of the ideal point.

[0051] Step S25: Based on the set of focus deviation values, if the focus deviation value exceeds the preset deviation value threshold, adjust the curvature influence factor and recalculate the optical path propagation path in the Zemax software to obtain the updated propagation path set.

[0052] Step S26: Extract the focal point coordinates for each depth from the updated propagation path set to determine the updated focal point dataset.

[0053] Step S27: For the updated focal point dataset, calculate the deviation between the laser focal point and the ideal focal point, and use the Euclidean distance formula to obtain the updated set of focal deviation values.

[0054] Step S28: Based on the updated set of focusing deviation values, generate a focusing deviation distribution map in Matlab and determine the distribution map data.

[0055] Specifically, curvature parameters are extracted from a pre-defined optical system to obtain a curvature dataset.

[0056] For example, when designing spherical optical lenses, the curvature data of the lens surface can be obtained through optical measurement equipment such as a profilometer.

[0057] In one embodiment, a high-precision profilometer is used to measure the curvature of a spherical mirror with a diameter of 0.5 meters, obtaining the curvature values ​​at various points on the surface with an accuracy of 0.01 millimeters. The curvature dataset contains the x, y, and z coordinates of each measurement point and its corresponding curvature value, forming a set of 5000 data points. This dataset provides reliable input for subsequent optical path analysis.

[0058] It should be noted that the equipment must be calibrated during measurement to avoid ambient light interference and ensure the accuracy of the curvature data. The propagation paths of the laser at different depths are calculated in Zemax software to obtain a set of propagation paths.

[0059] For example, the curvature dataset can be imported into Zemax, and the laser wavelength can be set to 532 nanometers to simulate the propagation of light in a lens. One possible implementation calculates the light path for a depth range of 0.1 mm to 10 mm, with a step size of 0.1 mm, generating a set of 100 propagation paths. Each path records the direction and position of light propagation at different depths.

[0060] Preferably, in Zemax, the ray tracing sampling density can be set to 10,000 rays to improve path accuracy. The focal point coordinates for each depth are extracted from the propagation path set to determine the focal point dataset.

[0061] For example, the focal point coordinates at depths of 1 mm, 5 mm, and 10 mm can be extracted from the Zemax output to form a dataset containing x, y, and z coordinates.

[0062] In one embodiment, the focal point dataset contains the coordinates of 100 points, recording the actual focal positions of the laser at different depths.

[0063] It should be noted that the coordinate system must be consistent during extraction to avoid errors in subsequent deviation calculations. The deviation between the laser focal point and the ideal focal point is calculated using the Euclidean distance formula.

[0064] For example, assuming the ideal focal point coordinates are (0, 0, 5) and the actual focal point coordinates are (0.02, 0.01, 5.03), the deviation can be calculated using a formula.

[0065] In one possible implementation, the deviation is calculated for each of the 100 focal points to obtain a set of focal deviation values, ranging from 0.01 mm to 0.05 mm.

[0066] Preferably, the performance of the optical system can be judged by statistically analyzing the distribution trend of the focus deviation value. If the focus deviation value exceeds a preset deviation value threshold, such as 0.03 mm, the curvature influence factor is adjusted and the optical path propagation path is recalculated.

[0067] For example, in Zemax, by adjusting the curvature parameters of the lens surface and reducing the radius of curvature by 0.01 mm, the optical path is re-simulated to generate an updated set of propagation paths.

[0068] In one embodiment, the updated set shows the focal point closer to the ideal position.

[0069] Preferably, the process can be iteratively adjusted multiple times to ensure convergence of the focusing deviation. The focal point coordinates are extracted from the updated propagation path set to determine the updated focal point dataset.

[0070] For example, the coordinates of 100 focal points at different depths can be extracted to form a new dataset.

[0071] It should be noted that the updated dataset typically shows smaller deviations, indicating that the optical system performance has been optimized. A focus deviation distribution map is generated in Matlab to determine the distribution data.

[0072] For example, the updated set of focus deviation values ​​can be imported into Matlab, and a 3D scatter plot can be generated to show the trend of focus deviation with depth. In one possible implementation, the plot uses color to represent the magnitude of the deviation, with red indicating a larger deviation and blue indicating a smaller deviation.

[0073] Preferably, axis labels and legends can be added to facilitate the analysis of the regularity of the focus deviation distribution.

[0074] S3: Extract the focus deviation value from the focus deviation distribution map, determine whether the deviation exceeds the allowable range by using the preset focus threshold, and determine the focus parameters that need to be adjusted.

[0075] Optionally, this step also includes: Step S31: Extract focus deviation values ​​from the focus deviation distribution map, load the image using OpenCV and apply Canny edge detection to obtain deviation quantization data, and obtain the current focus deviation value set.

[0076] Step S32: The current set of focus deviation values ​​is compared with a preset focus threshold. If the deviation value exceeds the preset focus threshold range, it is determined that the focus deviation is abnormal, and an abnormal deviation point set is obtained.

[0077] Step S33: For the set of abnormal deviation points, use NumPy to calculate its mean and variance, and determine the set of focusing parameters that need to be adjusted.

[0078] Step S34: Based on the focusing parameter set, the parameter values ​​are adjusted using the particle swarm optimization algorithm to obtain the optimized focusing parameter set.

[0079] Step S35: Correct the focus deviation distribution map using the optimized focus parameter set to generate a corrected focus deviation distribution map.

[0080] Step S36: Extract the focus deviation value again from the corrected focus deviation distribution map, verify it using a preset focus threshold, determine whether the deviation is within the allowable range, and obtain the verification result.

[0081] Step S37: Based on the verification results, if the deviation is still outside the range, iteratively adjust the focusing parameters and repeat the correction steps until the deviation meets the preset focusing threshold to obtain the final focusing parameter set.

[0082] Specifically, in the field of optical system deviation analysis, extracting focusing deviation values ​​from deviation distribution maps is a key step in optimizing optical performance.

[0083] For example, when loading a deviation distribution map using OpenCV, you can choose an RGB format image and simplify processing by converting it to grayscale. Canny edge detection can identify areas with large deviation values.

[0084] Specifically, a low threshold of 50 and a high threshold of 150 are set to extract the edge contours of the deviation area and generate quantized data containing the deviation intensity.

[0085] In one embodiment, a deviation distribution map with a resolution of 1024x768 is processed to obtain deviation values ​​of approximately 2000 edge points, forming a current focus deviation value set, ranging from 0.02 mm to 0.06 mm.

[0086] It should be noted that image preprocessing needs to remove noise to ensure the accuracy of edge detection. When comparing the current set of focus deviation values ​​with a threshold, the focus threshold can be set to 0.04 mm.

[0087] For example, if the current deviation value of a certain point reaches 0.05 mm, it is judged as abnormal and included in the abnormal deviation point set. In one possible implementation, about 300 abnormal points are selected from 2000 deviation points, with the deviation values ​​concentrated between 0.04 mm and 0.06 mm.

[0088] It should be noted that the focus threshold selection must be combined with the accuracy requirements of the optical system to avoid misjudgment. For the set of abnormal deviation points, NumPy is used to calculate the mean and variance to determine the parameters that need to be adjusted.

[0089] For example, the calculation results show a mean of 0.045 mm and a variance of 0.002 mm², indicating that the deviation distribution is relatively concentrated. Based on this, the focusing parameters that need to be adjusted, such as lens focal length or optical axis offset, can be determined.

[0090] In one embodiment, the focal length adjustment range is set to ±0.1 mm, and the optical axis offset adjustment range is set to ±0.05 mm, forming a set of focusing parameters. When adjusting the parameters using the particle swarm optimization algorithm, the number of particles can be set to 50, and the number of iterations can be set to 100.

[0091] For example, the algorithm optimizes the focal length to 52.3 mm and the optical axis offset to 0.02 mm based on the mean and variance of the deviation, thus obtaining the optimized set of focusing parameters.

[0092] It should be noted that the particle swarm optimization algorithm can efficiently converge to a better solution through collaborative search by the group. When correcting the deviation distribution map, the optimized parameters are imported into the optical simulation software to generate a new deviation distribution map.

[0093] For example, the corrected deviation range is reduced to 0.015 mm to 0.035 mm, indicating improved focusing performance.

[0094] In one embodiment, the corrected distribution map is reloaded, and the deviation value is verified using OpenCV to confirm that 98% of the points are within the 0.04 mm focusing threshold. If the verification results show that the deviation is still outside the range, the parameters can be adjusted iteratively.

[0095] For example, the second iteration further fine-tuned the focal length to 52.28 mm, generating a new deviation distribution map. Finally, all deviation values ​​were within 0.03 mm, resulting in the final set of focusing parameters.

[0096] It should be noted that the parameter changes during each iteration should be recorded in order to analyze the optimization trend.

[0097] S4 acquires material properties and processing environment data, analyzes the influence of material refractive index and ambient temperature on focusing through machine learning algorithms, and obtains parameter adjustment weights.

[0098] Optionally, this step also includes: Step S41: Obtain real-time data on material refractive index and ambient temperature from the sensor and store it as a structured dataset.

[0099] Step S42: Use support vector machine to analyze the structured dataset, extract the influence characteristics of refractive index and temperature on focusing performance, and obtain the performance influence factor.

[0100] Step S43: Based on the performance influencing factors, determine the preliminary parameter weights by fitting the relationship between refractive index and temperature and focusing performance through linear regression.

[0101] Step S44: Based on the initial parameter weights, use Scikit-learn's GridSearchCV to optimize the weight values ​​and obtain the optimized weight set.

[0102] Step S45: Based on the optimized weight set, perform data standardization using Scikit-learn's StandardScaler, adjust the structured dataset, and refit the adjusted dataset using linear regression to obtain a stable weight set.

[0103] Step S46: Obtain a stable weight set, combine it with real-time refractive index and temperature data obtained from the sensor, calculate the predicted value of focusing performance, and determine the final parameter adjustment weights.

[0104] Step S47: Adjust the weights through the final parameters, generate a focused performance optimization scheme, and output the adjusted parameter configuration.

[0105] Specifically, acquiring real-time data on material refractive index and ambient temperature from sensors is a fundamental step in optimizing the performance of optical systems. Sensors collect data in real time through high-precision measurement equipment. For example, refractive index sensors use optical interferometry to measure the optical properties of materials, while temperature sensors use thermistors to acquire changes in ambient temperature.

[0106] For example, the refractive index measurement range is 1.45 to 1.55 with an accuracy of 0.001; the temperature measurement range is 20 degrees Celsius to 40 degrees Celsius with an accuracy of 0.1 degrees Celsius. The collected data is indexed by timestamps and stored as a structured dataset in CSV format, containing three columns: refractive index, temperature, and acquisition time.

[0107] It should be noted that data acquisition must be synchronized in time to avoid analytical bias due to delays. Support vector machines are used to analyze the structured dataset and extract the characteristics of the influence of refractive index and temperature on focusing performance.

[0108] For example, using a support vector machine classification model, with refractive index and temperature as input features, focusing performance is divided into three categories: "excellent", "good", and "poor".

[0109] In one embodiment, the dataset contains 1000 data sets, of which 800 sets are used for training and 200 sets are used for testing. The model maps high-dimensional features through a kernel function to identify the impact of a 0.01 change in refractive index or a 2-degree Celsius change in temperature on focusing performance, generating performance impact factors, such as a refractive index weight of 0.6 and a temperature weight of 0.4.

[0110] It should be noted that feature extraction must be combined with the actual needs of the optical system to avoid overfitting.

[0111] The initial parameter weights were determined by fitting the relationship between refractive index, temperature, and focusing performance using linear regression.

[0112] For example, assuming focusing performance is represented by focusing performance deviation, the linear regression model uses refractive index and temperature as independent variables and focusing performance deviation as the dependent variable.

[0113] In one embodiment, the fitting results showed that for every 0.01 increase in refractive index, the focusing performance deviation increased by 0.02 mm; and for every 1 degree Celsius increase in temperature, the focusing performance deviation increased by 0.01 mm. Preliminary weighting indicated that the refractive index had a greater impact.

[0114] It should be noted that outliers need to be removed during fitting to ensure model reliability. The weights are optimized using Scikit-learn's GridSearchCV to obtain the optimized weight set.

[0115] For example, set a parametric mesh with a refractive index weight range of 0.5 to 0.7, a temperature weight range of 0.3 to 0.5, and a step size of 0.01. Through cross-validation, find the optimal weight combination, such as a refractive index of 0.65 and a temperature of 0.35.

[0116] For example, the optimized model improves prediction accuracy by 10% and reduces the prediction error of focus performance deviation to 0.005 mm.

[0117] It should be noted that grid search requires a balance between computational cost and accuracy requirements. Data standardization is performed using Scikit-learn's StandardScaler to adjust the structured dataset.

[0118] For example, normalizing the refractive index and temperature to the range of 0 to 1 eliminates dimensional differences.

[0119] In one embodiment, the standardized dataset is re-performed linear regression to obtain a stable set of weights, such as a refractive index of 0.64 and a temperature of 0.36.

[0120] It should be noted that standardization can improve the model's convergence speed and predictive stability. By combining a stable set of weights with real-time data, the focused performance prediction value is calculated, and the final parameter adjustment weights are determined.

[0121] For example, if the sensor's real-time data shows a refractive index of 1.50 and a temperature of 25 degrees Celsius, the predicted focusing performance deviation is 0.03 mm, which is below the focusing threshold of 0.04 mm, indicating good performance. After final weight adjustment, an optimized scheme is generated, and the output parameter configurations are set, such as adjusting the lens refractive index to 1.505 and setting the temperature control device to 25.2 degrees Celsius.

[0122] For example, this solution can significantly improve focusing accuracy and reduce deviation fluctuations.

[0123] It should be noted that the parameter configuration must match the actual hardware capabilities to ensure feasibility.

[0124] S5. Based on the parameter weights, a genetic algorithm is used to optimize the laser power and pulse frequency to obtain an adaptive parameter configuration.

[0125] Optionally, this step also includes: Step S51: Initialize the population using Python's DEAP library to generate an initial parameter set containing laser power and pulse frequency.

[0126] Step S52: Evaluate the laser processing performance of the population parameter set according to the preset fitness function, and determine the fitness value.

[0127] Preferably, the fitness calculation function is: F = w1(1-Ra) + w2Eff, Where F is the fitness value, Ra represents the surface roughness, Eff represents the processing efficiency, and w1 and w2 are set weights.

[0128] Step S53: If the maximum value in the fitness values ​​is less than the preset fitness threshold of 0.95, a new parameter combination is generated through crossover and mutation operations in the DEAP library to obtain the updated parameter set.

[0129] Step S54: For the updated parameter set, repeat the fitness function evaluation to obtain new fitness values.

[0130] In step S55, if the maximum value among the new fitness values ​​reaches the preset fitness threshold of 0.95, the parameter with the highest fitness is selected from the population as the final adaptive parameter configuration.

[0131] Step S56: Control the laser equipment through final adaptive parameter configuration, process the sample and measure the performance indicators to obtain the optimized parameter results.

[0132] For example, when initializing a population using the DEAP library, an initial parameter set can be constructed by randomly generating combinations of laser power and pulse frequency. Laser power typically relates to the energy input during processing, while pulse frequency affects the interaction frequency on the material surface. Assuming the laser processing equipment operates within a power range of 50 to 200 watts and a pulse frequency of 1 to 100 kHz, 100 parameter combinations can be generated, each containing a power value and a frequency value, forming the initial population parameter set. Random generation ensures that the parameters cover the entire operating range, increasing the likelihood of optimal selection.

[0133] It should be noted that the initial population size should be set reasonably based on the equipment performance and computing resources to avoid excessively large populations leading to computational burden or excessively small populations leading to insufficient diversity.

[0134] In one embodiment, the fitness function is evaluated using surface roughness and processing efficiency as core indicators. Surface roughness reflects the smoothness of the processed material and is typically expressed as Ra values ​​in micrometers. Processing efficiency is measured by the volume of material removed per unit time in cubic millimeters per second. Weights w1 and w2 can be preset according to processing requirements; for example, w1 is 0.7 and w2 is 0.3, emphasizing surface quality. Through experimental measurement, a Ra value of 0.8 micrometers and a processing efficiency of 10 cubic millimeters per second are obtained under a certain parameter combination. These values ​​are then substituted into the fitness function to calculate the fitness F value, determining whether the performance requirements are met. This evaluation method intuitively reflects the impact of parameters on the processing effect, facilitating subsequent optimization.

[0135] For example, crossover and mutation are core steps in genetic algorithms, used to generate new parameter combinations. Crossover can be achieved through single-point crossover, selecting two sets of parameters, such as 100 watts of power and 50 kHz of frequency, and 150 watts of power and 20 kHz of frequency, and exchanging some parameters to generate a new combination, such as 100 watts of power and 20 kHz of frequency. Mutation, on the other hand, randomly adjusts the parameters, for example, fine-tuning the power from 100 watts to 105 watts, increasing population diversity.

[0136] It should be noted that the crossover and mutation probabilities need to be set reasonably, for example, a crossover probability of 0.8 and a mutation probability of 0.1, to balance the ability of global search and local optimization.

[0137] In one embodiment, when repeatedly evaluating and updating the parameter set, the fitness value of each iteration can be recorded to analyze the trend of parameter changes.

[0138] For example, the initial population has a maximum fitness of 0.85. After one crossover and mutation, the maximum fitness of the new parameter set increases to 0.92. If the fitness threshold of 0.95 is not reached, iteration continues until the condition is met. Recording the Ra and efficiency values ​​for each iteration reveals that increasing power by 10 watts can significantly decrease the Ra value, while frequency adjustment has a greater impact on efficiency. This analysis helps to understand the contribution of parameters to performance.

[0139] For example, the final adaptive parameter configuration is selected based on the highest fitness value. Assume that after iteration, the following set of parameters is obtained: power 120 watts, frequency 30 kHz, corresponding to an Ra value of 0.5 micrometers, efficiency 12 cubic millimeters per second, and fitness value of 0.96, meeting the fitness threshold requirement. These parameters can be directly applied to the laser equipment control system. After processing a sample, the Ra value and efficiency are measured to verify its performance stability.

[0140] It should be noted that in practical applications, the equipment response time and material properties must be considered to ensure the feasibility of parameter configuration.

[0141] In one embodiment, when processing samples and measuring performance indicators, the Ra value can be measured using a high-precision instrument such as a profilometer, and efficiency can be evaluated using timing and volume measurement methods.

[0142] For example, when machining an aluminum alloy sample with parameters set to 120 watts power and 30 kHz frequency, the resulting Ra value is 0.48 micrometers and the efficiency is 12.5 cubic millimeters per second, which is close to the predicted value, indicating that the parameter configuration is reliable. This verification method can effectively confirm the practicality of the optimization results.

[0143] S6 dynamically adjusts the laser focusing depth and spot size through adaptive parameter configuration to obtain an optimized focusing path.

[0144] Optionally, this step also includes: Step S61: Acquire real-time depth data and spot size data of laser focusing through the sensor, and use Kalman filter algorithm to denoise the real-time depth data and spot size data to obtain smooth depth data and size data.

[0145] Step S62: Based on the smoothed depth data and size data, a preset parameter threshold is used for comparison. If the smoothed depth data exceeds the parameter threshold range, the laser focusing depth is adjusted through the PID controller to obtain the adjusted depth parameters.

[0146] Step S63: Based on the adjusted depth parameters and size data, a genetic algorithm is used to generate an initial focusing trajectory to obtain preliminary trajectory data.

[0147] Step S64: Calculate the root mean square error between the preliminary trajectory data and the actual focusing effect using the real-time acquired laser focusing feedback signal to obtain trajectory deviation data.

[0148] Step S65: If the trajectory deviation data exceeds the preset trajectory threshold, the trajectory data is optimized using the particle swarm optimization tool to obtain optimized trajectory parameters.

[0149] Step S66: Based on the optimized trajectory parameters, dynamically adjust the laser focusing depth and spot size to generate the final focusing path data.

[0150] For example, when acquiring real-time depth and spot size data from a focused laser, a high-precision laser rangefinder and a CCD camera can work together. The laser rangefinder monitors the distance between the laser focus and the material surface in real time, acquiring depth data in millimeters; the CCD camera measures the spot diameter in micrometers using image processing technology. Assuming a stainless steel sample is being machined, the sensor might acquire depth data of 2.5 millimeters and a spot size of 50 micrometers. Due to potential vibrations in the machining environment or uneven material surfaces, the data may contain noise, affecting subsequent control accuracy.

[0151] In one embodiment, the Kalman filter algorithm is used to denoise depth data and spot size data. The Kalman filter generates smooth output data by combining historical data and current measurements through prediction and update steps.

[0152] For example, the initial depth data fluctuated between 2.4 and 2.6 mm, but after filtering, it stabilized at 2.5 mm, with the standard deviation reduced to 0.01 mm; the spot size data was smoothed from 49 to 51 micrometers to 50 micrometers. This smoothed data can more accurately reflect the actual focusing state and provide a reliable basis for subsequent parameter adjustments.

[0153] For example, based on smooth depth and size data, the preset depth threshold range is 2.45 to 2.55 mm, and the spot size threshold is 48 to 52 micrometers. If the detected depth data is 2.6 mm, exceeding the parameter threshold range, the focusing depth is adjusted via a PID controller. The PID controller calculates the adjustment amount based on the proportional, integral, and derivative terms of the deviation.

[0154] For example, with the proportional gain set to 0.5, the controller outputs an adjustment signal to gradually reduce the depth of focus from 2.6 mm to 2.5 mm. This dynamic adjustment ensures that the laser focus is always in the optimal position.

[0155] In one embodiment, a genetic algorithm is used to generate an initial focusing trajectory. Based on an adjusted depth of 2.5 mm and a spot size of 50 μm, the algorithm randomly initializes 100 sets of trajectory parameters, each set including the depth change rate and the spot adjustment step size.

[0156] For example, a set of trajectory parameters could be used, with a depth change rate of 0.1 mm / s and a spot adjustment step size of 0.5 μm. This initial trajectory covers multiple possible paths, increasing the possibilities for optimization.

[0157] For example, the root mean square error between the initial trajectory and the actual focusing effect is calculated using real-time acquired feedback signals. If the error is 0.03 mm, exceeding the preset trajectory threshold of 0.02 mm, the trajectory parameters are adjusted using particle swarm optimization (PSO). PSO simulates swarm behavior and iteratively updates the depth change rate and spot adjustment step size for each trajectory group.

[0158] For example, after optimization, the depth change rate was adjusted to 0.08 mm / s, and the error was reduced to 0.015 mm, meeting the trajectory threshold requirements. This optimization method can quickly converge to better trajectory parameters.

[0159] In one embodiment, optimized trajectory parameters are used to dynamically adjust the laser focusing depth and spot size to generate final focusing path data.

[0160] For example, when machining stainless steel samples, the focusing depth is stabilized at 2.5 mm, the spot size is maintained at 50 micrometers, and the path data ensures precise laser focusing on complex curved surfaces. This dynamically adjustable path can adapt to changes in the material surface and improve processing consistency.

[0161] S7 controls the laser to perform a three-dimensional engraving operation based on the optimized focusing path, generating a preliminary engraving pattern.

[0162] Optionally, this step also includes: Step S71: Obtain the preset focusing path optimization data, use the A algorithm to determine the initial movement trajectory of the laser, and obtain the preliminary path for 3D carving.

[0163] Step S72: Based on the preliminary path and combined with material property data, adjust the laser power and beam focusing parameters to determine the control value of the engraving depth.

[0164] Step S73: The laser control module performs a three-dimensional engraving operation according to the control value to generate an initial engraving pattern.

[0165] Step S74: Extract surface feature data from the initial engraved pattern, and use the OpenCV library to analyze the accuracy of the pattern and determine whether there is any deviation.

[0166] Step S75: If the deviation exceeds the preset pattern threshold, update the cost function of the A algorithm according to the deviation data, readjust the laser movement trajectory, and obtain the updated engraving path.

[0167] Step S76: Using the updated engraving path, control the laser to perform secondary engraving to generate a finely tuned engraving pattern.

[0168] Step S77: Extract the final feature data from the finely adjusted engraved pattern, use the SIFT algorithm to verify the consistency between the pattern and the preset design, and determine the final engraving result.

[0169] For example, when acquiring preset focusing path optimization data, historical processing data can be extracted from the laser processing system's database, including the three-dimensional coordinates of the engraving path and the corresponding processing parameters. Assuming an aluminum alloy sample is being processed, the database provides a set of preset path data, including X, Y, and Z axis coordinates in millimeters with an accuracy of 0.01 millimeters. The path data reflects the geometric features of the engraving area, such as the surface height variation ranging from 0 to 5 millimeters. This data provides the basic input for subsequent algorithms, ensuring that the path planning conforms to the material surface.

[0170] In one embodiment, when using Algorithm A to determine the initial movement trajectory of the laser, Dijkstra's algorithm can be selected as a specific implementation of Algorithm A. Dijkstra's algorithm generates a preliminary 3D carving trajectory by calculating the shortest distance between path points.

[0171] For example, for the curved surface of an aluminum alloy sample, the algorithm uses the starting coordinates (0,0,0) as a reference to calculate the path to the target point (10,10,2), prioritizing points with smooth height changes to generate an initial trajectory containing 100 nodes. This method ensures that the trajectory covers the engraving area while reducing abrupt changes in laser movement.

[0172] For example, when adjusting laser power and beam focusing parameters based on material property data, the thermal conductivity and absorptivity data of aluminum alloys can be used as a reference. Assuming the thermal conductivity of aluminum alloy is 237 W / m·K and the absorptivity is 0.1 at a wavelength of 1064 nm, the laser power is initially set to 50 W, and the focused beam diameter is adjusted to 30 micrometers to control the engraving depth between 0.1 and 0.2 millimeters. This parameter adjustment adapts to the material properties, avoiding overheating or under-engraving.

[0173] In one embodiment, when the laser control module performs 3D engraving, it can send control commands through the CNC system.

[0174] For example, the control module receives a depth control value of 0.15 mm and drives the laser to move along the Z-axis, maintaining a stable focus. The initial engraving pattern is a rectangular area containing geometric textures, measuring 10 mm × 10 mm. After pattern generation, the surface exhibits micron-level texture features, initially meeting the design requirements.

[0175] For example, when analyzing the initial engraving pattern accuracy using the OpenCV library, the pattern outline can be extracted using edge detection technology. Suppose the detected deviation between the pattern edge and the preset design is 0.03 mm, exceeding the preset pattern threshold of 0.02 mm. OpenCV uses the Canny algorithm to identify edge pixels and calculate the pixel difference between the actual outline and the designed outline. This analysis method intuitively reflects the source of the deviation, facilitating subsequent optimization.

[0176] In one embodiment, when updating the cost function of algorithm A, the deviation data of 0.03 mm can be used as a weighting factor to adjust the path selection logic of Dijkstra's algorithm.

[0177] For example, by increasing the penalty value for path points in areas with large deviations, an updated trajectory with 90 nodes is regenerated. The new trajectory prioritizes avoiding curved areas with large deviations, improving path smoothness. Secondary sculpting is performed based on this trajectory, generating a finely tuned pattern with deviations reduced to 0.015 mm.

[0178] For example, when using the SIFT algorithm to verify the consistency of a finely adjusted pattern, key feature points of the pattern can be extracted. Assuming the preset design contains 100 feature points, the finely adjusted pattern matches 98 of them, achieving a matching rate of 98%. SIFT uses scale-invariant feature detection to ensure accurate comparison of the pattern under different lighting or viewing angles. This verification method confirms a high degree of consistency between the engraving result and the design.

[0179] In one embodiment, the extension scheme may introduce a real-time feedback mechanism.

[0180] For example, during the secondary engraving process, an integrated laser rangefinder sensor monitors the engraving depth and dynamically adjusts the laser power. If a depth deviation of 0.01 mm is detected, the system automatically fine-tunes the power from 50W to 52W. This method further improves engraving accuracy and consistency.

[0181] S8: Obtain the layer data of the preliminary engraved pattern, detect the accuracy of the pattern layer through image processing algorithm, and determine whether it meets the design requirements.

[0182] Optionally, this step also includes: Step S81: Obtain the original image data of the engraved pattern and generate the first image using a high-resolution scanning device.

[0183] Step S82: The first image is processed by grayscale conversion to obtain a grayscale image.

[0184] Step S83: The Canny edge detection algorithm is used to analyze the grayscale image, and a low threshold of 50 and a high threshold of 150 are set to extract the layer boundaries of the pattern and generate a boundary image.

[0185] Step S84: Extract hierarchical data from the boundary image, use OpenCV's findContours function to identify contours, calculate the contour features of each level, and obtain the contour dataset.

[0186] Preferably, the contour feature includes at least the contour area and the contour perimeter.

[0187] Step S85: If the number of levels in the contour dataset is consistent with the number of levels required by the design, then the level integrity is determined and a level integrity result is generated.

[0188] Step S86: Based on the layer integrity result, determine whether the pattern accuracy meets the design requirements and obtain the accuracy judgment result.

[0189] Step S87: Based on the accuracy judgment result, output the layer accuracy analysis report of the engraved pattern and generate the final analysis data.

[0190] For example, when acquiring raw image data of an engraved pattern, a high-resolution scanning device, such as an industrial-grade CCD camera with a resolution of 5000×5000 pixels, can be used to ensure the capture of minute details of the engraved pattern. Suppose a copper alloy sample is being processed with complex geometric textures engraved on its surface; the scanning device acquires images at a rate of 10 frames per second, generating a first image containing complete texture features. This method preserves the original information of the pattern, providing high-quality input for subsequent processing.

[0191] In one embodiment, by processing the first image with grayscale conversion, a color image can be converted into a 256-level grayscale image, highlighting the contrast between light and dark textures.

[0192] For example, the engraved areas of copper alloy samples have grayscale values ​​ranging from 50 to 200 due to differences in material reflectivity. Grayscale conversion uses a weighted average method to calculate pixel brightness, reducing color interference and facilitating subsequent edge detection. This processing method effectively enhances the recognizability of pattern layers.

[0193] For example, when analyzing grayscale images using the Canny edge detection algorithm, setting a low threshold of 50 and a high threshold of 150 can accurately extract the hierarchical boundaries of patterns. Assuming the geometric texture on the sample contains multiple depth variations, the Canny algorithm identifies edge pixels through gradient calculation, generating a boundary image. The boundary image clearly shows the hierarchical contours of the texture; for example, the inner contour corresponds to a depth of 0.1 mm, and the outer contour corresponds to 0.2 mm. This method can accurately capture the boundary features of patterns, providing reliable data for hierarchical analysis.

[0194] In one embodiment, when extracting hierarchical data from the boundary image, the OpenCV findContours function is used to identify contours and calculate features such as area and perimeter.

[0195] For example, the texture design of a copper alloy sample contains three levels of contours. findContours identified three sets of closed contours with areas of 100, 150, and 200 square millimeters and perimeters of 50, 70, and 90 millimeters, respectively. The contour dataset reflects the geometric characteristics of the levels, providing a basis for integrity assessment. This method can efficiently organize the structural information of complex patterns.

[0196] For example, when judging the integrity of the hierarchy, compare the number of levels in the contour dataset with the design requirements.

[0197] For example, if the design requires the copper alloy sample to contain three layers, and the contour dataset confirms three layers, then the integrity is deemed acceptable. This inspection method can quickly verify whether the engraving results meet expectations, ensuring the accuracy of subsequent precision analysis.

[0198] In one embodiment, pattern accuracy is determined based on the results of hierarchical integrity by comparing the deviation between the actual contour and the designed contour.

[0199] For example, assuming the area deviation threshold for the designed outline is 5 square millimeters, and the actual detected deviation is 3 square millimeters, the accuracy meets the standard. The accuracy judgment result reflects the processing quality of the engraved pattern and provides a basis for generating an analysis report. This method can intuitively evaluate the processing effect of the pattern.

[0200] For example, when outputting a layer accuracy analysis report of an engraved pattern, the contour dataset, integrity results, and accuracy judgment results can be integrated into a structured document.

[0201] For example, the report shows that the area deviation of the three contour layers of the copper alloy sample is less than 5 square millimeters, the number of layers is consistent, and the accuracy is qualified. The final analysis data is presented in tabular form, including the area, perimeter, and deviation value of each contour layer. This report format makes it easier for users to quickly understand the layer accuracy of the engraving results and improves data readability.

[0202] In one embodiment, the extension scheme may introduce an adaptive threshold adjustment mechanism.

[0203] For example, in Canny edge detection, if the reflectivity of the sample material varies significantly, the low and high thresholds can be dynamically adjusted, such as from 50 and 150 to 60 and 160, to adapt to the edge extraction requirements under different lighting conditions. This approach improves the algorithm's adaptability to complex materials and ensures the stability of the boundary image.

[0204] S9. If the hierarchical accuracy does not meet the requirements, adjust the iteration parameters of the genetic algorithm according to the detection results to generate a new adaptive parameter configuration.

[0205] Optionally, this step also includes: Step S91: If the detection result shows that the layer accuracy does not meet the standard, then obtain the accuracy deviation value from the detection data and determine the adjustment direction.

[0206] Step S92: Calculate the correlation coefficient between the deviation value and the iteration parameter from the accuracy deviation value using Python's SciPy library to obtain the parameter influence weight.

[0207] Step S93: Based on the influence weights of the parameters, crossover and mutation operations of the genetic algorithm are used to generate a candidate parameter set using Python's DEAP library.

[0208] Step S94: From the candidate parameter set, evaluate the hierarchical accuracy of each parameter set through the MATLAB simulation environment to determine the preferred parameter set.

[0209] Step S95: If the hierarchical accuracy of the preferred parameter set still does not meet the standard, then update the parameter influence weights based on the evaluation results.

[0210] Step S96: Generate a new set of candidate parameters from the updated parameter influence weights.

[0211] Step S97: Through iterative optimization, the preferred parameter set is applied to the adaptive configuration to obtain the final parameter configuration.

[0212] In one possible implementation, if the test results show that the layer accuracy of the engraved pattern does not meet the standard, the accuracy deviation value needs to be extracted from the test data to determine the adjustment direction.

[0213] For example, when machining an aluminum alloy sample with finely engraved patterns, inspection revealed a deviation of 8 square millimeters in the area of ​​the layer contours, exceeding the design threshold of 5 square millimeters. The accuracy deviation value was obtained by analyzing the contour dataset, specifically the difference between the actual area and the designed area for each layer. This method clearly quantifies the degree of deviation, providing a data basis for subsequent parameter adjustments.

[0214] For example, using Python's SciPy library to calculate the correlation coefficient between accuracy deviation and processing parameters can identify key influencing factors. Assuming the analysis reveals a correlation coefficient of 0.85 between laser power and accuracy deviation, it indicates that laser power has a significant impact on layer accuracy. The correlation coefficient, obtained through statistical analysis, reflects the contribution of parameter changes to the deviation. This method helps to pinpoint the core parameters that need optimization.

[0215] In one possible implementation, a genetic algorithm is used to generate a set of candidate parameters based on the influence weights of the parameters.

[0216] For example, using the DEAP library with a crossover probability of 0.7 and a mutation probability of 0.2, parameter combinations including laser power, scanning speed, and depth of focus are generated. The candidate parameter set includes 10 different configurations, such as laser power ranging from 20 to 30 watts and scanning speeds from 500 to 800 millimeters per second. This method rapidly explores the parameter space and screens potential optimization schemes by simulating biological evolution mechanisms.

[0217] For example, the hierarchical accuracy of candidate parameter sets can be evaluated using a MATLAB simulation environment. Assuming the simulation is for pattern engraving on an aluminum alloy sample, the contour area deviation for each parameter set is tested. The results show that a certain parameter set (laser power 25 watts, scanning speed 600 mm / s) reduces the deviation to 4 square millimeters, meeting the design requirements. This simulation evaluation allows for a direct comparison of the effects of different parameter sets, determining the optimal parameter set.

[0218] In one possible implementation, if the accuracy of the preferred parameter set is still not up to standard, the parameter influence weights need to be updated.

[0219] For example, the analysis revealed that the influence weight of scan speed increased from 0.3 to 0.5, indicating that its impact on accuracy was underestimated. The updated weights were recalculated using a weighted average to generate a new set of candidate parameters, such as adjusting the scan speed to 550 mm / s. This iterative optimization gradually approaches the optimal solution.

[0220] For example, applying the final parameter configuration to the adaptive configuration can significantly improve engraving quality. Assuming the pattern layer deviation of the aluminum alloy sample is reduced to 3 square millimeters, the contour clarity is improved, and the layer boundaries better match the design expectations. The advantage of this method lies in ensuring the targeted and efficient adjustment of parameters through data-driven iterative optimization, providing reliable support for complex engraving tasks.

[0221] In one possible implementation, the extension scheme could introduce a dynamic parameter monitoring mechanism.

[0222] For example, laser power fluctuation data can be collected in real time during the engraving process, and the parameter range can be dynamically adjusted based on the deviation value. This method can adapt to changes in materials or environment during processing, improve the system's adaptability to complex processes, and ensure the stability of layer accuracy.

[0223] like Figure 4 As shown, in a second aspect, the present invention provides an unattended laser spherical engraving system integrated with AI intelligence, which performs laser spherical engraving using the method described above. The system mainly includes: The geometric data acquisition module is used to acquire the geometric data of the spherical material, generate a spherical curvature distribution model through three-dimensional scanning technology, and obtain curvature change data. The curvature model generation module is used to calculate the focusing deviation of the laser at different depths based on the curvature change data and the optical path simulation algorithm, and obtain the focusing deviation distribution map. The optical path simulation module is used to extract the focus deviation value from the focus deviation distribution map, determine whether the focus deviation exceeds the allowable range by using a preset focus threshold, and determine the focus parameters that need to be adjusted. The deviation analysis module is used to acquire material properties and processing environment data, and analyzes the influence of material refractive index and ambient temperature on focusing through machine learning algorithms to obtain parameter adjustment weights; The parameter weight calculation module is used to adjust the weights according to the parameters and optimize the laser power and pulse frequency using a genetic algorithm to obtain an adaptive parameter configuration. The parameter optimization module is used to dynamically adjust the laser focusing depth and spot size through adaptive parameter configuration to obtain an optimized focusing path; The focus adjustment module is used to control the laser to perform 3D engraving operations and generate a preliminary engraving pattern based on the optimized focus path. The engraving execution module is used to acquire the layer data of the initial engraving pattern, detect the accuracy of the pattern layer through image processing algorithms, and determine whether it meets the design requirements. The accuracy detection module is used to adjust the iteration parameters of the genetic algorithm and generate a new adaptive parameter configuration if the hierarchical accuracy does not meet the requirements.

[0224] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A method of unattended laser spherically internal engraving in combination with AI intelligence, characterized in that, The method comprises: S1, acquiring the geometric data of the spherical material, generating a spherical curvature distribution model through three-dimensional scanning technology to obtain curvature variation data; S2, calculating the focusing deviation of the laser at different depths according to the curvature variation data to obtain a focusing deviation distribution map; S3, extracting the focusing deviation value from the focusing deviation distribution map, judging whether the focusing deviation exceeds the allowed range through a preset focusing threshold, and determining the focusing parameters that need to be adjusted; S4, acquiring material characteristics and processing environment data, analyzing the influence of material refractive index and environmental temperature on focusing, and obtaining parameter adjustment weights; S5, optimizing the laser power and pulse frequency according to the parameter adjustment weights to obtain adaptive parameter configuration; S6, dynamically adjusting the laser focusing depth and spot size through the adaptive parameter configuration to obtain an optimized focusing path; S7, controlling the laser to perform three-dimensional engraving operation according to the optimized focusing path to generate a preliminary engraving pattern; S8, acquiring the level data of the preliminary engraving pattern, detecting the accuracy of the pattern level, and judging whether it meets the design requirements; S9, if the level accuracy does not meet the requirements, adjusting the iteration parameters according to the detection results to generate new adaptive parameter configuration.

2. The unattended laser inscribing method of claim 1, wherein The step S1 acquires the geometric data of the spherical material, generates a spherical curvature distribution model through three-dimensional scanning technology to obtain curvature variation data, and comprises: Step S11, acquiring point cloud data of the spherical material through a three-dimensional scanner to generate an initial geometric data set containing spatial coordinates; Step S12, extracting point cloud data from the initial geometric data set, and generating a continuous surface model of the spherical material according to the point cloud data; Step S13, selecting surface points from the continuous surface model, calculating the principal curvatures of each point to obtain curvature distribution data; Step S14, if the noise level of the curvature distribution data is higher than a preset noise threshold, performing denoising processing on the curvature distribution data to obtain smooth curvature distribution data; Step S15, calculating gradient data of curvature variation from the smooth curvature distribution data to determine the curvature variation trend; Step S16, extracting peak and valley positions from the curvature variation trend to generate a spatial distribution data set describing the curvature variation; Step S17, converting the spatial distribution data set into CSV output format to obtain final curvature variation data.

3. The unattended laser inscribing method of claim 2, wherein, The step S13 selects surface points from the continuous surface model, calculates the principal curvatures of each point to obtain curvature distribution data, and comprises: the principal curvatures include maximum principal curvature and minimum principal curvature.

4. The unattended laser inscribing method combined with AI intelligence according to claim 3, characterized in that, The step S15 calculates gradient data of curvature variation from the smooth curvature distribution data to determine the curvature variation trend, and comprises: the gradient data is obtained by calculating the curvature difference of adjacent points through finite difference method.

5. The unattended laser inscribing method of claim 1, wherein, The step S2 calculates the focusing deviation of the laser at different depths according to the curvature variation data to obtain a focusing deviation distribution map, and comprises: Step S21, acquiring the curvature variation data, extracting the curvature parameters from a preset optical system to obtain a curvature data set; Step S22, calculating the light path propagation path of the laser at different depths according to the curvature data set to obtain a propagation path set; Step S23, extracting the focal point coordinates of each depth from the propagation path set to determine the focal point data set; Step S24, calculating the deviation of the laser focal point from the ideal focal point for the focal point data set to obtain a set of focal deviation values; Step S25, according to the set of focal deviation values, if the focal deviation value exceeds the preset deviation value threshold, adjusting the curvature influence factor, recalculating the optical path propagation path to obtain an updated propagation path set; Step S26, extracting the focal point coordinates of each depth from the updated propagation path set to determine the updated focal point data set; Step S27, calculating the deviation of the laser focal point from the ideal focal point for the updated focal point data set to obtain an updated set of focal deviation values; Step S28, generating a focal deviation distribution map according to the updated set of focal deviation values to determine the distribution map data.

6. The unattended laser inscribing method of claim 5, wherein, The step S24, calculating the deviation of the laser focal point from the ideal focal point for the focal point data set to obtain a set of focal deviation values, comprises: The deviation of the laser focus point from the ideal focus point is calculated using the following equation: wherein is the deviation of the laser focus point from the ideal focus point, , , is the laser focus point coordinate, is the ideal point coordinate.

7. The unattended laser inscribing method of claim 1, wherein, The step S5, according to the parameter adjustment weight, optimizing the laser power and pulse frequency to obtain the adaptive parameter configuration, comprises: Step S51, initializing the population using the DEAP library of Python to generate an initial parameter combination containing the laser power and pulse frequency to obtain a population parameter set; Step S52, evaluating the laser processing performance of the population parameter set according to the preset fitness function to determine the fitness value; Step S53, if the maximum value in the fitness value is less than the preset fitness threshold, generating a new parameter combination to obtain an updated parameter set; Step S54, repeatedly executing the fitness function evaluation for the updated parameter set to obtain a new fitness value; Step S55, if the maximum value in the new fitness value reaches the preset fitness threshold, selecting the parameter with the highest fitness from the population as the final adaptive parameter configuration; Step S56, controlling the laser equipment through the final adaptive parameter configuration to process the sample and measure the performance indicators to obtain the optimization parameter result.

8. The unattended laser inscribing method combined with AI intelligence according to claim 7, characterized in that, The step S52, evaluating the laser processing performance of the population parameter set according to the preset fitness function to determine the fitness value, comprises: The fitness calculation function is: F = w1(1-Ra) + w2Eff, Wherein, F is the fitness value, Ra represents the surface roughness, Eff represents the processing efficiency, and w1 and w2 are set weights.

9. The unattended laser inscribing method combined with AI intelligence according to claim 8, characterized in that, The step S53, if the maximum value in the fitness value is less than the preset fitness threshold, generating a new parameter combination to obtain an updated parameter set, comprises: the fitness threshold is set to 0.

95.

10. An unattended laser spherically inscribed system combined with AI intelligence, characterized in that, The method is used to perform laser spherical internal engraving, and the system comprises: A geometric data acquisition module is configured to acquire geometric data of a spherical material, generate a spherical curvature distribution model through a three-dimensional scanning technology, and obtain curvature variation data; A curvature model generation module is configured to calculate the focal deviation of laser at different depths according to the curvature variation data using an optical path simulation algorithm to obtain a focal deviation distribution map; The light path simulation module is configured to extract a focusing deviation value from the focusing deviation distribution map, determine whether the focusing deviation exceeds an allowable range by a preset focusing threshold, and determine a focusing parameter that needs to be adjusted. The deviation analysis module is configured to obtain material characteristics and processing environment data, analyze the influence of material refractive index and environmental temperature on focusing by a machine learning algorithm, and obtain a parameter adjustment weight. The parameter weight calculation module is configured to optimize laser power and pulse frequency by a genetic algorithm according to the parameter adjustment weight, and obtain an adaptive parameter configuration. The parameter optimization module is configured to dynamically adjust laser focusing depth and spot size by the adaptive parameter configuration, and obtain an optimized focusing path. The focusing adjustment module is configured to control the laser to perform a three-dimensional engraving operation according to the optimized focusing path, and generate a preliminary engraving pattern. The engraving execution module is configured to obtain level data of the preliminary engraving pattern, detect the accuracy of the pattern level by an image processing algorithm, and determine whether the design requirements are met. The accuracy detection module is configured to adjust the iteration parameters of the genetic algorithm according to the detection result if the level accuracy does not meet the requirements, and generate a new adaptive parameter configuration.

Citation Information

Cited By

  • Flat engraving control method of laser engraving equipment for mobile phone shell

    CN121276948A