Alignment method and device and electronic equipment

By automatically dividing areas based on targets in PCB manufacturing, determining the transformation information, and generating exposure maps, the problem that the overall shrinkage correction method is difficult to reflect local deformation is solved, and high-precision exposure positioning is achieved.

CN120379147APending Publication Date: 2025-07-25HANGZHOU XINJUNZHE MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510516625.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing solder-resistant exposure technology in PCB manufacturing relies on the overall shrinkage correction method, which is difficult to accurately reflect local deformation and affect the exposure positioning accuracy.

Method used

By automatically dividing areas based on targets, determining the transformation information of each area, generating exposure pictures corresponding to the design pictures, and flexibly responding to local deformation of the PCB board.

Benefits of technology

It improves the alignment accuracy of the PCB board, has strong adaptability, can accurately compensate for local deformation, and improves exposure positioning accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120379147A_ABST
    Figure CN120379147A_ABST
Patent Text Reader

Abstract

The invention provides an alignment method and device and electronic equipment, and relates to the technical field of PCB manufacturing. The method comprises the steps that theoretical target spots corresponding to a design drawing are obtained, triangular division is conducted on the obtained theoretical target spots, a plurality of first triangles and corresponding second triangles are obtained, the vertexes of the first triangles are the theoretical target spots, and the vertexes of the second triangles are actual target spots which correspond to the vertexes of the first triangles and are located on a plate; according to the corresponding first triangles and second triangles, transformation information corresponding to the first triangles is obtained, and the transformation information is used for indicating the transformation relation between the corresponding first triangles and second triangles; obtaining a second control point on the board according to the first control point and the transformation information of each graphic element in the design drawing; and according to the second control point of each graphic element, generating an exposure graph. Therefore, the local deformation of the PCB can be flexibly dealt with, and the alignment precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of PCB manufacturing, and more specifically, to an alignment method, apparatus, and electronic device. Background Art

[0002] Currently, in the manufacturing of Printed Circuit Boards (PCBs), the solder mask exposure technology mainly relies on Laser Direct Imaging (LDI) equipment to achieve precise positioning of solder joints and pads by matching the exposure pattern with the board material. During this process, generally, the exposure pattern designed for the entire board is corrected through an overall scaling correction method, that is, determining the position of the actual exposure pattern to be used, which means determining the exposure pattern used when the LDI equipment exposes.

[0003] The overall scaling correction method assumes that the overall deformation of the board material is relatively consistent, calculates a unified scaling parameter, and then corrects the exposure pattern designed for the entire board based on this scaling parameter. However, in the actual production process, due to processes such as drilling, etching, and lamination, the copper foil undergoes varying degrees of non-uniform deformation locally, and the overall correction method is difficult to accurately reflect the local deformation, thereby affecting the accuracy of exposure positioning. Summary of the Invention

[0004] Embodiments of the present application provide an alignment method, apparatus, electronic device, and readable storage medium, which can automatically divide regions based on target points, then determine the transformation information of each region, and finally determine the exposure pattern corresponding to the design drawing based on this transformation information, so as to flexibly handle local deformation of the PCB board and improve the alignment accuracy.

[0005] Embodiments of the present application can be implemented as follows:

[0006] In a first aspect, embodiments of the present application provide an alignment method, the method including:

[0007] Obtaining theoretical target points corresponding to a design drawing, and performing triangular division on the obtained theoretical target points to obtain a plurality of first triangles, and obtaining second triangles corresponding to each first triangle, where the vertices of the first triangle are theoretical target points, and the vertices of the second triangle are the actual target points located on the board corresponding to the vertices of the corresponding first triangle;

[0008] Obtaining the transformation information corresponding to each first triangle according to the corresponding first triangle and second triangle, where the transformation information is used to indicate the transformation relationship between the corresponding first triangle and the second triangle;

[0009] Obtain second control points located on the sheet according to the first control points of each graphic element in the design drawing and the transformation information;

[0010] Generate an exposure map according to the second control points of each graphic element.

[0011] In a second aspect, an embodiment of the present application provides an alignment device, and the device includes:

[0012] A zoning module, configured to obtain theoretical target points corresponding to a design drawing, perform triangular division on the obtained theoretical target points to obtain a plurality of first triangles, and obtain second triangles corresponding to each first triangle, where the vertices of the first triangle are theoretical target points, and the vertices of the second triangle are actual target points located on the sheet corresponding to the vertices of the corresponding first triangle;

[0013] An analysis module, configured to obtain transformation information corresponding to each first triangle according to the corresponding first triangle and second triangle, where the transformation information is used to indicate the transformation relationship between the corresponding first triangle and the second triangle;

[0014] A processing module, configured to obtain second control points located on the sheet according to the first control points of each graphic element in the design drawing and the transformation information;

[0015] A drawing module, configured to generate an exposure map according to the second control points of each graphic element.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement the alignment method described in the foregoing embodiments.

[0017] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the alignment method described in the foregoing embodiments is implemented.

[0018] The alignment method, device, electronic device, and readable storage medium provided by the embodiments of the present application first obtain theoretical target points corresponding to a design drawing, perform triangular division on the obtained theoretical target points to obtain a plurality of first triangles, and obtain second triangles corresponding to each first triangle; then, based on the corresponding first triangles and second triangles, analyze and obtain transformation information corresponding to each first triangle, and obtain second control points located on a plate based on the first control points of each graphic element in the design drawing and the above transformation information, and further generate an exposure map based on the obtained second control points. Among them, the vertices of the second triangle are the actual target points located on the plate corresponding to the theoretical target points of the corresponding first triangle, and the transformation information is used to indicate the transformation relationship between the corresponding first triangle and the second triangle. The above method performs local partitioning on the plate by collecting target point data, then analyzes and obtains the transformation information corresponding to each local area, and effectively compensates for local deformation based on this information, thereby greatly improving the positioning accuracy of solder joints and pads in the exposure map. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0020] Figure 1 It is a block diagram of the electronic device provided by the embodiments of the present application;

[0021] Figure 2 It is a flowchart of the alignment method provided by the embodiments of the present application;

[0022] Figure 3 For Figure 2 It is a flowchart of the sub-steps included in step S200 in

[0023] Figure 4 For Figure 3 It is a flowchart of the sub-steps included in sub-step S210 in

[0024] Figure 5 For Figure 4 It is a flowchart of the sub-steps included in sub-step S212 in

[0025] Figure 6 For Figure 2 It is a flowchart of the sub-steps included in step S300 in

[0026] Figure 7 For Figure 6 It is a flowchart of the sub-steps included in sub-step S310 in

[0027] Figure 8 For Figure 6 Flow diagram of sub - steps included in sub - step S320;

[0028] Figure 9 Schematic diagram of the corresponding first triangle and second triangle provided by the embodiment of the present application;

[0029] Figure 10 Schematic diagram of surface A and surface B and triangulation diagram provided by the embodiment of the present application;

[0030] Figure 11 Schematic diagram of the effect under linear deformation provided by the implementation of the present application;

[0031] Figure 12 Schematic diagram of the effect under non - linear deformation provided by the implementation of the present application;

[0032] Figure 13 Block diagram of the alignment device provided by the embodiment of the present application.

[0033] Icons: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication unit; 200 - alignment device; 210 - partition module; 220 - analysis module; 230 - processing module; 240 - drawing module. Detailed implementation manners

[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Usually, the components of the embodiments of the present application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.

[0035] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application claimed, but merely represents the selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts fall within the scope of protection of the present application.

[0036] It should be noted that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0037] The traditional full-board unified shrinkage and expansion method ignores the local deformation of the board in different regions, which results in insufficient alignment accuracy. The existing technologies are difficult to meet the increasing accuracy requirements in production, and there is a need for a more adaptable and accurate alignment technology.

[0038] In view of the above situation, the embodiments of the present application provide an alignment method, device, electronic device and readable storage medium, which can automatically divide regions based on target points, and then determine the transformation information of each region, and finally determine the exposure pattern corresponding to the design drawing based on the transformation information, so as to flexibly cope with the local deformation of the PCB board and improve the alignment accuracy.

[0039] The following will describe in detail some embodiments of the present application with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0040] Please refer to Figure 1 , Figure 1 which is a block diagram of the electronic device 100 provided by the embodiments of the present application. The electronic device 100 may be, but is not limited to, a computer, a server, etc. The electronic device 100 may include a memory 110, a processor 120 and a communication unit 130. The memory 110, the processor 120 and the communication unit 130 are directly or indirectly electrically connected to each other to realize data transmission or interaction. For example, these elements may be electrically connected to each other through one or more communication buses or signal lines.

[0041] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0042] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions. For example, the memory 110 stores an alignment device 200, and the alignment device 200 includes at least one software function module that can be stored in the memory 110 in the form of software or firmware. The processor 120 executes various functional applications and data processing by running software programs and modules stored in the memory 110, such as the alignment device 200 in the embodiment of the present application, that is, implementing the alignment method in the embodiment of the present application.

[0043] The communication unit 130 is used to establish a communication connection between the electronic device 100 and other communication terminals (such as LDI devices) through a network, and to send and receive data through the network.

[0044] It should be understood that Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0045] Please refer to Figure 2 , Figure 2 The flowchart of the alignment method provided in the embodiment of the present application is shown in FIG. The method can be applied to the above-mentioned electronic device. The specific flow of the alignment method is described in detail below. In this embodiment, the method can include steps S100 to S400.

[0046] Step S100, obtaining a theoretical target point corresponding to the design drawing, and performing triangulation on the obtained theoretical target point to obtain a plurality of first triangles, and obtaining a second triangle corresponding to each first triangle.

[0047] In this embodiment, the theoretical target points corresponding to the design drawing and the actual target points on the plate can be obtained. The theoretical target points and the actual target points are in one-to-one correspondence. The above-mentioned theoretical target points and actual target points can be referred to as alignment target point data. Among them, the actual target points can be obtained through an image acquisition unit and image recognition processing, or can be obtained by other means. The method for obtaining the actual target points is not limited herein.

[0048] Among them, the theoretical target points can be obtained from Gerber data. That is, the marked points in the Gerber data are called TPs (Theoretical Points), and the set where they are located is called TPs. The marked points actually captured from the plate are called PPs (Practical Points), and the set where they are located is called PPs.

[0049] In the case of obtaining the theoretical target points corresponding to the design drawing, based on the theoretical target points, triangular division can be performed, so that the design area corresponding to the theoretical target points is divided into a plurality of first triangles. The three vertices of the first triangle are the theoretical target points, that is, three theoretical target points determine a first triangle. Whether there is overlap between the plurality of first triangles can be determined based on the adopted triangular division method, and the adopted triangular division method can be determined in combination with actual needs, and no specific limitation is made herein.

[0050] In the case of determining the first triangle, the second triangle corresponding to each first triangle can also be determined. Since the theoretical target points and the actual target points are in one-to-one correspondence, for each first triangle, three theoretical target points that are the vertices of the first triangle can be determined, and then the actual target points corresponding to the three theoretical target points can be determined. Furthermore, the triangle formed by the three determined actual target points is used as the second triangle corresponding to the first triangle. It can be seen from this that the vertices of the second triangle are the actual target points on the plate corresponding to the vertices of the corresponding first triangle.

[0051] For example, assume there are four theoretical target points: a1, a2, a3, a4, and four actual target points: b1, b2, b3, b4, where a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and a4 corresponds to b4. If a first triangle is determined and the three vertices of the first triangle are: a1, a2, a3, then the three vertices of the corresponding second triangle can be determined as: b1, b2, b3.

[0052] Step S200, obtain the transformation information corresponding to each first triangle according to the corresponding first triangle and second triangle.

[0053] In this embodiment, one first triangle and the corresponding second triangle can be regarded as a triangle pair. For each triangle pair, the transformation information of this triangle pair can be analyzed to obtain the transformation information corresponding to the first triangle. This transformation information is used to indicate the transformation relationship between the first triangle and the second triangle in the triangle pair, that is, to indicate the transformation relationship between two partitions, where one partition is on the design drawing and the other partition is on the plate. The specific form and specific obtaining method of the above transformation relationship can be determined according to actual needs and will not be specifically limited here.

[0054] Step S300: Obtain the second control points located on the plate according to the first control points of the graphic elements in the design drawing and the transformation information.

[0055] In this embodiment, the control points of each graphic element in the design drawing are obtained as the first control points. For each first control point, the position of the first control point can be processed according to the transformation information obtained through step S200, and the processing result of the position of the first control point is used as the position of the second control point, that is, the second control point corresponding to the first control point is obtained.

[0056] Step S400: Generate an exposure pattern according to the second control points of each graphic element.

[0057] Optionally, when the second control points corresponding to a graphic element in the design drawing are obtained, that is, primitive drawing is performed according to this part of the second control points to draw the graphic element; repeating the above process can draw the exposure pattern. It is also possible to draw each graphic element after obtaining the second control points of all the graphic elements, so as to obtain the exposure pattern. This exposure pattern is the image used by the LDI device for exposure.

[0058] The method provided in this embodiment is a method of partitioning by target points and calculating expansion and contraction. This method automatically divides regions based on target points, and then determines the transformation information of each region. Finally, an exposure pattern corresponding to the design drawing is determined based on this transformation information, so that local deformation of the PCB board can be flexibly handled and the alignment accuracy can be improved.

[0059] As a possible implementation manner, based on the given target point positions in the design drawing (i.e., the positions of the theoretical target points), the Delaunay algorithm can be used to perform triangular meshing on the plane space, and the entire design area is divided into several non-overlapping triangular regions. The vertex of each triangle corresponds to a theoretical target point.

[0060] For example, the theoretical target points of the design drawing are P = {p1, p2,..., pn}. Triangulation connects the point set P into non - overlapping triangles, and the union of all triangles covers the convex hull of the point set. The Delaunay condition needs to be satisfied, that is, for any triangle, there are no other points inside its circumcircle.

[0061] In this way, each first triangle can be determined based on the theoretical target points through the Delaunay algorithm, and then the second triangle corresponding to each first triangle can be determined.

[0062] As a possible implementation, the transformation information can be obtained in the following way. For each first triangle, according to the vertices of the first triangle and the vertices of the corresponding second triangle, the affine transformation matrix between the first triangle and the corresponding second triangle is calculated.

[0063] That is, for each triangular region, according to the corresponding relationship of the three vertices of the region in the theoretical data (TPs) and the actual data (PPs), the local affine transformation matrix (at least three points are required for matrix calculation) is calculated as the transformation information between the first triangle and the second triangle corresponding to the triangular region.

[0064] Among them, the affine transformation formula is:

[0065]

[0066] Among them, (x, y) represents the vertex position of the first triangle (i.e., the position of the theoretical target point), (x', y') represents the vertex position of the second triangle (i.e., the position of the actual target point), a 11 、a 12 、a 21 、a 22 、t x 、t y represent the affine transformation parameters.

[0067] The derivation formula is:

[0068]

[0069] Writing the equations of three sets of points in matrix form can obtain:

[0070]

[0071] Solving the above 6×6 linear equations can obtain the affine transformation parameters, that is, the affine transformation matrix as the transformation information.

[0072] As another possible implementation, the transformation information can be obtained in the way Figure 3 shown. Please refer to Figure 3 ,Figure 3 For Figure 2 Figure 2 is a schematic flowchart of the sub-steps included in step S200. In this embodiment, step S200 may include steps S210 to S230.

[0073] Step S210: For each first triangle, by merging the first triangle with a reference triangle, obtain the first quadrilateral corresponding to the first triangle.

[0074] In this embodiment, for each first triangle, one first triangle can be selected from the adjacent first triangles sharing a common side with the first triangle as the reference triangle corresponding to the first triangle. Then, perform region merging on the first triangle and the corresponding reference triangle to obtain the first quadrilateral corresponding to the first triangle. Among them, a triangle can be randomly selected from the adjacent first triangles of the first triangle as the reference triangle corresponding to the first triangle, or the reference triangle can be selected by other means, and then the first quadrilateral corresponding to the first triangle can be obtained. It can be understood that if a first triangle has only one adjacent first triangle, the adjacent first triangle can be directly used as the reference triangle corresponding to the first triangle, and then the first quadrilateral corresponding to the first triangle can be obtained through merging.

[0075] As a possible implementation, it can be obtained through Figure 4 the shown method to obtain the first quadrilateral corresponding to the first triangle. Please refer to Figure 4 , Figure 4 For Figure 3 Figure 3 is a schematic flowchart of the sub-steps included in sub-step S210. In this embodiment, sub-step S210 may include sub-steps S211 to S213.

[0076] Sub-step S211: Take the first triangle sharing a common side with the first triangle as the candidate triangle.

[0077] In this embodiment, the first triangles obtained by partitioning can be analyzed to determine the first triangles sharing a common side with the currently targeted first triangle, and all the determined first triangles are taken as candidate triangles.

[0078] Sub-step S212: For each candidate triangle, calculate the score of the candidate quadrilateral obtained by merging the first triangle and the candidate triangle.

[0079] Next, for each candidate triangle, a score of an alternative quadrilateral corresponding to the candidate triangle can be calculated. An alternative quadrilateral corresponding to a candidate triangle is a quadrilateral obtained by merging the regions of the candidate triangle and the first triangle currently targeted. The scores of the alternative quadrilaterals can be calculated in any way. The smaller the score of an alternative quadrilateral, the closer the alternative quadrilateral is to a rectangle. That is, the score of an alternative quadrilateral is inversely proportional to the degree to which the alternative quadrilateral is close to a rectangle.

[0080] As a possible implementation, the score of an alternative quadrilateral can be calculated through Figure 5 shown. Please refer to Figure 5 , Figure 5 is Figure 4 a schematic flowchart of the sub-steps included in sub-step S212. In this embodiment, sub-step S212 may include sub-steps S2121 to S2123.

[0081] In sub-step S2121, according to the four angles and the right angle degree of the alternative quadrilateral, an angle deviation score is calculated.

[0082] In sub-step S2122, according to the lengths of the four sides of the alternative quadrilateral, a side length difference score is calculated.

[0083] In sub-step S2123, according to the angle deviation score and the side length difference score, the score of the alternative quadrilateral is obtained.

[0084] In this embodiment, the four angles of the alternative quadrilateral can be obtained by calculating the included angles first. Among them, the method of calculating the included angles can be as follows. First, the cosθ corresponding to the included angle θ between two vectors is calculated through the dot product: Then, the angle is obtained by using the inverse cosine function:

[0085] The angle deviation score can be calculated according to the following formula based on the four angles and the right angle degree of the alternative quadrilateral. The formula can be as follows: angleScore represents the angle deviation score, and angle i represents the angle of the i-th angle in the alternative quadrilateral. The side length difference score can also be calculated based on the following formula according to the lengths of the four sides of the alternative quadrilateral: where lengthScore represents the side length difference score, represents the side lengths of the two opposite sides of the alternative quadrilateral respectively, Denote the lengths of the other two opposite sides of the alternative quadrilateral respectively. The sum of the above angle deviation score and side length difference score can be used as the score of the alternative quadrilateral, that is: score = angleScore + lengthScore, where score represents the score. The score of the alternative quadrilateral represents the quadrilateral rectangularity score of the alternative quadrilateral. The final score of an alternative quadrilateral is the sum of the angle deviation score and the side length difference score. The smaller the score, the closer the quadrilateral is to the ideal rectangle.

[0086] Sub-step S213: Take the alternative quadrilateral corresponding to the minimum score among the obtained scores as the first quadrilateral corresponding to the first triangle.

[0087] The scores of the alternative quadrilaterals corresponding to the first triangle can be compared to determine the minimum score among them, and the alternative quadrilateral corresponding to the minimum score is taken as the first quadrilateral corresponding to the first triangle.

[0088] In the above method, for each triangular region, considering its common side situation with adjacent triangles, by evaluating whether the four corner angles are close to 90 degrees and whether the opposite side lengths are similar, a suitable adjacent triangle is selected for merging, so that the merged region is close to a rectangular shape, which is more suitable for perspective transformation calculation (at least four points are required for matrix calculation).

[0089] The following gives an example of how to obtain the first quadrilateral corresponding to a first triangle.

[0090] Suppose there are three first triangles, namely triangle A, B, and C. There is a triangle A on the left side of triangle B and a triangle C on the right side of triangle B. Both triangle A and triangle C share a side with triangle B. For triangle A, since triangle A only shares a side with triangle B, triangle A can only be merged with triangle B, and the merging result is the first quadrilateral corresponding to triangle A. For triangle B, since triangle B can be merged with triangle A and C, at this time, the quadrilateral rectangularity scores obtained after merging with triangle A and C respectively can be calculated; if the score of the quadrilateral rectangularity obtained by triangle B and triangle A is lower than the score of the quadrilateral rectangularity obtained by triangle B and triangle C, then choose to merge triangle A and triangle B, and take the merging result as the first quadrilateral corresponding to triangle B; if the score of the quadrilateral rectangularity obtained by triangle B and triangle C is lower than the score of the quadrilateral rectangularity obtained by triangle B and triangle A, then choose to merge triangle C and triangle B, and take the merging result as the first quadrilateral corresponding to triangle B.

[0091] Step S220: Determine the second quadrilateral located on the sheet corresponding to the first quadrilateral.

[0092] After determining a first quadrilateral, according to the one-to-one correspondence between the theoretical target points and the actual target points, the quadrilateral formed by the actual target points corresponding to the four vertices of the first quadrilateral is used as the second quadrilateral.

[0093] Step S230: Calculate the perspective transformation matrix between the first quadrilateral and the corresponding second quadrilateral based on the vertices of the first quadrilateral and the vertices of the corresponding second quadrilateral, and save the perspective transformation matrix as the transformation information corresponding to the first triangle.

[0094] In this embodiment, for each first quadrilateral determined by merging and the corresponding second quadrilateral, based on the corresponding theoretical target points (TPs) and actual target points (PPs) as vertices, calculate the perspective transformation (homography) matrix to adapt to the compensation of non-linear deformation, and use the calculated perspective transformation matrix as the transformation information corresponding to each first triangle.

[0095] The basic formula for perspective transformation is:

[0096]

[0097] Among them, (x, y) represents the vertex position of the first quadrilateral (i.e., the position of the theoretical target point), (x', y') represents the vertex position of the second quadrilateral (i.e., the position of the actual target point), (x', y', w') represents the homogeneous coordinates of the vertex of the second quadrilateral, and a 11 、a 12 、a 13 、a 21 、a 22 、a 23 、a 31 、a 32 、a 33 represent the perspective transformation parameters.

[0098] Solving from corresponding points:

[0099] a 11 x i +a 12 y i +a 13 -x i '(a 31 x i +a 32 y i +a 33 )=0

[0100] a 21 x i +a 22 y i +a 23 -y i '(a31 x i +a 32 y i +a 33 ) = 0

[0101] In this way, the perspective transformation matrix can be obtained.

[0102] In this embodiment, two methods for calculating transformation information are provided. Thus, it can be understood that the present application provides two linear partition alignment methods. The two schemes mainly differ in the selection of the local transformation model, so as to adapt to the differences in the deformation correction requirements of different customers. The first method is the linear partition alignment method based on affine transformation. In this method, the affine transformation is used to calculate the local transformation matrix (i.e., the transformation information mentioned above), only considering linear changes such as translation, rotation, scaling, and shear, without compensating for non-linear deformation. This method is suitable for customers who are extremely sensitive to linear deformation and require strict linear correction during the exposure alignment process, ensuring that the transformations in each region are consistent and there is no additional non-linear error. The second method is the non-linear partition alignment method based on perspective transformation. In this method, adjacent triangles are merged to generate an approximate rectangular region, and the perspective transformation (homography transformation) is used to calculate the local transformation matrix (i.e., the transformation information mentioned above), so as to be able to compensate for complex non-linear deformation. This method is suitable for customers who have a certain tolerance for a small amount of non-linear deformation and can still achieve a high alignment accuracy under relatively complex deformation conditions.

[0103] Optionally, when an exposure pattern needs to be obtained, the affine transformation matrix can be calculated in advance and specified manually as the transformation information, or the perspective transformation matrix can be calculated as the transformation information; it is also possible to automatically determine whether to calculate the affine transformation matrix as the transformation information or the perspective transformation matrix based on the actual situation of the board. For example, if it is automatically recognized that the board is mainly linearly deformed, the affine transformation matrix is calculated as the transformation information; if it is automatically recognized that the board is mainly non-linearly deformed, the perspective transformation matrix is calculated as the transformation information. When an exposure pattern needs to be obtained, the selection method for obtaining the transformation information by selecting one of the above two methods for calculating the transformation information can be determined specifically according to the actual needs, and no specific limitation is provided here.

[0104] After obtaining the transformation information, the second control point can be obtained through Figure 6 the method shown. Please refer to Figure 6 , Figure 6 which is Figure 2 a schematic flowchart of the sub-steps included in step S300 in

[0105] Sub-step S310: For each first control point, determine the first target triangle to which the first control point belongs, and use the transformation information corresponding to the first target triangle as the first target transformation information corresponding to the first control point.

[0106] In this embodiment, for each first control point, according to the position of the first control point and the positions of the first triangles, determine the first triangle to which the first control point belongs, and use the first triangle to which the first control point belongs as the first target triangle. Among them, the first control point is located inside the first target triangle to which it belongs, or is not located inside the first target triangle to which it belongs but is relatively close to the first target triangle to which it belongs.

[0107] As a possible implementation manner, it can be determined through Figure 7 the manner shown to determine the first target triangle to which a first control point belongs. Please refer to Figure 7 , Figure 7 is Figure 6 a schematic flowchart of the sub-steps included in sub-step S310 in

[0108] Sub-step S311: Analyze whether the first control point is located inside a first triangle.

[0109] Sub-step S312: If the first control point is located inside a first triangle, use the first triangle where the first control point is located as the first target triangle to which the first control point belongs.

[0110] Sub-step S313: If the first control point is not located inside any first triangle, use the first triangle with the shortest distance to the first control point among the obtained first triangles as the first target triangle to which the first control point belongs.

[0111] In this embodiment, the following method can be used to determine whether a point is inside a triangle. Use the cross product between the edge vector and the vector from the point to the vertex to determine whether the point P has the same sidedness as each side of the triangle. For triangle ABC and the point P to be measured, calculate three cross products:

[0112] cross2D(a, b) = a x ·b y -a y ·b x

[0113] crossABAP = cross2D(B - A, P - A)

[0114] crossBCBP = cross2D(C - B, P - B)

[0115] crossCACP = cross2D(A - C, P - C)

[0116] If the above three cross products are all positive or all negative, it indicates that point P is consistent with the half - plane where each side is located, that is, P is inside the triangle. In this way, it can be determined whether the first control point is inside the first triangle.

[0117] If it is determined through the above analysis that the first control point is inside a first triangle, then the first triangle where the first control point is located can be used as the first target triangle to which the first control point belongs.

[0118] If the first control point is not inside any first triangle, then the distance from the point to each side of the first triangle can be calculated by the distance calculation method from a point to a line segment, and then the first triangle where the side with the minimum distance is located can be used as the first target triangle to which the first control point belongs.

[0119] Among them, the distance calculation method from a point to a line segment is as follows.

[0120] Calculate the vector of line segment AB and the square of its length:

[0121]

[0122] Calculate the vector from point P to A:

[0123]

[0124] Find the projection coefficient t:

[0125]

[0126] If t is within the interval [0, 1], it indicates that the projection point is inside AB; if t < 0, the nearest point is A; if t > 1, the nearest point is B.

[0127] When the projection point is inside, first find the projection point P': Then calculate the distance from P to P': When the projection point is not inside, directly calculate the distance from P to the nearest endpoint:

[0128] In the case of determining the first target triangle to which the first control point belongs, the transformation information corresponding to the first target triangle can be directly used as the first target transformation information corresponding to the first control point.

[0129] Sub - step S320, obtain the second control point according to the first control point and the corresponding first target transformation information.

[0130] In the case where the first target transformation information corresponding to the first control point is determined, the first control point can be directly transformed according to the first target transformation information, and the processed point is used as the second control point corresponding to the first control point. For example, when the first target transformation information is an affine transformation matrix, the position of the first control point can be processed based on the conventional affine transformation formula (i.e., the affine transformation formula shown above) to obtain the second control point; similarly, when the first target transformation information is a perspective transformation matrix, the position of the first control point can be processed based on the conventional perspective transformation formula (i.e., the perspective transformation formula shown above) to obtain the second control point. In this way, the second control point can be quickly obtained.

[0131] Alternatively, in the case where the first target transformation information is an affine transformation matrix, the second control point can be obtained based on the first target transformation information in the manner shown by Figure 8 . Please refer to Figure 8 , Figure 8 which is Figure 6 a schematic flowchart of the sub-steps included in sub-step S320. In this embodiment, step S320 may include sub-steps S321 to S322.

[0132] Sub-step S321: Take the vertex in the first target triangle that is closest to the first control point as the target theoretical target point.

[0133] Sub-step S322: Calculate the second control point according to the relative position between the target theoretical target point and the first control point, and the first target transformation information.

[0134] In this embodiment, based on the distances between each vertex in the first target triangle and the first control point, the vertex in the first target triangle that is closest to the first control point can be determined, and this vertex is used as the target theoretical target point corresponding to the first control point. Then, according to the relative position between the target theoretical target point and the first control point, combined with the first target transformation information, the second control point corresponding to the first control point can be calculated.

[0135] For example, assuming that the first target transformation information is an affine transformation matrix, the corresponding second control point can be calculated in the following manner based on the relative position:

[0136] x' = PPs[i] x -((TPs[i] x -x)·a 11 +(TPs[i] y -y)·a 21 )

[0137] y' = PPs[i] y-((TPs[i] x -x)·a 12 +(TPs[i] y -y)·a 22 )

[0138] Wherein, i represents the index of the vertex in the first target triangle that is closest to the first control point.

[0139] Please refer to Figure 9 , Figure 9 in which the corresponding first triangle and second triangle are shown. Figure 9 The three green dots in [[ID]] are the theoretical target points, and the three red dots are the actual target points. Due to a bit of non-linear deformation, if the traditional calculation formula of affine transformation is used, then the calculated actual target point position is directly multiplying the theoretical target point position by the matrix (i.e., the affine transformation matrix). After the three theoretical target points are converted into actual target point coordinates, there will be at least one target point with some deviation.

[0140] If the formula of relative position is used, the target point closest to itself among the theoretical target points is itself. So the calculation according to the formula is PPs[i]-(0 + 0), and the conversion is the coordinates of the actual target point without any deviation. Moreover, according to the affine transformation calculated with the vertex as the relative position, t x and t y are both 0. It can be seen that using the method of calculating the second control point with relative position can improve the accuracy.

[0141] After obtaining the second control point, each graphic element in the design drawing can be drawn in sequence to obtain the exposure pattern. Among them, when drawing the graphic element, the drawing of the graphic element can be combined with the relevant information of each graphic element (for example, the type of the graphic primitive is a straight line or a circle, etc.). The LDI device can perform exposure based on the above exposure pattern.

[0142] In the alignment method of this embodiment, real-time target partitioning can be performed: by automatically collecting the theoretical target and the actual target, the PCB board can be locally partitioned in real time, breaking through the limitations of the existing overall area method. The local transformation matrix can also be calculated: the Delaunay triangulation is used to divide the plate into regions, and the affine transformation matrix or perspective transformation matrix is calculated based on the target data in each region, so as to accurately compensate for the local and non-uniform deformations of each region. The above method provides a dual transformation method: providing a linear partitioning alignment method based on affine transformation and a non-linear partitioning alignment method based on perspective transformation, respectively dealing with linear and complex non-linear deformations, and significantly improving the exposure alignment accuracy. When processing the first control point, a dynamic matrix selection mechanism is adopted: by judging the region to which each control point in the design drawing belongs, dynamic compensation for the deformation of different regions is realized. Even if the control point is outside the predefined region, the transformation matrix of the nearest region can be selected for correction. The above method can improve the adaptability to real-time and complex deformations in the production process.

[0143] The above alignment method provided by this embodiment has the following characteristics. Significantly improve the exposure alignment accuracy: By collecting target data in real time and using Delaunay triangulation to locally partition the plate, a dedicated affine transformation matrix or perspective transformation matrix can be calculated for each local region, effectively compensating for local and non-uniform deformations, thereby greatly improving the positioning accuracy of solder joints and pads in the exposure pattern. Flexibly handle complex non-linear deformations: The dual transformation method proposed in this embodiment includes both a linear alignment method based on affine transformation and a non-linear alignment method based on perspective transformation, and can select the most suitable transformation means according to different deformation situations, making the system more adaptable when facing complex and dynamic plate deformations. Improve production efficiency and reduce manufacturing costs: Since this method can automatically identify and correct local deformations in real-time production, it can avoid rework or waste board problems caused by inaccurate deformation correction, thereby improving product quality while significantly increasing productivity and reducing material waste and labor costs in the manufacturing process. Enhance the dynamic adjustment ability of the system: By adopting the dynamic matrix selection mechanism, even if the control point is outside the preset region, the transformation matrix of the nearest region can be automatically selected for correction, ensuring that the alignment correction always maintains a high accuracy and stability throughout the exposure process, providing greater flexibility and reliability for the practical application of the system.

[0144] The following combines Figures 10 to 12 to briefly illustrate the effects of the above method.

[0145] In this simulated exposure process, it is assumed that the Gerber data contains both side A and side B, and exposure needs to be carried out separately for each side. The primitive data used in the experiment is very simple: there are 7 points evenly distributed along the upper edge of the area to be exposed and 7 points evenly distributed along the lower edge for the alignment targets. The final requirement is that two representative lines in side A and side B after exposure must be parallel to ensure the overall alignment accuracy.

[0146] The different effects of affine transformation and perspective transformation under linear transformation and non - linear transformation (which can be judged by observing whether the opposite sides of the partition are parallel) are simulated.

[0147] The design areas where the primitives of side A and side B are located are as shown by the white rectangular frames in Figure 10 a and b, and the expected output is as shown in Figure 10 c. Triangulation is performed based on 14 theoretical targets in the design drawing, and the first triangle obtained is as shown in Figure 10 d.

[0148] In the case of linear deformation of the plate, the expected output graph is as shown in Figure 11 a: The primitive transforms with the linear deformation of the plate. The primitive drawn using the affine transformation matrix is as shown in Figure 11 b, and the primitive drawn using the perspective transformation matrix is as shown in Figure 11 c.

[0149] In the case of non - linear deformation of the plate, the expected output graph is as shown in Figure 12 a. The primitive drawn using the affine transformation matrix is as shown in Figure 12 b, and the primitive drawn using the perspective transformation matrix is as shown in Figure 12 c.

[0150] It can be concluded from this that the affine transformation scheme strictly restricts non - linear deformation and meets the needs of customers with extremely high requirements for exposure accuracy and who cannot accept any non - linear distortion; while the perspective transformation scheme adapts to more complex plate deformation situations by compensating for non - linear deformation and is suitable for application scenarios that can accept a certain non - linear correction effect.

[0151] The above alignment method is simply illustrated by examples below.

[0152] 1. Normally expose the first side.

[0153] The target positions of the first side and the second side of the design drawing are required to be consistent.

[0154] 2. Obtain the actual target coordinates of the first side.

[0155] Since the actual target coordinates of the first side are the same as those of the second side, obtaining the actual target coordinates of the first side means obtaining the actual target coordinates of the second side. The position of the actual target can be identified through an identification algorithm, and the position information is stored.

[0156] 3. Data input.

[0157] Input the design drawing and the corresponding alignment target data into the system. The target data includes the theoretical targets (TPs) predetermined in the design drawing and the actual targets (PPs) obtained through actual detection or acquisition. That is, the actual target coordinates of the second side are included in the target data.

[0158] 4. Delaunay triangulation.

[0159] According to the positions of all the theoretical targets in the design drawing, use the Delaunay triangulation algorithm to divide the plane, and divide the entire board surface into several non-overlapping triangular regions. Each of the three vertices of each triangle corresponds to a theoretical target. The divided triangles are the first triangles. The triangles corresponding to the first triangles on the board are the second triangles.

[0160] 5. Select the alignment algorithm.

[0161] According to the customer's requirements, select the partition alignment of affine transformation or perspective transformation, and then calculate the local affine transformation matrix or perspective transformation matrix.

[0162] 6. Control point area determination.

[0163] For the control points of each graphic element in the design drawing, use the spatial coordinates to determine the triangular region to which it belongs; if the control point is outside all the triangles, use the transformation matrix corresponding to the triangle or rectangle with the closest distance. That is, use the transformation information of the first target triangle corresponding to the control point in the design drawing for transformation processing.

[0164] 7. Coordinate transformation and exposure map generation.

[0165] Use the selected local transformation matrix to perform coordinate transformation on each control point in the design drawing to obtain the actual position of the control point in the exposure map. Finally, draw each graphic element according to the order of the transformed control points to generate the exposure map of the second side.

[0166] 8. Exposure ends.

[0167] After exposure, the superposition effect of the first side and the second side can be seen, and it is judged whether it is consistent with the design Figure One and check whether there is any deviation phenomenon.

[0168] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing the alignment device 200 is given below. Optionally, the alignment device 200 can adopt the above Figure 1 The device structure of the electronic device 100 is shown. Figure 13 , Figure 13 A block diagram of an alignment device 200 provided in an embodiment of the present application. It should be noted that the basic principle and technical effects of the alignment device 200 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiments. In this embodiment, the alignment device 200 may include: a partition module 210, an analysis module 220, a processing module 230 and a drawing module 240.

[0169] The partitioning module 210 is used to obtain the theoretical target point corresponding to the design drawing, and perform triangular division on the obtained theoretical target point to obtain multiple first triangles, and obtain second triangles corresponding to each first triangle. The vertices of the first triangles are the theoretical target points, and the vertices of the second triangles are the actual target points on the plate corresponding to the vertices of the corresponding first triangles.

[0170] The analysis module 220 is used to obtain transformation information corresponding to each first triangle according to the corresponding first triangle and the second triangle, wherein the transformation information is used to indicate the transformation relationship between the corresponding first triangle and the second triangle.

[0171] The processing module 230 is used to obtain a second control point located on the plate according to the first control point of each graphic element in the design drawing and the transformation information.

[0172] The drawing module 240 is used to generate an exposure map according to the second control point of each graphic element.

[0173] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The memory 110 shown in the figure may be fixed in the operating system (OS) of the electronic device 100 and may be Figure 1 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 110.

[0174] An embodiment of the present application further provides a readable storage medium having a computer program stored thereon, and the computer program implements the alignment method when executed by a processor.

[0175] In summary, the embodiments of the present application provide a alignment method, apparatus, electronic device, and readable storage medium. First, obtain the theoretical target points corresponding to the design drawing, and perform triangular division on the obtained theoretical target points to obtain a plurality of first triangles, and obtain the second triangles corresponding to each first triangle; then, based on the corresponding first triangle and the second triangle, analyze and obtain the transformation information corresponding to each first triangle, and obtain the second control points located on the plate based on the first control points of each graphic element in the design drawing and the above transformation information, and further generate an exposure map based on the obtained second control points. Wherein, the vertices of the second triangle are the actual target points located on the plate corresponding to the theoretical target points of the corresponding first triangle, and the transformation information is used to indicate the transformation relationship between the corresponding first triangle and the second triangle. The above method performs local partitioning on the plate by collecting target point data, and then analyzes and obtains the transformation information corresponding to each local area, and effectively compensates for local deformation based on this information, thereby greatly improving the positioning accuracy of the solder joints and pads in the exposure map.

[0176] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the drawings show the possible architectures, functions, and operations of the apparatus, method, and computer program product according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of the code, and the module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0177] In addition, each functional module in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0178] When the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0179] The foregoing are only optional embodiments of this application and are not intended to limit this application. For those skilled in the art, this application may have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims

1. A positioning method, characterized in that: The method includes: obtaining a theoretical target corresponding to a design drawing, performing triangular division on the obtained theoretical target to obtain a plurality of first triangles, and obtaining second triangles corresponding to the first triangles, wherein the vertices of the first triangles are the theoretical targets, and the vertices of the second triangles are the actual targets located on the plate corresponding to the vertices of the corresponding first triangles; obtaining transformation information corresponding to each first triangle according to the corresponding first triangle and second triangle, wherein the transformation information is used to indicate the transformation relationship between the corresponding first triangle and the second triangle; obtaining second control points located on the plate according to the first control points of the graphic elements in the design drawing and the transformation information; generating an exposure map according to the second control points of the graphic elements.

2. The method according to claim 1, wherein The obtaining transformation information corresponding to each first triangle according to the corresponding first triangle and second triangle includes: For each first triangle, calculating an affine transformation matrix between the first triangle and the corresponding second triangle according to the vertices of the first triangle and the vertices of the corresponding second triangle.

3. The method according to claim 1, wherein The obtaining transformation information corresponding to each first triangle according to the corresponding first triangle and second triangle includes: For each first triangle, obtaining a first quadrilateral corresponding to the first triangle by combining the first triangle with a reference triangle, wherein the reference triangle and the first triangle have a common side; determining a second quadrilateral located on the plate corresponding to the first quadrilateral; calculating a perspective transformation matrix between the first quadrilateral and the corresponding second quadrilateral according to the vertices of the first quadrilateral and the vertices of the corresponding second quadrilateral, and saving the perspective transformation matrix as the transformation information corresponding to the first triangle.

4. The method according to claim 3, characterized in that, The for each first triangle, obtaining a first quadrilateral corresponding to the first triangle by combining the first triangle with a reference triangle includes: taking the first triangle having a common side with the first triangle as a candidate triangle; for each candidate triangle, calculating a score of a candidate quadrilateral obtained by combining the first triangle and the candidate triangle, wherein the smaller the score of a candidate quadrilateral, the closer the candidate quadrilateral is to a rectangle; taking the candidate quadrilateral corresponding to the minimum score among the obtained scores as the first quadrilateral corresponding to the first triangle.

5. The method according to claim 4, wherein The for each candidate triangle, calculating a score of a candidate quadrilateral obtained by combining the first triangle and the candidate triangle includes: calculating an angle deviation score according to the four angles of the candidate quadrilateral and the degree of a right angle; calculating a side length difference score according to the lengths of the four sides of the candidate quadrilateral; obtaining the score of the candidate quadrilateral according to the angle deviation score and the side length difference score.

6. The method according to any one of claims 1-5, characterized in that, The obtaining second control points located on the plate according to the first control points of the graphic elements in the design drawing and the transformation information includes: For each first control point, determine the first target triangle to which the first control point belongs, and use the transformation information corresponding to the first target triangle as the first target transformation information corresponding to the first control point; Obtain the second control point according to the first control point and the corresponding first target transformation information.

7. The method according to claim 6, wherein When the first target transformation information is a perspective transformation matrix, the step of obtaining the second control point according to the first control point and the corresponding first target transformation information includes: Use the vertex in the first target triangle that is closest to the first control point as the target theoretical target point; Calculate the second control point according to the relative position between the target theoretical target point and the first control point, and the first target transformation information.

8. The method according to claim 6, wherein The step of, for each first control point, determining the first target triangle to which the first control point belongs includes: Analyze whether the first control point is located within a first triangle; If the first control point is located within a first triangle, use the first triangle where the first control point is located as the first target triangle to which the first control point belongs; If the first control point is not located within any first triangle, use the first triangle in the obtained first triangles that is closest to the first control point as the first target triangle to which the first control point belongs.

9. A positioning device, characterized in that, The device includes: A partitioning module, configured to obtain the theoretical target points corresponding to the design drawing, perform triangle partitioning on the obtained theoretical target points to obtain a plurality of first triangles, and obtain second triangles corresponding to each first triangle, where the vertices of the first triangle are theoretical target points, and the vertices of the second triangle are the actual target points on the plate corresponding to the vertices of the corresponding first triangle; An analysis module, configured to obtain the transformation information corresponding to each first triangle according to the corresponding first triangle and second triangle, where the transformation information is used to indicate the transformation relationship between the corresponding first triangle and the second triangle; A processing module, configured to obtain the second control points located on the plate according to the first control points of the graphic elements in the design drawing and the transformation information; A drawing module, configured to generate an exposure map according to the second control points of each graphic element.

10. An electronic device, characterized in that, It includes a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement the alignment method according to any one of claims 1-8.