A laser scanning method and system based on AI recognition
By acquiring information on workpiece material, size, and focal length, and combining it with historical scanning trajectories, AI recognition technology is used to generate precise laser scanning trajectories, solving the problem of inconsistent engraving caused by differences in workpieces and achieving high-precision QR code engraving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIUJIANG YANGTAI METAL PROD CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-12
Smart Images

Figure CN122197923A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to a laser scanning method and system based on AI recognition. Background Technology
[0002] With the continuous increase in demand for intelligent manufacturing and product lifecycle traceability, laser engraving technology, with its advantages of non-contact, high stability, and permanent marking, has been widely used in the QR code coding process of product shells in consumer electronics, precision hardware, and automotive parts.
[0003] Existing laser marking positioning solutions mainly use machine vision combined with fixed parameters for workpiece recognition and marking execution. By visually acquiring information about the workpiece contour and the area to be marked, position calibration is completed by single image recognition, and QR code marking is completed according to fixed laser parameters.
[0004] However, in existing technologies, differences in workpiece material and size can cause deviations in positioning results, resulting in insufficient consistency in QR code engraving positions and unstable clarity of graphic boundaries, leading to significant fluctuations in recognition pass rates during mass production. Summary of the Invention
[0005] In view of this, embodiments of this application provide a laser scanning method and system based on AI recognition, aiming to solve the problems of insufficient consistency of graphic imprint position, low trajectory matching degree, and poor adaptability of imprint parameters in the prior art.
[0006] The first aspect of this application provides a laser scanning method based on AI recognition, comprising:
[0007] Acquire the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the graphic information to be engraved, the range information of the area to be engraved, the current laser focal length information, the historical laser scanning trajectory information, and the positioning model of the graphic to be engraved;
[0008] Based on the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the current laser focal length information, and the historical laser scanning trajectory information, the positioning information of the area to be engraved is obtained;
[0009] Based on the graphic information to be engraved, the range information of the area to be engraved, and the positioning information of the area to be engraved, the current laser scanning trajectory information is generated.
[0010] Based on the current laser scanning trajectory information, the graphic information to be engraved, the graphic positioning model to be engraved, and the preset set of laser engraving parameters, laser scanning information is generated.
[0011] A second aspect of this application provides a laser scanning system based on AI recognition, comprising:
[0012] The information acquisition module is used to acquire information such as the material of the workpiece to be engraved, the size of the workpiece to be engraved, the graphic information to be engraved, the range of the area to be engraved, the current laser focal length, the historical laser scanning trajectory, and the positioning model of the graphic to be engraved.
[0013] The module for generating positioning information of the area to be engraved is used to obtain the positioning information of the area to be engraved based on the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the current laser focal length information, and the historical laser scanning trajectory information.
[0014] The current laser scanning trajectory information generation module is used to generate current laser scanning trajectory information based on the graphic information to be engraved, the range information of the area to be engraved, and the positioning information of the area to be engraved.
[0015] The laser scanning information generation module is used to generate laser scanning information based on the current laser scanning trajectory information, the graphic information to be engraved, the positioning model of the graphic to be engraved, and the preset set of laser engraving parameters.
[0016] A third aspect of this application provides a terminal device, the terminal device including a memory and a processor, the memory storing a computer program executable on the processor, the processor executing the computer program to implement the steps of the AI-based laser scanning method described in the first aspect above.
[0017] A fourth aspect of this application provides a computer-readable storage medium, comprising: storing a computer program, wherein when executed by a processor, the computer program implements the steps of the AI-based laser scanning method described in the first aspect above.
[0018] The beneficial effects of this application embodiment compared with the prior art are: this application accurately adapts to the individual differences of the workpiece to be engraved and the dynamic requirements of laser engraving, realizes high-precision scanning of QR code laser engraving, and makes the generated laser scanning information more in line with the actual engraving requirements, thereby improving the positioning accuracy, trajectory matching degree and graphic engraving consistency of laser scanning, and meeting the actual needs of high-precision engraving of QR codes on the shell of industrial products in industrial mass production. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1This is a schematic diagram illustrating the implementation process of the AI-based laser scanning method provided in Embodiment 1 of this application;
[0021] Figure 2 This is a schematic diagram illustrating the implementation process of the AI-based laser scanning method provided in Embodiment 2 of this application;
[0022] Figure 3 This is a schematic diagram illustrating the implementation process of the AI-based laser scanning method provided in Embodiment 3 of this application;
[0023] Figure 4 This is a schematic diagram illustrating the implementation process of the AI-based laser scanning method provided in Embodiment 4 of this application;
[0024] Figure 5 This is a schematic diagram illustrating the implementation process of the AI-based laser scanning method provided in Embodiment 5 of this application;
[0025] Figure 6 This is a schematic diagram illustrating the implementation process of the AI-based laser scanning method provided in Embodiment Six of this application;
[0026] Figure 7 This is a schematic diagram illustrating the implementation process of the AI-based laser scanning method provided in Embodiment 7 of this application;
[0027] Figure 8 This is a schematic diagram of the structure of the AI-based laser scanning system provided in the embodiments of this application;
[0028] Figure 9 This is a schematic diagram of the terminal device provided in the embodiments of this application. Detailed Implementation
[0029] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0030] To illustrate the technical solution described in this application, specific embodiments are provided below.
[0031] Figure 1 The implementation flowchart of the AI-based laser scanning method provided in Embodiment 1 of this application is shown below in detail:
[0032] Step S101: Obtain the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the graphic information to be engraved, the range information of the area to be engraved, the current laser focal length information, the historical laser scanning trajectory information, and the positioning model of the graphic to be engraved.
[0033] In this embodiment, the material information of the workpiece to be engraved can be the relevant material parameters of the electronic product casing to be engraved with QR codes in industrial production. This is used to match the appropriate laser engraving parameters. For example, different casing materials have different laser absorption rates, which affects the clarity of the engraving. The material information of the workpiece to be engraved can be obtained by scanning with a material detection sensor, or by manually entering the material parameters corresponding to the workpiece model through an industrial control terminal. The size information of the workpiece to be engraved can refer to the specific size parameters of the casing to be engraved. This serves as the basis for determining the position of the area to be engraved, avoiding the engraving position shift due to size deviation. The size information of the workpiece to be engraved can be obtained by taking a picture of the workpiece outline with a vision imaging device and then processing it with an image analysis algorithm. The graphic information to be engraved can be the graphic data related to the QR code to be engraved on the casing. This is the core target of laser scanning engraving. The graphic information to be engraved can be obtained by importing a preset QR code graphic file through an industrial control terminal. The area range information to be engraved can refer to the specific area parameters preset on the casing for engraving QR codes. This clarifies the boundaries and range of the engraving, avoiding exceeding the preset area and affecting the product appearance. The area range information to be engraved can be obtained by capturing the coordinate data of the preset engraving area on the casing with a vision positioning device. The current laser focal length information refers to the current focal length parameter of the laser engraving equipment, which directly affects the laser spot size and engraving accuracy. This information can be acquired in real-time by the focal length sensor built into the laser equipment. Historical laser scan trajectory information refers to the scan path data from previous laser engravings of similar workpieces. This data is used to analyze trajectory deviation patterns and assist in optimizing the current scan trajectory. Historical laser scan trajectory information can be generated by continuously recording the trajectory data for each engraving, and updating the previous trajectory information daily. The image positioning model can be a deep learning-based QR code positioning and recognition model used to accurately match the positional relationship between the image to be engraved and the area to be engraved, thereby achieving precise laser scanning positioning. This model can be trained on a large dataset of corresponding workpiece shells, the image to be engraved, and scan trajectories, combined with a CNN+Attention hybrid architecture. Image enhancement algorithms are introduced during training to optimize positioning accuracy, ensuring accurate positioning even under different workpiece deviations.
[0034] In this embodiment, the material information of the workpiece to be engraved may include the surface finish information, hardness information, and reflective properties information of the workpiece; the size information of the workpiece to be engraved may include the contour information, edge inclination information, and thickness information of the workpiece; the graphic information to be engraved may include the dot matrix information and boundary information of the graphic; the area information to be engraved may include the center coordinates, boundary coordinates, and flatness information of the area; the current laser focal length information may include the current laser focus offset information, the current laser focal spot size, and the current laser optical path attitude information; and the historical laser scanning trajectory information may include historical laser path deviation information, historical laser engraving repeatability information, and historical laser alignment correction information.
[0035] Among these, the surface finish information of the workpiece to be engraved refers to the smoothness of the shell surface, which affects the laser reflection intensity and engraving clarity. For example, a shell with a high surface finish has strong laser reflection, requiring adjustment of the laser power for adaptation. The hardness information of the workpiece to be engraved refers to the hardness of the shell material, which determines the energy requirement during laser engraving. For example, a material with high hardness requires higher laser power to achieve clear engraving. The reflectivity information of the workpiece to be engraved refers to the reflectivity of the shell surface to the laser. Materials with different reflectivity will cause differences in laser energy absorption, thus affecting the engraving effect. The contour information of the workpiece to be engraved refers to the overall shape contour data of the shell, used to determine the relative position of the area to be engraved on the shell. The edge tilt angle information of the workpiece to be engraved refers to the tilt angle of the shell edge relative to the horizontal plane, avoiding scanning trajectory deviation due to edge tilt. The thickness information of the workpiece to be engraved refers to the thickness parameter of the shell, affecting the laser penetration depth and avoiding damage to the workpiece due to excessive laser power. The dot matrix information of the graphic to be engraved refers to the dot matrix distribution data of the QR code, which is the core element constituting the QR code graphic. The boundary information of the graphic to be engraved refers to the edge contour of the QR code graphic. The parameters are used to accurately locate the area of the graphic; the center coordinates of the area to be engraved can refer to the coordinates of the center point of the area to be engraved, serving as the reference starting point of the scanning trajectory; the boundary coordinates of the area to be engraved can refer to the edge coordinates of the area to be engraved, clarifying the boundary range of the scan; the flatness information of the area to be engraved can refer to the flatness of the area to be engraved, avoiding laser focal length deviation due to unevenness; the current laser focus offset information can refer to the deviation data between the current laser focal length and the ideal focus position, used for real-time focal length correction; the current laser spot size information can refer to the size parameter of the current laser spot, directly affecting the thickness and clarity of the engraved lines; the current laser optical path attitude information can refer to the angle and position state of the laser emission optical path, ensuring that the laser accurately illuminates the area to be engraved; the historical laser path deviation information can refer to the deviation data between the past scanning trajectory and the ideal trajectory, used to analyze the deviation pattern; the historical laser engraving repeatability accuracy information can refer to the positional consistency data of multiple engravings of the same graphic in the past, reflecting the stability of the equipment; the historical laser alignment correction information can refer to the correction parameters made for trajectory deviation in the past, used to assist in the current trajectory optimization.Among these features, the surface finish, hardness, and reflectivity of the workpiece material can be collected collaboratively by a material detection sensor and a vision imaging device; the size of the workpiece can be obtained by taking a picture of the workpiece with a vision imaging device and then processing it using an image contour extraction algorithm; the graphic information to be engraved can be obtained by importing a preset QR code file into an industrial control terminal, and then obtaining the dot matrix and boundary information after encoding and parsing; the area range information to be engraved can be obtained by capturing a preset area of the shell with a vision positioning device, and then calculating the center, boundary coordinates, and flatness information; the current laser focal length information can be collected in real time by the focal length sensor and optical path monitoring module built into the laser device; and the historical laser scanning trajectory information can be automatically recorded by the system, including the trajectory, deviation, and correction data for each engraving, and the newly collected trajectory information can be overlaid and updated with the existing historical data daily to generate a continuous historical record.
[0036] Step S102: Based on the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the current laser focal length information, and the historical laser scanning trajectory information, the positioning information of the area to be engraved is obtained.
[0037] In this embodiment, the material and size information of the workpiece to be engraved are first encoded to generate a basic feature vector, which serves as the core basis for determining the location of the area to be engraved. Then, combined with the current laser focal length information, a threshold discrimination and image registration algorithm is used to initially determine the approximate location of the area to be engraved, avoiding positioning errors caused by focal length deviations and workpiece size differences. Then, based on historical laser scanning trajectory information and combined with standard positioning parameters of similar workpieces, a dynamic positioning feature space can be constructed using an LSTM+Transformer hybrid temporal architecture. This space includes key features such as historical positioning deviations and trajectory correction parameters. A collaborative filtering algorithm is used to calculate the positioning similarity between the current workpiece and historical similar workpieces. By referring to the positioning patterns of highly similar samples, the current positioning judgment is optimized, and the preliminary positioning position is corrected to obtain accurate positioning information of the area to be engraved, ensuring that the positioning information of the area to be engraved highly matches the actual situation of the workpiece.
[0038] Step S103: Generate current laser scanning trajectory information based on the graphic information to be engraved, the range information of the area to be engraved, and the positioning information of the area to be engraved.
[0039] In this embodiment, it is understood that the information of the graphic to be engraved, the range information of the area to be engraved, and the positioning information of the area to be engraved are all closely related to the generation of the laser scanning trajectory. The graphic to be engraved information can be matched with the positioning information of the area to be engraved based on pre-defined trajectory generation rules, clarifying the specific placement of the graphic within the area to be engraved and preventing the graphic from exceeding the area's boundaries. For example, if the positioning information of the area to be engraved shows the center coordinates of the area as a preset value, and the graphic to be engraved is a QR code with a specific dot matrix, then the center of the QR code graphic is aligned with the center of the area to be engraved. Then, combined with the range information of the area to be engraved, the boundary constraints of the QR code graphic within the area are determined. Furthermore, referring to the optimized parameters in historical laser scanning trajectory information, the scanning path is adjusted to avoid trajectory overlap or omissions. Then, a path planning algorithm is used to generate a scanning path that fits the outline of the graphic to be engraved and adapts to the range of the area to be engraved, thereby generating the current laser scanning trajectory information. This ensures that the laser scanning trajectory accurately covers the graphic to be engraved and meets the boundary requirements of the area to be engraved.
[0040] Step S104: Generate laser scanning information based on the current laser scanning trajectory information, the graphic information to be engraved, the graphic positioning model to be engraved, and the preset set of laser engraving parameters.
[0041] In this embodiment, the preset laser engraving parameter set can be manually preset and includes a dataset containing core engraving parameters such as laser power, scanning speed, and spot size, used to adapt to the engraving requirements of different workpiece materials and patterns. The pattern positioning model to be engraved can be a deep learning-based precise positioning model used to calibrate the matching degree between the scanning trajectory and the pattern to be engraved in real time. The current laser scanning trajectory information and the pattern information to be engraved can be input into the pattern positioning model. The pattern information and trajectory information are encoded using a BERT pre-trained model. After processing by a self-attention mechanism, a contextual feature vector is extracted to reflect the matching state between the trajectory and the pattern. Then, using this feature vector as a control condition, combined with the preset laser engraving parameter set, the laser scanning parameters are adaptively adjusted. For example, the laser power parameter is adjusted according to the reflective characteristics of the workpiece material information, and the scanning speed and spot size are adjusted according to the dot matrix information of the pattern to be engraved. Then, the current laser scanning trajectory is fine-tuned through a path optimization algorithm to ensure that the trajectory and the pattern are perfectly matched, thereby generating laser scanning information containing key parameters such as scanning path, laser power, and scanning speed.
[0042] The AI-based laser scanning method provided in this application accurately adapts to the individual differences of the workpiece to be engraved and the dynamic requirements of laser engraving, realizing high-precision scanning of QR code laser engraving. This makes the generated laser scanning information more in line with the actual engraving requirements, thereby improving the positioning accuracy, scanning trajectory matching degree and graphic engraving consistency of laser scanning, and meeting the actual needs of high-precision engraving of QR codes on the shells of industrial products in industrial mass production.
[0043] Figure 2 The flowchart illustrating the implementation of the AI-based laser scanning method provided in Embodiment 2 of this application is shown. The difference between this method and Embodiment 1 is that step S104 specifically includes:
[0044] Step S201: Based on the preset feature extraction rules for the pattern to be engraved, and according to the preset set of laser engraving parameters, generate multiple calibration engraving pattern feature information.
[0045] In this embodiment, the preset feature extraction rules for the graphic to be engraved can be manually preset. These rules can refer to a standardized process for processing the engraved graphic data through image contour extraction, dot matrix feature analysis, and boundary feature enhancement, used to accurately extract the core features of the graphic. Multiple sets of engraving parameters adapted to different workpiece materials can be selected from a preset set of laser engraving parameters. Then, for each set of parameters corresponding to a standard QR code graphic, an image contour extraction algorithm is sequentially executed to obtain the graphic boundary features. Next, dot matrix feature analysis is used to extract the dot matrix distribution pattern of the graphic. Finally, a boundary feature enhancement algorithm can be used to optimize feature accuracy, generating calibrated engraved graphic feature information corresponding to each set of parameters. This information serves as the standard input feature for subsequent training of the graphic positioning model, ensuring a clear reference benchmark during the training process.
[0046] Step S202: Encode the graphic information to be engraved to obtain multiple graphic feature information.
[0047] In this embodiment, the graphic information to be engraved includes the dot matrix information and the boundary information of the graphic. The encoding process is as follows: First, the dot matrix information and the boundary information of the graphic to be engraved are converted into structured numerical data, such as dot matrix coordinates and boundary contour parameters. Then, these numerical data are input into a large language model to generate corresponding graphic feature description data, such as "the dot matrix is evenly distributed, the boundary contour is clear, and it conforms to the QR code standard". Then, the graphic feature description data is input into the CNN pre-trained model in the graphic localization model to be engraved. After processing through the self-attention mechanism, the context vector is extracted as the graphic feature information to be engraved. Since the graphic to be engraved may have different angles and different scaling ratios, multiple graphic feature information adapted to different working conditions will be generated.
[0048] Step S203: Based on the multiple calibrated imprint feature information and the multiple imprint feature information, train the imprint positioning model to obtain the trained imprint positioning model.
[0049] In this embodiment, the localization model for the image to be engraved can be a CNN+Attention hybrid architecture model based on deep learning. The training process can first use the encoder in the VAE pre-trained model to map the generated multiple calibrated engraving image feature information to a low-dimensional latent feature vector. Then, the low-dimensional latent feature vector and the multiple image feature information to be engraved are used as input to the localization model for the image to be engraved. During the training process, the matching error between the image feature information to be engraved and the calibrated image feature information is calculated using the calibrated image feature information as a standard benchmark. The model parameters are updated through the backpropagation algorithm. Then, an image enhancement algorithm is introduced to simulate the changes in image features under different workpiece deviations and different lighting conditions to optimize the model's adaptability. The training process is repeated until the error converges, resulting in the trained localization model for the image to be engraved. This model can accurately identify the positional association between the image to be engraved and the area to be engraved, thus improving the localization accuracy.
[0050] Step S204: Generate laser scanning information based on the current laser scanning trajectory information, the image to be engraved information, and the trained image positioning model to be engraved.
[0051] In this embodiment, the current laser scanning trajectory information and the graphic information to be engraved can be input together into the trained graphic positioning model. The trained graphic positioning model will first perform feature matching between the current laser scanning trajectory information and the graphic information to be engraved to identify deviations between the trajectory and the graphic. Then, based on the graphic information to be engraved, the current laser scanning trajectory information will be fine-tuned to correct trajectory offset, overlap, or omission. Then, combined with a preset set of laser engraving parameters, the laser power, scanning speed, and other parameters will be adjusted according to the characteristics of the graphic to be engraved and the material properties of the workpiece. Finally, the fine-tuned current laser scanning trajectory information and the adjusted engraving parameters will be integrated to generate laser scanning information containing a precise scanning path and adaptation parameters, ensuring that the laser engraving can accurately fit the graphic to be engraved and improve the engraving clarity and positional consistency.
[0052] The AI-based laser scanning method provided in this application enables the positioning model of the graphic to be engraved to learn the correlation between the graphic to be engraved and the laser scanning parameters more accurately, thereby improving the adaptability of the laser scanning information to the actual needs of the graphic to be engraved and the characteristics of the workpiece, thus improving the positioning accuracy and engraving effect of the laser scanning, and adapting to the engraving needs of different working conditions in industrial mass production.
[0053] Figure 3The flowchart illustrating the implementation of the AI-based laser scanning method provided in Embodiment 3 of this application is shown. Its difference from Embodiment 2 described above lies in:
[0054] The plurality of calibration imprinted graphic feature information includes first calibration imprinted graphic feature information and second calibration imprinted graphic feature information;
[0055] The plurality of graphic feature information to be engraved includes first graphic feature information to be engraved and second graphic feature information to be engraved;
[0056] Step S203 specifically includes:
[0057] Step S301: Perform splicing processing based on the first calibrated imprinting pattern feature information and the first imprinting pattern feature information to generate the first imprinting pattern splicing feature information.
[0058] In this embodiment, the first calibration and engraving graphic feature information can be calibration graphic features adapted to the standard workpiece material and standard size, and the first graphic feature information to be engraved can be graphic features corresponding to the workpiece material and size to be engraved. The splicing process can be to splice the first calibration and engraving graphic feature information and the first graphic feature information to be engraved according to the feature dimension, retain the core feature parameters of both, and then optimize the feature integrity after splicing through the feature fusion algorithm to remove redundant features, thereby generating the first engraving graphic splicing feature information. This information can simultaneously reflect the standardity of the calibration graphic and the particularity of the graphic to be engraved, providing a more comprehensive feature input for model training.
[0059] Step S302: Perform splicing processing based on the second calibrated imprinting pattern feature information and the second imprinting pattern feature information to generate second imprinting pattern splicing feature information.
[0060] In this embodiment, the second calibration imprinting graphic feature information can be calibration graphic features adapted to special workpiece materials and non-standard sizes, complementing the first calibration imprinting graphic feature information. The second graphic feature information to be imprinted can be feature information of the graphic to be imprinted under different angles and lighting conditions, complementing the first graphic feature information to be imprinted. The second calibration imprinting graphic feature information and the second graphic feature information to be imprinted are spliced together according to feature dimensions. Then, through feature deduplication and enhancement processing, the feature accuracy is optimized, thereby generating the second imprinting graphic splicing feature information, which is used to improve the model's adaptability to different working conditions.
[0061] Step S303: Perform splicing processing based on the first imprinted pattern splicing feature information and the second imprinted pattern splicing feature information to generate imprinted pattern cross splicing feature information.
[0062] In this embodiment, the first imprinted graphic splicing feature information focuses on the fusion of graphic features under standard working conditions, while the second imprinted graphic splicing feature information focuses on the fusion of graphic features under special working conditions. The splicing process can involve cross-splicing the two, integrating the feature parameters of the standard and special working conditions. Then, through a time-series feature fusion algorithm, the correlation between different features can be strengthened, feature deviations can be corrected, and redundant data generated during the splicing process can be removed to optimize the feature dimensions, thereby generating imprinted graphic cross-splicing feature information to cover graphic features under different working conditions and conditions, providing a more comprehensive and accurate training basis for the imprinted graphic positioning model.
[0063] Step S304: Based on the cross-splicing feature information of the engraved pattern, train the positioning model of the pattern to be engraved to obtain the trained positioning model of the pattern to be engraved.
[0064] In this embodiment, the model for locating the graphic to be engraved can be a time-series feature recognition model based on deep learning. The training process can be as follows: first, the cross-splicing feature information of the graphic to be engraved is input into the feature extraction layer of the model to extract the correlation rules of graphic features under different working conditions. Then, the calibration part in the cross-splicing feature information of the graphic to be engraved is used as a benchmark to calculate the feature matching error. The feature recognition parameters of the model are updated through backpropagation. Then, simulated data of different workpiece deviations and different laser working conditions are introduced to optimize the anti-interference ability of the model. The training process is repeated until the error converges to obtain the trained model for locating the graphic to be engraved, which is used to accurately adapt to the positioning requirements of the graphic to be engraved under different working conditions and improve the stability and accuracy of positioning.
[0065] The AI-based laser scanning method provided in this application enables the positioning model of the graphic to be engraved to learn the graphic feature patterns under different working conditions, thereby improving the adaptability of the positioning model of the graphic to be engraved to workpiece differences and working condition changes, so as to generate more accurate laser scanning information, improve the consistency and accuracy of laser engraving, and meet diverse engraving needs.
[0066] Figure 4 The flowchart illustrating the implementation of the AI-based laser scanning method provided in Embodiment 4 of this application is shown. The difference between this method and Embodiment 2 is that step S203 specifically includes:
[0067] Step S401: Perform vector transformation based on the feature information of the multiple graphics to be engraved to obtain multiple feature vectors of the graphics to be engraved.
[0068] In this embodiment, the feature information of multiple graphics to be etched covers the feature data of the graphics to be etched under different angles, different scaling ratios, and different lighting conditions. The vector conversion process can be to convert the structured data and feature parameters in the feature information of each graphic to be etched into a fixed-dimensional vector through a feature vector encoding algorithm, and then to standardize each vector to correct vector deviations, ensuring that the dimension of each graphic feature vector to be etched is uniform and the values are standardized. Then, the vector conversion of all graphic feature information to be etched is completed in sequence, thereby generating multiple graphic feature vectors to be etched, which are used to intuitively reflect the feature differences of the graphics to be etched.
[0069] Step S402: Merge the multiple feature vectors of the graphic to be engraved and the preset feature vector of the workpiece to be engraved to generate the feature vector of the graphic to be mapped.
[0070] In this embodiment, the preset feature vector of the workpiece to be engraved can be manually preset, referring to the set of graphic feature vectors corresponding to similar workpieces to be engraved in the database. It includes graphic feature parameters corresponding to different workpiece materials and different workpiece sizes, and is used to supplement the workpiece-related features of the graphic to be engraved. The merging process can be to concatenate multiple graphic feature vectors to be engraved with the preset feature vector of the workpiece to be engraved according to the vector dimension, and then strengthen the correlation between the graphic features to be engraved and the workpiece features through a vector fusion algorithm, remove redundant vector data, optimize the vector dimension, and thus generate a graphic feature vector to be mapped for engraving. This vector is used to integrate the features of the graphic to be engraved itself with the common features of similar workpieces to improve the comprehensiveness of the features.
[0071] Step S403: Generate the feature representation sequence information of the image to be mapped and imprinted based on the feature vector of the image to be mapped, the preset feature query vector of the image to be imprinted, the preset feature key vector of the image to be imprinted, and the preset feature value vector of the image to be imprinted.
[0072] In this embodiment, the preset feature query vector, feature key vector, and feature value vector of the graphic to be engraved can be manually preset and are all learnable parameter vectors in the self-attention mechanism, used for feature query, feature association judgment, and feature value extraction, respectively. The process can begin by mapping the graphic feature vector to be engraved with the preset feature query vector, feature key vector, and feature value vector to obtain query features, key features, and value features. Then, the correlation between the query features and key features is calculated to obtain feature weights. Finally, the value features are weighted and fused according to the feature weights to generate feature representation vectors. These feature representation vectors are then arranged in chronological order to generate a sequence of graphic feature representation information to accurately reflect the association between the graphic features to be engraved and the workpiece features.
[0073] Step S404: Based on the multiple calibrated imprint feature information and the feature representation sequence information of the image to be imprinted, the localization model of the image to be imprinted is trained to obtain the trained localization model of the image to be imprinted.
[0074] In this embodiment, the model for locating the graphic to be engraved can be a deep learning model based on a self-attention mechanism. The training process can be as follows: first, multiple calibrated graphic feature information are used as standard benchmarks and input into the benchmark feature layer of the model. Then, the feature representation sequence information of the graphic to be engraved is used as training input and input into the feature learning layer of the model. The matching error between the feature representation sequence information of the graphic to be engraved and the calibrated graphic feature information is calculated. The parameters of the model are updated through the backpropagation algorithm. Then, interference data such as workpiece deviation and laser condition changes are introduced to optimize the feature recognition capability of the model. The training process is repeated until the error converges, resulting in a trained model for locating the graphic to be engraved. This model is used to accurately capture the correlation features between the graphic to be engraved and the workpiece, thereby improving the positioning accuracy and anti-interference capability.
[0075] The AI-based laser scanning method provided in this application strengthens the correlation between the features of the graphic to be engraved and the features of the workpiece to be engraved, enriches the feature dimensions of the graphic positioning model training, and enables the graphic positioning model to accurately learn the graphic feature rules, thereby improving the model's positioning accuracy and adaptability, making the generated laser scanning information more consistent with actual working conditions, so as to ensure the stability and consistency of laser engraving.
[0076] Figure 5 The flowchart illustrating the implementation of the AI-based laser scanning method provided in Embodiment 5 of this application is shown. The difference between this method and Embodiment 4 above is that step S403 specifically includes:
[0077] Step S501: Perform mapping calculations based on the feature vector of the graphic to be mapped and the preset feature query vector of the graphic to be mapped to generate query feature information of the graphic to be mapped.
[0078] In this embodiment, the preset feature query vector of the image to be imprinted can be manually preset. It is a learnable parameter vector used for feature querying in the self-attention mechanism, and its dimension is consistent with the feature vector of the image to be mapped. It is used to accurately retrieve the core features in the feature vector of the image to be mapped. The mapping calculation process can be to perform matrix multiplication between the feature vector of the image to be mapped and the preset feature query vector of the image to be mapped, and then normalize the calculation result to correct the calculation deviation and remove redundant data, thereby generating the query feature information of the image to be imprinted, which is used to subsequently retrieve the correlation between the feature vector of the image to be mapped and other feature vectors.
[0079] Step S502: Perform mapping calculations based on the feature vector of the graphic to be mapped and the preset feature key vector of the graphic to be mapped to generate the key feature information of the graphic to be mapped.
[0080] In this embodiment, the preset feature key vector of the image to be imprinted can be manually preset, or it can be a learnable parameter vector used for feature association judgment in a self-attention mechanism. It has the same dimension as the preset feature query vector of the image to be imprinted and is used to measure the degree of association between the feature vector of the image to be imprinted and other feature vectors. Performing matrix multiplication between the feature vector of the image to be imprinted and the preset feature key vector of the image to be imprinted can optimize the calculation results through standardization, correct feature bias, and thus generate key feature information of the image to be imprinted. This information is used in conjunction with the query feature information of the image to be imprinted to quantify the association weights between different features.
[0081] Step S503: Perform mapping calculations based on the feature vector of the graphic to be mapped and the preset feature value vector of the graphic to be mapped to generate the feature information of the graphic to be mapped.
[0082] In this embodiment, the preset feature value vector of the graphic to be imprinted can be manually preset, or it can be a learnable parameter vector used for feature extraction in a self-attention mechanism, used to extract the core value features from the feature vector of the graphic to be imprinted. The mapping calculation process can be to perform matrix multiplication between the feature vector of the graphic to be imprinted and the preset feature value vector of the graphic to be imprinted, thereby generating the value feature information of the graphic to be imprinted, which is used to store the core features to be fused, and can also be used for weighted fusion through feature weights to improve the targeting of features.
[0083] Step S504: Based on the query feature information of the graphic to be engraved and the key feature information of the graphic to be engraved, obtain the feature weight information of the graphic to be engraved.
[0084] In this embodiment, the dot product of the transpose of the query feature information and the key feature information of the graphic to be etched can be calculated to obtain the original feature correlation matrix. To avoid the gradient vanishing problem caused by excessive feature dimension, each element in the original feature correlation matrix can be divided by the key feature dimension for scaling. The scaled correlation matrix can be normalized by softmax to generate feature weight information of the graphic to be etched, which is used to quantify the importance of different features of the graphic to be etched.
[0085] Step S505: Based on the feature weight information of the graphic to be engraved and the value feature information of the graphic to be engraved, obtain the feature representation vector of the graphic to be engraved.
[0086] In this embodiment, the weighted feature information of the graphic to be engraved and the value feature information of the graphic to be engraved can be weighted and summed. During the weighted summation, the corresponding features in the value feature information of the graphic to be engraved are strengthened or weakened according to the weight ratio of different features in the weighted feature information of the graphic to be engraved. Then, the result of the weighted summation can be standardized to correct vector deviation and optimize vector dimension, thereby generating a feature representation vector of the graphic to be engraved. This vector is used to accurately reflect the core features of the graphic to be engraved, highlight the influence of important features, and improve the relevance of the features.
[0087] Step S506: Perform sequence transformation processing on the feature representation vector of the graphic to be engraved to generate feature representation sequence information of the graphic to be engraved.
[0088] In this embodiment, the sequence transformation process can be to arrange the feature representation vector of the graphic to be imprinted in time sequence according to feature dimension and feature importance, and then strengthen the temporal correlation between different features and correct sequence deviation through a temporal feature integration algorithm. Then, feature temporal labels are added to clarify the temporal attributes of different features, thereby generating the feature representation sequence information of the graphic to be imprinted. This information is used to fully reflect the distribution pattern and correlation of the features of the graphic to be imprinted, and to provide a more accurate and comprehensive input basis for training the graphic localization model.
[0089] The AI-based laser scanning method provided in this application improves the relevance and comprehensiveness of the feature representation sequence information of the graphic to be engraved, thereby improving the training effect of the graphic positioning model and the accuracy of the graphic positioning model in recognizing the positional relationship between the graphic to be engraved and the area to be engraved, thus improving the accuracy of laser scanning and the engraving quality.
[0090] Figure 6 The flowchart illustrating the implementation of the AI-based laser scanning method provided in Embodiment Six of this application is shown. The difference between this method and Embodiment Five is that step S504 specifically includes:
[0091] Step S601: Multiply the query feature information of the graphic to be engraved and the key feature information of the graphic to be engraved to obtain the fused feature information of the graphic to be engraved.
[0092] In this embodiment, the query feature information of the graphic to be imprinted is used to retrieve the core features in the feature vector of the graphic to be imprinted, and the key feature information of the graphic to be imprinted is used to measure the correlation between the feature vector of the graphic to be imprinted and other feature vectors. The multiplication of the two can accurately fuse the feature advantages of both, realizing feature complementarity and enhancement. Specifically, the query feature information of the graphic to be imprinted and the key feature information of the graphic to be imprinted can be subjected to matrix multiplication. During the operation, the feature dimensions of the two are accurately matched to ensure that each core feature can be matched with the corresponding correlation parameter. Then, the operation result is initially standardized to correct the deviation generated during the calculation and remove redundant feature data, thereby generating the fused feature information of the graphic to be imprinted, which is used to simultaneously reflect the core features of the graphic to be imprinted and the correlation between different features.
[0093] Step S602: The enhanced feature information of the graphic to be engraved is obtained by adding the fusion feature information of the graphic to be engraved and the query feature information of the graphic to be engraved.
[0094] In this embodiment, the fusion feature information of the image to be imprinted integrates core features and correlation information, while the query feature information of the image to be imprinted focuses on the accurate retrieval of core features. Adding the two together further strengthens the proportion of core features while preserving the effectiveness of correlation information. Specifically, the fusion feature information and the query feature information of the image to be imprinted are added element-wise according to their corresponding feature dimensions. This ensures that core features are further strengthened and correlation information is effectively preserved. The result of the addition is then subjected to feature enhancement processing to optimize feature accuracy, correct minor deviations during the addition process, and remove invalid feature data. This generates enhanced feature information for the image to be imprinted, highlighting its core features and clarifying the correlation weights between different features, thereby improving the targeting and effectiveness of the features.
[0095] Step S603: Perform multiplication calculation based on the enhanced feature information of the graphic to be engraved and the key feature information of the graphic to be engraved to obtain the feature weight information of the graphic to be engraved.
[0096] In this embodiment, the enhanced feature information of the graphic to be imprinted highlights the core features while retaining the basic correlation, while the key feature information of the graphic to be imprinted focuses on measuring the degree of feature correlation. The multiplication of the two can accurately quantify the importance of different core features and generate feature weights that meet the model training requirements. Specifically, matrix multiplication can be performed on the enhanced feature information and the key feature information of the graphic to be imprinted to further strengthen the matching relationship between core features and correlation. Then, the result can be subjected to softmax normalization to ensure that the sum of all feature weights is 1, accurately quantifying the importance ratio of each feature of the graphic to be imprinted, correcting weight deviations, and thus generating feature weight information of the graphic to be imprinted to accurately reflect the importance of different features of the graphic to be imprinted.
[0097] The AI-based laser scanning method provided in this application improves the accuracy and relevance of the feature weight information of the graphic to be engraved, provides a more reliable input basis for training the graphic positioning model, enhances the accuracy and anti-interference ability of the graphic positioning model, and ensures that the generated laser scanning information is more in line with the actual engraving requirements, thereby improving the quality and consistency of laser engraving.
[0098] Figure 7 The flowchart illustrating the implementation of the AI-based laser scanning method provided in Embodiment Seven of this application is shown. The difference between this method and Embodiment One is that, after step S104, the method further includes:
[0099] Step S701: Based on the preset mapping relationship between laser scanning information and laser displacement control information, laser scanning displacement control information is generated according to the laser scanning information, so as to control the laser scanning displacement through the laser scanning displacement control information.
[0100] In this embodiment, the preset mapping relationship between laser scanning information and laser displacement control information can be manually preset. This refers to a standardized mapping rule library built based on a large amount of industrial engraving experimental data. This library covers the correspondence between parameters such as scanning path, laser power, and scanning speed in the laser scanning information and laser displacement control parameters, used to achieve precise adaptive control of laser displacement. The laser scanning information includes core parameters such as the scanning path of the graphic to be engraved and laser power. Different scanning paths and power requirements correspond to different displacement control requirements. For example, when the laser scanning information shows a complex dot matrix QR code and a slow scanning speed, high-precision displacement control parameters need to be generated to ensure that the displacement deviation is controlled within a preset range. When the scanning path is a simple boundary contour and the scanning speed is fast, the displacement control precision can be appropriately adjusted to balance efficiency and accuracy. Specifically, the laser scanning information can be input into a preset mapping rule library to retrieve the corresponding displacement control parameters. Then, through parameter optimization algorithms, combined with the characteristics of the material and size information of the workpiece to be engraved, the retrieved displacement control parameters can be fine-tuned to correct the control deviation, thereby generating laser scanning displacement control information. This information can be sent to the laser displacement control module in the form of electrical signal commands to control the laser emitter to move according to the specified displacement trajectory and speed, achieving precise control of the laser scanning displacement and ensuring that the laser scanning trajectory is completely aligned with the graphic to be engraved, avoiding engraving offset caused by displacement deviation.
[0101] Step S702: Based on the preset mapping relationship between laser scanning information and laser spot shape adjustment information, laser spot shape adjustment information is generated according to the laser scanning information. The laser spot shape adjustment information includes laser spot size adjustment information, laser spot energy uniformity adjustment information, and laser spot edge sharpness adjustment information, so as to adjust the laser spot through the laser spot size adjustment information, laser spot energy uniformity adjustment information, and laser spot edge sharpness adjustment information.
[0102] In this embodiment, the preset mapping relationship between laser scanning information and laser spot shape adjustment information can be manually preset. It is a multi-dimensional mapping rule built based on different workpiece materials and different requirements for the pattern to be engraved. It covers the correspondence between parameters such as laser power, scanning speed, and dot density of the pattern to be engraved in the laser scanning information and laser spot shape parameters, and is used to achieve precise adaptation of spot shape to engraving requirements. Different parameters in the laser scanning information correspond to different spot shape requirements. For example, when the laser scanning information shows that the dot information of the pattern to be engraved is a high-density dot matrix and the material information of the workpiece to be engraved is a high-hardness material, it is necessary to generate spot adjustment information with small size, high energy uniformity, and high edge sharpness to ensure that the dot matrix engraving is clear and without blurring; when the pattern to be engraved has a large boundary and the workpiece material is a low-hardness material, spot adjustment information with a slightly larger size and moderate energy uniformity can be generated to balance engraving efficiency and quality. Specifically, the process involves first analyzing the core parameters in the laser scanning information, combining them with the characteristics of the workpiece material and the pattern to be engraved, and then searching a pre-defined mapping database to obtain preliminary spot shape adjustment parameters. A spot shape optimization algorithm is then used to correct these preliminary parameters, ensuring that the spot size matches the line thickness of the pattern to be engraved, the energy uniformity matches the material absorption characteristics, and the edge sharpness matches the clarity of the pattern boundary. This generates laser spot shape adjustment information that includes laser spot size adjustment information, laser spot energy uniformity adjustment information, and laser spot edge sharpness adjustment information. This adjustment information is then sent to the laser spot control module, which controls the spot size by adjusting the lens spacing at the laser emitter, adjusts the spot energy uniformity through the energy distribution module, and optimizes the spot edge sharpness through the edge sharpening module. This achieves precise adjustment of the laser spot shape, thereby improving the clarity and consistency of the laser engraving.
[0103] In this embodiment, laser scanning displacement control and laser spot shape adjustment are not performed independently, but can be coordinated and adapted to each other to ensure the overall accuracy of laser scanning and the engraving effect. Specifically, after generating laser scanning displacement control information and laser spot shape adjustment information, they can be synchronously calibrated through preset laser control collaborative calibration rules. First, the displacement parameters corresponding to the laser scanning displacement control information are matched and compared with the spot parameters corresponding to the laser spot shape adjustment information to determine whether the displacement speed, spot size, and energy uniformity are compatible. For example, when the laser scanning displacement control information shows a fast displacement speed, it is necessary to ensure that the laser spot size adjustment information corresponds to a slightly larger spot to avoid discontinuous engraving due to excessively fast displacement and a small spot size. When the displacement speed is slow, a small-sized, high-sharp spot can be used to improve the accuracy of engraving details. Then, through a collaborative optimization algorithm, the parameters of both are simultaneously fine-tuned to correct deviations generated during the collaborative process. This ensures that the displacement trajectory and spot shape of the laser emitter are always precisely matched with the information of the graphic to be imprinted, the material information of the workpiece to be imprinted, and the range of the area to be imprinted. This achieves collaborative control of laser scanning displacement and spot shape, thereby enhancing the consistency and accuracy of laser imprinting. Simultaneously, the preset laser control collaborative calibration rules can be manually set and constructed based on a large amount of industrial collaborative control experimental data. These rules cover collaborative adaptation standards for different displacement and spot parameters, providing a reliable basis for the synchronous calibration of both and ensuring that the collaborative control process is standardized and efficient.
[0104] The AI-based laser scanning method provided in this application precisely controls the laser scanning displacement and spot shape, making up for the shortcomings of single scanning path control. This makes the laser scanning more adaptable to the characteristics of the workpiece to be engraved and the requirements of the graphic to be engraved, thereby improving the accuracy, stability and engraving quality of the laser scanning, so as to meet the stringent requirements for high-precision QR code engraving in industrial mass production.
[0105] Corresponding to the method in the above embodiments, Figure 8 The diagram shows a structural block diagram of an AI-based laser scanning system provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiments of this application are shown. Figure 8 The AI-based laser scanning system in the example can be the execution subject of the AI-based laser scanning method provided in the aforementioned embodiment 1.
[0106] Reference Figure 8 The AI-based laser scanning system includes:
[0107] The information acquisition module 810 is used to acquire the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the graphic information to be engraved, the range information of the area to be engraved, the current laser focal length information, the historical laser scanning trajectory information, and the positioning model of the graphic to be engraved.
[0108] The module 820 for generating positioning information of the area to be engraved is used to obtain positioning information of the area to be engraved based on the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the current laser focal length information, and the historical laser scanning trajectory information.
[0109] The current laser scanning trajectory information generation module 830 is used to generate current laser scanning trajectory information based on the graphic information to be engraved, the range information of the area to be engraved, and the positioning information of the area to be engraved.
[0110] The laser scanning information generation module 840 is used to generate laser scanning information based on the current laser scanning trajectory information, the graphic information to be engraved, the graphic positioning model to be engraved, and the preset set of laser engraving parameters.
[0111] The process by which each module in the AI-based laser scanning system provided in this application implements its respective function can be found in the foregoing. Figure 1 The description of Embodiment 1 shown will not be repeated here.
[0112] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0113] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0114] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0115] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0116] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. It should also be understood that although the terms "first," "second," etc., are used in the text to describe various elements in some embodiments of this application, these elements should not be limited by these terms. These terms are merely used to distinguish one element from another. For example, a first table may be named a second table, and similarly, a second table may be named a first table, without departing from the scope of the various described embodiments. Both the first table and the second table are tables, but they are not the same table.
[0117] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0118] The AI-based laser scanning method provided in this application can be applied to terminal devices such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality / virtual reality devices, laptops, super mobile personal computers, netbooks, and personal digital assistants. This application does not impose any restrictions on the specific type of terminal device.
[0119] For example, the terminal device may be a station in a WLAN, a cellular phone, a cordless phone, a session initiation protocol phone, a wireless local loop station, a personal digital processing device, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, an in-vehicle device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a set-top box, a user premises equipment, and / or other devices for communication over a wireless system, as well as next-generation communication systems, such as mobile terminals in 5G networks or mobile terminals in future evolved public terrestrial mobile networks, etc.
[0120] Figure 9 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. For example... Figure 9 As shown, the terminal device 9 of this embodiment includes: at least one processor 90 ( Figure 9(Only one is shown in the image), memory 91, which stores a computer program 92 that can run on the processor 90. When the processor 90 executes the computer program 92, it implements the steps in the various AI-based laser scanning method embodiments described above, for example... Figure 1 Steps S101 to S104 are shown. Alternatively, when the processor 90 executes the computer program 92, it implements the functions of each module / unit in the above system embodiments, for example... Figure 8 The functions of modules 810 to 840 are shown.
[0121] The terminal device 9 can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will understand that... Figure 9 This is merely an example of terminal device 9 and does not constitute a limitation on terminal device 9. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal device may also include input transmission devices, network access devices, buses, etc.
[0122] The processor 90 may be a central processing unit, or it may be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0123] In some embodiments, the memory 91 may be an internal storage unit of the terminal device 9, such as a hard disk or memory of the terminal device 9. The memory 91 may also be an external storage device of the terminal device 9, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc., equipped on the terminal device 9. Furthermore, the memory 91 may include both internal and external storage units of the terminal device 9. The memory 91 is used to store operating systems, applications, bootloaders, data, and other programs, such as the program code of computer programs. The memory 91 can also be used to temporarily store data that has been sent or will be sent.
[0124] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0125] This application also provides a terminal device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, it causes the terminal device to implement the steps in any of the above method embodiments.
[0126] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0127] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.
[0128] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0129] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0130] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0131] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0132] 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 spirit and 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 scanning method based on AI recognition, characterized in that, include: Acquire the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the graphic information to be engraved, the range information of the area to be engraved, the current laser focal length information, the historical laser scanning trajectory information, and the positioning model of the graphic to be engraved; Based on the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the current laser focal length information, and the historical laser scanning trajectory information, the positioning information of the area to be engraved is obtained; Based on the graphic information to be engraved, the range information of the area to be engraved, and the positioning information of the area to be engraved, the current laser scanning trajectory information is generated. Based on the current laser scanning trajectory information, the graphic information to be engraved, the graphic positioning model to be engraved, and the preset set of laser engraving parameters, laser scanning information is generated.
2. The laser scanning method based on AI recognition as described in claim 1, characterized in that, The step of generating laser scanning information based on the current laser scanning trajectory information, the image to be engraved information, the image positioning model to be engraved, and a preset set of laser engraving parameters specifically includes: Based on the preset feature extraction rules of the pattern to be engraved, and according to the preset set of laser engraving parameters, multiple calibration engraving pattern feature information are generated. The graphic information to be engraved is encoded to obtain multiple graphic feature information to be engraved. Based on the feature information of the multiple calibrated imprinted graphics and the feature information of the multiple graphics to be imprinted, the localization model of the graphics to be imprinted is trained to obtain the trained localization model of the graphics to be imprinted. Based on the current laser scanning trajectory information, the image to be engraved information, and the trained image positioning model, laser scanning information is generated.
3. The laser scanning method based on AI recognition as described in claim 2, characterized in that, The plurality of calibration imprinted graphic feature information includes first calibration imprinted graphic feature information and second calibration imprinted graphic feature information; The plurality of graphic feature information to be engraved includes first graphic feature information to be engraved and second graphic feature information to be engraved; The step of training the localization model of the image to be imprinted based on the feature information of the multiple calibrated imprinted images and the feature information of the multiple images to be imprinted, to obtain the trained localization model of the image to be imprinted, specifically includes: The first calibrated imprint feature information and the first imprint feature information are spliced together to generate the first imprint splicing feature information. The second calibrated engraved graphic feature information and the second graphic to be engraved feature information are spliced together to generate the second engraved graphic splicing feature information. The first and second engraved graphic splicing feature information are spliced together to generate the engraved graphic cross splicing feature information. Based on the cross-splicing feature information of the engraved pattern, the positioning model of the pattern to be engraved is trained to obtain the trained positioning model of the pattern to be engraved.
4. The laser scanning method based on AI recognition as described in claim 2, characterized in that, The step of training the localization model of the image to be imprinted based on the feature information of the multiple calibrated imprinted images and the feature information of the multiple images to be imprinted, to obtain the trained localization model of the image to be imprinted, specifically includes: Based on the feature information of the multiple graphics to be engraved, vector transformation is performed to obtain multiple feature vectors of the graphics to be engraved. The feature vectors of the multiple graphic features to be engraved and the preset feature vectors of the workpiece to be engraved are merged to generate the graphic feature vector to be mapped and engraved. Based on the feature vector of the image to be mapped, the preset feature query vector of the image to be mapped, the preset feature key vector of the image to be mapped, and the preset feature value vector of the image to be mapped, a feature representation sequence information of the image to be mapped is generated. Based on the feature information of the multiple calibrated imprinted graphics and the feature representation sequence information of the graphic to be imprinted, the localization model of the graphic to be imprinted is trained to obtain the trained localization model of the graphic to be imprinted.
5. The laser scanning method based on AI recognition as described in claim 4, characterized in that, The step of generating the feature representation sequence information of the image to be mapped and imprinted based on the feature vector of the image to be mapped, the preset feature query vector of the image to be imprinted, the preset feature key vector of the image to be imprinted, and the preset feature value vector of the image to be imprinted specifically includes: Mapping calculations are performed based on the feature vector of the graphic to be mapped and the preset feature query vector of the graphic to be mapped to generate query feature information of the graphic to be mapped. Mapping calculations are performed based on the feature vector of the graphic to be mapped and the preset feature key vector of the graphic to be mapped to generate the key feature information of the graphic to be mapped. Mapping calculations are performed based on the feature vector of the graphic to be mapped and the preset feature value vector of the graphic to be mapped to generate the feature information of the graphic to be mapped. Based on the query feature information and key feature information of the graphic to be engraved, the feature weight information of the graphic to be engraved is obtained. Based on the feature weight information of the graphic to be engraved and the value feature information of the graphic to be engraved, the feature representation vector of the graphic to be engraved is obtained; The feature representation vector of the graphic to be etched is subjected to sequence transformation processing to generate the feature representation sequence information of the graphic to be etched.
6. The laser scanning method based on AI recognition as described in claim 5, characterized in that, The step of obtaining the feature weight information of the image to be engraved based on the query feature information and the key feature information of the image to be engraved specifically includes: The fused feature information of the graphic to be engraved is obtained by multiplying the query feature information of the graphic to be engraved and the key feature information of the graphic to be engraved. The enhanced feature information of the graphic to be engraved is obtained by adding the fusion feature information of the graphic to be engraved and the query feature information of the graphic to be engraved. The feature weight information of the graphic to be engraved is obtained by multiplying the enhanced feature information and the key feature information of the graphic to be engraved.
7. The laser scanning method based on AI recognition as described in claim 1, characterized in that, After the step of generating laser scanning information based on the current laser scanning trajectory information, the image to be engraved information, the image positioning model to be engraved, and the preset set of laser engraving parameters, the method further includes: Based on the preset mapping relationship between laser scanning information and laser displacement control information, laser scanning displacement control information is generated according to the laser scanning information, so as to control the laser scanning displacement through the laser scanning displacement control information; Based on the preset mapping relationship between laser scanning information and laser spot shape adjustment information, laser spot shape adjustment information is generated according to the laser scanning information. The laser spot shape adjustment information includes laser spot size adjustment information, laser spot energy uniformity adjustment information, and laser spot edge sharpness adjustment information, so as to adjust the laser spot through the laser spot size adjustment information, laser spot energy uniformity adjustment information, and laser spot edge sharpness adjustment information.
8. A laser scanning system based on AI recognition, characterized in that, include: The information acquisition module is used to acquire information such as the material of the workpiece to be engraved, the size of the workpiece to be engraved, the graphic information to be engraved, the range of the area to be engraved, the current laser focal length, the historical laser scanning trajectory, and the positioning model of the graphic to be engraved. The module for generating positioning information of the area to be engraved is used to obtain the positioning information of the area to be engraved based on the material information of the workpiece to be engraved, the size information of the workpiece to be engraved, the current laser focal length information, and the historical laser scanning trajectory information. The current laser scanning trajectory information generation module is used to generate current laser scanning trajectory information based on the graphic information to be engraved, the range information of the area to be engraved, and the positioning information of the area to be engraved. The laser scanning information generation module is used to generate laser scanning information based on the current laser scanning trajectory information, the graphic information to be engraved, the positioning model of the graphic to be engraved, and the preset set of laser engraving parameters.
9. A terminal device, characterized in that, The terminal device includes a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.