A graphic matching method, device, equipment and medium
By marking anchor points and extracting relative coordinates for the matching target graph, combined with anchor points in the preset graphic layout, the problem of exponential growth in the graph matching time and computing power costs caused by the reduction of integrated circuit nodes is solved, and the rapid matching between graphs and layouts and resource savings are achieved.
Patent Information
- Application Number
- CN202510066381.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-16
AI Technical Summary
As integrated circuit nodes enter below 28 nanometers, the complexity of the graphics structure and the number of graphics elements of the layout have expanded dramatically, resulting in the challenge of exponential growth in terms of time cost and computing power requirements in traditional graphics matching technologies.
By marking the matching target graph, the shape information and relative coordinates of the anchor graph are extracted, the initial anchor graph is marked in the preset graphic layout, and the anchor graph search and match is performed based on the relative coordinates and shape information until all anchor graphs are matched.
This method significantly reduces the time and machine resources required for graph matching by reducing the number of matches and narrowing the search range, achieving rapid matching of graphs and layouts.
Smart Images

Figure CN119478464B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of pattern matching technology, and in particular to a pattern matching method, device, equipment and medium. Background Art
[0002] As integrated circuit nodes enter below 28 nanometers, the complexity of the graphic structure of the layout increases rapidly, and the number of graphic elements in the layout also expands sharply. Therefore, the number of rule-based design rule checking (DRC) projects in advanced processes has also shown an exponential growth trend. Rule-based DRC tools, which are crucial in physical verification, face unprecedented challenges. Traditional graphic matching technology matches graphics with corresponding features one by one in the complete layout based on all the geometric features of the acquired graphics. As the technology nodes advance, the complexity of the layout and the acquired graphics has almost doubled, resulting in an exponential increase in the time cost and computing power required to match the graphics.
[0003] In summary, how to achieve fast matching of graphics and layout and reduce time cost and computing power cost is a technical problem to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a graphic matching method, device, equipment and medium, which can realize fast matching between graphics and layout, and reduce time cost and computing cost. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a graph matching method, comprising:
[0006] Anchor point marking is performed on the target graphic to be matched, so as to obtain a plurality of anchor point graphics of the target graphic to be matched;
[0007] Extracting shape information of each of the anchor graphics and relative coordinates of each of the anchor graphics relative to an initial anchor graphics; wherein the initial anchor graphics is any one of the anchor graphics;
[0008] Marking a target pattern identical to the initial anchor point pattern in a preset graphic layout to obtain a marked graphic layout;
[0009] Taking each target pattern in the marked graphic layout as a matching reference point, searching and matching anchor point graphics on the marked graphic layout after matching is completed according to the relative coordinates, the shape information and in the order of anchor point matching, until all the anchor point graphics are matched, so as to obtain a final marked graphic layout;
[0010] The pattern matching of the target graphic to be matched is performed in the anchor point marking area of the final marked graphic layout to obtain a corresponding matching result.
[0011] Optionally, the anchor point marking of the target graphic to be matched to obtain a plurality of anchor point graphics of the target graphic to be matched includes:
[0012] A plurality of graphics satisfying the graphic position condition and the graphic shape condition are selected and marked in the target graphics to be matched, so as to obtain a plurality of anchor point graphics.
[0013] Optionally, extracting shape information of each anchor point graphic and relative coordinates of each anchor point graphic relative to an initial anchor point graphic includes:
[0014] The position of the initial anchor point graphic is set as the origin of the coordinate system, and a coordinate system is constructed with the horizontal direction of the initial anchor point graphic as the horizontal axis and the vertical direction as the vertical axis;
[0015] Respectively acquiring coordinate information of each of the anchor point graphics in the coordinate system to obtain relative coordinates of each of the anchor point graphics relative to the initial anchor point graphics;
[0016] Shape information is extracted from each of the anchor point graphics to obtain shape information of each anchor point graphic.
[0017] Optionally, marking a target pattern identical to the initial anchor point pattern in a preset graphic layout to obtain a marked graphic layout includes:
[0018] The shape information of the initial anchor point graphic is used to search and match the anchor point graphic in the preset graphic layout to determine a pattern in the preset graphic layout with the same shape as the initial anchor point graphic as the target pattern to obtain the marked graphic layout.
[0019] Optionally, searching and matching anchor point graphics on the marked graphic layout after matching is completed according to the relative coordinates and the shape information and in an anchor point matching order until all the anchor point graphics are matched to obtain a final marked graphic layout, including:
[0020] An anchor point graphic is determined as the current anchor point graphic to be matched using the anchor point matching order;
[0021] Determine the matching position of the current to-be-matched anchor point graphic in the vicinity of each matching reference point in the marked graphic layout using the relative coordinates of the current to-be-matched anchor point graphic;
[0022] Compare the layout pattern located at the matching position with the shape information of the current anchor point graphic to be matched, so as to determine whether there is a pattern in the preset graphic layout that has the same shape as the current anchor point graphic to be matched based on the comparison result;
[0023] Determine the next anchor point graphic as the current anchor point graphic to be matched according to the anchor point matching order, and jump to execute the step of using the relative coordinates of the current anchor point graphic to be matched in the vicinity of each matching reference point in the marked graphic layout to determine the matching position of the current anchor point graphic to be matched, until all the anchor point graphics complete the matching process to obtain the final marked graphic layout.
[0024] Optionally, determining whether there is a pattern in the preset graphic layout that has the same shape as the current anchor point graphic to be matched based on the comparison result includes:
[0025] If the layout pattern at the matching position has the same shape information as the current anchor point graphic to be matched, it is determined that there is a pattern with the same shape as the current anchor point graphic to be matched in the preset graphic layout, and an anchor point is marked at the matching position in the marked graphic layout to obtain an updated marked graphic layout;
[0026] If the layout pattern at the matching position is different from the shape information of the current anchor point graphic to be matched, it is determined that there is no pattern with the same shape as the current anchor point graphic to be matched in the preset graphic layout, and updating of the marked graphic layout is prohibited.
[0027] Optionally, performing pattern matching of the target graphic to be matched in the anchor point mark area of the final marked graphic layout to obtain a corresponding matching result includes:
[0028] According to the preset area screening requirements, a number of anchor point marking areas are screened in the final marked graphic layout;
[0029] According to the preset graphic pattern matching rules, pattern matching of the target graphics to be matched is performed in each anchor point mark area respectively to obtain corresponding matching results.
[0030] In a second aspect, the present application discloses a pattern matching device, comprising:
[0031] An anchor point marking module, used for marking anchor points of a target graphic to be matched, so as to obtain a plurality of anchor point graphics of the target graphic to be matched;
[0032] An information extraction module, used to extract shape information of each of the anchor graphics and relative coordinates of each of the anchor graphics relative to an initial anchor graphics; wherein the initial anchor graphics is any one of the anchor graphics;
[0033] A layout marking module, used to mark a target pattern identical to the initial anchor point pattern in a preset graphic layout to obtain a marked graphic layout;
[0034] A first matching module is used to use each target pattern in the marked graphic layout as a matching reference point, and perform anchor point graphics search and matching on the marked graphic layout after matching according to the relative coordinates, the shape information and in an anchor point matching order, until all the anchor point graphics are matched, so as to obtain a final marked graphic layout;
[0035] The second matching module is used to perform pattern matching of the target graphic to be matched in the anchor point mark area of the final marked graphic layout to obtain a corresponding matching result.
[0036] In a third aspect, the present application discloses an electronic device, comprising:
[0037] Memory, used to store computer programs;
[0038] The processor is used to execute the computer program to implement the steps of the aforementioned disclosed graphic matching method.
[0039] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed graphic matching method are implemented.
[0040] It can be seen that the present application discloses a graphic matching method, including: anchoring a target graphic to be matched to obtain a plurality of anchor graphics of the target graphic to be matched; extracting shape information of each anchor graphics and relative coordinates of each anchor graphics relative to an initial anchor graphics; wherein the initial anchor graphics is any one of the anchor graphics; marking a target pattern identical to the initial anchor graphics in a preset graphic layout to obtain a marked graphic layout; using each target pattern in the marked graphic layout as a matching reference point, searching and matching anchor graphics on the marked graphic layout after matching is completed according to the relative coordinates, the shape information and in the order of anchor matching, until all the anchor graphics are matched to obtain a final marked graphic layout; performing pattern matching of the target graphic to be matched in the anchor mark area of the final marked graphic layout to obtain a corresponding matching result. It can be seen that by marking several anchor graphics in the target graphics to be matched, after the initial anchor graphics are completely matched in the preset graphics layout, the remaining anchor graphics only need to be searched and matched in the vicinity of the previously successfully matched anchor graphics according to the relative coordinates, reducing the number of matches and narrowing the search range. In this way, the high-complexity and large-number graphics matching steps are simplified to low-complexity and small-graphic anchor matching, greatly reducing the time and machine resources required for pattern matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0042] Figure 1 A flow chart of a graphic matching method disclosed in this application;
[0043] Figure 2 A schematic diagram of a target graphic structure to be matched disclosed in this application;
[0044] Figure 3 A schematic diagram of an anchor point graphic mark disclosed in this application;
[0045] Figure 4 A schematic diagram of a preset graphic layout structure disclosed in this application;
[0046] FIG5 (a) is a schematic diagram of a preset graphic layout matching initial anchor point graphic result disclosed in the present application;
[0047] FIG5( b ) is a schematic diagram of a result of matching a preset graphic layout with a second anchor point graphic disclosed in the present application;
[0048] FIG5( c ) is a schematic diagram of a result of matching a preset graphic layout with a third anchor point graphic disclosed in the present application;
[0049] FIG5( d ) is a schematic diagram of a pattern matching result of a final marked graphic layout disclosed in the present application;
[0050] Figure 6 A schematic diagram of the structure of a pattern matching device disclosed in this application;
[0051] Figure 7 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0053] As integrated circuit nodes enter below 28 nanometers, the complexity of the graphic structure of the layout increases rapidly, and the number of graphic elements in the layout also expands sharply. Therefore, the number of rule-based design rule checking (DRC) projects in advanced processes has also shown an exponential growth trend. Rule-based DRC tools, which are crucial in physical verification, face unprecedented challenges. Traditional graphic matching technology matches graphics with corresponding features one by one in the complete layout based on all the geometric features of the acquired graphics. As the technology nodes advance, the complexity of the layout and the acquired graphics has almost doubled, resulting in an exponential increase in the time cost and computing power required to match the graphics.
[0054] To this end, the present invention provides a graphic matching solution that can achieve rapid matching of graphics and layouts, reducing time costs and computing power costs.
[0055] Reference Figure 1 As shown, an embodiment of the present invention discloses a graphic matching method, including:
[0056] Step S11: Anchor point marking is performed on the target graphic to be matched, so as to obtain a plurality of anchor point graphics of the target graphic to be matched.
[0057] In this embodiment, several graphics that meet the graphic position conditions and graphic shape conditions are selected and marked in the target graphic to be matched to obtain several anchor graphics. It is understandable that on the basis of the graphic library or the custom graphic, the anchor graphics are manually marked, and the order of marking is obtained to obtain several anchor graphics and the marking order, wherein the graphic matching library is a graphic library of the integrated circuit layout. This graphic library is a collection of graphics previously collected for Pattern Matching, and these graphics may be obtained in a variety of ways. For example, defective graphic structures found in previous integrated circuit designs, or hot spot graphics that may have problems obtained through simulation software, etc., are not specifically limited to this.
[0058] In a specific implementation, when an anchor graphic is to be marked, the graphic features of certain graphics are screened out from the graphics library as the graphic shape conditions for marking the anchor graphics. At the same time, the graphic position conditions for screening the anchor graphics in this solution are further determined based on the position information of each graphic in the layout stored in the graphics library. Among them, the graphic position conditions are to screen out key features for use in the subsequent matching process, and the key features include graphics with critical positions, special shapes, or easy to use as reference points in the layout. For example, in a graphics library that stores various circuit element layout graphics, for a complex chip layout verification process, the layout graphics of key functional modules in the chip (such as specific graphics of the core part of the processor) will be selected as anchor graphics, because these graphics are crucial to the function and layout of the entire chip, and using them as anchors can better match and verify the layout.
[0059] Another specific implementation method is that when an anchor graphic is to be marked, a graphic that meets the customized conditions is selected from the current target graphic to be matched as the anchor graphic according to a manual customization method. Manual customization is not based on the relationship between historical graphics and the layout like a graphics library, but manual customization can flexibly adapt to the anchor graphic screening scenarios of the target graphic to be matched in various real scenarios.
[0060] In this embodiment, in the process of filtering anchor point graphics, the filtered anchor point graphics are also marked one by one, and a marking order of the anchor point graphics is formed. The above marking order can be used as a subsequent anchor point matching order, or it may not be used as an anchor point matching order, and there is no specific limitation on this.
[0061] In this embodiment, the number of anchor graphics to be screened needs to be more than two, and the maximum number may be the total number of graphics included in the current target to be matched.
[0062] Reference Figure 2 As shown in FIG. 1 , a target graphic to be matched is shown, and the shaded parts in the figure are the target graphics. Figure 2 It can be seen that there are several graphics of different shapes and numbers in the target graphics to be matched. After marking the anchor points in the target graphics to be matched, the anchor point graphics can be obtained, such as Figure 3 As shown, the anchor graphs are 3 anchor graphs selected from 9 target graphs, and the marking order is used as the anchor matching order.
[0063] Step S12: extracting shape information of each of the anchor graphics and relative coordinates of each of the anchor graphics with respect to an initial anchor graphics; wherein the initial anchor graphics is any one of the anchor graphics.
[0064] In this embodiment, after determining each anchor point graphic of the target graphic to be matched, the shape information of each anchor point graphic is extracted. At the same time, a graphic is determined from each anchor point graphic as the initial anchor point graphic, wherein, when the anchor point matching order is the marking order, the initial anchor point graphic is the first marked anchor point graphic, and when the anchor point matching order is manually customized, the initial anchor point graphic is the graphic under the customized rule.
[0065] In this embodiment, the position of the initial anchor point graphic is set as the origin of the coordinate system, and the coordinate system is constructed with the horizontal direction of the initial anchor point graphic as the horizontal axis and the vertical direction as the vertical axis; the coordinate information of each anchor point graphic in the coordinate system is obtained respectively to obtain the relative coordinates of each anchor point graphic relative to the initial anchor point graphic; the shape information of each anchor point graphic is extracted to obtain the shape information of each anchor point graphic. It can be understood that the lower left corner of the initial anchor point graphic is set as the origin of the coordinate system, and the plane rectangular coordinate system is constructed with the horizontal direction as the x-axis coordinate and the numerical direction as the y-axis. In this way, the coordinate information of other anchor point graphics in the current coordinate system can be obtained, wherein the coordinate information of the lower left corner (first take the leftmost, then take the bottom) of each anchor point graphic is used as the coordinate information of the anchor point graphic, that is, the relative coordinates of each anchor point graphic relative to the initial anchor point graphic.
[0066] Step S13: marking a target pattern identical to the initial anchor point pattern in a preset graphic layout to obtain a marked graphic layout.
[0067] In this embodiment, the shape information of the initial anchor point graphic is used to search and match the anchor point graphic in the preset graphic layout to determine the pattern in the preset graphic layout with the same shape as the initial anchor point graphic as the target pattern to obtain the marked graphic layout. It can be understood that the pattern matching process is performed in the preset graphic layout using the initial anchor point graphic to mark all the patterns in the preset graphic layout that meet the initial anchor point graphic, wherein the preset graphic layout is as follows: Figure 4 As shown by Figure 4 It can be seen that there are a large number of complex layout graphics in the current layout, and they are densely distributed. After executing the Pattern Matching matching process of the initial anchor point graphic in the preset graphic layout, the matching result is shown in Figure 5 (a). The red rectangular part in Figure 5 (a) is the pattern matched by this matching process that is the same as the initial anchor point graphic.
[0068] Step S14: taking each of the target patterns in the marked graphic layout as a matching reference point, searching and matching anchor point graphics on the marked graphic layout after matching is completed according to the relative coordinates, the shape information and in the order of anchor point matching, until all the anchor point graphics are matched to obtain the final marked graphic layout.
[0069] In this embodiment, an anchor point graphic is determined as the current anchor point graphic to be matched using the anchor point matching order; the matching position of the current anchor point graphic to be matched is determined in the vicinity of each matching reference point in the marked graphic layout using the relative coordinates of the current anchor point graphic; the layout pattern located at the matching position is compared with the shape information of the current anchor point graphic to be matched, so as to determine whether there is a pattern in the preset graphic layout with the same shape as the current anchor point graphic to be matched based on the comparison result; the next anchor point graphic is determined as the current anchor point graphic to be matched according to the anchor point matching order, and the step of determining the matching position of the current anchor point graphic to be matched in the vicinity of each matching reference point in the marked graphic layout using the relative coordinates of the current anchor point graphic to be matched is jumped to execute, until all the anchor point graphics complete the matching process, so as to obtain the final marked graphic layout. Specifically, if the layout pattern located at the matching position is the same as the shape information of the current anchor point graphic to be matched, it is determined that there is a pattern with the same shape as the current anchor point graphic to be matched in the preset graphic layout, and the anchor point is marked at the matching position in the marked graphic layout to obtain an updated marked graphic layout; if the layout pattern located at the matching position is different from the shape information of the current anchor point graphic to be matched, it is determined that there is no pattern with the same shape as the current anchor point graphic to be matched in the preset graphic layout, and updating of the marked graphic layout is prohibited. It can be understood that, based on the initial anchor point graph, that is, based on the marked graphic layout, according to the relative coordinates of other recorded anchor point graphs relative to the initial anchor point graph, it is searched whether there is a pattern that satisfies the second anchor point graph, that is, the layout marking result shown in Figure 5 (b) is obtained, and then, near the graph that satisfies the first two anchor point graphs, the third anchor point graph is searched according to the relative coordinates, that is, the layout marking result shown in Figure 5 (c) is obtained, and the fourth anchor point is defined according to the relative positions of the first three anchor points, and the fifth anchor point is defined according to the relative positions of the first four anchor points, ..., until all anchor point graphs are matched, and this area is marked according to the distribution of the anchor points to obtain the final marked graphic layout. In this way, according to the graphics and relative coordinates of the defined anchor points, the range of the next anchor point marking is narrowed after each anchor point graphic marking, so as to achieve the purpose of narrowing the area used for the final Pattern Matching, and simplify the high-complexity and large-number graphic matching steps to low-complexity and small-graphic anchor point matching, which greatly reduces the time and machine resources required for pattern matching.
[0070] Step S15: performing pattern matching of the target graphic to be matched in the anchor point marked area of the final marked graphic layout to obtain a corresponding matching result.
[0071] In this embodiment, several anchor point marked areas are selected in the final marked graphic layout according to the preset area screening requirements; the pattern matching of the target graphic to be matched is performed in each anchor point marked area according to the preset graphic pattern matching rules to obtain the corresponding matching results. It can be understood that the marked areas that meet the requirements of all anchor point graphic marked areas are screened out in the final marked graphic layout. Taking Figure 5 (d) as an example, it is finally determined that there is only one marked area, and then the pattern matching of the target graphic to be matched is performed on this area again according to the Pattern Matching matching process to obtain the final matching result. Among them, the Pattern Matching matching process is as follows:
[0072] 1) Get the graphics:
[0073] Extract defects existing in the process or hot spot graphic structures obtained by simulation through the layout browsing tool; use the layout coordinates and read the graphics specified in the coordinates in the layout through the Pattern Matching tool; define the required pattern shape through the rule language or customize the required pattern shape in the Pattern Matching tool.
[0074] 2) Define the graph:
[0075] Collect the graphics obtained in step 1) in the defect graphics library and edit the graphics, such as adding fuzzy matching options, adding rotation matching directions, specifying output markers, etc.
[0076] 3) Matching graphics:
[0077] Use the graphic library established in step 2) to perform graphic matching on the design layout to find out the structural position of the defective graphic in the design layout.
[0078] In this way, taking the case where there are 9 target graphics to be matched as an example, assuming that the number of graphics in the layout is n (the order of n is usually more than 10 million), the traditional method needs to perform more than 9n matching operations. However, with the method of the present invention, after marking the anchor point graphics and giving the matching order, except for the first anchor point graphic that needs to traverse the entire layout (n matching operations), the number of matching operations for the remaining 8 anchor point graphics is greatly reduced, and the final number of matching operations is about n, thereby greatly reducing the Pattern Matching time and saving machine resources.
[0079] It can be seen that the present application discloses a graphic matching method, including: anchoring a target graphic to be matched to obtain a plurality of anchor graphics of the target graphic to be matched; extracting shape information of each anchor graphics and relative coordinates of each anchor graphics relative to an initial anchor graphics; wherein the initial anchor graphics is any one of the anchor graphics; marking a target pattern identical to the initial anchor graphics in a preset graphic layout to obtain a marked graphic layout; using each target pattern in the marked graphic layout as a matching reference point, searching and matching anchor graphics on the marked graphic layout after matching is completed according to the relative coordinates, the shape information and in the order of anchor matching, until all the anchor graphics are matched to obtain a final marked graphic layout; performing pattern matching of the target graphic to be matched in the anchor mark area of the final marked graphic layout to obtain a corresponding matching result. It can be seen that by marking several anchor graphics in the target graphics to be matched, after the initial anchor graphics are completely matched in the preset graphics layout, the remaining anchor graphics only need to be searched and matched in the vicinity of the previously successfully matched anchor graphics according to the relative coordinates, reducing the number of matches and narrowing the search range. In this way, the high-complexity and large-number graphics matching steps are simplified to low-complexity and small-graphic anchor matching, greatly reducing the time and machine resources required for pattern matching.
[0080] Reference Figure 6 As shown, the present invention also discloses a graphic matching device, including:
[0081] An anchor point marking module 11, used for marking anchor points of a target graphic to be matched, so as to obtain a plurality of anchor point graphics of the target graphic to be matched;
[0082] An information extraction module 12, used to extract shape information of each of the anchor graphics and relative coordinates of each of the anchor graphics relative to an initial anchor graphics; wherein the initial anchor graphics is any one of the anchor graphics;
[0083] A layout marking module 13 is used to mark a target pattern identical to the initial anchor point pattern in a preset graphic layout to obtain a marked graphic layout;
[0084] A first matching module 14 is used to use each target pattern in the marked graphic layout as a matching reference point, and perform anchor point graphics search and matching on the marked graphic layout after matching according to the relative coordinates, the shape information and in an anchor point matching order, until all the anchor point graphics are matched, so as to obtain a final marked graphic layout;
[0085] The second matching module 15 is used to perform pattern matching of the target graphic to be matched in the anchor point mark area of the final marked graphic layout to obtain a corresponding matching result.
[0086] It can be seen that the present application discloses anchor point marking of a target graphic to be matched to obtain several anchor point graphics of the target graphic to be matched; extracting shape information of each anchor point graphic and relative coordinates of each anchor point graphic relative to an initial anchor point graphic; wherein the initial anchor point graphic is any one of the anchor point graphics; marking a target pattern identical to the initial anchor point graphic in a preset graphic layout to obtain a marked graphic layout; using each target pattern in the marked graphic layout as a matching reference point, searching and matching anchor point graphics on the marked graphic layout after matching is completed according to the relative coordinates, the shape information and in the order of anchor point matching, until all the anchor point graphics are matched to obtain a final marked graphic layout; performing pattern matching of the target graphic to be matched in the anchor point marked area of the final marked graphic layout to obtain a corresponding matching result. It can be seen that by marking several anchor graphics in the target graphics to be matched, after the initial anchor graphics are completely matched in the preset graphics layout, the remaining anchor graphics only need to be searched and matched in the vicinity of the previously successfully matched anchor graphics according to the relative coordinates, reducing the number of matches and narrowing the search range. In this way, the high-complexity and large-number graphics matching steps are simplified to low-complexity and small-graphic anchor matching, greatly reducing the time and machine resources required for pattern matching.
[0087] Furthermore, the present application also discloses an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0088] Figure 7 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the graphic matching method disclosed in any of the above embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0089] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0090] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0091] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0092] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the graphic matching method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data transmitted from an external device received by the electronic device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0093] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed graphic matching method. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0094] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0095] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly with hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory RAM (Random Access Memory), memory, read-only memory ROM (Read Only Memory), electrically programmable EPROM (Electrically Programmable Read Only Memory), electrically erasable programmable EEPROM (ElectricErasable Programmable Read Only Memory), register, hard disk, removable disk, CD-ROM (CompactDisc-Read Only Memory), or any other form of storage medium known in the technical field.
[0096] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0097] The scheme provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A pattern matching method, characterized in that: include: Anchor point marking is performed on the target graphic to be matched, so as to obtain a plurality of anchor point graphics of the target graphic to be matched; Extracting shape information of each of the anchor graphics and relative coordinates of each of the anchor graphics relative to an initial anchor graphics; wherein the initial anchor graphics is any one of the anchor graphics; Marking a target pattern identical to the initial anchor point pattern in a preset graphic layout to obtain a marked graphic layout; Taking each of the target patterns in the marked graphic layout as a matching reference point, searching and matching anchor point graphics on the marked graphic layout after matching is completed according to the relative coordinates, the shape information and in the anchor point matching order, until all the anchor point graphics are matched, so as to obtain a final marked graphic layout; wherein the final marked graphic layout is a graphic layout obtained after dynamically matching and updating the marked graphic layout based on the anchor point matching order; Performing pattern matching of the target graphic to be matched in the anchor point marked area of the final marked graphic layout to obtain a corresponding matching result; The step of performing pattern matching of the target graphic to be matched in the anchor point mark area of the final marked graphic layout to obtain a corresponding matching result includes: Selecting a number of anchor point marked areas in the final marked graphic layout according to preset area screening requirements; According to the preset graphic pattern matching rules, pattern matching of the target graphic to be matched is performed in each anchor point mark area to obtain corresponding matching results; wherein the preset graphic pattern matching rules include fuzzy matching and rotation matching.
2. The pattern matching method according to claim 1, characterized in that: The anchor point marking of the target graphic to be matched to obtain a plurality of anchor point graphics of the target graphic to be matched includes: A plurality of graphics satisfying the graphic position condition and the graphic shape condition are selected and marked in the target graphics to be matched, so as to obtain a plurality of anchor point graphics.
3. The pattern matching method according to claim 1, characterized in that: The extracting the shape information of each anchor point graphic and the relative coordinates of each anchor point graphic relative to the initial anchor point graphic includes: The position of the initial anchor point graphic is set as the origin of the coordinate system, and a coordinate system is constructed with the horizontal direction of the initial anchor point graphic as the horizontal axis and the vertical direction as the vertical axis; Respectively acquiring coordinate information of each of the anchor point graphics in the coordinate system to obtain relative coordinates of each of the anchor point graphics relative to the initial anchor point graphics; Shape information is extracted from each of the anchor point graphics to obtain shape information of each anchor point graphic.
4. The pattern matching method according to claim 1, characterized in that: The step of marking a target pattern identical to the initial anchor point pattern in a preset graphic layout to obtain a marked graphic layout includes: The shape information of the initial anchor point graphic is used to search and match the anchor point graphic in the preset graphic layout to determine a pattern in the preset graphic layout with the same shape as the initial anchor point graphic as the target pattern to obtain the marked graphic layout.
5. The pattern matching method according to claim 1, characterized in that: The anchor point graphics search and matching is performed on the marked graphic layout after matching according to the relative coordinates and the shape information and in the order of anchor point matching, until all the anchor point graphics are matched to obtain the final marked graphic layout, including: An anchor point graphic is determined as the current anchor point graphic to be matched using the anchor point matching order; Determine the matching position of the current to-be-matched anchor point graphic in the vicinity of each matching reference point in the marked graphic layout using the relative coordinates of the current to-be-matched anchor point graphic; Compare the layout pattern located at the matching position with the shape information of the current anchor point graphic to be matched, so as to determine whether there is a pattern in the preset graphic layout that has the same shape as the current anchor point graphic to be matched based on the comparison result; Determine the next anchor point graphic as the current anchor point graphic to be matched according to the anchor point matching order, and jump to execute the step of using the relative coordinates of the current anchor point graphic to be matched in the vicinity of each matching reference point in the marked graphic layout to determine the matching position of the current anchor point graphic to be matched, until all the anchor point graphics complete the matching process to obtain the final marked graphic layout.
6. The pattern matching method according to claim 5, characterized in that: The determining, based on the comparison result, whether there is a pattern in the preset graphic layout that has the same shape as the current anchor point graphic to be matched comprises: If the layout pattern at the matching position has the same shape information as the current anchor point graphic to be matched, it is determined that there is a pattern with the same shape as the current anchor point graphic to be matched in the preset graphic layout, and an anchor point is marked at the matching position in the marked graphic layout to obtain an updated marked graphic layout; If the layout pattern at the matching position is different from the shape information of the current anchor point graphic to be matched, it is determined that there is no pattern with the same shape as the current anchor point graphic to be matched in the preset graphic layout, and updating of the marked graphic layout is prohibited.
7. A pattern matching device, characterized in that: include: An anchor point marking module, used for marking anchor points of a target graphic to be matched, so as to obtain a plurality of anchor point graphics of the target graphic to be matched; An information extraction module, used to extract shape information of each of the anchor graphics and relative coordinates of each of the anchor graphics relative to an initial anchor graphics; wherein the initial anchor graphics is any one of the anchor graphics; A layout marking module, used to mark a target pattern identical to the initial anchor point pattern in a preset graphic layout to obtain a marked graphic layout; A first matching module is used to use each of the target patterns in the marked graphic layout as a matching reference point, and to search and match anchor point graphics on the marked graphic layout after matching according to the relative coordinates, the shape information and in an anchor point matching order, until all the anchor point graphics are matched, so as to obtain a final marked graphic layout; wherein the final marked graphic layout is a graphic layout obtained after dynamically matching and updating the marked graphic layout based on the anchor point matching order; A second matching module, used for performing pattern matching of the target graphic to be matched in the anchor point mark area of the final marked graphic layout to obtain a corresponding matching result; The second matching module is specifically used to screen a number of anchor point marked areas in the final marked graphic layout according to preset area screening requirements; and perform pattern matching of the target graphic to be matched in each anchor point marked area according to preset graphic pattern matching rules to obtain corresponding matching results; wherein the preset graphic pattern matching rules include fuzzy matching and rotation matching.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the graphic matching method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the graphic matching method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
A multiple-subarea matching method constraint by a space relation
CN103337068A