Focusing method, laser assembly and electronic equipment

By generating and comparing the marking parameters of laser images, the focal length of the laser device is automatically determined, solving the complex focusing problem in existing technologies and achieving fast and accurate focal length calibration.

CN121945967APending Publication Date: 2026-05-01SHENZHEN CREALITY ECOSYSTEM TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN CREALITY ECOSYSTEM TECHNOLOGY CO LTD
Filing Date
2024-11-20
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

The focusing process of existing laser equipment is complex, requires highly skilled operators, and makes it difficult to quickly and accurately calibrate the focal length to ensure marking results.

Method used

By receiving a series of laser marking heights, candidate laser images are generated, and the marking parameters are compared to select the optimal image. This determines the target laser marking height and focal length parameters, simplifying the user's focusing operation.

Benefits of technology

It improves the user's focusing efficiency, provides accurate focal length calibration parameters, and simplifies the focusing process of laser equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121945967A_ABST
    Figure CN121945967A_ABST
Patent Text Reader

Abstract

The invention provides a focusing method, a laser assembly and electronic equipment, the method is applied to a laser module, and the method comprises the steps of receiving a series of laser marking heights, emitting laser to a marking platform according to the series of laser marking heights, and generating a series of candidate laser images on the marking platform, one laser marking height corresponds to one candidate laser image; marking parameters of the series of candidate laser images are compared, the candidate laser image with the optimal marking parameter is selected as a target laser image, and the optimal marking parameter indicates that the quality of the candidate laser image generated by laser emitted by the laser assembly to the marking platform is optimal; and obtaining a target laser marking height corresponding to the target laser image, and determining a target focal length parameter of the laser assembly according to the target laser marking height. According to the method provided by the invention, the user can conveniently focus, and meanwhile, the focusing result is visually presented to the user in the form of the candidate laser image, so that the user can quickly determine the target focal length parameter according to the focusing result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of equipment parameter calibration technology, and in particular to a focusing method, laser components, and electronic equipment. Background Technology

[0002] Laser equipment consists of main modules such as a laser component and a marking plane. During laser marking, the laser component sets the marking height according to the factory-set focal length parameters, and then marks the material according to this height. In actual processing, different materials will change the actual laser marking height, thus affecting the marking effect. To ensure perfect marking results, users need to calibrate the focal length of the laser equipment for different materials to ensure that the laser can be properly focused on the processing plane, thereby guaranteeing the marking effect.

[0003] In related technologies, the focusing process of laser equipment is relatively complex and requires highly skilled operators. Therefore, providing a new focusing method that offers laser equipment users fast and accurate focus calibration parameters is a pressing issue that needs to be addressed. Summary of the Invention

[0004] In view of this, this application provides a focusing method, a laser component, and an electronic device, which can provide users with accurate laser marking height in batches, thereby improving the focusing efficiency of laser equipment.

[0005] A first aspect of this application provides a focusing method, including: The system receives a series of laser marking heights, emits laser light onto a marking platform based on these heights, and generates a series of candidate laser images on the platform, where each laser marking height corresponds to one candidate laser image. The marking parameters of the candidate laser images are compared, and the candidate laser image with the optimal marking parameters is selected as the target laser image. Optimal marking parameters indicate that the quality of the candidate laser image generated by the laser component is the best. The target laser marking height corresponding to the target laser image is obtained, and the target focal length parameter of the laser component is determined based on the target laser marking height.

[0006] Compared with related technologies, the embodiments of this application have at least the following advantages: By determining a series of laser marking heights, multiple focusing options are automatically provided to the user, thereby simplifying the user's focusing operation. By inputting a series of laser marking heights into the laser component, the laser component emits lasers to the marking platform according to the series of laser marking heights, generating a series of candidate laser images on the marking platform. Each laser marking height corresponds to one candidate laser image. This application, by generating a series of images corresponding to laser marking heights, intuitively displays the focusing effect of the laser marking height to the user. This application compares the marking parameters of the candidate laser images and selects the candidate laser image with the optimal marking parameters as the target laser image; it obtains the target laser marking height of the target laser image and determines the target focal length parameter of the laser component based on the target laser marking height, thereby improving the user's focusing efficiency.

[0007] Optionally, before receiving a series of laser marking heights, the process includes: determining a series of laser marking heights; determining a series of laser marking heights includes: obtaining a reference focal length parameter and a preset focal length range of the laser component; setting a parameter gradient of the reference focal length parameter based on the preset focal length range and the reference focal length parameter; obtaining a reference laser marking height corresponding to the reference focal length parameter; and determining a series of laser marking heights based on the parameter gradient and the reference laser marking height.

[0008] Optionally, receiving a series of laser marking heights and emitting lasers to the marking platform according to these heights includes: obtaining a reference laser marking height corresponding to a reference focal length parameter; determining a series of laser marking heights based on the parameter gradient and the reference laser marking height; sorting the series of laser marking heights in a preset order; obtaining the laser marking path; and sequentially selecting laser marking heights according to the marking path to emit lasers to the marking platform.

[0009] Optionally, the labeling path is N. N matrix, N The N matrix comprises multiple matrix elements. According to the marking path, laser marking heights are selected sequentially to emit lasers onto the marking platform. This includes: selecting laser marking heights sequentially to emit lasers onto the marking platform according to the generation order of the matrix elements; wherein, in each marking process, the matrix element includes at least one laser spot generated by laser marking.

[0010] Optionally, after generating candidate laser images, the process includes: labeling matrix elements to obtain the correspondence between laser marking height and candidate images; generating and storing the correspondence between labels and laser marking height, with the labels used for users to select candidate laser images.

[0011] Optionally, after determining the target focal length parameter of the laser component based on the target laser marking height, the process includes: processing the material based on the target focal length parameter, which includes: measuring the actual laser marking height of the material processed by the laser component according to the target focal length parameter; calculating the height difference between the target laser marking height and the actual laser marking height; performing laser marking according to the target focal length parameter when the height difference is less than a preset height difference threshold; and adjusting the actual laser marking height and performing laser marking according to the adjusted laser marking height when the height difference is not less than the preset height difference threshold.

[0012] Optionally, if the height difference is not less than a preset height difference threshold, the actual laser marking height can be adjusted, including: increasing the actual laser marking height if the target laser marking height is greater than the actual laser marking height; and decreasing the actual laser marking height if the target laser marking height is less than the actual laser marking height.

[0013] Optionally, it includes: a driving module, a laser module, a first control module, and a second control module; the driving module is used to receive a series of laser marking heights; the laser module is used to emit lasers to the marking platform according to the series of laser marking heights, and generate a series of candidate laser images on the marking platform, wherein one laser marking height corresponds to one candidate laser image; the first control module is used to compare the marking parameters of the series of candidate laser images, and select the candidate laser image with the optimal marking parameters as the target laser image, wherein the optimal marking parameters indicate that the quality of the candidate laser image generated by the laser component emitting lasers to the marking platform is the best; the second control module is used to obtain the target laser marking height corresponding to the target laser image, and determine the target focal length parameter of the laser component according to the target laser marking height.

[0014] Optionally, the laser assembly further includes: a ranging module; the ranging module is used to measure the actual laser marking height of the material processed by the laser assembly according to the target focal length parameter; calculate the height difference between the target laser marking height and the actual laser marking height; perform laser marking according to the target focal length parameter when the height difference is less than a preset height difference threshold; and adjust the actual laser marking height and perform laser marking according to the adjusted laser marking height when the height difference is not less than the preset height difference threshold.

[0015] Thirdly, embodiments of this application also provide an electronic device, which includes a processor and a memory. The memory is used to store instructions, and the processor is used to call the instructions in the memory, causing the electronic device to execute the focusing method as described in the first aspect.

[0016] The technical effects achieved by the second, third, and fourth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect, and will not be repeated here. Attached Figure Description

[0017] Figure 1 A flowchart illustrating the steps of a focusing method provided in an embodiment of this application.

[0018] Figure 2 This is a schematic diagram of a scenario where a laser component, provided in an embodiment of this application, performs laser marking based on the laser marking height.

[0019] Figure 3 This is a schematic diagram of the processing conditions of a focusing method provided in an embodiment of this application.

[0020] Figure 4 This is a schematic diagram of the structure of a laser component provided in one embodiment of this application.

[0021] Figure 5 A flowchart illustrating the steps of a focusing method provided in another embodiment of this application.

[0022] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0023] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0024] The following description sets forth many specific details to provide a full understanding of this application. The described embodiments are only some, not all, of the embodiments of this application.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.

[0026] It should be further noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0027] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.

[0028] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0029] Laser equipment consists of main components such as a laser module and a marking plane. During laser marking, the laser module sets the marking height according to the factory-set focal length parameters, and then marks the material according to this height. In actual processing, different materials will change the actual laser marking height, thus affecting the marking effect. To ensure perfect marking results, users need to calibrate the focal length of the laser equipment for different materials to ensure that the laser can be properly focused on the processing plane, thereby guaranteeing the marking effect.

[0030] In related technologies, the focusing process of laser equipment is relatively complex and requires highly skilled operators. How can a new focusing method be developed to provide users of laser equipment with fast and accurate focus calibration parameters?

[0031] In view of the above, embodiments of this application provide a focusing method, a laser component, and an electronic device, which can provide users with more accurate laser marking heights in batches and improve the focusing efficiency of electronic devices.

[0032] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the focusing method of this application, applied to a laser assembly. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0033] The specific process of this embodiment is as follows: Figure 1 As shown, it includes the following steps: Step 110: Receive a series of laser marking heights, emit lasers to the marking platform according to the series of laser marking heights, and generate a series of candidate laser images on the marking platform, wherein one laser marking height corresponds to one candidate laser image.

[0034] The laser marking height is the vertical distance from the center of the laser component's lens to the marking platform. Before step 110, step 110 can be performed via a first user operation instruction. This first operation instruction can be an operation command issued by the user through interactive methods such as a touchscreen, mouse click, or switch operation; this application does not limit the specific method. For example, when the material to be processed is placed on the processing platform, the user clicks the "Auto Focus" button on the laser component's operation interface, thus inputting the first operation instruction. Based on this instruction, the laser component initiates the focusing process, determining a series of laser marking heights. After receiving the laser marking heights, the laser component performs marking according to these heights, producing candidate laser images.

[0035] Step 120: Compare the marking parameters of a series of candidate laser images, and select the candidate laser image with the best marking parameters as the target laser image. The best marking parameters indicate that the quality of the candidate laser image generated by the laser component emitting laser to the marking platform is the best.

[0036] In this embodiment, the marking effect of candidate laser images can be determined by the user's visual inspection on-site. The marking effect is evaluated based on marking parameters, including the diameter of the laser spot and the laser depth of the laser spot on the marking card. After on-site confirmation by the user, the candidate laser image corresponding to the laser spot with the smallest diameter and the thickest laser depth is selected as the target laser image. After determining the candidate laser images, the laser marking height corresponding to the candidate laser images is determined according to the image generation order.

[0037] In one embodiment, acquiring candidate laser images includes: capturing candidate laser images using a camera device. After capturing the candidate laser images, the candidate laser images are displayed on the user interface of the laser component for selection by the user. Optionally, before displaying the candidate laser images on the user interface, the laser component may perform preliminary screening of the candidate laser images to eliminate candidate laser images with poor imaging quality.

[0038] Step 130: Obtain the target laser marking height corresponding to the target laser image, and determine the target focal length parameter of the laser component based on the target laser marking height.

[0039] When there is no workpiece on the marking platform, the target laser marking height and the target focal length are the same. When there is workpiece on the marking platform, it is necessary to first determine the marking error caused by the workpiece affecting the marking height, and then determine the target focal length based on the marking error and the target laser marking height.

[0040] In one embodiment, before receiving a series of laser marking heights, the method includes: determining a series of laser marking heights; determining a series of laser marking heights includes: acquiring a reference focal length parameter and a preset focal length range of the laser component; setting a parameter gradient of the reference focal length parameter according to the preset focal length range and the reference focal length parameter; acquiring a reference laser marking height corresponding to the reference focal length parameter; and determining a series of laser marking heights according to the parameter gradient and the reference laser marking height.

[0041] The focal length parameter is the distance from the center of the lens of the laser assembly to the laser focal point, while the laser marking height is the distance from the workpiece surface to the laser assembly lens. Typically, the focal length parameter is the same as the distance from the laser assembly to the marking plane. The reference focal length parameter of the laser assembly is the factory calibration parameter of the laser equipment; engineers have calibrated the factory focal length parameter of the laser equipment before it leaves the factory. The preset focal length range is the maximum fluctuation range of the reference focal length parameter set based on user experience. By determining a series of laser marking heights within the preset focal length range, fine-tuning can be performed around the value of the reference focal length parameter.

[0042] Specifically, setting the parameter gradient includes: taking values ​​at intervals within a preset focal length range. For example, for a preset reference focal length range f1, a reference focal length gradient Δf is set based on the preset reference focal length range f1, thereby calculating a series of focal length parameters f2, where f2 = f + Δf. More preferably, the series of focal length parameters are symmetrically distributed and / or equally spaced relative to the initial measured distance value. For example, for a preset focal length range of 2mm, parameter gradients of -2mm, -1.5mm, -1mm, -0.5mm, 0mm, +0.5mm, +1mm, 1.5mm, and +2mm can be set.

[0043] In this embodiment, a series of laser marking heights are determined, including: determining a reference laser marking height corresponding to a reference focal length parameter; setting a height gradient of the reference laser marking height according to the parameter gradient; and sending the height gradient to the motor of the laser component so that the motor drives the laser component to move the laser marking height of the laser component according to the reference focal length gradient Δf.

[0044] It should be noted that when there is no workpiece on the marking plane, the value of the laser marking height is the same as the value of the focal length parameter.

[0045] In one embodiment, step 110 receives a series of laser marking heights and emits lasers to the marking platform according to the series of laser marking heights, including: sorting the series of laser marking heights in a preset order; obtaining the marking path of laser marking; and selecting the laser marking heights in sequence according to the marking path to emit lasers to the marking platform.

[0046] The marking path of the laser component refers to the order in which candidate laser images are generated on the marking plane as the laser component sequentially projects them. The marking path and the graphic shape of the candidate laser images can be set according to user preferences. The marking path of the candidate laser images includes, but is not limited to, counter-clockwise, clockwise, and array arrangements. The graphic shape of the candidate laser images includes, but is not limited to, one or more of the following: square, circle, and triangle.

[0047] In this embodiment, the preset order can be sorted according to the numerical value of the laser marking height. For example, for N laser marking heights, the laser marking heights are numbered from smallest to largest according to their numerical values, and the laser marking heights are selected sequentially and input into the laser component. Each laser marking height corresponds to a candidate laser image, and the number of each candidate laser image is the same as the number of the laser marking height.

[0048] In one embodiment, the marking path is N. N matrix, N The N matrix comprises multiple matrix elements. According to the marking path, laser marking heights are selected sequentially to emit lasers onto the marking platform. This includes: selecting laser marking heights sequentially to emit lasers onto the marking platform according to the generation order of the matrix elements; wherein, in each marking process, the matrix element includes at least one laser spot generated by laser marking.

[0049] In this embodiment, when there is only one laser spot, the laser component projects the laser spot onto the center of the candidate laser image. For example, if the candidate laser image is square, the laser component projects the laser spot onto the center of the square. When there are multiple laser spots, the laser component projects the laser spots into an array on the candidate laser image.

[0050] In one specific embodiment, the marking path is N. In an N-matrix laser marking system, the laser component marks the matrix elements sequentially according to their arrangement to generate candidate laser images. In this embodiment, the candidate laser image is square in shape. When performing laser marking, the laser component can either mark the center of the square with laser dots or mark several laser dots sequentially within the square area.

[0051] Specifically, such as Figure 2 As shown, Figure 2This is a schematic diagram illustrating a scenario where a laser component, according to an embodiment of this application, performs marking based on laser marking height. Figure 2 In the process, after receiving the laser marking height, the laser component 210 projects candidate laser images onto the marking platform 220 (the candidate laser images include: Figure 2 Rectangles 1 to 9 in the text Figure 2 The dashed lines in the image indicate partial laser beams, and the candidate laser image is square in shape. Figure 2 In this embodiment, the lighting path is a 3×3 matrix, with elements arranged from left to right and top to bottom. When the laser component performs lighting, after receiving a series of laser marking heights, it sequentially receives the laser marking heights according to the marking path. For example, for laser marking heights 1 to 9, upon receiving laser marking height 1, candidate laser images are generated in rectangular area 1 according to the matrix element order. Upon receiving laser marking height 2, candidate laser images are generated in rectangular area 2 according to the matrix element order. Upon receiving laser marking height 3, candidate laser images are generated in rectangular area 3 according to the matrix element order. Upon receiving laser marking height 4, candidate laser images are generated in rectangular area 4 according to the matrix element order. Upon receiving laser marking height 5, candidate laser images are generated in rectangular area 5 according to the matrix element order. Upon receiving laser marking height 6, candidate laser images are generated in rectangular area 6 according to the matrix element order. When receiving laser marking at height 7, candidate laser images are generated by marking in rectangular area 7 according to the matrix element order. When receiving laser marking at height 8, candidate laser images are generated in rectangular area 8 according to the matrix element order. When receiving laser marking at height 9, candidate laser images are generated in rectangular area 9 according to the matrix element order.

[0052] In this embodiment, after generating candidate laser images, the process includes: labeling matrix elements to obtain the correspondence between laser marking height and candidate images; generating and storing the correspondence between labels and laser marking height, with the labels used for users to select candidate laser images.

[0053] In one embodiment, after determining the target focal length parameter of the laser component based on the target laser marking height, the process includes: measuring the actual laser marking height of the material processed by the laser component according to the target focal length parameter; calculating the height difference between the target laser marking height and the actual laser marking height; performing laser marking according to the target focal length parameter when the height difference is less than a preset height difference threshold; and adjusting the actual laser marking height and performing laser marking according to the adjusted actual laser marking height when the height difference is not less than the preset height difference threshold.

[0054] In this embodiment, the target laser marking height is determined based on the marking plane. When the laser assembly processes materials, the material properties of the materials need to be considered to eliminate the influence of the material thickness on the laser marking effect. Specifically, the laser marking error is determined by measuring the height difference between the actual laser marking height and the target laser marking height.

[0055] In this embodiment, adjusting the actual laser marking height when the height difference is not less than a preset height difference threshold includes: increasing the actual laser marking height when the target laser marking height is greater than the actual laser marking height; and decreasing the actual laser marking height when the target laser marking height is less than the actual laser marking height.

[0056] like Figure 3 As shown, Figure 3 This is a schematic diagram of the processing conditions of a focusing method provided in an embodiment of this application. Figure 3 In the processing condition, the processing material 320 is placed on the marking platform 330, and the laser component 310 performs laser illumination on the processing material 320. The laser processing path is indicated by a dashed arrow. The target laser marking height is H1, the actual laser marking height is H2, and the height difference between the target laser marking height H1 and the actual laser marking height H2 is Δh, where Δh = H1 - H2. During the focusing process, it is determined whether the absolute value of Δh exceeds a preset height difference threshold. If the absolute value of Δh exceeds the preset height difference threshold, the automatic focusing process is activated to obtain the optimal actual laser marking height H3. Based on the optimal actual laser marking height H3 and Δh, the optimal focal length parameters during the processing are determined. If the absolute value of Δh does not exceed the preset height difference threshold, the automatic focusing process is not activated.

[0057] In one specific embodiment, it is first determined whether the absolute value of Δh is less than 0.1mm. If it is, the process ends. If not, it is then determined whether Δh is greater than 0. If yes, the motor is controlled to move upward to achieve focusing. If no, the motor is controlled to move downward to achieve focusing.

[0058] The embodiments of this application have at least the following advantages: By determining a series of laser marking heights, multiple focusing options are automatically provided to the user, thereby simplifying the user's focusing operation. By inputting a series of laser marking heights into the laser component, the laser component emits laser light onto the marking platform according to the series of laser marking heights, generating a series of candidate laser images on the marking platform. Each laser marking height corresponds to one candidate laser image. By generating a series of images corresponding to laser marking heights, the focusing effect of the laser marking height is intuitively displayed to the user. By comparing the marking parameters of the candidate laser images, the candidate laser image with the optimal marking parameters is selected as the target laser image. The target laser marking height of the target laser image is obtained, and the target focal length parameter of the laser component is determined based on the target laser marking height, thereby improving the user's focusing efficiency.

[0059] Secondly, such as Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of a laser assembly provided in an embodiment of this application. The laser assembly includes: a driving module 410, a laser module 420, a first control module 430, and a second control module 440.

[0060] The drive module 410 is used to receive a series of laser marking heights.

[0061] The drive module includes a motor, which is used to connect to the drive structure of the laser module to control the movement of the laser module.

[0062] The laser module 420 is used to emit lasers to the marking platform according to a series of laser marking heights, and generate a series of candidate laser images on the marking platform, wherein one laser marking height corresponds to one candidate laser image.

[0063] The laser module 420 includes a laser lens for emitting laser light, and a driving structure connected to the laser lens for moving the laser emission position of the laser lens according to the laser marking height.

[0064] The first control module 430 is used to compare the marking parameters of a series of candidate laser images and select the candidate laser image with the best marking parameters as the target laser image. The best marking parameters indicate that the quality of the candidate laser image generated by the laser component emitting laser to the marking platform is the best.

[0065] The second control module 440 is used to acquire the target laser marking height corresponding to the target laser image, and determine the target focal length parameter of the laser component based on the target laser marking height.

[0066] In this embodiment, the laser component further includes: a ranging module, used to measure the actual laser marking height of the material processed by the laser component according to the target focal length parameter; calculate the height difference between the target laser marking height and the actual laser marking height; perform laser marking according to the target focal length parameter when the height difference is less than a preset height difference threshold; and adjust the actual laser marking height and perform laser marking according to the adjusted actual laser marking height when the height difference is not less than the preset height difference threshold.

[0067] In this embodiment, the ranging module includes a laser ranging sensor for real-time detection of the laser marking height. A laser ranging sensor is added at a suitable location near the laser assembly to detect the focal length.

[0068] Before leaving the factory, the laser equipment corresponding to the laser component has its focus adjusted by the manufacturer's professionals and the data stored locally. During the actual engraving process, after the user places materials of different heights on the processing platform, they only need to click "auto focus" once, and the control system will automatically adjust to the appropriate focus.

[0069] In one embodiment, the laser assembly further includes a user terminal having a corresponding display screen for providing a user interface for the user to perform focusing operations. Figure 5 This is a flowchart illustrating the steps of a focusing method provided in another embodiment of this application, applied to the user terminal of this embodiment. For example... Figure 5 Instructions: Step 510: Receive the first operation instruction and begin the adjustment process. The first operation instruction is for the user to select the focusing process via the user interface. Step 520: Determine a series of laser marking heights, marking paths, and marking shapes. Each laser marking height corresponds to a candidate laser image, each candidate laser image has a corresponding number, and the marking shape is the laser marking range. Step 530: The laser component marks each laser height sequentially, generating candidate laser images. Each laser marking height generates one candidate laser image, and the candidate laser image number is the same as the laser marking height's order. Step 540: Determine whether to traverse all laser marking heights. Step 540: Based on the candidate laser image numbers, confirm whether to traverse all laser marking heights. If all laser marking heights have been traversed, confirm marking completion and proceed to step 550; otherwise, return to step 530 for marking. Step 550: Remove the focusing card to obtain candidate laser images. Step 560: Determine the target laser image according to the second operation instruction. In step 560, the second operation instruction is for the user to input the target laser pattern number into the confirmation interface of the user interface to confirm the target laser image. Step 570: Find the target laser marking height and target focal length parameters corresponding to the target laser image. Step S570: Based on the stored correspondence, find the target focal length parameters corresponding to the target laser marking height.

[0070] This embodiment automatically determines a series of focusing parameters of the laser component through a first operation instruction, thereby simplifying the user's parameter adjustment operation; at the same time, it receives a second operation instruction and determines the target laser image from a series of candidate laser images according to the second operation instruction, so that the user can make a quick selection based on the intuitive parameter adjustment results.

[0071] Please refer to Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0072] The electronic device 100 includes a memory 20, a processor 30, and a computer program 40 stored in the memory 20 and executable on the processor 30. When the processor 30 executes the computer program 40, it implements the steps described in the focusing method embodiments above, for example... Figure 1 Steps 110 to 130 are shown.

[0073] For example, computer program 40 can also be divided into one or more modules / units, one or more of which are stored in memory 20 and executed by processor 30. One or more modules / units can be a series of computer program instruction segments capable of performing a specific function, the instruction segments describing the execution process of computer program 40 in electronic device 100. For example, it can be divided into the shown drive module 410, laser module 420, first control module 430, and second control module 440.

[0074] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 100 and does not constitute a limitation on the electronic device 100. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device 100 may also include input / output devices, network access devices, buses, etc.

[0075] Processor 30 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors, single-chip microcomputers, or any conventional processor.

[0076] The memory 20 can be used to store computer programs 40 and / or modules / units. The processor 30 implements various functions of the electronic device 100 by running or executing the computer programs and / or modules / units stored in the memory 20 and by calling data stored in the memory 20. The memory 20 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 100 (such as audio data), etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.

[0077] If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they 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 computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

Claims

1. A focusing method applied to a laser assembly, characterized in that, include: A series of laser marking heights are received, and a laser is emitted toward a marking platform according to the series of laser marking heights, generating a series of candidate laser images on the marking platform, wherein one laser marking height corresponds to one candidate laser image; By comparing the marking parameters of a series of candidate laser images, the candidate laser image with the optimal marking parameters is selected as the target laser image. The optimal marking parameters indicate that the quality of the candidate laser image generated by the laser component emitting laser light to the marking platform is the best. Obtain the target laser marking height corresponding to the target laser image, and determine the target focal length parameter of the laser component based on the target laser marking height.

2. The focusing method according to claim 1, characterized in that, Before receiving a series of laser marking heights, the process includes: determining the series of laser marking heights; determining the series of laser marking heights includes: Obtain the reference focal length parameters and preset focal length range of the laser component; Based on the preset focal length range and the reference focal length parameter, set the parameter gradient of the reference focal length parameter; Obtain the reference laser marking height corresponding to the reference focal length parameter, and determine the series of laser marking heights based on the parameter gradient and the reference laser marking height.

3. The focusing method according to claim 1, characterized in that, The process of receiving a series of laser marking heights and emitting laser light to the marking platform according to the series of laser marking heights includes: The series of laser marking heights are sorted according to a preset order; Obtain the laser marking path, and then select the laser marking height sequentially according to the marking path to emit laser light onto the marking platform.

4. The focusing method according to claim 3, characterized in that, The marking path is N. N matrix, the N The N matrix includes multiple matrix elements. The step of sequentially selecting the laser marking heights according to the marking path and emitting lasers towards the marking platform includes: According to the generation order of the matrix elements, the laser marking heights are selected sequentially to emit lasers to the marking platform; In each marking process, the matrix element includes at least one laser spot generated by laser marking.

5. The focusing method according to claim 4, characterized in that, After generating the candidate laser image, the process includes: The matrix elements are labeled to obtain the correspondence between the laser marking height and the candidate image; Generate and store the correspondence between the label and the laser marking height. The label is used to allow the user to select the candidate laser image.

6. The focusing method according to claim 1, characterized in that, After determining the target focal length parameter of the laser component based on the target laser marking height, the process includes: processing materials based on the target focal length parameter, wherein processing materials based on the target focal length parameter includes: Measure the actual laser marking height of the material processed by the laser assembly according to the target focal length parameter; Calculate the height difference between the target laser marking height and the actual laser marking height; If the height difference is less than a preset height difference threshold, laser marking is performed according to the target focal length parameter; If the height difference is not less than the preset height difference threshold, the actual laser marking height is adjusted, and laser marking is performed according to the adjusted actual laser marking height.

7. The focusing method according to claim 6, characterized in that, Adjusting the actual laser marking height when the height difference is not less than the preset height difference threshold includes: If the target laser marking height is greater than the actual laser marking height, increase the actual laser marking height. If the target laser marking height is less than the actual laser marking height, reduce the actual laser marking height.

8. A laser assembly, characterized in that, include: Drive module, laser module, first control module and second control module; The drive module is used to receive a series of laser marking heights; The laser module is used to emit lasers to the marking platform according to the series of laser marking heights, and generate a series of candidate laser images on the marking platform, wherein one laser marking height corresponds to one candidate laser image; The first control module is used to compare the marking parameters of a series of candidate laser images and select the candidate laser image with the optimal marking parameters as the target laser image. The optimal marking parameters indicate that the quality of the candidate laser image generated by the laser component emitting laser to the marking platform is the best. The second control module is used to acquire the target laser marking height corresponding to the target laser image, and determine the target focal length parameter of the laser component based on the target laser marking height.

9. The laser assembly according to claim 8, characterized in that, The laser assembly further includes: a ranging module; The ranging module is used to measure the actual laser marking height of the material processed by the laser component according to the target focal length parameter; calculate the height difference between the target laser marking height and the actual laser marking height; perform laser marking according to the target focal length parameter when the height difference is less than a preset height difference threshold; and adjust the actual laser marking height and perform laser marking according to the adjusted actual laser marking height when the height difference is not less than the preset height difference threshold.

10. An electronic device, the electronic device comprising a processor and a memory, characterized in that, The memory is used to store instructions, and the processor is used to invoke the instructions in the memory to cause the electronic device to perform the focusing method as described in any one of claims 1 to 7.