Method, device and computer readable storage medium for embedding watermark in layout file
Patent Information
- Application Number
- CN202611323893.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2026-08-14
- Filing Date
- 2026-08-28
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]目前现有可以使用软件来手动添加水印,但是如果进行批量处理则比较耗时耗力,而且水印小,不易被识别,容易被抹去,无法满足当前的设计安全和质量管理需求
[0016]The aforementioned method for embedding watermarks in layout files uses a method of hollowing out and embedding watermark graphics in key layers of the layout file, achieving clear visibility of the watermark and making it difficult to remove. Simultaneously, it can generate watermarks in batches over a large area of the layout file, improving efficiency, saving time, and avoiding wasted manpower, thereby preventing unauthorized copying or plagiarism. Furthermore, an apparatus for embedding watermarks in layout files and a computer-readable storage medium are disclosed, both possessing the performance and beneficial effects of the aforementioned method for embedding watermarks in layout files.
Smart Images

Figure CN122928599A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of integrated circuit layout and graphics processing technology, and particularly relates to a method, apparatus and computer-readable storage medium for embedding watermarks in layout files. Background Technology
[0002] With the continuous development of integrated circuit technology and the intensification of market competition, circuit layouts, as one of the core assets of high-tech companies, face severe risks of piracy and infringement. Traditional copyright protection methods are often insufficient to address the security challenges of complex electronic design documents. By embedding watermarks in the integrated circuit layout design, the originality and ownership of the design can be effectively proven, preventing plagiarism or illegal copying. This is similar to adding watermarks to digital images and is currently an effective means of protecting intellectual property rights. Specific information, such as version numbers, designer information, or customer identifiers, can be encoded in the watermark, facilitating subsequent tracking, management, and verification of authenticity. During large-scale production or design distribution, if problematic chips occur, the watermark can be used to trace back to the design source or production batch, aiding in quality control and liability determination.
[0003] Currently, software can be used to manually add watermarks, but batch processing is time-consuming and labor-intensive. Moreover, the watermarks are small, difficult to identify, and easy to erase, which cannot meet the current design security and quality management requirements.
[0004] Therefore, there is an urgent need for a more efficient method that meets the requirements of design safety and quality management to embed watermarks into the layout of integrated circuit designs. Summary of the Invention
[0005] To address all or part of the problems of the prior art, this invention provides a more efficient method, apparatus, and computer-readable storage medium for embedding watermarks in layout files that meets design safety and quality management requirements.
[0006] Firstly, this embodiment provides a method for embedding watermarks in a layout file, including the following steps: Obtain the original layout and watermark image, and select the target layer in the original layout; An auxiliary layer is created in the original layout based on the target layer, and the size of the watermark graphic is adjusted based on the target layer; In the original map, at least one target module is selected, and the polygon information of the target layer within the boundary region of the target module is identified. The embedding position of the watermark graphic is determined based on the polygon information in the target layer, the watermark graphic is drawn at the embedding position in the auxiliary layer, and the watermark graphic is made to be inside the polygon in the target layer, thereby generating the first layout. In the first layout, the watermark graphic in the auxiliary layer is embedded into the polygon of the target layer to obtain the target layout after watermark embedding.
[0007] In some embodiments, creating an auxiliary layer in the original layout based on the target layer includes: The boundary contour of the auxiliary layer lies within the boundary region of the target layer.
[0008] In some embodiments, adjusting the size of the watermark graphic based on the target layer includes: Based on the process design rules of the target layer, the geometric parameters of the watermark graphic are configured to ensure that the size of the watermark graphic is smaller than the minimum allowable graphic size of the target layer, and that the watermark graphic embedded in the target layer does not violate the process design rules.
[0009] In some embodiments, identifying the polygon information of the target layer within the boundary region of the target module includes: Extract the boundary contour coordinates of the target module to determine the processing area of the target layer; Traverse and identify all polygon information of the target layer within the processing area, including the contour vertex coordinates of the polygons and the size and area of each polygon.
[0010] In some embodiments, determining the embedding position of the watermark graphic based on polygon information in the target layer includes: Based on the polygon information of the target layer, and according to the size of the watermark graphic and the process design rules of the target layer, the polygons of the target layer in the processing area are filtered out, and polygons with a size or area smaller than a preset value are removed to obtain valid polygons. Using the extreme coordinates of the effective polygon as a reference, the starting coordinates and dot matrix positions of the watermark pattern array within the effective polygon are calculated to determine the embedding position of the watermark pattern.
[0011] In some embodiments, embedding the watermark graphic in the auxiliary layer into the polygon of the target layer in the first layout includes: Perform an AND operation on the target layer and auxiliary layer in the first layout, and create a first intermediate layer in the first layout to draw the result graphic, thus forming the second layout; Perform a difference operation between the target layer in the second layout and the first intermediate layer or auxiliary layer, and create a second intermediate layer in the second layout to draw the result graphics, thus forming a third layout; In the third version of the drawing, the graphics of the first intermediate layer are embedded into the graphics of the second intermediate layer, and a third intermediate layer is created to draw the resulting graphics; Delete the target layer in the third version of the graph and update the third intermediate layer as the new target layer.
[0012] In some embodiments, embedding the graphic of the first intermediate layer into the graphic of the second intermediate layer includes: Perform a union operation on the first intermediate layer and the second intermediate layer without eliminating the boundary lines between the contact graphics, thus completing the physical tessellation of the graphics in the first intermediate layer and the second intermediate layer.
[0013] In some embodiments, the method for embedding a watermark in the layout file further includes: The auxiliary layer, the first intermediate layer, and the second intermediate layer in the target layout are deleted, and the final target layout is consistent with the hierarchical structure, layer settings, and cell settings of the original layout.
[0014] Secondly, this embodiment provides an apparatus for embedding watermarks in a layout file, the apparatus comprising: The acquisition module is used to acquire the original layout and watermark image, select a target layer in the original layout, create an auxiliary layer in the original layout based on the target layer, and adjust the size of the watermark image based on the target layer. An identification module is used to select at least one target module in the original map and identify the polygon information of the target layer within the boundary area of the target module. An embedding module is used to determine the embedding position of the watermark graphic based on the polygon information in the target layer, draw the watermark graphic at the embedding position in the auxiliary layer, and ensure that the watermark graphic is inside the polygon in the target layer to generate a first layout; in the first layout, the watermark graphic in the auxiliary layer is embedded into the polygon in the target layer to obtain the target layout after watermark embedding.
[0015] Thirdly, this embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method for embedding watermarks in layout files as described in the first aspect.
[0016] The aforementioned method for embedding watermarks in layout files uses a method of hollowing out and embedding watermark graphics in key layers of the layout file, achieving clear visibility of the watermark and making it difficult to remove. Simultaneously, it can generate watermarks in batches over a large area of the layout file, improving efficiency, saving time, and avoiding wasted manpower, thereby preventing unauthorized copying or plagiarism. Furthermore, an apparatus for embedding watermarks in layout files and a computer-readable storage medium are disclosed, both possessing the performance and beneficial effects of the aforementioned method for embedding watermarks in layout files. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology 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.
[0018] Figure 1 This is a flowchart of a method for embedding watermarks in a layout file in one embodiment; Figure 2 This is a schematic diagram of a watermark graphic in one embodiment; Figure 3 This is a partial schematic diagram of the auxiliary layer and the target layer in one embodiment; Figure 4 This is a partial schematic diagram of the first intermediate layer (layer A) and the auxiliary layer in one embodiment; Figure 5 This is a partial schematic diagram of the second intermediate layer (layer B) in one embodiment; Figure 6 This is a partial schematic diagram of the third intermediate layer (layer C) in one embodiment; Figure 7 This is a partial schematic diagram of the auxiliary layer and the target layer in another embodiment. Detailed Implementation
[0019] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings, which illustrate embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of this application will be thorough and complete.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0021] It should also be understood that the terms "comprising / including" or "having," etc., specify the presence of the stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. Meanwhile, in this specification, the term "and / or" includes any and all combinations of the associated listed items.
[0022] To embed watermarks into the designed integrated circuits more efficiently and effectively, this embodiment provides a method for embedding watermarks into layout files, including the following steps: Obtain the original layout and watermark image, and select the target layer in the original layout; An auxiliary layer is created in the original layout based on the target layer, and the size of the watermark graphic is adjusted based on the target layer; In the original map, at least one target module is selected, and the polygon information of the target layer within the boundary region of the target module is identified. The embedding position of the watermark graphic is determined based on the polygon information in the target layer, the watermark graphic is drawn at the embedding position in the auxiliary layer, and the watermark graphic is made to be inside the polygon in the target layer, thereby generating the first layout. In the first layout, the watermark graphic in the auxiliary layer is embedded into the polygon of the target layer to obtain the target layout after watermark embedding.
[0023] The above-mentioned method for embedding watermarks in layout files uses a method of hollowing out watermark graphics and embedding them into the key layer (target layer) of the layout file to make the watermark clearly visible and difficult to remove. At the same time, it can generate watermarks in batches over a large area of the layout file, improving efficiency, saving time, avoiding waste of manpower, and preventing irregular copying or plagiarism.
[0024] In this embodiment, the target layer is the metal layer in the original layout.
[0025] Specifically, the Metal 1 layer (first metal interconnect layer) can be selected as the target layer, or other metal layers can be selected. The watermark can theoretically be applied to the front-middle layer (such as the active region layer and polysilicon layer in the front-middle layer). However, since the front-middle layer is small in size, it is easy to violate the process design rule and destroy the original circuit function. Moreover, the front-middle layer is the core layer of the layout and can easily affect the device characteristics.
[0026] In this embodiment, the target module selected in the original layout is a valid module that contains a target layer.
[0027] Specifically, priority should be given to functional modules with core intellectual property rights, such as IP cores, algorithm modules, and storage modules. It is not recommended to select empty modules or temporary test modules that will be deleted later. Batch selection of target modules is also supported.
[0028] In this embodiment, creating an auxiliary layer in the original layout based on the target layer includes: The boundary contour of the auxiliary layer lies within the boundary region of the target layer.
[0029] Specifically, the placement boundary of the watermark graphic on the subsequent auxiliary layer must not exceed the boundary of the target layer of the target module. If the watermark graphic runs outside the boundary of the target layer, this part will be discarded directly during subsequent layer calculations, and the watermark will not be generated. Therefore, it is recommended to set the boundary outline of the auxiliary layer within the boundary area of the target layer when creating the auxiliary layer.
[0030] In this embodiment, adjusting the size of the watermark graphic based on the target layer includes: Based on the design rule of the target layer, configure the geometric parameters of the watermark graphic to ensure that the size of the watermark graphic is smaller than the minimum allowable graphic size of the target layer, and that the watermark graphic embedded in the target layer does not violate the design rule.
[0031] Specifically, the basic geometric parameters such as character height and line width of the watermark graphic are pre-configured in the auxiliary layer. This involves retrieving the process design rule parameters of the target layer to limit the lower limit of the watermark graphic size. The graphic size of the watermark graphic must be smaller than the minimum allowable graphic size of the target layer. The area / size of the watermark graphic cannot be too large overall, ensuring that the remaining graphic after the watermark graphic is removed from the target layer after the calculation conforms to the process design rule and preventing the generation of graphics that violate the design rule.
[0032] In this embodiment, identifying the polygon information of the target layer within the boundary region of the target module includes: Extract the boundary contour coordinates of the target module to determine the processing area of the target layer; Traverse and identify all polygon information of the target layer within the processing area, including the contour vertex coordinates of the polygons and the size and area of each polygon.
[0033] In this embodiment, determining the embedding position of the watermark graphic based on the polygon information in the target layer includes: Based on the polygon information of the target layer, and according to the size of the watermark graphic and the design rule of the target layer, the polygons of the target layer in the processing area are filtered out, and polygons with a size or area smaller than a preset value are removed to obtain valid polygons. Using the extreme coordinates of the effective polygon as a reference, the starting coordinates and dot matrix positions of the watermark pattern array within the effective polygon are calculated to determine the embedding position of the watermark pattern.
[0034] Among them, the extreme coordinates of the effective polygon refer to the minimum and maximum coordinates of the physical boundary of the effective polygon, which are generally the coordinates of the lower left corner and the upper right corner.
[0035] Specifically, the process of identifying polygon information in the target module and determining the embedding position of the watermark graphic in the auxiliary layer includes the following steps: 1) Extracting the coordinates of the overall outer frame boundary of the target module to lock the global processing range of the target layer; 2) Traversing and identifying the contour vertices, coordinate positions, and size and area of individual polygons within the target module; 3) Filtering the polygons for validity, removing fragmented graphics that are too small to support the watermark, and obtaining valid polygons; 4) Using the extreme coordinates of the valid polygons as a reference, automatically calculating the starting coordinates and lattice positions of the watermark graphic array to determine the embedding position of the watermark graphic. All embedding positions, placement spacing, and clipping range of the watermark are determined based on the polygon information (coordinates and geometric parameters, etc.) identified above, ensuring that the watermark is accurately placed inside the valid polygons; 5) Drawing the watermark graphic in the auxiliary layer based on all obtained placement coordinates (i.e., the embedding position of the watermark graphic), and performing graphic intersection operations with the valid polygons of the target layer, retaining only the watermark graphic completely inside the valid polygons and discarding the watermark graphic that crosses the polygon, to ensure that all subsequent watermark cutouts are set inside the polygons of the target layer.
[0036] Step 4) specifically includes: the script reads all vertices of the valid polygon and calculates the vertex coordinates Xmin, Xmax, Ymin, and Ymax of the valid polygon; it then superimposes a preset edge safety offset Offset_X and Offset_Y onto the lower left corner (Xmin, Ymin) of the polygon to obtain the starting reference coordinates of the watermark graphic array. Next, based on preset horizontal pitch and vertical pitch, iteratively calculates the placement coordinates of each watermark graphic in the array. When the calculated coordinates exceed the boundary of the polygon after deducting the safety offset, the iteration in that direction terminates.
[0037] For better and more effective polygon filtering and determination of watermark embedding positions, please refer to... Figure 7In another embodiment shown, the target layer and auxiliary layer are illustrated. It can be seen that the polygons in the target layer have different sizes and areas. These polygons include: The topmost valid polygon: Due to size or area limitations, only a single watermark graphic is drawn at the corresponding position in the auxiliary layer; The effective polygon in the middle has a large size and area, and a 3×2 watermark graphic array is drawn at the corresponding position of the auxiliary layer; The polygons removed at the bottom: are too small in size or area to embed the watermark graphic, and the corresponding position of the auxiliary layer does not have the watermark graphic drawn.
[0038] In this embodiment, polygons of different sizes in the target layer within the same target module use a uniform spacing; however, in other embodiments, based on the design rule of the target layer, different spacings can be adjusted based on the area where the polygons in the target layer are located, and this application does not make specific limitations.
[0039] Specifically, the pitch of the watermark graphic array is a configurable parameter that needs to be validated in conjunction with the design rules of the target layer: based on the watermark graphic size, the minimum line width of the target layer, and the minimum clearance process constraints, the minimum allowable pitch value is derived; if the preset pitch does not meet the process constraints, it is automatically corrected to the minimum safe value allowed by the design rules. After the pitch is validated and determined, the vertex coordinates of the valid polygons are read, and the number of rows and columns of watermark graphics that can be arranged inside the polygons is calculated. The size / area of the valid polygons only determines the number of watermark graphics that can be placed and does not change the pitch value itself.
[0040] In this embodiment, the step of embedding the watermark graphic in the auxiliary layer of the first layout into the polygon of the target layer includes: Perform an AND operation on the target layer and auxiliary layer in the first layout, and create a first intermediate layer (layer A) in the first layout to draw the result graphic, forming the second layout; Perform a difference operation (NOT) on the target layer in the second layout with the first intermediate layer (layer A) or the auxiliary layer, and create a second intermediate layer (layer B) in the second layout to draw the result graphic, thus forming the third layout; In the third version of the drawing, the graphics of the first intermediate layer (layer A) are embedded into the graphics of the second intermediate layer (layer B), and a third intermediate layer (layer C) is created to draw the result graphics; Delete the target layer in the third version of the graph and update the third intermediate layer as the new target layer.
[0041] It should be noted that when performing a difference operation (NOT) between the target layer and the first intermediate layer or the auxiliary layer in the second version of the diagram, either the difference operation between the target layer and the first intermediate layer or the difference operation between the target layer and the auxiliary layer can be performed, depending on the specific application scenario requirements.
[0042] In this embodiment, embedding the graphic of the first intermediate layer (layer A) into the graphic of the second intermediate layer (layer B) includes: Perform a union (OR) operation on the first intermediate layer (layer A) and the second intermediate layer (layer B) without eliminating the boundary lines between the contact graphics, thus completing the physical tessellation of the graphics in the first intermediate layer (layer A) and the second intermediate layer (layer B).
[0043] In this embodiment, the method for embedding watermarks in the layout file further includes: The auxiliary layer, the first intermediate layer (layer A), and the second intermediate layer (layer B) in the target layout are deleted. The final target layout is consistent with the original layout in terms of hierarchical structure, layer settings, and cell settings.
[0044] The following specific application example illustrates the method for embedding watermarks in the above-mentioned layout file, specifically including: Get Figure 2 The watermark pattern shown indicates that the target layer is Metal 1, and the target module is selected.
[0045] Use an unused layer in the layout (GDS) that is not involved in the calculation as an auxiliary layer (SMTX), so that the boundary contour of the auxiliary layer (SMTX) is within the boundary area of the Metal 1 metal layer (Metal 1).
[0046] Adjusting the size of the watermark graphic includes: pre-configuring basic geometric parameters such as the character height and line width of the "SMTX" label; configuring the pitch spacing of the array via script to ensure that the watermark cutout graphic meets the corresponding process layer design rules, avoiding the generation of non-compliant fragment graphics, and ensuring that the layout can be fabricated normally. It also adapts to different sized layout polygons to prevent the watermark from exceeding the polygon boundaries, causing watermark failure, or directly cutting through existing circuitry.
[0047] Use a script to identify the polygon Metal1 in the Metal 1 layer within the boundary region of the target module. Use the script to draw the watermark graphic in the auxiliary layer according to the corresponding pitch, and the watermark graphic is inside the Metal 1 layer within the Metal 1 layer.
[0048] Processing Layout (GDS), based on such Figure 3 The auxiliary layer (SMTX) and the Metal 1 metal layer (Metal 1) shown are subjected to Boolean calculations: A = Metal 1 AND SMTX, B = Metal 1 NOT A, C = B OR A. Among them, layer A is an independent Metal 1 POLYGON with the watermark graphic "SMTX", layer B is a Metal 1 POLYGON with the watermark graphic "SMTX" removed, and layer C is formed by embedding the graphic in layer A into the graphic in layer B in a jigsaw puzzle manner, thus completing the physical tiling of the graphics in layer A and layer B.
[0049] Finally, the script performs the deletion of the auxiliary layer, the first intermediate layer (layer A), and the second intermediate layer (layer B) to obtain the final GDS file with the embedded watermark. The final output target layout: fully inherits the hierarchical structure, all layers, and all cells of the original complete layout, only updating the Metal 1 layer. It is an independent, DRC / LVS-enabled complete chip layout with no external dependencies.
[0050] This method can embed watermarks in batches in GDS, making the watermarks clearer and easier to track and view later. In addition, the watermarks are not directly applied to the auxiliary layer in the form of Labels, making them difficult to erase. Even if the watermarks are erased, it is difficult to restore the layout, thus improving the watermarks' ability to prevent deletion and tampering.
[0051] Based on the same inventive concept, this application also provides an apparatus for implementing the method of embedding watermarks in layout files as described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations of one or more apparatus embodiments for embedding watermarks in layout files provided below can be found in the limitations of the method for embedding watermarks in layout files described above, and will not be repeated here.
[0052] In one embodiment, an apparatus for embedding a watermark in a layout document is provided, the apparatus comprising: The acquisition module is used to acquire the original layout and watermark image, select a target layer in the original layout, create an auxiliary layer in the original layout based on the target layer, and adjust the size of the watermark image based on the target layer. An identification module is used to select at least one target module in the original map and identify the polygon information of the target layer within the boundary area of the target module. An embedding module is used to determine the embedding position of the watermark graphic based on the polygon information in the target layer, draw the watermark graphic at the embedding position in the auxiliary layer, and ensure that the watermark graphic is inside the polygon in the target layer to generate a first layout; in the first layout, the watermark graphic in the auxiliary layer is embedded into the polygon in the target layer to obtain the target layout after watermark embedding.
[0053] The various modules in the aforementioned watermark embedding device for map files can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0054] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described embodiments of the method for embedding watermarks in layout files.
[0055] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0056] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0057] In the description of this specification, the references to terms such as "some embodiments," "other embodiments," "ideal embodiments," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example that are included in at least one embodiment or example of this application. In this specification, the illustrative descriptions of the above terms do not necessarily refer to the same embodiments or examples.
[0058] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0059] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for embedding watermarks in a layout file, characterized in that, Including the following steps: Obtain the original layout and watermark image, and select the target layer in the original layout; An auxiliary layer is created in the original layout based on the target layer, and the size of the watermark graphic is adjusted based on the target layer; In the original map, at least one target module is selected, and the polygon information of the target layer within the boundary region of the target module is identified. The embedding position of the watermark graphic is determined based on the polygon information in the target layer, the watermark graphic is drawn at the embedding position in the auxiliary layer, and the watermark graphic is made to be inside the polygon in the target layer, thereby generating the first layout. In the first layout, the watermark graphic in the auxiliary layer is embedded into the polygon of the target layer to obtain the target layout after watermark embedding.
2. The method for embedding watermarks in map documents according to claim 1, characterized in that, The creation of an auxiliary layer in the original layout based on the target layer includes: The boundary contour of the auxiliary layer lies within the boundary region of the target layer.
3. The method for embedding watermarks in map documents according to claim 1, characterized in that, Adjusting the size of the watermark graphic based on the target layer includes: Based on the process design rules of the target layer, the geometric parameters of the watermark graphic are configured to ensure that the size of the watermark graphic is smaller than the minimum allowable graphic size of the target layer, and that the watermark graphic embedded in the target layer does not violate the process design rules.
4. The method for embedding watermarks in map documents according to claim 1, characterized in that, The identification of polygon information of the target layer within the boundary region of the target module includes: Extract the boundary contour coordinates of the target module to determine the processing area of the target layer; Traverse and identify all polygon information of the target layer within the processing area, including the contour vertex coordinates of the polygons and the size and area of each polygon.
5. The method for embedding watermarks in layout documents according to claim 4, characterized in that, Determining the embedding position of the watermark graphic based on the polygon information in the target layer includes: Based on the polygon information of the target layer, and according to the size of the watermark graphic and the process design rules of the target layer, the polygons of the target layer in the processing area are filtered out, and polygons with a size or area smaller than a preset value are removed to obtain valid polygons. Using the extreme coordinates of the effective polygon as a reference, the starting coordinates and dot matrix positions of the watermark pattern array within the effective polygon are calculated to determine the embedding position of the watermark pattern.
6. The method for embedding watermarks in a layout file according to claim 1, characterized in that, In the first version of the image, embedding the watermark graphic in the auxiliary layer into the polygon of the target layer includes: Perform an AND operation on the target layer and auxiliary layer in the first layout, and create a first intermediate layer in the first layout to draw the result graphic, thus forming the second layout; Perform a difference operation between the target layer in the second layout and the first intermediate layer or auxiliary layer, and create a second intermediate layer in the second layout to draw the result graphics, thus forming a third layout; In the third version of the drawing, the graphics of the first intermediate layer are embedded into the graphics of the second intermediate layer, and a third intermediate layer is created to draw the resulting graphics; Delete the target layer in the third version of the graph and update the third intermediate layer as the new target layer.
7. The method for embedding watermarks in layout documents according to claim 6, characterized in that, The step of embedding the graphic of the first intermediate layer into the graphic of the second intermediate layer includes: Perform a union operation on the first intermediate layer and the second intermediate layer without eliminating the boundary lines between the contact graphics, thus completing the physical tessellation of the graphics in the first intermediate layer and the second intermediate layer.
8. The method for embedding watermarks in layout documents according to claim 7, characterized in that, Also includes: The auxiliary layer, the first intermediate layer, and the second intermediate layer in the target layout are deleted, and the final target layout is consistent with the hierarchical structure, layer settings, and cell settings of the original layout.
9. An apparatus for embedding watermarks in a layout document, characterized in that, The device includes: The acquisition module is used to acquire the original layout and watermark image, select a target layer in the original layout, create an auxiliary layer in the original layout based on the target layer, and adjust the size of the watermark image based on the target layer. An identification module is used to select at least one target module in the original map and identify the polygon information of the target layer within the boundary area of the target module. An embedding module is used to determine the embedding position of the watermark graphic based on the polygon information in the target layer, draw the watermark graphic at the embedding position in the auxiliary layer, and ensure that the watermark graphic is inside the polygon in the target layer to generate a first layout; in the first layout, the watermark graphic in the auxiliary layer is embedded into the polygon in the target layer to obtain the target layout after watermark embedding.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for embedding watermarks in a layout file as described in any one of claims 1 to 8.