CN114283437A - Legend identification method, device, equipment and storage medium - Google Patents

Legend identification method, device, equipment and storage medium Download PDF

Info

Publication number
CN114283437A
CN114283437A CN202111369485.8A CN202111369485A CN114283437A CN 114283437 A CN114283437 A CN 114283437A CN 202111369485 A CN202111369485 A CN 202111369485A CN 114283437 A CN114283437 A CN 114283437A
Authority
CN
China
Prior art keywords
legend
frame
data
block
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111369485.8A
Other languages
Chinese (zh)
Inventor
刘浩
张伟
於其之
张华安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wanyi Technology Co Ltd
Original Assignee
Wanyi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wanyi Technology Co Ltd filed Critical Wanyi Technology Co Ltd
Priority to CN202111369485.8A priority Critical patent/CN114283437A/en
Publication of CN114283437A publication Critical patent/CN114283437A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to a legend identification method, apparatus, device and storage medium. The method comprises the steps of obtaining a drawing file to be identified; identifying drawing frame data in a drawing file; screening a target picture frame comprising a legend symbol table from the picture frame data; screening a graph example symbol table from the picture frame information corresponding to the target picture frame; extracting at least one legend block in the legend symbol table; determining row data and column data of a unit cell to which each legend block belongs in at least one legend block; respectively determining legend names corresponding to the legend blocks based on the row data and the column data; and associating the legend block and legend name corresponding to each other. When the legend block is identified, the drawing file can be directly identified without converting the drawing file into an image, so that the identification precision is high.

Description

Legend identification method, device, equipment and storage medium
Technical Field
The present application relates to the field of computers, and in particular, to a method, an apparatus, a device, and a storage medium for legend identification.
Background
In the design of drawing files in the field of building design, name information corresponding to different legend symbols is generally described by using a legend. However, different designers have different design styles, so that the same legend symbol may have different meanings or the same name information may have multiple legend symbols in different drawing documents. Therefore, when the design drawing file is checked, different legends need to be rapidly identified, and the legend identification is rapidly carried out, so that the working efficiency of checking the drawing file is improved.
Currently, when identifying a legend on a drawing file, the drawing file needs to be printed as an image, and the legend is identified based on the printed image. However, since the pixels of the legend in the image are small, there is a problem that the recognition accuracy is not high.
Disclosure of Invention
The application provides a legend identification method, a legend identification device, legend identification equipment and a storage medium, which are used for solving the problem of low identification precision when legend identification is carried out on an image based on a drawing.
In a first aspect, a legend identification method is provided, including:
acquiring a drawing file to be identified;
identifying drawing frame data in the drawing file;
screening a target picture frame comprising a legend symbol table from the picture frame data;
screening the legend symbol table from the picture frame information corresponding to the target picture frame;
extracting at least one legend block in the legend symbol table;
determining row data and column data of a unit cell to which each legend block belongs in the at least one legend block;
respectively determining legend names corresponding to the legend blocks based on the row data and the column data;
and associating the legend block and legend name corresponding to each other.
Optionally, acquiring a drawing file to be identified includes:
acquiring a file hash value of the drawing file;
and acquiring the drawing file based on the storage position indicated by the file hash value.
Optionally, the screening, from the frame data, an object frame including a legend table includes:
acquiring at least one picture frame in the picture frame data;
acquiring a frame type of each frame in the at least one frame;
based on the frame type, screening the at least one frame to obtain a frame of which the frame type indicates a diagram class;
and taking the frame of the indication legend class as the target frame.
Optionally, the selecting the legend symbol table from the frame information corresponding to the target frame includes:
screening a target table matched with a keyword of a preset indication legend symbol table from the drawing frame information;
and taking the target table as the legend symbol table.
Optionally, before determining the row data and the column data of the cell to which each legend block belongs in the at least one legend block, the method further includes:
determining the cell to which each legend block belongs;
and for the cells to which any one of the legend blocks belongs, determining the primitives of the cells to which the legend blocks belong, wherein the primitives do not include non-legend blocks.
Optionally, determining row data and column data of a cell to which each legend block in the at least one legend block belongs includes:
acquiring the coordinate range of the cell to which each legend block belongs;
respectively determining the left boundary and the upper boundary of each cell based on the coordinate range;
based on the left boundary and the upper boundary, sorting the cells in a manner that the left boundary is from left to right and the upper boundary is from top to bottom;
and determining the row data and the column data of each unit cell according to the sorted result.
Optionally, respectively determining, based on the row data and the column data, a legend name corresponding to each legend block, including:
for any of the legend blocks, the following processing is performed:
extracting a list table indicating the legend name from the legend symbol table by adopting a preset keyword indicating the legend name;
acquiring a target table which is the same as row data and column data of the legend block from the column table;
and taking the text information in the target table as the legend name corresponding to the legend block.
In a second aspect, there is provided a legend identifying apparatus, including:
the acquisition unit is used for acquiring a drawing file to be identified;
the identification unit is used for identifying the drawing frame data in the drawing file;
a first screening unit, configured to screen a target frame including a legend table from the frame data;
a second screening unit, configured to screen the legend symbol table from the frame information corresponding to the target frame;
an extracting unit, configured to extract at least one legend block in the legend symbol table;
the first determining unit is used for determining row data and column data of the cell to which each legend block belongs in the at least one legend block;
a second determining unit, configured to determine, based on the row data and the column data, legend names corresponding to the legend blocks, respectively;
and the association unit is used for associating the legend block and the legend name which correspond to each other.
In a third aspect, an electronic device is provided, including: the system comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor is configured to execute the program stored in the memory to implement the legend identifying method of the first aspect.
In a fourth aspect, there is provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the legend identification method of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: in the technical scheme provided by the embodiment, a drawing file to be identified is obtained; identifying drawing frame data in a drawing file; screening a target picture frame comprising a legend symbol table from the picture frame data; screening a graph example symbol table from the picture frame information corresponding to the target picture frame; extracting at least one legend block in the legend symbol table; determining row data and column data of a unit cell to which each legend block belongs in at least one legend block; respectively determining legend names corresponding to the legend blocks based on the row data and the column data; and associating the legend block and legend name corresponding to each other. When the legend block is identified, the drawing file can be directly identified without converting the drawing file into an image, so that the identification precision is high.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a diagram illustrating a network system architecture according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating an exemplary method of identifying legends in an embodiment of the present application;
FIG. 3 is a schematic diagram of an exemplary identification apparatus according to the present application;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to facilitate understanding of the embodiments of the present application, some terms referred to in the present application will be explained below.
Primitive: generally referred to as primitive graphical elements. Basic graphic elements are points, lines, circles (arcs), area fills, and characters, etc.
Drawing frame: the wire frame of the drawing area is limited on the drawing paper in the engineering drawing.
Legend: the description of the symbols on the drawings is presented.
First, a network system architecture to which the solution of the embodiment of the present application may be applied is described by way of example.
Referring to fig. 1, fig. 1 is an architecture diagram of a network system according to an embodiment of the present application, and as shown in fig. 1, the network system includes a terminal 101, an image review server 102, and a database 103.
The network system is connected through a wired or wireless network, and may be a virtual private network, a local area network, a wide area network, a metropolitan area network, or the like, and a specific communication transmission protocol is not limited.
The terminal 101 may be configured to submit a drawing file to be identified to the drawing-examination server 102 through a program code or a touch signal, so as to request the drawing-examination server 102 to perform a step related to the legend identification.
The image-checking server 102 serves as an execution subject, in some embodiments, the image-checking server 102 may be a background server of an intelligent image-checking platform, the intelligent image-checking platform automatically performs electric drawing checking by regularizing building industry design drawing checking standards and the like, and the image-checking server 102 performs a series of processing of network models, such as building a convolutional neural network and the like, by executing program codes through a processor.
The database 103 may be configured to store information such as a drawing file to be identified, a file hash value (file _ hash), and the like, and a developer may extract required information from the database 103 by inputting a conditional query statement through the terminal 101, for example: a file hash value. The database 103 may be a local database, such as Van-Bu database of vancke, a third-party database independent of the image review server 102, such as a database of some design houses, or a cloud database.
It should be understood that the terminal 101 in this embodiment may be a desktop computer, a tablet computer, a super computer, or other devices; the examination server 102 may be a local server, a cloud server, or a server cluster.
It should be understood that the network system architecture shown in fig. 1 is merely an example, and may include further components such as routers, switches, etc.
Based on the network system architecture shown in fig. 1, the method for identifying the legend provided by the embodiment of the present application is described in detail below with reference to the related drawings. Referring to fig. 2, fig. 2 is a flowchart illustrating an example legend identification method according to an embodiment of the present application, where the method is applied to the graph examination server 102 shown in fig. 1, and the example legend identification method specifically includes the following steps:
step 201, obtaining a drawing file to be identified.
In this embodiment, when a legend of a drawing file needs to be identified, the drawing file to be identified may be uploaded to the review server 102 in real time through the terminal 101; the drawing file may also be stored in the database 103 in advance, and when the legend of the drawing file needs to be identified, the drawing file is obtained from the database 103 based on a file hash value of the drawing file, where the file hash value is used to indicate a storage location of the drawing file in the database 103.
It should be understood that the file hash value of each drawing file is stored locally in the terminal 101, and thus the file hash value acquired by the image viewing server 101 may be indicated by the user through the terminal 101.
The drawing file in the present embodiment includes, but is not limited to, a DWG file.
Step 202, identifying the drawing frame data in the drawing file.
In this embodiment, the frame data specifically indicates the primitive in the drawing file. For example, the frame data may be data of frames, texts, legend blocks, line segments, points and the like in the drawing file.
In this embodiment, a CAD drawing block parsing service is deployed in the review server 102, and when the drawing frame data in the drawing file is identified, the CAD drawing block parsing service is accessed, and the drawing file is analyzed by the CAD drawing block parsing service to obtain the drawing frame data in the drawing file.
Step 203, selecting a target frame including a legend table from the frame data.
In application, the drawing frames in the drawing file can be drawing list type drawing frames, design description type drawing frames, electrical type drawing frames and other types of drawing frames according to different fields related to the drawing file. The different types of frames are represented in different forms in the drawing document, such as different thickness of the lines of the frames. Therefore, when the CAD drawing block analysis service analyzes the drawing file, the type of the drawing frame can be identified based on the representation form of the drawing frame, and the type of the drawing frame is marked. Therefore, when a frame of a certain type needs to be filtered from the frame data, the frame in the frame data can be filtered by retrieving and matching the frame type.
In one embodiment, when a target frame comprising a legend symbol table is screened from frame data, at least one frame in the frame data is obtained; acquiring a frame type of each frame in at least one frame; based on the frame type, screening at least one frame to obtain a frame of which the frame type indicates a diagram class; a frame indicating a legend class is taken as a target frame.
Step 204, a graph example symbol table is screened from the frame information corresponding to the target frame.
In application, the target frame may include other tables besides the legend table, but since the specific content in the legend table is different from that in the non-legend table, the frame information in the target frame may be filtered based on the specific content so as to be filtered to the legend table.
In one embodiment, a target table matched with keywords of a preset indication legend symbol table is screened from the picture frame information; the target table is used as a legend symbol table.
In application, a preset key for indicating the legend symbol table can uniquely indicate the legend symbol table. Such as a key word, such as a legend, symbol, legend symbol, etc.
Step 205, at least one legend block in the legend symbol table is extracted.
In application, the legend block has a uniquely determined expression format relative to other primitives in the drawing file, so the legend block in the legend symbol table can be extracted based on the expression format of the legend block.
In application, some legend blocks are combined with primitives of non-legend blocks, for example, text is combined on legend blocks, some lines are combined on legend blocks, etc., and when such legend blocks are identified, only the legend blocks themselves can be identified, but the combined primitives on legend blocks cannot be identified, so that the identification is not accurate. To avoid this, after extracting at least one legend block in the legend symbol table, the at least one legend block may also be filtered to filter out legend blocks used in combination with primitives.
Since the cells in which the legend block is located in the legend block used in combination with the primitives necessarily have other primitives besides the legend block, it is possible to determine whether the legend block is a legend block used in combination with other primitives by determining whether other primitives exist in the primitives in which the legend block is located.
In a specific embodiment, the cell to which each legend block belongs is determined; and for the cells to which any legend block belongs, determining the primitives of the cells to which the legend block belongs and which do not comprise non-legend blocks.
It should be understood that whether a cell, a legend block, or other primitive has coordinates in the drawing file, so when the coordinate range of the cell to which the legend block belongs includes the coordinate range of the primitive that is not a legend block, it may be determined that the cell to which the legend block belongs includes the primitive that is not a legend block; otherwise, it may be determined that the cells to which the legend block belongs do not include primitives other than the legend block.
And step 206, determining row data and column data of the unit cell to which each legend block belongs in at least one legend block.
In this embodiment, a left boundary and an upper boundary are added to each cell through the coordinate range of the cell, and then the row data and the column data of each cell are determined through the left boundary and the upper boundary.
In a specific embodiment, the coordinate range of the cell to which each legend block belongs is obtained; respectively determining the respective left boundary and upper boundary of each cell based on the coordinate range; based on the left boundary and the upper boundary, sorting the cells in a mode that the left boundary is from left to right and the upper boundary is from top to bottom; and determining the respective row data and column data of each unit cell according to the sorted result.
Where the left border indicates the leftmost position of the cell and the upper border indicates the uppermost position of the cell. In application, for convenience of operation, the left boundary and the bordered boundary of the cell may be marked with coordinates in the coordinate system of the drawing document. For example, the left boundary of a cell is marked with the abscissa of the upper left vertex of the cell, and the upper boundary of the cell is marked with the ordinate of the upper left vertex of the cell.
In one example, if the coordinates of the top left vertex of a cell are (a, B), the left boundary of the cell is x ═ a, and the top boundary is y ═ B.
In the embodiment, considering the drawing error existing during drawing of the drawing file, when the boundary error of the left boundaries of the two cells does not exceed the first error threshold, the two cells are determined to be positioned in the same column; and when the boundary error of the upper boundaries of the two cells does not exceed the second error threshold value, determining that the two cells are positioned in the same row.
It should be understood that the first error threshold and the second error threshold may be set manually based on experience. The first error threshold and the second error threshold may be the same or different, and this embodiment is not particularly limited in this respect.
In order to determine the number of rows and columns of each cell, based on the left boundary and the upper boundary of each cell, the cells are sorted in a manner that the left boundary is from left to right, and the upper boundary is from top to bottom, so that respective row data and column data of each cell are obtained.
It should be understood that when the left and upper boundaries of a cell are represented in coordinates, the coordinate system of the drawing file may be combined and the row and column data for the cell may be determined based on the left and upper boundaries. For example, when the coordinate system of the drawing document uses the top left vertex of the drawing document as the origin of coordinates, the horizontal direction is the X axis, and the vertical direction is the Y axis, it may be determined that the cell with the small left boundary is located on the left of the cell with the large left boundary, and the cell with the small upper boundary is located on the upper side of the cell with the large upper boundary.
In one example, taking the presence of four cells A, B, C, D as an example, the left boundary of the a cell is 1 and the upper boundary is 1; the left boundary of the B cell is 1, and the upper boundary is 2; the left boundary of the C cell is 2, and the upper boundary is 1; the left border of the D cell is 2 and the upper border is 2. Then after the cells are sorted according to the left boundary from left to right and the upper boundary from top to bottom, it can be determined that the cell A and the cell B are positioned in the same column and the cell C is positioned in the same row; the cells B and the cells D are positioned in the same row; the C cell and the D cell are located in the same column. Further, it can be determined that the a cells are located in a first row and a first column, the B cells are located in a second row and a first column, the C cells are located in a first row and a second column, and the D cells are located in a second row and a second column.
Step 207, determining the legend names corresponding to the legend blocks respectively based on the row data and the column data.
In one embodiment, for any of the legend blocks, the following processing is performed: extracting a list table indicating the legend name from the legend symbol table by adopting a preset keyword indicating the legend name; acquiring a target table which is the same as row data and column data of the legend block from the column table; and taking the text information in the target table as the legend name corresponding to the legend block.
In this embodiment, the preset keyword indicating the legend name may be preset manually based on experience, for example, the preset keyword is set as a name and a purpose.
Step 208, associate the legend block and legend name corresponding to each other.
In the technical scheme provided by the embodiment, a drawing file to be identified is obtained; identifying drawing frame data in a drawing file; screening a target picture frame comprising a legend symbol table from the picture frame data; screening a graph example symbol table from the picture frame information corresponding to the target picture frame; extracting at least one legend block in the legend symbol table; determining row data and column data of a unit cell to which each legend block belongs in at least one legend block; respectively determining legend names corresponding to the legend blocks based on the row data and the column data; and associating the legend block and legend name corresponding to each other. When the legend block is identified, the drawing file can be directly identified without converting the drawing file into an image, so that the identification precision is high.
Based on the same concept, an example of the present application provides an example identification apparatus, and specific implementation of the apparatus may refer to descriptions in the method example section, and repeated descriptions are omitted, as shown in fig. 3, the apparatus mainly includes:
an obtaining unit 301, configured to obtain a drawing file to be identified;
an identifying unit 302, configured to identify drawing frame data in a drawing file;
a first filtering unit 303, configured to filter a target frame including a legend table from the frame data;
a second filtering unit 304, configured to filter a symbol table from the frame information corresponding to the target frame;
an extracting unit 305 for extracting at least one legend block in the legend symbol table;
a first determining unit 306, configured to determine row data and column data of a cell to which each legend block belongs in at least one legend block;
a second determining unit 307, configured to determine, based on the row data and the column data, legend names corresponding to the legend blocks, respectively;
and an associating unit 308 for associating the legend block and the legend name corresponding to each other.
Optionally, the obtaining unit 301 is configured to:
acquiring a file hash value of a drawing file;
and acquiring the drawing file based on the storage position indicated by the file hash value.
Optionally, the first screening unit 303 is configured to:
acquiring at least one picture frame in the picture frame data;
acquiring a frame type of each frame in at least one frame;
based on the frame type, screening at least one frame to obtain a frame of which the frame type indicates a diagram class;
a frame indicating a legend class is taken as a target frame.
Optionally, the second screening unit 304 is configured to:
screening a target table matched with keywords of a preset indication legend symbol table from the picture frame information;
the target table is used as a legend symbol table.
Optionally, the apparatus is further configured to:
before determining row data and column data of a cell to which each legend block belongs in at least one legend block, determining the cell to which each legend block belongs;
and for the cells to which any legend block belongs, determining the primitives of the cells to which the legend block belongs and which do not comprise non-legend blocks.
Optionally, the first determining unit 306 is configured to:
acquiring the coordinate range of the cell to which each legend block belongs;
respectively determining the respective left boundary and upper boundary of each cell based on the coordinate range;
based on the left boundary and the upper boundary, sorting the cells in a mode that the left boundary is from left to right and the upper boundary is from top to bottom;
and determining the respective row data and column data of each unit cell according to the sorted result.
Optionally, the first determining unit 307 is configured to:
for any of the legend blocks, the following processing is performed:
extracting a list table indicating the legend name from the legend symbol table by adopting a preset keyword indicating the legend name;
acquiring a target table which is the same as row data and column data of the legend block from the column table;
and taking the text information in the target table as the legend name corresponding to the legend block.
Based on the same concept, an embodiment of the present application further provides an electronic device, as shown in fig. 4, the electronic device mainly includes: a processor 401, a memory 402 and a communication bus 403, wherein the processor 401 and the memory 402 communicate with each other via the communication bus 403. The memory 402 stores a program executable by the processor 401, and the processor 401 executes the program stored in the memory 402, so as to implement the following steps:
acquiring a drawing file to be identified;
identifying drawing frame data in a drawing file;
screening a target picture frame comprising a legend symbol table from the picture frame data;
screening a graph example symbol table from the picture frame information corresponding to the target picture frame;
extracting at least one legend block in the legend symbol table;
determining row data and column data of a unit cell to which each legend block belongs in at least one legend block;
respectively determining legend names corresponding to the legend blocks based on the row data and the column data;
and associating the legend block and legend name corresponding to each other.
The communication bus 403 mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 403 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
The Memory 402 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the aforementioned processor 401.
The Processor 401 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc., and may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.
In still another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program which, when run on a computer, causes the computer to execute the legend identification method described in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes, etc.), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A legend identification method, comprising:
acquiring a drawing file to be identified;
identifying drawing frame data in the drawing file;
screening a target picture frame comprising a legend symbol table from the picture frame data;
screening the legend symbol table from the picture frame information corresponding to the target picture frame;
extracting at least one legend block in the legend symbol table;
determining row data and column data of a unit cell to which each legend block belongs in the at least one legend block;
respectively determining legend names corresponding to the legend blocks based on the row data and the column data;
and associating the legend block and legend name corresponding to each other.
2. The method of claim 1, wherein obtaining a drawing file to be identified comprises:
acquiring a file hash value of the drawing file;
and acquiring the drawing file based on the storage position indicated by the file hash value.
3. The method of claim 1, wherein screening the frame data for a target frame comprising a legend symbol table comprises:
acquiring at least one picture frame in the picture frame data;
acquiring a frame type of each frame in the at least one frame;
based on the frame type, screening the at least one frame to obtain a frame of which the frame type indicates a diagram class;
and taking the frame of the indication legend class as the target frame.
4. The method according to claim 1, wherein the selecting the legend symbol table from the frame information corresponding to the target frame comprises:
screening a target table matched with a keyword of a preset indication legend symbol table from the drawing frame information;
and taking the target table as the legend symbol table.
5. The method according to claim 1, wherein before determining the row data and the column data of the cell to which each legend block belongs in the at least one legend block, further comprising:
determining the cell to which each legend block belongs;
and for the cells to which any one of the legend blocks belongs, determining the primitives of the cells to which the legend blocks belong, wherein the primitives do not include non-legend blocks.
6. The method according to any one of claims 1 to 5, wherein determining row and column data of a cell to which each legend block of the at least one legend block belongs comprises:
acquiring the coordinate range of the cell to which each legend block belongs;
respectively determining the left boundary and the upper boundary of each cell based on the coordinate range;
based on the left boundary and the upper boundary, sorting the cells in a manner that the left boundary is from left to right and the upper boundary is from top to bottom;
and determining the row data and the column data of each unit cell according to the sorted result.
7. The method of claim 1, wherein determining a legend name corresponding to each legend block based on the row data and the column data, respectively, comprises:
for any of the legend blocks, the following processing is performed:
extracting a list table indicating the legend name from the legend symbol table by adopting a preset keyword indicating the legend name;
acquiring a target table which is the same as row data and column data of the legend block from the column table;
and taking the text information in the target table as the legend name corresponding to the legend block.
8. A legend identifying apparatus, comprising:
the acquisition unit is used for acquiring a drawing file to be identified;
the identification unit is used for identifying the drawing frame data in the drawing file;
a first screening unit, configured to screen a target frame including a legend table from the frame data;
a second screening unit, configured to screen the legend symbol table from the frame information corresponding to the target frame;
an extracting unit, configured to extract at least one legend block in the legend symbol table;
the first determining unit is used for determining row data and column data of the cell to which each legend block belongs in the at least one legend block;
a second determining unit, configured to determine, based on the row data and the column data, legend names corresponding to the legend blocks, respectively;
and the association unit is used for associating the legend block and the legend name which correspond to each other.
9. An electronic device, comprising: the system comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor, configured to execute the program stored in the memory, to implement the legend identification method of any of claims 1-7.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the legend identification method of any of claims 1-7.
CN202111369485.8A 2021-11-15 2021-11-15 Legend identification method, device, equipment and storage medium Pending CN114283437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111369485.8A CN114283437A (en) 2021-11-15 2021-11-15 Legend identification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111369485.8A CN114283437A (en) 2021-11-15 2021-11-15 Legend identification method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114283437A true CN114283437A (en) 2022-04-05

Family

ID=80869441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111369485.8A Pending CN114283437A (en) 2021-11-15 2021-11-15 Legend identification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114283437A (en)

Similar Documents

Publication Publication Date Title
CN108416198B (en) Device and method for establishing human-machine recognition model and computer readable storage medium
CN110334346B (en) Information extraction method and device of PDF (Portable document Format) file
US9910842B2 (en) Interactively predicting fields in a form
CN109886928B (en) Target cell marking method, device, storage medium and terminal equipment
CN110737689B (en) Data standard compliance detection method, device, system and storage medium
CN111563218B (en) Page repairing method and device
CN114005126A (en) Table reconstruction method and device, computer equipment and readable storage medium
CN112036295A (en) Bill image processing method, bill image processing device, storage medium and electronic device
CN111680506A (en) External key mapping method and device of database table, electronic equipment and storage medium
CN112527676A (en) Model automation test method, device and storage medium
CN115729817A (en) Method and device for generating and optimizing test case library, electronic equipment and storage medium
CN116682130A (en) Method, device and equipment for extracting icon information and readable storage medium
CN113076961B (en) Image feature library updating method, image detection method and device
CN110688995B (en) Map query processing method, computer-readable storage medium and mobile terminal
CN112613367A (en) Bill information text box acquisition method, system, equipment and storage medium
CN109815243B (en) Structured storage method and device during document interface modification
JP2016076115A (en) Information processing device, information processing method and program
CN108170838B (en) Topic evolution visualization display method, application server and computer readable storage medium
CN116052848A (en) Data coding method and system for medical imaging quality control
CN114283437A (en) Legend identification method, device, equipment and storage medium
CN105677827B (en) A kind of acquisition methods and device of list
CN114612889A (en) Instrument information acquisition method and system, electronic equipment and storage medium
CN114564773A (en) Component screening and checking method and system based on BIM (building information modeling)
CN110309335B (en) Picture matching method, device and equipment and storage medium
US9753901B1 (en) Identifying important document content using geometries of page elements

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination