A method and related apparatus for detecting defects in photomasks

By extracting features from the optical image of the photomask using a pre-trained image recognition model, the problem of false positives and false negatives caused by the lack of design documents in traditional methods is solved, achieving efficient and accurate photomask defect detection and improving the production yield of the photolithography process.

CN122492647APending Publication Date: 2026-07-31SKYVERSE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SKYVERSE TECH CO LTD
Filing Date
2026-05-12
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently and accurately identify mask defects, especially in the absence of design documents, leading to serious issues of false positives and false negatives, which negatively impact the production yield of the photolithography process.

Method used

A pre-trained image recognition model is used to extract the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction by acquiring the optical image of the mask. After correction, the defect is determined.

Benefits of technology

This improves the accuracy and reliability of mask defect detection, avoids the false detection and missed detection problems in traditional solutions, expands the application scenarios of the technical solution, and achieves efficient and accurate defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492647A_ABST
    Figure CN122492647A_ABST
Patent Text Reader

Abstract

This application discloses a method and related apparatus for detecting defects in photomasks, relating to the field of photomask defect detection technology. The method includes: acquiring an optical image of the photomask; processing the optical image using a pre-trained image recognition model to obtain the initial coordinate range of the repeating unit region, the initial dimensions of the basic units, and the initial periodic repetition direction of the basic units in the repeating unit region; and determining the defects in the photomask based on the initial coordinate range of the repeating unit region, the initial dimensions of the basic units, and the initial periodic repetition direction. The technical solution of this application extracts the inherent periodic repetition features of the photomask from its optical image using a pre-trained image recognition model, and performs defect determination based on these features, enabling efficient and accurate detection of photomask defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of mask defect detection technology, and in particular to a mask detection method and related apparatus. Background Technology

[0002] Photolithography refers to the process of projecting a pre-set pattern on a photomask onto the wafer surface using an illumination and imaging system, thus achieving the physical transfer from the photomask pattern to the wafer dielectric layer. Since a single photomask can be used for photolithography processes on a large number of wafers, defects in the photomask can cause systemic defects in the wafer, severely impacting production yield. Therefore, defect detection of photomasks is an indispensable and critical quality control step in semiconductor manufacturing.

[0003] Traditional methods determine whether a mask has defects by calculating the difference between the optical image of the mask and a rendered reference image generated based on the mask's design file. However, in some practical applications, users often have difficulty obtaining the mask's design file, making it impossible to generate a rendered reference image and directly limiting the applicability of the solution. Furthermore, the rendering process is based on a theoretical model, while the actual imaging process is affected by various practical factors such as lighting conditions and the optical characteristics of the imaging system. This results in significant deviations between the rendered reference image and the actual acquired optical image, leading to numerous false detections and affecting the accuracy and reliability of defect detection.

[0004] Therefore, how to efficiently and accurately identify defects in photomasks has become one of the urgent technical problems to be solved in the field of photomask defect identification technology. Summary of the Invention

[0005] To address the aforementioned issues, this application provides a mask detection method that can efficiently and accurately detect defects in mask dies.

[0006] The embodiments of this application disclose the following technical solutions: The first aspect of this application provides a method for detecting defects in a photomask, including: Obtain an optical image of a mask; the optical image includes a repeating unit region; the repeating unit region includes multiple basic units arranged periodically; The optical image is processed using a pre-trained image recognition model to obtain the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction of the basic unit in the repeating unit region. Based on the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repeating direction, the defects of the mask are determined.

[0007] In one optional implementation, determining the defects of the mask based on the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction includes: The initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repeating direction are corrected to obtain the target coordinate range of the repeating unit region, the target specifications of the basic unit, and the target periodic repeating direction of the basic unit in the repeating unit region. Based on the target coordinate range, the target specifications, and the target periodic repetition direction, the defects of the mask are determined.

[0008] In one optional implementation, the initial periodic repetition direction is corrected to obtain the target coordinate range of the repeating unit region, the target size of the basic unit, and the target periodic repetition direction of the basic unit in the repeating unit region, including: Based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and the preset fraction threshold, the target coordinate interval of the repetition unit region is determined; Based on the initial coordinate range, the initial specifications, the initial periodic repetition direction, and the preset tolerance, the target specifications of the basic unit are determined; Based on the initial coordinate range, the initial specifications, the initial periodic repetition direction, and the preset similarity threshold, the target periodic repetition direction of the basic unit is determined.

[0009] In one optional implementation, determining the target coordinate interval of the repeating unit region based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and a preset fraction threshold includes: Based on the initial coordinate interval, the initial specifications, and the initial periodic repetition direction, the repeating unit region is divided into multiple sequentially adjacent candidate basic units; the specifications of the candidate basic units match the initial specifications. Any one of the plurality of candidate basic units is taken as the first candidate basic unit. Based on the similarity between the first candidate basic unit and each second candidate basic unit, the similarity score of the first candidate basic unit is determined. The second candidate basic unit is the candidate basic unit that is adjacent to the first candidate basic unit among the plurality of candidate basic units. The target coordinates and similarity scores of the first candidate basic unit are used as a set of target data, and a first curve is plotted based on multiple sets of target data; The similarity scores in the first curve that are greater than the score threshold are taken as the target similarity scores; The coordinate interval corresponding to the target similarity score is used as the target coordinate interval of the repeating unit region.

[0010] In one optional implementation, determining the target specification of the basic unit based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and the preset tolerance includes: Based on the initial specifications and the preset tolerances, multiple reference specifications are generated; For each reference specification, based on the reference specification, the initial coordinate interval, and the initial periodic repetition direction, the repeating unit region is divided into a plurality of sequentially adjacent reference basic units; the specifications of the reference basic units are matched with the target reference specification; Take any one of the multiple reference specifications as the target reference specification, take any one of the multiple reference basic units corresponding to the target reference specification as the first reference basic unit, calculate the similarity between the first reference basic unit and each second reference basic unit, and obtain multiple similarities corresponding to the target reference specification; the second reference basic unit is the reference basic unit adjacent to the first reference basic unit. Based on multiple similarities corresponding to the target reference specification, the target similarity of the target reference specification is determined; The maximum target similarity among the multiple target similarities is determined, and the reference specification corresponding to the maximum target similarity is used as the target specification of the basic unit.

[0011] In one optional implementation, determining the target periodic repetition direction of the basic unit based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and a preset similarity threshold includes: Based on the initial coordinate range, the initial specifications, and the initial periodic repetition direction, the repetition unit region is divided into multiple sequentially adjacent calibration basic units; the specifications of the calibration basic units match the initial specifications. For each of the preset multiple arrangement directions, the similarity between the first calibration basic unit and each second calibration basic unit in that arrangement direction is determined, and multiple similarities corresponding to that arrangement direction are obtained; the first calibration basic unit is any one of the multiple calibration basic units; the second calibration basic unit is the calibration basic unit that is adjacent to the first candidate unit in the arrangement direction among the multiple calibration basic units. Based on multiple similarities corresponding to each of the arrangement directions, the target similarity of each of the arrangement directions is determined; The target similarity for each of the arrangement directions is compared with the similarity threshold, and the target similarity greater than the second similarity threshold is taken as the filtered target similarity. The arrangement direction corresponding to the similarity of the filtered targets is used to determine the periodic repetition direction of the targets.

[0012] In one optional implementation, determining the defects of the mask based on the target coordinate range, the target size, and the target periodic repetition direction includes: Based on the target specifications, the target coordinate space, and the target periodic repetition direction, the repetition unit region is divided into multiple sequentially adjacent target reference units; the specifications of the target reference units match the target specifications. A first target reference unit and a second target reference unit are determined; the first target reference unit is any one of the plurality of target reference units; the second target reference unit is a target reference unit adjacent to the first target reference unit among the plurality of target reference units, or a unit generated based on a plurality of target reference units adjacent to the first target reference unit. The defects of the mask are determined based on the difference between the optical image of the first target reference unit and the optical image of the second target reference unit.

[0013] In one optional implementation, the step of obtaining sample labels for the pre-trained image recognition model includes: Obtain the sample design file of the sample mask; the sample design file includes a sample repeating unit region; the sample repeating unit region includes multiple periodically arranged basic sample units; The coordinate point data in the sample design file are processed to determine the initial coordinate interval of the sample repeating unit region, the initial size of the sample basic unit, and the initial periodic repeating direction of the sample basic unit. The initial coordinate range of the sample repeating unit region is transformed to the optical coordinate system of the sample image to obtain the target coordinate range of the sample repeating unit region; the sample image is an optical image generated based on the sample mask. The initial specifications of the sample basic unit are transformed to the optical coordinate system where the sample image is located to obtain the target specifications of the sample basic unit; The target coordinate range of the sample repeating unit region, the target size of the sample basic unit, and the initial periodic repeating direction of the sample basic unit are used as the sample label.

[0014] In one optional implementation, the initial periodic repetition direction of the basic units in the repeating unit region includes: The distribution is periodically repeated along the horizontal axis of the coordinate system where the optical image is located, periodically repeated along the vertical axis of the coordinate system where the optical image is located, and periodically repeated along both the horizontal and vertical axes.

[0015] A second aspect of this application provides a mask defect detection device, comprising: An optical image acquisition module is used to acquire an optical image of a photomask; the optical image includes a repeating unit region; the repeating unit region includes multiple basic units arranged periodically; The initial parameter acquisition module is used to process the optical image using a pre-trained image recognition model to obtain the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction of the basic unit in the repeating unit region. The mask defect determination module is used to determine the defects of the mask based on the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction.

[0016] A third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any implementation of the first aspect.

[0017] A fourth aspect of this application provides an electronic device, comprising: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method described in any implementation of the first aspect.

[0018] Compared with the prior art, this application has the following beneficial effects: This application discloses a method for detecting defects in a mask, comprising: acquiring an optical image of the mask; processing the optical image using a pre-trained image recognition model to obtain the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repetition direction of the basic unit in the repeating unit region; and determining the defects in the mask based on the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repetition direction.

[0019] The technical solution of this application, through a pre-trained image recognition model, can extract the inherent periodic repetitive features of the optical image of the mask and perform defect judgment based on these features. On the one hand, it avoids the problems of false detection and missed detection caused by the inherent deviation between the theoretical rendering model and the real imaging environment in the traditional solution, and significantly improves the accuracy and reliability of defect detection. On the other hand, it effectively breaks through the limitation of the traditional solution's dependence on the design documents of the mask, and expands the practical application scenarios of the technical solution. Therefore, this application can achieve efficient and accurate detection of mask defects. Attached Figure Description

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

[0021] Figure 1 A flowchart of a mask defect detection method provided in this application embodiment; Figure 2 This is a schematic diagram of a repeating unit region provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the distribution of multiple candidate units provided in an embodiment of this application; Figure 4 A schematic diagram of a first curve provided for an embodiment of this application; Figure 5 A flowchart illustrating a data acquisition process provided in this application embodiment; Figure 6 This is a schematic diagram of a mask defect detection device provided in an embodiment of this application. Detailed Implementation

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

[0023] Figure 1 This is a flowchart illustrating a mask defect detection method provided in an embodiment of this application. (Combined with...) Figure 1 As shown, the mask defect detection method disclosed in this application includes: S101, Obtain the optical image of the mask.

[0024] Masks are the core pattern transfer medium in the field of micro-nano manufacturing, with their surfaces bearing high-precision structured patterns corresponding to the patterns to be processed on the wafer. Masks contain wafer-level patterning units that match the wafer chip layout. Each wafer-level patterning unit has a repeating unit region, which is composed of multiple basic units arranged periodically, and the geometric specifications and spatial arrangement of each basic unit are highly consistent.

[0025] The optical image of a photomask is obtained by imaging the surface pattern of the photomask using the optical imaging system of a photomask inspection machine. Based on the physical structural characteristics of the repeating unit regions on the photomask surface and the "pattern-image" mapping principle of the optical imaging system, the optical image must completely preserve the original pattern distribution of the photomask. Therefore, the optical image includes repeating unit regions, and these repeating unit regions consist of multiple periodically arranged basic units. The pixel characteristics of each basic unit in the optical image maintain consistency with its physical geometric specifications and arrangement.

[0026] The optical imaging system of the mask inspection machine can use a single optical configuration or multiple optical configurations for optical imaging. If the optical imaging system uses a single optical configuration, the initial single-channel optical image obtained through the optical system is directly used as the optical image of the mask in S101. If the optical imaging system uses multiple optical configurations, multiple initial optical images of the mask are acquired through the optical system, registered and aligned with sub-pixel precision, and merged into a single multi-channel mask image using an image fusion algorithm, which is then used as the optical image of the mask in S101.

[0027] For example, when multiple configurations are a combination of transmission imaging and reflection imaging, transmission imaging is more sensitive to defects in the transparent areas of the mask (such as impurities in the transparent area and pattern defects), while reflection imaging is more sensitive to defects in the opaque areas of the mask (such as scratches in the opaque area and film peeling). By combining the two imaging modes, it is possible to achieve comprehensive capture of defects of different regions and types of defects in the mask, significantly improving the coverage and completeness of defect detection.

[0028] S102, the optical image is processed using a pre-trained image recognition model to obtain the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction of the basic unit in the repeating unit region.

[0029] The image recognition model in this application is a pre-trained neural network model used to output the initial coordinate range of repeating unit regions in optical images, the initial dimensions of basic units, and the initial periodic repetition direction of basic units in repeating unit regions. Subsequent embodiments of this application will detail the sample images and labels corresponding to the image recognition model, as well as the process of training the neural network model based on the sample images and corresponding labels to obtain the image recognition model.

[0030] The repeating cell region in this application is a region composed of multiple basic cells arranged periodically; the extent of the repeating cell region is much smaller than the size of the wafer on the mask.

[0031] The initial coordinate range of the repeating unit region refers to the range of horizontal and vertical coordinate values ​​that define the spatial position of the repeating unit region in the pixel coordinate system of the optical image.

[0032] Figure 2 Regions 1, 2 and 3 in the above are all repeated unit regions in this application. Figure 2 The "rectangular dashed frame" defining region 1, region 2, and region 3 are all visual boundary markers of the initial coordinate intervals of the repeating unit regions in the optical image.

[0033] For example, for Figure 2 The initial coordinate range of the repeating unit region shown can be determined using the two-dimensional pixel coordinates of the upper left corner and the lower right corner of the "rectangular dashed frame"; alternatively, the initial coordinate range of the repeating unit region can be determined using the two-dimensional pixel coordinates of the upper left corner of the "rectangular dashed frame" and the width and height of the "rectangular dashed frame".

[0034] It is understood that the repeating unit region in this application is not limited by shape and can be any geometric shape; correspondingly, the dashed box used to define the boundary of the repeating unit region can adopt any polygonal structure. The initial coordinate range of the repeating unit region can be characterized by the two-dimensional pixel coordinates of all vertices of the corresponding polygon.

[0035] The initial coordinate range of the repeating unit region determines the range of optical images from which mask defects can be determined using the method disclosed in this application. Optical images within the repeating unit region can be used to determine mask defects using the method disclosed in this application; optical images outside the repeating unit region cannot be compared or analyzed with optical images within the repeating unit region, nor can they be compared with optical patterns in other regions outside the repeating unit region.

[0036] The initial periodic repetition direction of the basic units in the repeating unit region is also called the repetition type.

[0037] In one optional implementation, the initial periodic repetition direction of the basic units in the repeating unit region includes: periodic repetition distribution along the horizontal axis of the coordinate system where the optical image is located, periodic repetition distribution along the vertical axis of the coordinate system where the optical image is located, and periodic repetition distribution along both the horizontal and vertical axes.

[0038] Combination Figure 2 As shown, the basic units in region 1 repeat periodically along both the horizontal (Px direction) and vertical (Py direction), and the repeating type of region 1 is 2D; the basic units in region 2 repeat periodically only along the horizontal direction, and the repeating type of region 2 is 1D-X; the basic units in region 3 repeat periodically only along the vertical direction, and the repeating type of region 3 is 1D-Y.

[0039] In this context, the basic unit in region 1 consists of a black solid rectangle within a dashed frame and half of the white gap between two black solid rectangles; the basic unit in region 2 consists of an irregular black solid polygon within a dashed frame and half of the white gap between two irregular black solid polygons; and the basic unit in region 3 consists of a black solid rectangle, a black solid square, and the white gap between them.

[0040] It is understood that the types of duplication involved in this application are not limited to... Figure 2 The three types shown, 2D, 1D-X, and 1D-Y, can be extended to other forms. For example, the initial periodic repetition direction of the basic unit within the repeating unit region can be the 45° or 135° direction corresponding to tetrahedral symmetry, or the 60° or 120° direction corresponding to hexagonal symmetry, etc. Those skilled in the art can assign appropriate repetition type names to different initial periodic repetition directions according to actual application requirements.

[0041] The repetition type in this application directly determines the comparison logic of the basic units. If the repetition type is 2D, any basic unit within the repetition unit area can be compared with the basic units adjacent to it in the four directions above, below, left, and right. If the repetition type is 1D-X, any basic unit within the repetition unit area can only be compared with the two horizontally adjacent basic units to its left and right. If the repetition type is 1D-Y, any basic unit within the repetition unit area can only be compared with the two vertically adjacent basic units above and below it.

[0042] It should be noted that for basic units located at the edge of a repeating unit region, they can only be compared with adjacent basic units in the direction inside the repeating unit region, and not with non-repeating unit regions outside the repeating unit region.

[0043] In this application, the initial specification of the repeating unit refers to the geometric dimension parameters of the basic pattern unit within the repeating unit region. Combined with... Figure 2 As shown: For region 1 with a repeating type of 2D, the initial specifications of its basic units are characterized by two parameters: the horizontal dimension (the dimension in the Px direction) and the vertical dimension (the dimension in the Py direction); for region 2 with a repeating type of 1D-X, the initial specifications of its basic units are characterized only by the horizontal dimension parameter; for region 3 with a repeating type of 1D-Y, the initial specifications of its basic units are characterized only by the vertical dimension parameter.

[0044] After obtaining the optical image of the mask, the optical image is input into the image recognition model. The model processes the optical image to obtain the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repetition direction of the basic unit in the repeating unit region.

[0045] S103, based on the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repeating direction, determine the defects of the mask.

[0046] In this application, the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repetition direction of the basic unit in the repeating unit region are referred to as the characteristic attributes of the optical image.

[0047] It is understandable that the prediction of the initial coordinate range (i.e. the position of the repeating unit region) of the optical image feature attributes is biased, covering the non-repeating unit region. The subsequent mask defect detection process will compare and detect the repeating unit region and the non-repeating unit region across regions, resulting in a large number of invalid comparison results.

[0048] It is understandable that if the initial periodic repetition direction (i.e. repetition type) of the basic unit in the optical image feature attributes is predicted incorrectly, a comparison logic that does not match the actual repetition pattern will be used, making it impossible to effectively identify real defects and generating a large number of false defect annotations.

[0049] It is understandable that inaccurate prediction of the initial specifications (i.e. the size of the basic unit) of the basic unit in the optical image feature attributes will lead to a mismatch between the size of the comparison window and the actual size of the basic unit, resulting in misalignment of the comparison area, failure to achieve effective feature alignment, and thus causing missed or false detection of defects.

[0050] All three of these situations can lead to a large number of false positives and false negatives, seriously affecting the reliability of the test results, and even causing the test process to collapse due to data processing logic conflicts.

[0051] To improve the accuracy of the feature attributes of optical images, this application, after obtaining the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repetition direction of the basic unit in the repeating unit region through an image recognition model, corrects the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repetition direction to obtain the target coordinate range of the repeating unit region, the target specifications of the basic unit, and the target periodic repetition direction of the basic unit in the repeating unit region; then, based on the target coordinate range, target specifications, and target periodic repetition direction, the defects of the mask are determined.

[0052] In one optional implementation, the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repetition direction are corrected to obtain the target coordinate range of the repeating unit region, the target specifications of the basic unit, and the target periodic repetition direction of the basic unit in the repeating unit region. This includes the following steps: The first step is to determine the target coordinate range of the repeating unit region based on the initial coordinate range, the initial specifications, the initial periodic repetition direction, and the preset fraction threshold.

[0053] A1, based on the initial coordinate interval, the initial specification, and the initial periodic repetition direction, the repeating unit region is divided into multiple candidate basic units that are sequentially adjacent; the specification of the candidate basic units matches the initial specification.

[0054] For example, if the initial periodic repetition direction is 2D, then the top left corner of the initial coordinate interval is used as the starting reference, and the mesh is divided sequentially according to the initial specifications and along the horizontal (Px direction) and vertical (Py direction) directions to form multiple closely adjacent candidate basic units. The specifications of the candidate basic units are the same as the initial specifications.

[0055] For example, if the initial periodic repetition direction is 1D-X, then the network is divided along the horizontal direction according to the initial specifications, with the left boundary of the initial coordinate interval as the starting reference, forming multiple candidate basic units that are closely adjacent along the horizontal direction. The specifications of the candidate basic units are the same as the initial specifications.

[0056] For example, if the initial periodic repetition direction is 1D-Y, then the upper boundary of the initial coordinate interval is used as the starting reference, and the mesh is divided along the longitudinal direction according to the initial specifications to form multiple candidate basic units that are closely adjacent along the longitudinal direction. The specifications of the candidate basic units are the same as the initial specifications.

[0057] A2, take any one of the plurality of candidate basic units as the first candidate basic unit, and determine the similarity score of the first candidate basic unit based on the similarity between the first candidate basic unit and each second candidate basic unit.

[0058] Among them, the second candidate basic unit is the candidate basic unit that is adjacent to the first candidate basic unit among multiple candidate basic units.

[0059] Specifically, for each first candidate basic unit, each second candidate basic unit adjacent to the first candidate basic unit is traversed, and the similarity between the first candidate basic unit and each second candidate basic unit is calculated to obtain multiple similarities corresponding to the first candidate basic unit; then, the multiple similarities corresponding to the multiple first candidate basic units are weighted and summed to obtain the similarity score of the first candidate basic unit.

[0060] One method for calculating the similarity between the first candidate basic unit and the second candidate basic unit is to calculate the similarity between the patterns in the first candidate basic unit and the patterns in the second candidate basic unit. Since this is well-known to those skilled in the art, this application will not elaborate further on the determination of the pattern similarity between the two candidate units.

[0061] Figure 3 This is a schematic diagram showing the distribution of multiple candidate units provided in an embodiment of this application. Figure 3 The repeating unit region is a region defined by a black dashed box and composed of multiple black solid circles; its initial periodic repeating direction is 2D. Figure 3 The closely adjacent solid-line rectangles in the diagram represent multiple closely adjacent candidate basic units. Figure 3 Five candidate basic units are schematically shown in the diagram; each candidate basic unit has the same specifications; the black solid circles in the solid rectangles represent the patterns in the candidate basic units.

[0062] For example, the first candidate basic unit in this application is Figure 3 This includes any one of the multiple candidate basic units. Assume the first candidate basic unit is candidate basic unit 1 (i.e., ...). Figure 3If the candidate basic unit is numbered 1, then the multiple second candidate basic units are candidate basic unit 2, candidate basic unit 3, candidate basic unit 4, and candidate basic unit 5. Calculate the similarity *a* between candidate basic unit 1 and candidate basic unit 2, the similarity *b* between candidate basic unit 1 and candidate basic unit 3, the similarity *c* between candidate basic unit 1 and candidate basic unit 4, and the similarity *d* between candidate basic unit 1 and candidate basic unit 5. Then, perform a weighted summation of the multiple similarities corresponding to candidate basic unit 1, i.e., similarity *a*, similarity *b*, similarity *c*, and similarity *d*, and obtain the result as the similarity score of candidate basic unit 1. Thus, we can obtain... Figure 3 The similarity score corresponding to each candidate basic unit.

[0063] A3, take the target coordinates and similarity scores of the first candidate basic unit as a set of target data, and draw a first curve based on multiple sets of target data.

[0064] It is understood that the coordinates of a candidate basic unit are a range of coordinates. For ease of calculation, this application uses the average value of the coordinate range of the candidate basic unit as the target coordinates of the candidate unit. Those skilled in the art can also determine the target coordinates of the candidate unit described in this application based on actual needs and the coordinate range of the candidate basic unit.

[0065] The target coordinates of the first candidate basic unit and its similarity score are used as a set of target data. Since the first candidate basic unit is any one of multiple candidate basic units, the same method can be used to obtain each set of target data corresponding to each candidate basic unit, thus obtaining multiple sets of target data.

[0066] After obtaining multiple sets of target data, a first curve can be plotted. The horizontal axis of the first curve represents the coordinates (position) of each candidate basic unit, and the vertical axis represents the similarity score of each candidate basic unit.

[0067] A4, take the similarity scores in the first curve that are greater than the score threshold as the target similarity scores; and take the coordinate interval corresponding to the target similarity scores as the target coordinate interval of the repeating unit region.

[0068] Figure 4 This is a schematic diagram of a first curve provided in an embodiment of this application. Figure 4 The first curve in is Figure 3 The curve is obtained after processing the repeating unit region in A1-A3. Because... Figure 3 The edge portion of the [structure] may contain a small number of non-repeating unit regions; therefore, [the area located in the region]... Figure 3 The basic units at the edges of the image have lower similarity scores, and are located in... Figure 3 The basic units in the central region of the image have higher similarity scores.

[0069] In one optional implementation, after obtaining the first curve, the similarity scores in the first curve that exceed a preset score threshold can be used as the target similarity scores; the coordinate interval corresponding to the target similarity scores (the coordinate range corresponding to the horizontal axis) can be used as the target coordinate interval for the repeating unit region. Figure 4 The score threshold in the diagram is the similarity score corresponding to the dashed line parallel to the horizontal axis.

[0070] In another optional implementation, after obtaining the first curve, the similarity scores in the first curve that exceed a preset score threshold can be used as the target similarity scores. The coordinate interval corresponding to the target similarity scores can be used as the coordinate interval to be filtered for the repeating unit region. Then, the center region of the coordinate interval to be filtered is selected as the target coordinate interval. The advantage of this is that it can further avoid the boundary blurring or local noise problems that may exist at the edge of the coordinate interval, making the target coordinate interval more closely fit the core range of the repeating unit region and improving the accuracy of repeating unit positioning.

[0071] The second step is to determine the target specifications of the basic unit based on the initial coordinate range, the initial specifications, the initial periodic repetition direction, and the preset tolerance.

[0072] B1. Generate multiple reference specifications based on the initial specifications and the preset tolerances.

[0073] This step means that after determining the initial specifications (i.e., initial dimensional parameters) of the basic unit, the dimensional parameters of the basic unit are adjusted up and down within the preset tolerance, using the initial specifications of the basic unit as the reference value (the adjustment method may include equal step increments or decreases, random values, etc.), thereby generating multiple reference specifications of basic units that are different from each other and all meet the tolerance requirements.

[0074] For example, if the initial size of the basic unit is 50×30 and the preset tolerance is ±5% (that is, the size parameters are allowed to fluctuate within 95%~105% of the initial size), then the reference size of the generated basic unit can be: 50×30, 48×28, 48×29, 51×31 and 52×31, etc.; where the unit of the initial size is pixels.

[0075] B2, for each of the reference specifications, based on the reference specification, the initial coordinate interval, and the initial periodic repetition direction, the repeating unit region is divided into a plurality of sequentially adjacent reference basic units; the specifications of the reference basic units are matched with the target reference specification.

[0076] After adopting multiple reference specifications corresponding to the basic unit in method B1, for each reference specification, the repeating unit region can be divided into multiple sequentially adjacent reference basic units based on the reference specification, the initial coordinate interval, and the initial periodic repeating direction; finally, multiple sequentially adjacent reference basic units corresponding to each reference specification are obtained.

[0077] Since the implementation process of "dividing the repeating cell region into multiple sequentially adjacent reference basic cells based on the reference specification" is the same as the implementation process of "dividing the repeating cell region into multiple sequentially adjacent candidate basic cells based on the initial specification" in A1, it will not be described again here.

[0078] B3, take any one of the multiple reference specifications as the target reference specification, take any one of the multiple reference basic units corresponding to the target reference specification as the first reference basic unit, calculate the similarity between the first reference basic unit and each second reference basic unit, and obtain multiple similarities corresponding to the target reference specification; the second reference basic unit is the reference basic unit adjacent to the first reference basic unit.

[0079] In this application, the target reference specification is any one of multiple reference specifications; the first reference basic unit is any one of the multiple reference basic units corresponding to the target reference specification. For any selected target reference specification, its corresponding set of reference basic units contains several adjacently distributed reference basic units. When calculating similarity, firstly, an arbitrary reference basic unit is selected from the set of reference basic units as the first reference basic unit. Then, all adjacent reference basic units (i.e., second reference basic units) of the first reference basic unit in the set are determined. The number of adjacent units can be determined according to the arrangement of repeated units, such as two on the left and right in a linear arrangement, or four on the left, right, and top, bottom, and bottom in a matrix arrangement. Subsequently, a preset similarity calculation algorithm is used to calculate the similarity between the first reference basic unit and each second reference basic unit. Each similarity result corresponds to the matching degree of a pair of adjacent reference basic units. By performing the above calculation process on all first reference basic units and their corresponding second reference basic units under the target reference specification one by one, multiple sets of similarity data corresponding to the target reference specification are finally formed.

[0080] B4. Based on multiple similarities corresponding to the target reference specification, determine the target similarity of the target reference specification.

[0081] After obtaining multiple similarities corresponding to the target reference specification, numerical operations such as weighted summation can be performed on the multiple similarities to obtain the target similarity of the target specification.

[0082] Understandably, by using the methods in B3 and B4, we can obtain the target similarity corresponding to each reference specification, that is, we can obtain multiple target similarities.

[0083] B5. Determine the maximum target similarity among the multiple target similarities, and use the reference specification corresponding to the maximum target similarity as the target specification of the basic unit.

[0084] After obtaining multiple target similarities, the maximum value among the multiple target similarities is taken as the maximum target similarity; then the reference specification corresponding to the maximum target similarity is taken as the target specification of the basic unit.

[0085] In one alternative implementation, the target specification of the basic unit can be determined based on the initial coordinate range of the repeating unit region, the initial specification, and the Fourier transform.

[0086] Specifically, after determining the initial coordinate interval of the repeating unit region in the optical image of the mask, the complete image data corresponding to the initial coordinate interval is first extracted to ensure that the image information of the repeating unit region is not missing. Then, Fourier frequency domain analysis processing is performed on the image data, and the image is transformed from the spatial domain (representing the spatial distribution information of pixels) to the frequency domain (representing the frequency distribution characteristics of the image) through Fourier transform, thereby obtaining the image frequency spectrum in the frequency domain.

[0087] Since there is a fixed mapping relationship between the size of the repeating unit and the characteristic frequency in the frequency domain, the initial specifications of the basic unit output by the image recognition model are used to calculate the corresponding characteristic frequency range. Then, amplitude analysis is performed on the frequency spectrum within this characteristic frequency range to filter out all frequency points that meet the signal validity criteria, and the frequency position with the largest amplitude is determined. This frequency position corresponds to the most realistic size characteristic of the repeating unit. The optimal frequency position is then transformed from the frequency domain back to the spatial domain using an inverse Fourier transform to obtain the target specifications of the basic unit.

[0088] The third step is to determine the target periodic repetition direction of the basic unit based on the initial coordinate range, the initial specifications, the initial periodic repetition direction, and the preset similarity threshold.

[0089] C1, based on the initial coordinate interval, the initial specifications, and the initial periodic repetition direction, divides the repetition unit region into a plurality of sequentially adjacent calibration basic units; the specifications of the calibration basic units match the initial specifications.

[0090] The content in C1 is the same as that in A1, so it will not be repeated here.

[0091] C2, for each of the preset multiple arrangement directions, determine the similarity between the first calibration basic unit and each second calibration basic unit in that arrangement direction, and obtain multiple similarities corresponding to that arrangement direction.

[0092] It is understandable that for a mask to be defect-identified, the basic units in its repeating cell region usually follow a specific periodic arrangement pattern (such as the array arrangement of circuit patterns in a semiconductor mask, the grid arrangement of pixel units in a display panel mask, etc.). Therefore, based on the design rules, graphic functional attributes, and manufacturing process requirements of the mask, the periodic arrangement of the basic units in the repeating cell region of the mask can be roughly determined, that is, the possible arrangement directions of the basic units (such as horizontal, vertical, 45° tilt, etc.) can be roughly determined. In this application, the roughly determined arrangement direction of the mask to be identified is used as one of the preset arrangement directions in this application.

[0093] The first calibration basic unit in this application is any one of a plurality of calibration basic units; the second calibration basic unit is a calibration basic unit that is adjacent to the first candidate unit in the arrangement direction among the plurality of calibration basic units.

[0094] This step means that, for each of the preset multiple arrangement directions, the similarity between the first calibration basic unit and each second calibration basic unit in that arrangement direction is determined, thereby obtaining multiple similarities corresponding to that arrangement direction.

[0095] The method for calculating similarity can be found in the description in A2, and will not be repeated here.

[0096] C3, based on multiple similarities corresponding to each of the arrangement directions, determine the target similarity for each of the arrangement directions.

[0097] Specifically, by performing weighted summation and other numerical operations on the multiple similarities corresponding to each arrangement direction, the target similarity for each arrangement direction can be obtained.

[0098] C4, compare the target similarity of each of the arrangement directions with the similarity threshold, and take the target similarity that is greater than the second similarity threshold as the filtered target similarity; determine the target periodic repetition direction by the arrangement direction corresponding to the filtered target similarity.

[0099] For example, if the preset candidate arrangement directions include horizontal (horizontal) and vertical (vertical) directions, after calculations in steps C1-C3, it is found that the target similarity corresponding to the horizontal direction is higher than the preset second similarity threshold, and the target similarity corresponding to the vertical direction is also higher than the second similarity threshold. Therefore, it can be determined that the target periodic repetition direction of the basic unit is horizontal and vertical, that is, the arrangement type of the repeating unit is 2D.

[0100] In acquiring the feature parameters of the optical image of the mask, this application first uses a pre-trained image recognition model to quickly and coarsely screen the optical image of the mask, efficiently identifying potential repeating unit regions; then, a fine correction process (A1-A4, B1-B5, and C1-C4) is performed on these repeating unit regions. This application ensures the overall computational efficiency of the process through the high-speed recognition capability of the image recognition model, and ensures the accuracy of feature parameter detection through the high-precision characteristics of the correction method, achieving a synergistic optimization of accuracy and processing speed.

[0101] By correcting the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repetition direction of the basic unit in the repeating unit region output by the image recognition model through the correction methods in the first, second, and third steps of S103, a more accurate position of the repeating unit, size of the basic unit, and periodic arrangement direction of the basic unit in the repeating unit region can be obtained, that is, the target coordinate range of the repeating unit region, the target size of the basic unit, and the target periodic repetition direction can be obtained.

[0102] In one optional implementation, determining the defects of the mask based on the target coordinate range, the target size, and the target periodic repetition direction includes: D1, based on the target specifications, the target coordinate space, and the target periodic repetition direction, divides the repeating unit region into multiple sequentially adjacent target reference units.

[0103] The details of this step are as described in A1 of the aforementioned embodiments and will not be repeated here.

[0104] D2, determine the optical image of the first target reference unit and the optical image of the second target reference unit.

[0105] The first target reference unit is any one of the multiple target reference units; the second target reference unit is a target reference unit adjacent to the first target reference unit among the multiple target reference units, or a unit generated based on multiple target reference units adjacent to the target reference unit.

[0106] First, any one of the multiple target reference elements is selected as the first target reference element.

[0107] Secondly, the second target reference element is determined based on the periodic repetition direction of the target, which can be achieved using one of the following two methods: The first approach is to select any one of the reference units adjacent to the first target reference unit and use it directly as the second target reference unit. The second approach involves first identifying all reference units adjacent to the first target reference unit, and then using a pre-defined fusion algorithm such as aggregation algorithm and mean calculation to fuse these multiple adjacent reference units, and using the fused reference unit as the second target reference unit.

[0108] The image corresponding to the first target reference unit in the optical image of the mask is used as the optical image corresponding to the first target reference unit; similarly, the image corresponding to the second target reference unit in the optical image of the mask is used as the optical image corresponding to the second target reference unit.

[0109] D3, based on the difference between the optical image of the first target reference unit and the optical image of the second target reference unit, determines the defects of the mask.

[0110] After aligning the optical images of the first target reference unit and the second target reference unit with subpixel precision, a difference image between the optical images of the first target reference unit and the second target reference unit is determined; based on the difference image, defects in the mask are determined.

[0111] In summary, the mask defect detection method disclosed in this application refers to determining the mask defects by directly outputting the position of the repeating unit area, the initial specifications of the basic unit, and the initial periodic repeating direction of the basic unit in the repeating unit area through an image recognition model; and then comparing the optical images corresponding to the basic units in the repeating unit area with each other.

[0112] It is understandable that if, during mask defect detection, the method used is not to compare optical images corresponding to basic units within the repeating unit region to determine mask defects, but rather to compare optical images corresponding to repeating wafers (theoretically identical wafers) on the mask, the resulting discrepancies would be significant. This is because the spacing between repeating wafers on the mask is much larger than the spacing between adjacent basic units within the repeating unit region. Furthermore, the illumination and imaging systems exhibit spatial inhomogeneity, and the mask itself experiences height fluctuations due to deformation and clamping errors. The combined effect of these factors would lead to significant differences in grayscale values ​​between the optical images corresponding to different repeating wafers on the mask. Directly performing defect detection based on these repeating wafer images would introduce a large number of false defect signals, resulting in a high false detection rate and insufficient detection accuracy to meet practical application requirements.

[0113] In this application, the spacing between two adjacent basic units within the repeating unit region is extremely small. At the scale of this repeating unit, the spatial non-uniformity of the illumination system and imaging system is negligible, and the height fluctuation difference of the mask is also insignificant. Therefore, it will not cause obvious grayscale differences in the optical images corresponding to adjacent basic units. Thus, by selecting repeating units with similar spacing and consistent grayscale characteristics within the repeating unit region for comparative detection, this application can effectively suppress the interference caused by the above-mentioned systematic and random errors, and significantly improve the accuracy and reliability of mask defect detection.

[0114] Meanwhile, compared with the traditional solution that "determines whether there are defects in the mask by calculating the difference between the optical image of the mask and the rendered reference image generated based on the design file of the mask", the technical solution of this application effectively breaks through the limitation of the traditional solution on the design file of the mask, expands the practical application scenarios of the technical solution, and can achieve efficient and accurate detection of mask defects.

[0115] The following section introduces the sample images and labels corresponding to the image recognition model, as well as the process of training the neural network model based on the sample images and corresponding labels to obtain the image recognition model.

[0116] In the field of mask defect detection, defect detection schemes based on artificial neural network models have been proposed. Existing schemes can directly identify defect targets in optical images using target detection technology. However, with the continuous evolution of semiconductor manufacturing process nodes, the feature size of mask patterns is constantly shrinking, the morphology of optical proximity correction structures is becoming increasingly complex, and the types of mask defects are becoming more diverse. Different defects have significantly different optical response characteristics, making it difficult for schemes based on artificial neural network models to meet the high-precision detection requirements of advanced processes in terms of detection accuracy.

[0117] Based on the above problems, the image recognition model proposed in this application does not output the defects of the mask, but outputs the optical feature parameters of the repeating unit region in the optical image of the mask, that is, outputs the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repetition direction of the basic unit in the repeating unit region.

[0118] In this application, the training samples used to train the image recognition model are optical images of sample masks, and the sample labels are the optical feature parameters of repeating unit regions in the optical images of sample masks.

[0119] In one alternative implementation, the following approach can be adopted: Figure 5 The method shown determines the training samples and sample labels corresponding to the image recognition model, including: S501 generates a sample image based on the optical image of the sample mask.

[0120] The process of acquiring the optical image of the sample mask is described in S101 and will not be repeated here.

[0121] For example, after obtaining the optical image of the sample mask, the optical image can be directly used as the sample image.

[0122] For example, after acquiring the optical image of the sample mask, based on actual engineering experience in mask defect detection, common types of defect patterns can be implanted into the optical image. That is, simulated defect signals are injected into the optical image of the sample mask according to a preset probability distribution, and the optical image after implanting the defect patterns is used as a sample pattern for model training.

[0123] S502, Obtain the sample design file of the sample mask.

[0124] The sample design document includes a sample repeating unit area; the sample repeating unit area includes multiple periodically arranged basic sample units.

[0125] S503, process the coordinate point data in the sample design file to determine the initial coordinate interval of the sample repeating unit region, the initial specifications of the sample basic unit, and the initial periodic repeating direction of the sample basic unit.

[0126] S504, the initial coordinate range of the sample repeating unit region is transformed to the optical coordinate system where the sample image is located to obtain the target coordinate range of the sample repeating unit region; and the initial specification of the sample basic unit is transformed to the optical coordinate system where the sample image is located to obtain the target specification of the sample basic unit.

[0127] Since transforming the coordinate data in the sample design file into the optical coordinate system is a well-known process for those skilled in the art, the contents of S504 will not be elaborated upon in this application.

[0128] S505, the target coordinate range of the sample repeating unit region, the target size of the sample basic unit, and the initial periodic repeating direction of the sample basic unit are used as the sample label.

[0129] After obtaining the training samples and sample labels corresponding to the image recognition model, the neural network model can be trained by defining a loss function adapted to the model task and using the gradient backpropagation algorithm. By iteratively optimizing the network parameters through multiple rounds to minimize the loss function value, the image recognition model claimed in this application is finally obtained.

[0130] For example, the neural network model can be a U-Net semantic segmentation network, and the loss function can be a weighted combination of the Dice loss function and the cross-entropy loss function. This application does not limit the specific form of the neural network model or the loss function.

[0131] Based on the same inventive concept, this application also provides a mask defect detection device. Figure 6 This is a schematic diagram of a mask defect detection device provided in an embodiment of this application. (Combined with...) Figure 6 As shown, the mask defect detection device 600 disclosed in this application includes: An optical image acquisition module 601 is used to acquire an optical image of a photomask; the optical image includes a repeating unit region; the repeating unit region includes multiple basic units arranged periodically; The initial parameter acquisition module 602 is used to process the optical image using a pre-trained image recognition model to obtain the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction of the basic unit in the repeating unit region. The mask defect determination module 603 is used to determine the defects of the mask based on the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repeating direction.

[0132] In one alternative implementation, the mask defect determination module 603 includes: An optical feature parameter correction submodule is used to correct the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repeating direction to obtain the target coordinate range of the repeating unit region, the target specifications of the basic unit, and the target periodic repeating direction of the basic unit in the repeating unit region. A defect determination sub-model is used to determine the defects of the mask based on the target coordinate range, the target specification, and the target periodic repetition direction.

[0133] In one alternative implementation, the optical characteristic parameter correction submodule includes: The target coordinate interval determination submodule is used to determine the target coordinate interval of the repeating unit region based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and a preset fraction threshold. The target specification determination submodule is used to determine the target specification of the basic unit based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and the preset tolerance. The target repetition direction determination submodule is used to determine the target periodic repetition direction of the basic unit based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and a preset similarity threshold.

[0134] In one alternative implementation, the target coordinate interval determination submodule includes: The first grid division unit is used to divide the repeating unit region into a plurality of sequentially adjacent candidate basic units based on the initial coordinate interval, the initial specification, and the initial periodic repeating direction; the specification of the candidate basic units matches the initial specification. The first similarity score determination unit is used to take any one of the plurality of candidate basic units as the first candidate basic unit, and determine the similarity score of the first candidate basic unit based on the similarity between the first candidate basic unit and each second candidate basic unit; the second candidate basic unit is the basic candidate unit that is adjacent to the first candidate unit among the plurality of candidate basic units. The first curve determination unit is used to take the target coordinates and similarity scores of the first candidate basic unit as a set of target data, and draw a first curve based on multiple sets of target data; The first target similarity score determination unit is used to take the similarity scores in the first curve that are greater than the score threshold as target similarity scores; The target coordinate interval determination unit is used to take the coordinate interval corresponding to the target similarity score as the target coordinate interval of the repeating unit region.

[0135] In one alternative implementation, the target specification defines submodules, including: A reference specification determination subunit is used to generate multiple reference specifications based on the initial specifications and the preset tolerances; The second grid division unit is used to divide the repeating unit region into a plurality of sequentially adjacent reference basic units for each reference specification, based on the reference specification, the initial coordinate interval, and the initial periodic repeating direction; the specifications of the reference basic units match the target reference specification. The second similarity determination unit takes any one of the plurality of reference specifications as the target reference specification, takes any one of the plurality of reference basic units corresponding to the target reference specification as the first reference basic unit, calculates the similarity between the first reference basic unit and each second reference basic unit, and obtains the plurality of similarities corresponding to the target reference specification; the second reference basic unit is the reference basic unit adjacent to the first reference basic unit. The second target similarity determination unit is used to determine the target similarity of the target reference specification based on multiple similarities corresponding to the target reference specification. The target specification determination unit is used to determine the maximum target similarity among multiple target similarities, and to use the reference specification corresponding to the maximum target similarity as the target specification of the basic unit.

[0136] In one alternative implementation, the target repetition direction determination submodule includes: The third grid division unit is used to divide the repeating unit region into multiple sequentially adjacent calibration basic units based on the initial coordinate interval, the initial specifications, and the initial periodic repeating direction; the specifications of the calibration basic units match the initial specifications. The third similarity determination unit is used to determine the similarity between the first calibration basic unit and each second calibration basic unit in each of the preset multiple arrangement directions, thereby obtaining multiple similarities corresponding to the arrangement direction; the first calibration basic unit is any one of the multiple calibration basic units; the second calibration basic unit is the calibration basic unit that is adjacent to the first candidate unit in the arrangement direction among the multiple calibration basic units. The third target similarity determination unit is used to determine the target similarity of each of the arrangement directions based on multiple similarities corresponding to each of the arrangement directions; The fourth target similarity determination unit is used to compare the target similarity of each of the arrangement directions with the similarity threshold, and to take the target similarity that is greater than the second similarity threshold as the filtered target similarity; The target repetition direction determination unit is used to determine the periodic repetition direction of the target based on the arrangement direction corresponding to the similarity of the filtered targets.

[0137] In one alternative implementation, the defect determination sub-model includes: The fourth grid division unit is used to divide the repeating unit region into multiple sequentially adjacent target reference units based on the target specifications, the target coordinate space, and the target periodic repeating direction; the specifications of the target reference units match the target specifications. A comparison unit group determination unit is used to determine a first target reference unit and a second target reference unit; the first target reference unit is any one of the plurality of target reference units; the second target reference unit is a target reference unit adjacent to the first target reference unit among the plurality of target reference units, or is generated based on a plurality of target reference units adjacent to the target reference unit. The defect determination unit is used to determine the defects of the mask based on the optical differences between the optical image of the first target reference unit and the optical image of the second target reference unit.

[0138] In one alternative implementation, the mask defect detection device 600 further includes: The sample design file determination module is used to obtain the sample design file of the sample mask; the sample design file includes a sample repeating unit region; the sample repeating unit region includes multiple periodically arranged basic sample units; The initial optical parameter determination module is used to process the coordinate point data in the sample design file to determine the initial coordinate interval of the sample repeating unit region, the initial size of the sample basic unit, and the initial periodic repeating direction of the sample basic unit. The first parameter conversion module is used to convert the initial coordinate range of the sample repeating unit region to the optical coordinate system where the sample image is located, so as to obtain the target coordinate range of the sample repeating unit region; the sample image is an optical image generated based on the sample mask. The second parameter conversion module is used to convert the initial specifications of the sample basic unit to the optical coordinate system where the sample image is located, so as to obtain the target specifications of the sample basic unit. The sample label determination module is used to take the target coordinate range of the sample repeating unit region, the target size of the sample basic unit, and the initial periodic repeating direction of the sample basic unit as the sample label.

[0139] Based on the mask detection method and apparatus provided in the foregoing embodiments, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements some or all of the steps in the mask detection method mentioned above.

[0140] Based on the mask detection method and apparatus provided in the foregoing embodiments, this application also provides an electronic device, including: A memory on which computer programs are stored; A processor is configured to execute the computer program in the memory to implement some or all of the steps in the mask detection method provided in the foregoing embodiments.

[0141] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and equipment embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components indicated as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0142] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for detecting defects in a photomask, characterized in that, The method includes: Obtain an optical image of a mask; the optical image includes a repeating unit region; the repeating unit region includes multiple basic units arranged periodically; The optical image is processed using a pre-trained image recognition model to obtain the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction of the basic unit in the repeating unit region. Based on the initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repeating direction, the defects of the mask are determined.

2. The method of claim 1, wherein, The determination of defects in the mask based on the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction includes: The initial coordinate range of the repeating unit region, the initial specifications of the basic unit, and the initial periodic repeating direction are corrected to obtain the target coordinate range of the repeating unit region, the target specifications of the basic unit, and the target periodic repeating direction of the basic unit in the repeating unit region. Based on the target coordinate range, the target specifications, and the target periodic repetition direction, the defects of the mask are determined.

3. The method of claim 2, wherein, The step of correcting the initial coordinate interval of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction to obtain the target coordinate interval of the repeating unit region, the target size of the basic unit, and the target periodic repeating direction of the basic unit in the repeating unit region includes: Based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and the preset fraction threshold, the target coordinate interval of the repetition unit region is determined; Based on the initial coordinate range, the initial specifications, the initial periodic repetition direction, and the preset tolerance, the target specifications of the basic unit are determined; Based on the initial coordinate range, the initial specifications, the initial periodic repetition direction, and the preset similarity threshold, the target periodic repetition direction of the basic unit is determined.

4. The method of claim 3, wherein, Determining the target coordinate interval of the repeating unit region based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and a preset fraction threshold includes: Based on the initial coordinate interval, the initial specifications, and the initial periodic repetition direction, the repeating unit region is divided into multiple sequentially adjacent candidate basic units; the specifications of the candidate basic units match the initial specifications. Any one of the plurality of candidate basic units is taken as the first candidate basic unit. Based on the similarity between the first candidate basic unit and each second candidate basic unit, the similarity score of the first candidate basic unit is determined. The second candidate basic unit is the candidate basic unit that is adjacent to the first candidate basic unit among the plurality of candidate basic units. The target coordinates and similarity scores of the first candidate basic unit are used as a set of target data, and a first curve is plotted based on multiple sets of target data; The similarity scores in the first curve that are greater than the score threshold are taken as the target similarity scores; The coordinate interval corresponding to the target similarity score is used as the target coordinate interval of the repeating unit region.

5. The method of claim 3, wherein, The determination of the target specifications of the basic unit based on the initial coordinate interval, the initial specifications, the initial periodic repetition direction, and the preset tolerance includes: Based on the initial specifications and the preset tolerances, multiple reference specifications are generated; For each reference specification, based on the reference specification, the initial coordinate interval, and the initial periodic repetition direction, the repeating unit region is divided into a plurality of sequentially adjacent reference basic units; the specifications of the reference basic units are matched with the target reference specification; Take any one of the multiple reference specifications as the target reference specification, take any one of the multiple reference basic units corresponding to the target reference specification as the first reference basic unit, calculate the similarity between the first reference basic unit and each second reference basic unit, and obtain multiple similarities corresponding to the target reference specification; the second reference basic unit is the reference basic unit adjacent to the first reference basic unit. Based on multiple similarities corresponding to the target reference specification, the target similarity of the target reference specification is determined; The maximum target similarity among the multiple target similarities is determined, and the reference specification corresponding to the maximum target similarity is used as the target specification of the basic unit.

6. The method of claim 3, wherein, The step of determining the target periodic repetition direction of the basic unit based on the initial coordinate interval, the initial specification, the initial periodic repetition direction, and a preset similarity threshold includes: Based on the initial coordinate range, the initial specifications, and the initial periodic repetition direction, the repetition unit region is divided into multiple sequentially adjacent calibration basic units; the specifications of the calibration basic units match the initial specifications. For each of the preset multiple arrangement directions, the similarity between the first calibration basic unit and each second calibration basic unit in that arrangement direction is determined, and multiple similarities corresponding to that arrangement direction are obtained; the first calibration basic unit is any one of the multiple calibration basic units; the second calibration basic unit is the calibration basic unit that is adjacent to the first candidate unit in the arrangement direction among the multiple calibration basic units. Based on multiple similarities corresponding to each of the arrangement directions, the target similarity of each of the arrangement directions is determined; The target similarity for each of the arrangement directions is compared with the similarity threshold, and the target similarity greater than the second similarity threshold is taken as the filtered target similarity. The arrangement direction corresponding to the similarity of the filtered targets is used to determine the periodic repetition direction of the targets.

7. The method of claim 2, wherein, Determining the defects of the mask based on the target coordinate range, the target size, and the target periodic repetition direction includes: Based on the target specifications, the target coordinate space, and the target periodic repetition direction, the repetition unit region is divided into multiple sequentially adjacent target reference units; the specifications of the target reference units match the target specifications. A first target reference unit and a second target reference unit are determined; the first target reference unit is any one of the plurality of target reference units; the second target reference unit is a target reference unit adjacent to the first target reference unit among the plurality of target reference units, or a unit generated based on a plurality of target reference units adjacent to the first target reference unit. The defects of the mask are determined based on the optical differences between the optical image of the first target reference unit and the optical image of the second target reference unit.

8. The method according to any one of claims 1-7, characterized in that, The steps for obtaining sample labels for the pre-trained image recognition model include: Obtain the sample design file of the sample mask; the sample design file includes a sample repeating unit region; the sample repeating unit region includes multiple periodically arranged basic sample units; The coordinate point data in the sample design file are processed to determine the initial coordinate interval of the sample repeating unit region, the initial size of the sample basic unit, and the initial periodic repeating direction of the sample basic unit. The initial coordinate range of the sample repeating unit region is transformed to the optical coordinate system of the sample image to obtain the target coordinate range of the sample repeating unit region; the sample image is an optical image generated based on the sample mask. The initial specifications of the sample basic unit are transformed to the optical coordinate system where the sample image is located to obtain the target specifications of the sample basic unit; The target coordinate range of the sample repeating unit region, the target size of the sample basic unit, and the initial periodic repeating direction of the sample basic unit are used as the sample label.

9. The method according to any one of claims 1-7, characterized in that, The initial periodic repetition direction of the basic units in the repeating unit region includes: The distribution is periodically repeated along the horizontal axis of the coordinate system where the optical image is located, periodically repeated along the vertical axis of the coordinate system where the optical image is located, and periodically repeated along both the horizontal and vertical axes.

10. A mask defect detection apparatus, characterized by comprising: The device includes: An optical image acquisition module is used to acquire an optical image of a photomask; the optical image includes a repeating unit region; the repeating unit region includes multiple basic units arranged periodically; The initial parameter acquisition module is used to process the optical image using a pre-trained image recognition model to obtain the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction of the basic unit in the repeating unit region. The mask defect determination module is used to determine the defects of the mask based on the initial coordinate range of the repeating unit region, the initial size of the basic unit, and the initial periodic repeating direction.

11. A computer readable storage medium having stored thereon a computer program, characterized in that When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-9.

12. An electronic device, comprising: include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-9.