Method and device for layout fuzzy matching based on hausdorff distance, medium, program product and terminal
By using a layout fuzzy matching method based on Hausdorff distance, and determining layout consistency through preprocessing and distance calculation, the problem of long computation time and low efficiency in existing technologies is solved. This achieves efficient and accurate layout matching, adapts to process changes, and improves the progress of chip design verification.
Patent Information
- Application Number
- CN202510898090.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-07-01
AI Technical Summary
Existing layout fuzzy matching methods suffer from long computation time, low efficiency, and poor process adaptability when processing large-scale layouts, thus affecting the progress of chip design verification.
A fuzzy matching method based on Hausdorff distance is adopted. By acquiring the first and second maps to be matched, preprocessing operations are performed on the coordinate point sets respectively, and Hausdorff distance is calculated. The consistency of the maps is determined by whether the maximum Hausdorff distance is less than or equal to a preset threshold.
It significantly improves the efficiency and accuracy of layout fuzzy matching, solves the problems of long computation time and low efficiency, adapts to process changes, and improves the speed of chip design verification.
Smart Images

Figure CN120411567B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of chip design, and particularly relates to a layout fuzzy matching method and device based on Hausdorff distance, a medium, a program product and a terminal. BACKGROUND
[0002] Layout fuzzy matching is mainly used for detecting the similarity between different layouts. In the context of increasing chip accuracy requirements, fuzzy matching is increasingly important in design verification. Currently, common fuzzy matching methods include geometric feature comparison, template comparison and feature point description. These methods generally have the problems of sensitivity to process variation and poor rotation and scaling adaptability in practical applications. In particular, existing layout fuzzy matching methods have long operation time and low efficiency when processing large-scale layouts, which seriously affects the progress of chip design verification. These problems are more pronounced under advanced process conditions, limiting the practical application effect of fuzzy matching technology. SUMMARY
[0003] In view of the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide a layout fuzzy matching method and device based on Hausdorff distance, a medium, a program product and a terminal, which are used to solve the problems of low operation efficiency and poor process adaptability existing in the prior art fuzzy matching technology.
[0004] To achieve the above object and other related objects, the first aspect of the present application provides a layout fuzzy matching method based on Hausdorff distance, comprising: obtaining a first layout and a second layout to be executed for fuzzy matching; performing a preprocessing operation on the first coordinate point set and the second coordinate point set, respectively; performing a Hausdorff distance calculation operation on the first coordinate point set and the second coordinate point set subjected to the preprocessing operation, respectively, and obtaining a maximum Hausdorff distance based on the calculation result; determining whether the maximum Hausdorff distance is less than or equal to a preset threshold value, if it is less than or equal to the preset threshold value, it is determined that the first layout and the second layout are consistent; otherwise, it is determined that the first layout and the second layout are inconsistent. Figure One
[0005] In some embodiments of the first aspect of the present application, the process of performing a Hausdorff distance calculation operation on the first coordinate point set and the second coordinate point set subjected to the preprocessing operation, respectively, and obtaining a maximum Hausdorff distance based on the calculation result comprises: performing a one-way Hausdorff distance calculation operation on the first coordinate point set directed to the second coordinate point set to obtain a first Hausdorff distance; performing a one-way Hausdorff distance calculation operation on the second coordinate point set directed to the second coordinate point set to obtain a second Hausdorff distance; and performing a two-way Hausdorff distance calculation operation on the first Hausdorff distance and the second Hausdorff distance to obtain a maximum Hausdorff distance.
[0006] In some embodiments of the first aspect of the present application, the process of performing the one-way Hausdorff distance calculation operation from the source point set to the target point set comprises: constructing a two-dimensional query tree for the source point set and a two-dimensional query tree for the target point set, respectively; for each source point in the source point set, constructing a corresponding rectangular frame centered on the current source point; applying the coordinates of the current rectangular frame to the two-dimensional query tree of the target point set to obtain all target points falling within the frame; calculating the distance from the current source point to each filtered target point, and extracting the shortest distance as the one-way Hausdorff distance calculation result of the source point.
[0007] In some embodiments of the first aspect of the present application, the process of constructing a corresponding rectangular frame centered on the current source point comprises: constructing a rectangular frame centered on the current source point, extending n times the preset threshold distance in the up, down, left and right four directions.
[0008] In some embodiments of the first aspect of the present application, the first layout and the second layout each include one or more layout patterns; the process of performing a preprocessing operation on the first coordinate point set and the second coordinate point set, respectively, comprises: for each coordinate point of the layout pattern in the first layout, subtracting the vertex coordinates in the first layout from the current coordinate point to generate the first coordinate point set; and / or, for each coordinate point of the layout pattern in the second layout, subtracting the vertex coordinates in the second layout from the current coordinate point to generate the second coordinate point set.
[0009] In some embodiments of the first aspect of the present application, the vertex coordinates include any one of the following coordinates of the bounding box of the first layout: left lower corner point coordinates, right lower corner point coordinates, left upper corner point coordinates, right upper corner point coordinates.
[0010] To achieve the above object and other related objects, the second aspect of the present application provides a layout fuzzy matching device based on Hausdorff distance, comprising: a data acquisition module for acquiring a first layout and a second layout to be executed for fuzzy matching; performing a preprocessing operation on the first coordinate point set and the second coordinate point set, respectively; a distance calculation module for performing a Hausdorff distance calculation operation on the first coordinate point set and the second coordinate point set after the preprocessing operation, respectively, and obtaining the maximum Hausdorff distance based on the calculation result; a fuzzy matching module for judging whether the maximum Hausdorff distance is less than or equal to a preset threshold value, if less than or equal to the preset threshold value, determining that the first layout and the second layout are consistent; otherwise, determining that the first layout and the second layout are inconsistent. Figure One
[0011] To achieve the above object and other related objects, the third aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the Hausdorff distance based fuzzy matching method of a layout.
[0012] To achieve the above object and other related objects, the fourth aspect of the present application provides a computer program product, which includes computer program codes, and when the computer program codes are run on a computer, the computer program codes make the computer implement the Hausdorff distance based fuzzy matching method of a layout.
[0013] To achieve the above object and other related objects, the fifth aspect of the present application provides an electronic terminal, which includes a memory, a processor and a computer program stored in the memory; the processor executes the computer program to implement the Hausdorff distance based fuzzy matching method of a layout.
[0014] As described above, the Hausdorff distance based fuzzy matching method of a layout, the device, the medium, the program product and the terminal of the present application have the following beneficial effects: by obtaining a first layout and a second layout to be executed for fuzzy matching, a preprocessing operation is performed on a coordinate point set in the layout respectively. A Hausdorff distance calculation operation is performed on the first coordinate point set and the second coordinate point set after the preprocessing operation, and a maximum Hausdorff distance is obtained based on the calculation result. By judging whether the maximum Hausdorff distance is less than or equal to a preset threshold value, it is determined whether the first layout and the second layout are consistent. The problem of long operation time and low efficiency of the existing fuzzy matching method of a layout when processing a large-scale layout is solved. The efficiency and accuracy of the fuzzy matching of a layout are significantly improved. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 A flowchart of an embodiment of the Hausdorff distance based fuzzy matching method of a layout of the present application is shown.
[0016] Figure 2 A flowchart of another embodiment of the Hausdorff distance based fuzzy matching method of a layout of the present application is shown.
[0017] Figure 3 A layout diagram in an embodiment of the Hausdorff distance based fuzzy matching method of a layout of the present application is shown.
[0018] Figure 4a A point set diagram in an embodiment of the Hausdorff distance based fuzzy matching method of a layout of the present application is shown.
[0019] Figure 4b A distance calculation process diagram in an embodiment of the Hausdorff distance based fuzzy matching method of a layout of the present application is shown.
[0020] Figure 4c The shortest distance in an embodiment of the layout fuzzy matching method based on Hausdorff distance is shown.
[0021] Figure 4d The distance calculation process in an embodiment of the layout fuzzy matching method based on Hausdorff distance is shown.
[0022] Figure 4e The shortest distance in an embodiment of the layout fuzzy matching method based on Hausdorff distance is shown.
[0023] Figure 4f The maximum distance comparison in an embodiment of the layout fuzzy matching method based on Hausdorff distance is shown.
[0024] Figure 4g The maximum distance in an embodiment of the layout fuzzy matching method based on Hausdorff distance is shown.
[0025] Figure 4h The distance calculation process in an embodiment of the layout fuzzy matching method based on Hausdorff distance is shown.
[0026] Figure 5 The structure of an embodiment of the layout fuzzy matching device based on Hausdorff distance is shown.
[0027] Figure 6 The structure of an embodiment of the layout fuzzy matching terminal based on Hausdorff distance is shown. DETAILED DESCRIPTION
[0028] The embodiments of the present application will be described in detail hereinafter with specific reference to the drawings. The advantages and effects of the present application can be easily understood by those skilled in the art from the content disclosed in the present specification. The present application can also be implemented or applied in other different specific embodiments, and the details in the present specification can be modified or changed based on different views and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0029] Before the present application is further described, the nomenclature and terminology used in the embodiments of the present application are explained, which are applicable to the following explanations:
[0030] <1>Layout Fuzzy Matching: Layout fuzzy matching refers to a technique in the field of integrated circuit design that compares different versions of layout files to identify their similarities or differences. Unlike exact matching, fuzzy matching allows for some degree of deformation, size variation, or local differences to accommodate variations in the actual manufacturing process, design iterations, or intentional modifications. The goal is to determine whether two layouts can be considered the same or have a high degree of correlation within a certain tolerance, commonly used in design verification, IP reuse, physical design optimization, and other aspects.
[0031] <2>One-way Hausdorff Distance: One-way Hausdorff distance is a measure of similarity between two point sets. Given two point sets A and B, the one-way Hausdorff distance from A to B is defined as the maximum distance from any point in set A to the nearest point in set B.
[0032] <3>Two-way Hausdorff Distance: Two-way Hausdorff distance is an extension of one-way Hausdorff distance, used to more comprehensively measure the similarity between two point sets. Given two point sets A and B, the two-way Hausdorff distance is defined as the maximum of the one-way Hausdorff distance from A to B and the one-way Hausdorff distance from B to A. Two-way Hausdorff distance is a symmetric measure that considers the maximum deviation between two point sets, commonly used in image processing, pattern recognition, shape matching, and other fields.
[0033] <4>Layout Bounding Box: Layout bounding box refers to the smallest rectangular area that encloses an integrated circuit layout or a specific graphical element within it, such as a device, cell, or wire. The edges of this rectangle are usually parallel to the coordinate axes and completely contain all the geometric shapes of the layout object. The bounding box is defined by its left-bottom corner and right-top corner coordinates (or width and height), and is a common representation method for describing the range and location of layout objects, widely used in layout data storage, operation, display, and spatial query.
[0034] To facilitate understanding of the embodiments of the present application, first, a layout fuzzy matching method based on Hausdorff distance is described. Figure 1 Detailed description. Figure 1 A flowchart of a layout fuzzy matching method based on Hausdorff distance in an embodiment of the present application is shown. Figure 2 A flowchart of a layout fuzzy matching method based on Hausdorff distance in an embodiment of the present application is shown. The layout fuzzy matching method based on Hausdorff distance in this embodiment mainly includes the following steps:
[0035] Step S11: Obtain a first layout and a second layout to be executed for fuzzy matching; and perform a preprocessing operation on the first coordinate point set and the second coordinate point set, respectively.
[0036] In an embodiment of the present application, the first layout and the second layout each include one or more layout patterns; and the process of performing a preprocessing operation on the first set of coordinate points and the second set of coordinate points respectively includes: for each layout pattern in the first layout, subtracting the vertex coordinate in the first layout from the current coordinate point to generate the first set of coordinate points; and / or for each layout pattern in the second layout, subtracting the vertex coordinate in the second layout from the current coordinate point to generate the second set of coordinate points.
[0037] In the embodiment, the first layout and the second layout to be matched are obtained, as shown in FIG. 1, each of which includes one or more pattern elements defined by coordinate points. Figure 3 The original coordinate data is subjected to a standardization preprocessing: for the first layout, taking the vertex coordinate (x0, y0) of the layout as the reference origin, all pattern coordinate points (x, y) are converted into relative coordinates (x-x0, y-y0) to realize the normalization of the layout data in the local coordinate system; the second layout is subjected to the same processing logic to perform coordinate translation with respect to its own vertex coordinate. This preprocessing method effectively eliminates the difference between the absolute coordinate systems of different layouts and solves the error caused by the inconsistency of the coordinate systems.
[0038] In an embodiment of the present application, the vertex coordinate includes any one of the following coordinates of the boundary box of the first layout: the coordinate of the lower left corner point, the coordinate of the lower right corner point, the coordinate of the upper left corner point, and the coordinate of the upper right corner point. More preferably, the coordinate of the lower left corner point is selected as the vertex coordinate to perform the standardization preprocessing operation.
[0039] In the embodiment, the boundary box refers to a preset rectangular region enclosing all pattern elements of the first layout, and the vertex coordinate refers to the coordinate of the lower left corner (or other agreed reference point) of the rectangle. The boundary box is used to describe the spatial range of the layout to determine the positions of the two layouts to be subjected to fuzzy matching in the coordinate system.
[0040] Step S12: performing a Hausdorff distance calculation operation on the first set of coordinate points and the second set of coordinate points respectively after the preprocessing operation, and obtaining the maximum Hausdorff distance based on the calculation result.
[0041] In an embodiment of the present application, the process of performing Hausdorff distance calculation on the first set of coordinate points and the second set of coordinate points respectively after the pre-processing operation and obtaining the maximum Hausdorff distance based on the calculation result comprises: performing one-way Hausdorff distance calculation on the first set of coordinate points to the second set of coordinate points to obtain a first Hausdorff distance; performing one-way Hausdorff distance calculation on the second set of coordinate points to the first set of coordinate points to obtain a second Hausdorff distance; and performing two-way Hausdorff distance calculation on the first Hausdorff distance and the second Hausdorff distance to obtain the maximum Hausdorff distance.
[0042] In the embodiment, the Hausdorff distance is used to measure the similarity between two sets of point sets of the compared layout. Specifically, the layout to be performed fuzzy comparison includes, the first set of coordinate points is the second set of coordinate points is The one-way Hausdorff distance is shown in formula 1 and formula 2, wherein The one-way Hausdorff distance from the point set A to the point set B is The one-way Hausdorff distance from the point set B to the point set A is For example, the process of calculating the distance from each point a i in the point set A to its nearest point b j in the point set B, these distances are denoted as ‖a i - b j ‖ and sorted, and finally the maximum value of these maximum distances is taken as the value of h(A, B).
[0043] (Formula 1)
[0044] (Formula 2)
[0045] The process of the two-way Hausdorff distance calculation is shown in formula 3. The two-way Hausdorff distance H(A, B) is the larger one of the one-way distances h(A, B) and h(B, A), which is used to measure the maximum mismatch between the two point sets.
[0046] (Formula 3)
[0047] Figures 4a to 4h The calculation process of the one-way Hausdorff distance is shown. First, given two point sets A and B (as shown in Figure 4a ), next, the distances of point a1 to all points in set B are calculated (as shown in Figure 4b ), and compared to obtain the shortest distance (as shown in the red dashed line) Figure 4cThe shortest distance is noted as d(a1, b1). Then, the distances of point a2 to all points in set B are calculated (as shown in FIG. 4B), and the point with the shortest distance is found as shown by the red dashed line, noted as d(a2, b3) (as shown in FIG. 4C). Figure 4d The shortest distance is noted as d(a1, b1). Then, the distances of point a2 to all points in set B are calculated (as shown in FIG. 4B), and the point with the shortest distance is found as shown by the red dashed line, noted as d(a2, b3) (as shown in FIG. 4C). Figure 4e The shortest distance is noted as d(a1, b1). Then, the distances of point a2 to all points in set B are calculated (as shown in FIG. 4B), and the point with the shortest distance is found as shown by the red dashed line, noted as d(a2, b3) (as shown in FIG. 4C). 1, The shortest distance is noted as d(a1, b1). Then, the distances of point a2 to all points in set B are calculated (as shown in FIG. 4B), and the point with the shortest distance is found as shown by the red dashed line, noted as d(a2, b3) (as shown in FIG. 4C). Figure 4f The shortest distance is noted as d(a1, b1). Then, the distances of point a2 to all points in set B are calculated (as shown in FIG. 4B), and the point with the shortest distance is found as shown by the red dashed line, noted as d(a2, b3) (as shown in FIG. 4C). Figure 4g The shortest distance is noted as d(a1, b1). Then, the distances of point a2 to all points in set B are calculated (as shown in FIG. 4B), and the point with the shortest distance is found as shown by the red dashed line, noted as d(a2, b3) (as shown in FIG. 4C). Figure 4h The shortest distance is noted as d(a1, b1). Then, the distances of point a2 to all points in set B are calculated (as shown in FIG. 4B), and the point with the shortest distance is found as shown by the red dashed line, noted as d(a2, b3) (as shown in FIG. 4C).
[0048] Further, in the one-way Hausdorff distance, for example, the process of calculating the distance of each point a i in the point set A to its nearest point b j in the point set B includes the following steps: for any point a i in the point set A, it is necessary to traverse and calculate the Euclidean distance of a j to all points b j in the point set B. The Euclidean distance is a commonly used measure of the straight-line distance between two points in a multi-dimensional space. By comparing these Euclidean distances, the minimum value is found, which is the shortest distance of point a i to the point set B. Repeat the above enumeration calculation for each point in the point set A to obtain the shortest distance set of all points in the point set A to the point set B. Finally, the one-way Hausdorff distance is defined as the maximum value of these shortest distances.
[0049] More preferably, the two-dimensional query tree combined with the rectangular query frame can also be used to achieve efficient calculation of the one-way Hausdorff distance calculation. Specifically, the process of performing a one-way Hausdorff distance calculation operation on a source point set to a target point set includes: constructing a two-dimensional query tree of the source point set and a two-dimensional query tree of the target point set, respectively; for each source point in the source point set, constructing a corresponding rectangular frame with the current source point as the center; applying the coordinates of the current rectangular frame to the two-dimensional query tree of the target point set to obtain all target points falling within the frame; calculating the distance of the current source point to each filtered target point, and extracting the shortest distance as the one-way Hausdorff distance calculation result of the source point.
[0050] In the embodiment, the two-dimensional query trees are constructed respectively from the source point set and the target point set, which greatly improves the calculation efficiency compared with the traditional one-to-one corresponding calculation mode. It should be noted that the source point set and the target point set correspond to the first coordinate point set and the second coordinate point set in the above embodiment. In the embodiment, the one-way Hausdorff distance calculation operation is performed on the first coordinate point set to the second coordinate point set, and the one-way Hausdorff distance calculation operation is performed on the second coordinate point set to the second coordinate point set. The two steps are described and explained.
[0051] Specifically, the embodiment includes the following specific steps. First, two-dimensional query trees are constructed from the source point set and the target point set. The two-dimensional query tree is a tree data structure used to improve the fast query capability of points in a specific area. In the specific implementation process, a two-dimensional query tree TreeA is constructed from the source point set A, and another two-dimensional query tree TreeB is constructed from the target point set B. When performing the one-way Hausdorff distance calculation, each source point in the source point set is processed in turn. For the currently selected source point, a rectangular query frame is constructed around it. The coordinates of the rectangular frame are used to perform a query operation in the two-dimensional query tree TreeB of the target point set. Through this method, all target points located in the rectangular frame can be quickly and accurately obtained, greatly reducing the possibility of invalid distance calculation. Next, for each selected target point, the distance value is obtained by calculating the distance between the current source point and the target point. This process ensures that the shortest distance corresponding to the current source point can be extracted, and thus the one-way Hausdorff distance calculation result of the source point is obtained. Therefore, the whole calculation process fully utilizes the query efficiency of the tree structure, thereby realizing the efficient calculation of the one-way Hausdorff distance under a specific point set. The technical scheme of the embodiment simplifies the distance calculation process by applying the two-dimensional query tree and quickly positioning the rectangular frame, and effectively enhances the operability and reliability in practical applications.
[0052] In an embodiment of the application, the process of performing the one-way Hausdorff distance calculation operation from the source point set to the target point set includes: constructing a two-dimensional query tree of the source point set and a two-dimensional query tree of the target point set; for each source point in the source point set, performing the following operations: constructing a corresponding rectangular frame with the current source point as the center; applying the coordinates of the current rectangular frame to the two-dimensional query tree of the target point set to obtain all target points falling within the frame; calculating the distance from the current source point to each selected target point, and extracting the shortest distance as the one-way Hausdorff distance calculation result of the source point. The process of constructing a corresponding rectangular frame with the current source point as the center includes: constructing a rectangular frame with the current source point as the center, and extending n times the preset threshold distance in the upward, downward, left, and right directions.
[0053] In the embodiment, the distance between the source point and each filtered target point is calculated, and the shortest distance is extracted as the result of the one-way Hausdorff distance calculation of the current source point. Preferably, for any specific point a1 in the point set A, when calculating the distance with all target points in the point set B, in order to optimize the calculation time, the point a1 will be taken as the center point, and a rectangular frame will be constructed around it. The rectangular frame extends n times of the matching threshold thr in each of the four directions, and the value of n is usually greater than 1 to ensure the comprehensiveness of the query. The threshold thr is an adjustable parameter, which can be adjusted according to different process requirements.
[0054] Further, if no point from the target point set B is found in the query frame, the value of h(A, B) can be set to infinity (∞), indicating that the distance between the target point and the current source point is too far under the current threshold condition, and the corresponding target point cannot be found. On the contrary, if there are target points in the query frame, these points can be regarded as the point set B for subsequent distance calculation, so as to obtain a more accurate one-way Hausdorff distance.
[0055] The embodiment provides a new one-way Hausdorff distance calculation method by constructing a two-dimensional query tree and defining a suitable query frame mechanism, solves the problem of low time efficiency in traditional calculation, and effectively improves the speed and accuracy of the calculation process. The embodiment is suitable for various scenarios requiring set distance calculation, and has good application prospect and practical value.
[0056] Step S13: determining whether the maximum Hausdorff distance is less than or equal to a preset threshold. If the maximum Hausdorff distance is less than or equal to the preset threshold, it is determined that the first layout and the second layout are consistent. Figure One If the maximum Hausdorff distance is greater than the preset threshold, it is determined that the first layout and the second layout are inconsistent.
[0057] In the embodiment, in order to realize the fuzzy matching of the layout, after the maximum Hausdorff distance between the two layouts is calculated, it is compared with a preset threshold. If the maximum Hausdorff distance is less than or equal to the threshold, it is considered that the two layouts are basically consistent, that is, the fuzzy matching is realized. Otherwise, it is considered that the two layouts are inconsistent.
[0058] It should be noted that the embodiment itself does not limit the method of how to specifically set the preset threshold. The selection of the preset threshold can be based on different application scenarios, the requirements of the layout matching, and the like. Figure OneThe precision of the consistency requirement and the actual process standard are determined. For example, in some applications with high precision requirements, the preset threshold can be set smaller; and in applications with relatively low precision requirements, the preset threshold can be set relatively larger. In addition, the setting of the preset threshold can also be optimized based on experience, historical data analysis or through experiments.
[0059] The present application is defined as a whole method of determining whether two layouts are consistent by comparing the Hausdorff distance with the preset threshold. Through this method, fuzzy matching of the layout can be realized to determine whether the two layouts have similarity within the allowed error range. Therefore, the core of the present application lies in this fuzzy matching judgment mechanism based on the Hausdorff distance and the preset threshold, rather than the specific setting method of the threshold. The preset threshold can be regarded as an adjustable parameter, and its value is determined by the requirements and background of the specific application.
[0060] In the embodiments of the present application, the same items or similar items with basically the same functions and effects are distinguished by using "first", "second", etc. For example, the first layout and the second layout are only used to distinguish different layouts, and do not limit the sequence. Those skilled in the art can understand that "first", "second", etc. do not limit the quantity and execution order, and "first", "second", etc. also do not necessarily mean different.
[0061] It should be noted that in the embodiments of the present application, "exemplary" or "for example" means an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner.
[0062] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the association between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b or c can represent a, b, c, a-b, a-c, b-c or a-b-c, where a, b and c can be single or multiple.
[0063] Figure 5Fig. 5 is a schematic block diagram of a layout fuzzy matching device 500 based on Hausdorff distance provided by an embodiment of the present application. As shown in Figure 5 Fig. 5, the device includes a data acquisition module 501, a distance calculation module 502 and a fuzzy matching module 503.
[0064] The data acquisition module 501 is configured to acquire a first layout and a second layout to be subjected to fuzzy matching, and perform a preprocessing operation on the first coordinate point set and the second coordinate point set respectively.
[0065] The distance calculation module 502 is configured to perform a Hausdorff distance calculation operation on the first coordinate point set and the second coordinate point set subjected to the preprocessing operation respectively, and obtain a maximum Hausdorff distance based on the calculation result.
[0066] The fuzzy matching module 503 is configured to determine whether the maximum Hausdorff distance is less than or equal to a preset threshold value, and if so, determine that the first layout and the second layout are consistent; otherwise, determine that the first layout and the second layout are inconsistent. Figure One
[0067] It should be understood that the specific process of each module performing the above corresponding steps has been described in detail in the above method embodiment, and thus will not be described here again for the sake of brevity.
[0068] It should also be understood that the division of the modules in the embodiments of the present application is schematic, and is merely a logical functional division. In actual implementation, there can be another division manner. In addition, each functional module in each embodiment of the present application can be integrated in one processor, or can be physically separated, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software functional module.
[0069] Figure 6 Fig. 6 is a schematic block diagram of an electronic terminal provided by an embodiment of the present application. As shown in Figure 6 Fig. 6, the electronic terminal includes at least one processor 601, a memory 602, at least one network interface 603 and a user interface 606. Each component in the device is coupled together through a bus system 604. It can be understood that the bus system 604 is used to realize the connection and communication between the components. The bus system 604 includes a data bus, a power bus, a control bus and a status signal bus in addition. However, for the sake of clarity, all kinds of buses are marked as the bus system in Figure 6 Fig. 6.
[0070] The user interface 606 can include a display, a keyboard, a mouse, a trackball, a click gun, a key, a button, a touchpad or a touch screen, etc.
[0071] It is to be understood that the memory 602 can be volatile or nonvolatile memory, or both. The nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), which is used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as static random access memory (SRAM), synchronous static random access memory (SSRAM). The memory described in the embodiments of the present application is intended to include, but not be limited to, these and any other suitable type of memory.
[0072] The memory 602 in the embodiments of the present application is used to store various types of data to support the operation of the electronic terminal 600. Examples of these data include: any executable program for operating on the electronic terminal 600, such as an operating system 6021 and an application program 6022; the operating system 6021 contains various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application program 6022 can contain various application programs, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. The method for implementing the layout fuzzy matching based on the Hausdorff distance provided by the embodiments of the present application can be included in the application program 6022.
[0073] The method disclosed in the above embodiments of the present application can be applied in the processor 601 or implemented by the processor 601. The processor 601 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by an integrated logic circuit or an instruction in the form of software in the processor 601. The processor 601 described above can be a general-purpose processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The processor 601 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general-purpose processor 601 can be a microprocessor or any conventional processor, etc. The steps of the method for optimizing the accessories provided in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory. The processor reads the information in the memory and combines the hardware to complete the steps of the above method.
[0074] In exemplary embodiments, the electronic terminal 600 can be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), or the like, for performing the aforementioned methods.
[0075] According to the method provided in the embodiments of the present application, the present application further provides a computer program product, which comprises computer program codes, and when the computer program codes are run on a computer, the computer is caused to perform the method for fuzzy layout matching based on Hausdorff distance according to any one of the above-mentioned embodiments.
[0076] According to the method provided in the embodiments of the present application, the present application further provides a computer readable storage medium, which stores program codes, and when the program codes are run on a computer, the computer is caused to perform the method for fuzzy layout matching based on Hausdorff distance according to any one of the above-mentioned embodiments.
[0077] As used in this specification, the terms "component," "module," "system", and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and / or thread of execution and a component can be localized, partially localized, and / or distributed across two or more computers. Also, these components can execute from various computer readable media having various data structures stored thereon. The components can communicate by way of local and / or remote processes such as in accordance with a signal having one or more data packets (e.g., data from one component interacting with another component in a local system, distributed system, and / or across a network such as the Internet with other systems via the signal), software, and / or other means in accordance with the teachings herein.
[0078] Those of skill in the art would understand that the various illustrative logical blocks, modules, and steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of both. The choice of hardware or software, or combinations of both, would be dependent on the specific application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
[0079] Those of skill in the art would understand that, for the purposes of description and enabling the claimed application, the specific process described above for the system, apparatus and unit can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0080] In several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, for example, the division of units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0081] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0082] In addition, the functional units in each embodiment of the present application can be integrated into a processing unit, or each unit can be physically present alone, or two or more units can be integrated into one unit.
[0083] In the above embodiments, the functions of the various functional units can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, the functions can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the whole or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available media sets. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, high-density digital video disc (Digital Video Disc, DVD), or semiconductor media (for example, solid state disk (Solid State Disk, SSD) and the like.
[0084] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and various media that can store program codes.
[0085] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0086] In summary, the present application provides a layout fuzzy matching method and device based on Hausdorff distance, a medium, a program product and a terminal. The first layout and the second layout to be executed for fuzzy matching are obtained, and a preprocessing operation is performed on the coordinate point sets in the layouts respectively. The Hausdorff distance calculation operation is performed on the first coordinate point set and the second coordinate point set after the preprocessing operation, and the maximum Hausdorff distance is obtained based on the calculation result. Whether the first layout and the second layout are consistent is determined by judging whether the maximum Hausdorff distance is less than or equal to a preset threshold. The problem that the existing layout fuzzy matching method has long operation time and low efficiency when processing large-scale layout is solved. The efficiency and accuracy of layout fuzzy matching are significantly improved. Therefore, the present application effectively overcomes various shortcomings in the prior art and has high industrial utilization value.
[0087] The above embodiments only exemplarily illustrate the principles and effects of the present application, and are not used to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes completed by those skilled in the art without departing from the spirit and technical idea disclosed in the present application should be covered by the claims of the present application.
Claims
1. A method for layout fuzzy matching based on Hausdorff distance, characterized in that, The method comprises the following steps: obtaining a first layout and a second layout to be executed for fuzzy matching; respectively performing a preprocessing operation on a first coordinate point set and a second coordinate point set; respectively performing a Hausdorff distance calculation operation on the first coordinate point set and the second coordinate point set subjected to the preprocessing operation, and obtaining a maximum Hausdorff distance based on a calculation result, the process comprising: performing a one-way Hausdorff distance calculation operation on the first coordinate point set directed to the second coordinate point set to obtain a first Hausdorff distance; performing a one-way Hausdorff distance calculation operation on the second coordinate point set directed to the second coordinate point set to obtain a second Hausdorff distance; performing a two-way Hausdorff distance calculation operation on the first Hausdorff distance and the second Hausdorff distance to obtain a maximum Hausdorff distance; the process of performing a one-way Hausdorff distance calculation operation on a source point set directed to a target point set comprising: respectively constructing a two-dimensional query tree of the source point set and a two-dimensional query tree of the target point set; for each source point in the source point set, performing the following operation: constructing a corresponding rectangular frame with the current source point as the center, the process comprising: constructing a rectangular frame with the current source point as the center, extending in the upward, downward, left and right four directions by a distance of n times a preset threshold; applying the coordinates of the current rectangular frame to the two-dimensional query tree of the target point set to obtain all target points falling within the frame; calculating the distance from the current source point to each filtered target point, and extracting the shortest distance as the one-way Hausdorff distance calculation result of the source point; the source point set is the first coordinate point set, and the target point set is the second coordinate point set; judging whether the maximum Hausdorff distance is less than or equal to a preset threshold, if yes, determining that the first layout and the second layout are consistent; otherwise, determining that the first layout and the second layout are inconsistent.
2. The Hausdorff distance based layout fuzzy matching method according to claim 1, wherein, The first layout and the second layout each comprise one or more layout graphs; the process of respectively performing a preprocessing operation on the first coordinate point set and the second coordinate point set comprises: for each coordinate point of a layout graph in the first layout, subtracting a vertex coordinate in the first layout from the current coordinate point to generate a first coordinate point set; and / or for each coordinate point of a layout graph in the second layout, subtracting a vertex coordinate in the second layout from the current coordinate point to generate a second coordinate point set. The vertex coordinate in the first layout comprises any one of the following coordinates of a boundary frame of the first layout: a lower-left corner point coordinate, a lower-right corner point coordinate, an upper-left corner point coordinate, and an upper-right corner point coordinate; and the vertex coordinate in the second layout comprises any one of the following coordinates of a boundary frame of the second layout: a lower-left corner point coordinate, a lower-right corner point coordinate, an upper-left corner point coordinate, and an upper-right corner point coordinate.
3. The Hausdorff distance based layout fuzzy matching method according to claim 2, wherein, The method comprises the following steps:
4. A layout fuzzy matching apparatus based on the Hausdorff distance, characterized by, a data acquisition module for obtaining a first layout and a second layout to be executed for fuzzy matching; respectively performing a preprocessing operation on a first coordinate point set and a second coordinate point set; The distance calculation module is configured to perform Hausdorff distance calculation operation on the first coordinate point set and the second coordinate point set respectively after the preprocessing operation, and obtain the maximum Hausdorff distance based on the calculation result, and the process includes: performing one-way Hausdorff distance calculation operation on the first coordinate point set to the second coordinate point set to obtain the first Hausdorff distance; performing one-way Hausdorff distance calculation operation on the second coordinate point set to the second coordinate point set to obtain the second Hausdorff distance; performing two-way Hausdorff distance calculation operation on the first Hausdorff distance and the second Hausdorff distance to obtain the maximum Hausdorff distance; the process of performing one-way Hausdorff distance calculation operation on the source point set to the target point set includes: constructing two-dimensional query trees of the source point set and the target point set respectively; for each source point in the source point set, the following operation is performed: constructing a corresponding rectangular frame with the current source point as the center, which includes: constructing a rectangular frame with the current source point as the center, extending the distance of n times the preset threshold in the upward, downward, left and right four directions; applying the coordinates of the current rectangular frame to the two-dimensional query tree of the target point set to obtain all target points falling in the frame; calculating the distance from the current source point to each filtered target point, and extracting the shortest distance as the one-way Hausdorff distance calculation result of the source point; The fuzzy matching module is configured to judge whether the maximum Hausdorff distance is less than or equal to a preset threshold, if yes, it is determined that the first layout and the second layout are consistent; otherwise, it is determined that the first layout and the second layout are inconsistent.
5. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the layout fuzzy matching method based on Hausdorff distance in any one of claims 1 to 3.
6. A computer program product, characterised in that, The computer program product includes computer program code, when the computer program code is run on the computer, so that the computer realizes the layout fuzzy matching method based on Hausdorff distance in any one of claims 1 to 3.
7. An electronic terminal comprising a memory, a processor and a computer program stored on the memory, characterized in that, The processor executes the computer program to realize the layout fuzzy matching method based on Hausdorff distance in any one of claims 1 to 3.
Citation Information
Patent Citations
Layout fuzzy matching method and device, storage medium and electronic equipment
CN120011829A