CN111159453B - Label and component matching method and device for CAD drawing - Google Patents

Label and component matching method and device for CAD drawing Download PDF

Info

Publication number
CN111159453B
CN111159453B CN201911345596.8A CN201911345596A CN111159453B CN 111159453 B CN111159453 B CN 111159453B CN 201911345596 A CN201911345596 A CN 201911345596A CN 111159453 B CN111159453 B CN 111159453B
Authority
CN
China
Prior art keywords
component
label
matching
text
cad
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.)
Active
Application number
CN201911345596.8A
Other languages
Chinese (zh)
Other versions
CN111159453A (en
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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN201911345596.8A priority Critical patent/CN111159453B/en
Publication of CN111159453A publication Critical patent/CN111159453A/en
Application granted granted Critical
Publication of CN111159453B publication Critical patent/CN111159453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method and a device for matching labels and components of CAD drawings, wherein the matching method comprises the following steps: step 1, extracting attribute information of a first component in a building database according to expert domain knowledge to generate an attribute value rule; step 2, identifying a text label and a lead in the CAD building drawing to be processed, matching the text label with the lead, determining an indication position of the text label, and generating a position set; and 3, selecting text labels corresponding to the indication positions, of which the distances between the second components are smaller than a threshold value, in the position set according to the second components in the CAD building drawing to be processed, and matching the text labels with the components according to attribute value rules. Through the technical scheme in the application, the recognition and reasoning problem of the Chinese character label information in the building drawing is solved, and the functions of recognition of the lead wire and the label, matching of the label and the component, term reasoning and the like in the CAD building drawing are realized.

Description

Label and component matching method and device for CAD drawing
Technical Field
The application relates to the technical field of drawing identification, in particular to a method for matching a label and a component of a CAD drawing and a device for matching the label and the component of the CAD drawing.
Background
The construction industry is an important industry of national economy, the development of the construction industry is rapid since the innovation is opened, and the electronic drawing in the construction industry is popular at present, and the construction industry has great prospect in intelligent standard examination, model reconstruction and the like aiming at construction drawings. The construction drawing has a large number of text labels, which are used for helping people understand the drawing, and in order to actually use the information in the drawing, the text labels must be capable of processing the content.
In the prior art, although the label content can be extracted in the processing of the axial net label, the title bar information and the like in the CAD drawing, the identification and the reasoning of the text label in the building drawing cannot be carried out, the text label with the lead cannot be processed, and particularly, the processing of the actual meaning of the text label, certain professional concept terms and the like is not carried out.
Disclosure of Invention
The purpose of the present application is: the method solves the problem of identification and reasoning of Chinese label information in the building drawing, and realizes the functions of identification of leads and labels, matching of the labels and components, term reasoning and the like in the CAD building drawing.
The technical scheme of the first aspect of the application is that: the utility model provides a label and component matching device of CAD drawing, matching device is applicable to the matching of label and component in the CAD building drawing, and matching device includes: the system comprises a knowledge base processing module, a lead and tag identification module and a tag and component matching module; the knowledge base processing module is used for extracting attribute information of a first component in the building type database according to expert domain knowledge to generate attribute value rules; the lead and label recognition module is used for recognizing text labels and leads in CAD (computer aided design) building drawings to be processed, matching the text labels with the leads, determining indication positions of the text labels and generating a position set; the label and component matching module is used for selecting text labels corresponding to indication positions, of which the distance between the second components is smaller than a threshold value, in the position set according to the second components in the CAD building drawing to be processed, and matching the text labels with the components according to attribute value rules.
In any of the above technical solutions, further, matching the text label with the lead specifically includes: determining four vertex coordinates of a two-dimensional rectangular frame corresponding to the text label in the CAD building drawing to be processed according to the layer information of the CAD building drawing to be processed, and marking the vertex coordinates as index key values; and marking coordinates of end points of the leads as index values, adopting an R-tree space index structure, and matching text labels corresponding to the index key values with the leads corresponding to the index values when the index values are judged to be contained in the range of the index key values.
In any of the foregoing solutions, further, the attribute information includes: component type, component attribute, and attribute type.
In any of the above technical solutions, further, the tag and component matching module matches the text tag with the component, specifically including: in the position set, traversing and reading the indication position of the text label, and calculating the linear distance between the indication position and a second component in the CAD building drawing to be processed; when the straight line distance is judged to be smaller than the threshold value, the second component corresponding to the indication position is marked as a potential component, and a potential component set is generated; and sequentially judging whether the component types of the potential components in the potential component set are of space types, if so, determining the space position to which the corresponding text label belongs, and matching the space position text label as the text label of the space position, and if not, selecting the text label corresponding to the indication position of the minimum linear distance, and matching the text label with a second component in the CAD building drawing to be processed.
In any of the above solutions, further, the matching device further includes: a term reasoning module; the term reasoning module is used for extracting information in the text labels matched with the components and displaying the information in a classified mode.
The technical scheme of the second aspect of the application is that: the label and component matching method of the CAD drawing is suitable for matching labels and components in the CAD building drawing, and comprises the following steps: step 1, extracting attribute information of a first component in a building database according to expert domain knowledge to generate an attribute value rule; step 2, identifying a text label and a lead in the CAD building drawing to be processed, matching the text label with the lead, determining an indication position of the text label, and generating a position set; and 3, selecting text labels corresponding to the indication positions, of which the distances between the second components are smaller than a threshold value, in the position set according to the second components in the CAD building drawing to be processed, and matching the text labels with the components according to attribute value rules.
In any of the above technical solutions, further, in step 2, matching the text label with the lead specifically includes: determining four vertex coordinates of a two-dimensional rectangular frame corresponding to the text label in the CAD building drawing to be processed according to the layer information of the CAD building drawing to be processed, and marking the vertex coordinates as index key values; and marking coordinates of end points of the leads as index values, adopting an R-tree space index structure, and matching text labels corresponding to the index key values with the leads corresponding to the index values when the index values are judged to be contained in the range of the index key values.
In any of the foregoing solutions, further, the attribute information includes: component type, component attribute, and attribute type.
In any of the above technical solutions, further, in step 3, matching the text label with the component specifically includes: in the position set, traversing and reading the indication position of the text label, and calculating the linear distance between the indication position and a second component in the CAD building drawing to be processed; when the straight line distance is judged to be smaller than the threshold value, the second component corresponding to the indication position is marked as a potential component, and a potential component set is generated; and sequentially judging whether the component types of the potential components in the potential component set are of space types, if so, determining the space position to which the corresponding text label belongs, and matching the space position text label as the text label of the space position, and if not, selecting the text label corresponding to the indication position of the minimum linear distance, and matching the text label with a second component in the CAD building drawing to be processed.
In any of the above technical solutions, further, the matching method further includes: and 4, extracting information in the text labels matched with the components, and displaying the information in a classified mode.
The beneficial effects of this application are:
according to the technical scheme, the label of the CAD drawing is matched with the component, so that the content of the text label in the CAD building drawing can be identified, the text label can be corresponding to a specific component, and the text label (label information) is converted into real available attribute information of the component.
According to the technical scheme, a series of functions of text label extraction, lead extraction, text label and component matching, semantic reasoning and the like are achieved in the CAD building drawing, and compared with the existing processing mode of axial network characters and the like, the text label of component description in the CAD building drawing can be identified, the corresponding text label is matched to the corresponding component through the lead, information in the CAD building drawing is reserved to the greatest extent, and a foundation is provided for subsequent operation of the CAD building drawing.
Drawings
The advantages of the foregoing and/or additional aspects of the present application will become apparent and readily appreciated from the description of the embodiments, taken in conjunction with the accompanying drawings, wherein:
FIG. 1 is a schematic block diagram of a label and component matching apparatus for CAD drawings according to one embodiment of the present application;
fig. 2 is a schematic flow chart diagram of a label and component matching method of CAD drawings according to one embodiment of the application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will be more clearly understood, a more particular description of the application will be rendered by reference to the appended drawings and appended detailed description. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, however, the present application may be practiced otherwise than as described herein, and thus the scope of the present application is not limited to the specific embodiments disclosed below.
Embodiment one:
as shown in fig. 1, this embodiment provides a device for matching a label and a member of a CAD drawing, which is suitable for matching a label and a member in a CAD building drawing, and the matching device includes: the system comprises a knowledge base processing module, a lead and tag identification module and a tag and component matching module;
the knowledge base processing module is used for extracting attribute information of a first component in the building type database according to expert domain knowledge, and generating attribute value rules in the form of regular expressions.
Specifically, a processing basis is provided for matching text labels through a knowledge base processing module, and attribute information of a first component in a building database is extracted by using expert domain knowledge, wherein the extracted content comprises: component type, component attribute, and attribute type provide a basis for text labels to match components.
The nouns involved in the present embodiment are explained below:
a component: representation of a concept of an entity in the field of construction;
type of component: a concept that characterizes a component classification;
component properties: refers to information including a member name, a length, and attributes describing the member;
attribute type: classification information describing the attributes of these components.
The module lists attribute information of each type of component in the CAD building drawing, such as a wall, a door, a window, a column and the like, such as whether a fireproof door, a fireproof grade, a fire rescue window and the like are involved, and the attribute information of each component corresponds to an attribute value rule expressed by a regular expression.
Taking the component "door" as an example, the regular expression (attribute value rule) of the door is:
door= (methyl ethyl propyl fire-proof roller shutter door shutter push-pull flat-open safety exit folding evacuation FM FHM M)
In a general drawing, the text label of the door is M or a fire door or a sliding door, and the text label of the corresponding content can be matched by using the regular expression. Furthermore, the component type, the component attribute and the attribute type of the text description can be obtained.
It should be noted that there is a default type among the component types of the attribute information, that is, only one attribute is "other", and the rule represented by the regular expression corresponding to this attribute is virtually empty, and it does not directly match any tag content. This is so because the attributes and contents listed here are all components that are involved in the building code, if there is a text label that corresponds to an attribute that does not match any of the other, it defaults to a rule that it matches, its possible attribute is the "other" attribute, and its corresponding component may be of any type.
The lead and label recognition module is used for recognizing text labels and leads in the CAD building drawing to be processed, matching the text labels with the leads, determining indication positions of the text labels and generating a position set.
Specifically, the module identifies the text label and the lead in the CAD building drawing to be processed by utilizing the layer information containing the text label where the lead is located in the CAD building drawing to be processed, and matches the text label with the corresponding lead.
In this embodiment, the matching is performed by determining geometric coordinate data of the lead and the text label, and if a certain end point of the lead enters a rectangle representing the text label, the two are matched together to obtain a real indication position of the text label.
To facilitate subsequent calculations, we define the "indicated position" of the text label: if the text label has a corresponding lead, the "indication position" of the text label is the position of the end point of the other end of the lead; if the text label does not have a lead, then the "indicated position" of the text label is the center position of the text label.
The lead information obtained by us comprises layer information of the lead and endpoint coordinate information of the lead.
Further, the embodiment shows a method for matching a text label and a lead, which specifically includes:
determining four vertex coordinates of a two-dimensional rectangular frame corresponding to the text label in the CAD building drawing to be processed according to the layer information of the CAD building drawing to be processed, and marking the vertex coordinates as index key values;
and marking coordinates of the end points of the leads as index values, adopting an R-tree space index structure, and matching text labels corresponding to the index key values with leads corresponding to the index values when the index values are judged to be contained in the range of the index key values.
And combining all the leads, and then using an R-tree space index structure to find a text label corresponding to each lead so as to obtain an indication position of the text label.
In the R-tree space index structure, a two-dimensional rectangular frame is used as an index key value, the index value is a lead, wherein the two-dimensional rectangular frame is the coordinates of four vertexes of a rectangle in which text labels are placed, and an index line segment is quickly queried through the rectangular frame containing the text labels.
Because the position of a possible component pointed by the text label is required to be frequently queried in the component matching process, the position of the text label can be avoided from being calculated each time by using the R-tree space index structure, and the result whether the text label is intersected or surrounded can be obtained by directly using the query mode when the text label is geometrically intersected with other components and is geometrically surrounded by other components.
The length of the lead and the length relative distance of the length of the label are adopted when the text label is specifically matched with the lead due to the difference of fonts and font sizes used by the drafter in drawing, so as to more accord with the situation seen in the actual drawing.
The label and component matching module is used for selecting text labels corresponding to indication positions, of which the distance between the second components is smaller than a threshold value, in the position set according to the second components in the CAD building drawing to be processed, and matching the text labels with the components according to attribute value rules.
Specifically, in the CAD building drawing, the manner of expressing the component type, component attribute and semantic information of attribute classification of the component is most commonly to place a text label, and use a lead to point to the geometric figure of the corresponding component, and the label and component matching module matches the text label with the component by using the result of the knowledge base processing module, that is, the attribute value rule represented by the regular expression, so as to realize the function of converting the text label into the corresponding component type, component attribute and attribute type.
When matching is carried out, the indication position of the text label is read through traversal in the position set, the text label near a certain component is screened according to a threshold value, whether the text content of the text label meets the attribute value rule of the corresponding regular expression is judged, and if yes, the text label is a potential candidate object of the attribute of the corresponding component.
First, the indication position is determined. Judging whether the text label has a lead or not in the position set, and if so, obtaining a real indication position, namely the position of a lead endpoint, by using lead information; if there is no lead, the "indicated position" of the tag is the center position of the tag.
And then, determining a text label according to the indication position, extracting the text content of the text label, and obtaining a possibly corresponding component and corresponding attribute information of the label by utilizing a domain knowledge base confirmed by a domain expert.
Because of the existence of the default type case, at least one rule will be matched. Also because of the numerous rules, more than one component type may be matched.
The embodiment shows a method for matching text labels and components, which specifically comprises the following steps:
in the position set, traversing and reading the indication position of the text label, and calculating the linear distance between the indication position and a second component in the CAD building drawing to be processed;
when the straight line distance is judged to be smaller than the threshold value, the second component corresponding to the indication position is marked as a potential component, and a potential component set is generated;
and sequentially judging whether the component types of the potential components in the potential component set are of space types, if so, determining the space position to which the corresponding text label belongs, and matching the space position as the text label of the space position, and if not, selecting the text label corresponding to the indication position of the minimum linear distance, and matching the text label with a second component in the CAD building drawing to be processed.
After the potential corresponding component types are obtained, firstly judging whether the potential corresponding component types have space types, wherein the space types are the same as the component types, and represent the components of the space, and judging whether all the line segments in the geometric data in the drawing form a box enclosing space through a line scanning algorithm, if the space types can form the box enclosing space, the line segments in the line scanning algorithm form the space. If a space component exists, the text label is firstly found in which space and matched into label information of the space.
Otherwise, only the type of the normal component can be identified in the corresponding component types of the text labels, and then the matching of the normal component is performed, and the process is as follows:
first, all possible corresponding components of the text labels in the drawing data are traversed, for example, one text label may be fire-resistant grade of a door, and the attribute value of the text label may also be fire-resistant grade of a window, so that all door and window components are found out and used as candidate components.
Among these candidate components, the component closest to the text label is found, calculated as the linear distance between the geometric center point of the component and the geometric center point or indicated location of the text label.
Then, a match is made for the component with the text label. Because it is the nearest component to find directly, so there is no situation of repeated matching in this process.
Further, the matching device further includes: a term reasoning module; the term reasoning module is used for extracting information in the text labels matched with the components and displaying the information in a classified mode.
In this embodiment, the term of art describes the relevant definitions related to building element entities, describing building entity attributes, and process standards, etc. involved in the building field. The term of art determines that by matching a textual description of a corresponding component in a CAD building drawing, such textual description may be a description of any meaningful attribute information of that component.
For example, a text description "fire door class a" in a text label describing the door component can be matched according to the technical term, the fire class component attribute describing the door component can be matched according to the "fire class a" and the value classified according to the "fire class a" is classified according to the "fire class a".
The term reasoning module is used for refining attribute description of the components and extracting more information from text description with limited two-dimensional drawings as much as possible.
Further, the term reasoning module is further configured to: the concept in the building field is utilized to deduce and generate the concept of the technical terms which are not marked in the CAD building drawing, for example, according to the fact that a space contains a stair component and a door component is arranged on the boundary of the space, the space can be inferred to be a closed stair, corresponding text labels are marked, the machine can recognize the concept without manually adding corresponding labels, and therefore the content in the CAD building drawing is reserved to the greatest extent.
The module mainly constructs a concept tree for the technical terms in CAD building drawings, the concept tree is similar to a tree structure, branch structures in the concept tree describe the organization relationship among components and the attribute relationship of the components, such as door and window components in rooms, walls are connected with the doors and windows, branches on the door and window components describe the properties of the components, stairways contain the concepts of stairways and the like, and the concept tree can be used for reasoning the component types of unknown branch nodes and the corresponding properties of the components.
In general, in CAD building drawings, many components have no corresponding text labels, the shape of a component is colloquially determined by a plotter, and the human eye can easily determine the type of the component, but a computer cannot understand the type of the component, and a concept tree is required to supplement incomplete component label information.
On the basis of matching leads with text labels and text labels in the front, supplementing related technical terms in a building, respectively adding the matched components and text labels to corresponding positions of the components in a concept tree, adding attribute information of the matched components to corresponding positions, then using data on branches near the components in the concept tree, removing CAD building drawings, matching the components according to geometric attributes, adding concepts on the branches if the components are matched, and adding corresponding data, so that attribute information of the components is more sufficient.
On the basis of the functional modules, the embodiment provides a device for matching the labels and the components in the CAD building drawing, and the functions of matching the lead wires and the text labels, matching the text labels and the components, reasoning terms and the like in the CAD building drawing are realized. The matching device is characterized in that the lead wire can be matched with the label, so that the name of a component is determined, the content of the text label can be converted into the corresponding component attribute, and the special terms and the like which are not marked in CAD building drawings but can be understood by professionals are supplemented.
Embodiment two:
as shown in fig. 2, the embodiment provides a method for matching a label and a component of a CAD drawing, the matching method is suitable for matching a label and a component in a CAD building drawing, and the matching method includes:
step 1, extracting attribute information of a first component in a building database according to expert domain knowledge to generate an attribute value rule;
specifically, a processing basis is provided for matching text labels through the step 1, and attribute information of a first component in a building database is extracted by using expert domain knowledge, wherein the extracted content comprises: component type, component attribute, and attribute type provide a basis for text labels to match components.
The nouns involved in the present embodiment are explained below:
a component: representation of a concept of an entity in the field of construction;
type of component: a concept that characterizes a component classification;
component properties: refers to information including a member name, a length, and attributes describing the member;
attribute type: classification information describing the attributes of these components.
By the method, the attribute information of each type of member in the CAD building drawing, such as a wall, a door, a window, a column and the like, is listed, such as whether a fireproof door, a fireproof grade, a fire rescue window and the like are involved, and the attribute information of each member corresponds to an attribute value rule expressed by a regular expression.
Taking the component "door" as an example, the regular expression (attribute value rule) of the door is:
door= (methyl ethyl propyl fire-proof roller shutter door shutter push-pull flat-open safety exit folding evacuation FM FHM M)
In a general drawing, the text label of the door is M or a fire door or a sliding door, and the text label of the corresponding content can be matched by using the regular expression. Furthermore, the component type, the component attribute and the attribute type of the text description can be obtained.
It should be noted that there is a default type among the component types of the attribute information, that is, only one attribute is "other", and the rule represented by the regular expression corresponding to this attribute is virtually empty, and it does not directly match any tag content. This is so because the attributes and contents listed here are all components that are involved in the building code, if there is a text label that corresponds to an attribute that does not match any of the other, it defaults to a rule that it matches, its possible attribute is the "other" attribute, and its corresponding component may be of any type.
Step 2, identifying a text label and a lead in the CAD building drawing to be processed, matching the text label with the lead, determining an indication position of the text label, and generating a position set;
specifically, the text label and the lead in the CAD building drawing to be processed are identified by using the layer information containing the text label, in which the lead is located, in the CAD building drawing to be processed, and the text label and the lead are matched with the corresponding lead, namely, the text label and the lead information are extracted from the CAD building drawing, the text label and the lead are matched, the relation between the text label and the lead is obtained, the position indicated by the label is further obtained, and after the step of processing, the content of the label and the position indicated by the label are obtained.
In this embodiment, the matching is performed by determining geometric coordinate data of the lead and the text label, and if a certain end point of the lead enters a rectangle representing the text label, the two are matched together to obtain a real indication position of the text label.
To facilitate subsequent calculations, we define the "indicated position" of the text label: if the text label has a corresponding lead, the "indication position" of the text label is the position of the end point of the other end of the lead; if the text label does not have a lead, then the "indicated position" of the text label is the center position of the text label.
The lead information obtained by us comprises layer information of the lead and endpoint coordinate information of the lead.
Further, in step 2, matching the text label with the lead wire specifically includes:
determining four vertex coordinates of a two-dimensional rectangular frame corresponding to the text label in the CAD building drawing to be processed according to the layer information of the CAD building drawing to be processed, and marking the vertex coordinates as index key values;
and marking coordinates of end points of the leads as index values, adopting an R-tree space index structure, and matching text labels corresponding to the index key values with the leads corresponding to the index values when the index values are judged to be contained in the range of the index key values.
And combining all the leads, and then using an R-tree space index structure to find a text label corresponding to each lead so as to obtain an indication position of the text label.
In the R-tree space index structure, a two-dimensional rectangular frame is used as an index key value, the index value is a lead, wherein the two-dimensional rectangular frame is the coordinates of four vertexes of a rectangle in which text labels are placed, and an index line segment is quickly queried through the rectangular frame containing the text labels.
Because the position of a possible component pointed by the text label is required to be frequently queried in the component matching process, the position of the text label can be avoided from being calculated each time by using the R-tree space index structure, and the result whether the text label is intersected or surrounded can be obtained by directly using the query mode when the text label is geometrically intersected with other components and is geometrically surrounded by other components.
The length of the lead and the length relative distance of the length of the label are adopted when the text label is specifically matched with the lead due to the difference of fonts and font sizes used by the drafter in drawing, so as to more accord with the situation seen in the actual drawing.
And 3, selecting text labels corresponding to the indication positions, of which the distances between the second components are smaller than a threshold value, in the position set according to the second components in the CAD building drawing to be processed, and matching the text labels with the components according to attribute value rules.
Preferably, the attribute information includes: component type, component attribute, and attribute type.
Specifically, in the CAD building drawing, the manner of expressing the component type, component attribute and semantic information of attribute classification of the component is most commonly to place a text label, and use a lead to point to the geometric figure of the corresponding component, and the result in step 1, that is, the attribute value rule represented by the regular expression, is used to match the text label with the component, so as to realize the function of converting the text label into the corresponding component type, component attribute and attribute type.
When matching is carried out, the indication position of the text label is read through traversal in the position set, the text label near a certain component is screened according to a threshold value, whether the text content of the text label meets the attribute value rule of the corresponding regular expression is judged, and if yes, the text label is a potential candidate object of the attribute of the corresponding component.
First, the indication position is determined. Judging whether the text label has a lead or not in the position set, and if so, obtaining a real indication position, namely the position of a lead endpoint, by using lead information; if there is no lead, the "indicated position" of the tag is the center position of the tag.
And then, determining a text label according to the indication position, extracting the text content of the text label, and obtaining a possibly corresponding component and corresponding attribute information of the label by utilizing a domain knowledge base confirmed by a domain expert.
Because of the existence of the default type case, at least one rule will be matched. Also because of the numerous rules, more than one component type may be matched.
Further, in step 3, matching the text label with the component specifically includes:
in the position set, traversing and reading the indication position of the text label, and calculating the linear distance between the indication position and a second component in the CAD building drawing to be processed;
when the straight line distance is judged to be smaller than the threshold value, the second component corresponding to the indication position is marked as a potential component, and a potential component set is generated;
and sequentially judging whether the component types of the potential components in the potential component set are of space types, if so, determining the space position to which the corresponding text label belongs, and matching the space position text label as the text label of the space position, and if not, selecting the text label corresponding to the indication position of the minimum linear distance, and matching the text label with a second component in the CAD building drawing to be processed.
After the potential corresponding component types are obtained, firstly judging whether the potential corresponding component types have space types, wherein the space types are the same as the component types, and represent the components of the space, and judging whether all the line segments in the geometric data in the drawing form a box enclosing space through a line scanning algorithm, if the space types can form the box enclosing space, the line segments in the line scanning algorithm form the space. If a space component exists, the text label is firstly found in which space and matched into label information of the space.
Otherwise, only the type of the normal component can be identified in the corresponding component types of the text labels, and then the matching of the normal component is performed, and the process is as follows:
first, all possible corresponding components of the text labels in the drawing data are traversed, for example, one text label may be fire-resistant grade of a door, and the attribute value of the text label may also be fire-resistant grade of a window, so that all door and window components are found out and used as candidate components.
Among these candidate components, the component closest to the text label is found, calculated as the linear distance between the geometric center point of the component and the geometric center point or indicated location of the text label.
Then, a match is made for the component with the text label. Because it is the nearest component to find directly, so there is no situation of repeated matching in this process.
The method comprises the steps of firstly obtaining potential corresponding component types of each label by using the result of a knowledge base module, and then matching the label with the component by using the result of a lead label identification module.
Different matching strategies are adopted for the labels of the common components and the labels of the space, wherein the labels of the common components are the components closest to the labels, and the labels of the space components are the labels inside the space components.
Further, the matching method further comprises the following steps: and 4, extracting information in the text labels matched with the components, and displaying the information in a classified mode.
Specifically, a concept tree is constructed for the professional concept in the CAD building drawing, and on the result of the previous processing, supplementary reasoning is performed on necessary professional terms, for example, the space containing the stairs is a staircase or the like.
In this embodiment, the term of art describes the relevant definitions related to building element entities, describing building entity attributes, and process standards, etc. involved in the building field. The term of art determines that by matching a textual description of a corresponding component in a CAD building drawing, such textual description may be a description of any meaningful attribute information of that component.
For example, a text description "fire door class a" in a text label describing the door component can be matched according to the technical term, the fire class component attribute describing the door component can be matched according to the "fire class a" and the value classified according to the "fire class a" is classified according to the "fire class a".
By the method, attribute description of the component is thinned, and more information is extracted from text description with limited two-dimensional drawings as much as possible.
Further, in the method for matching the tag with the component, the method further includes: the concept in the building field is utilized to deduce and generate the concept of the technical terms which are not marked in the CAD building drawing, for example, according to the fact that a space contains a stair component and a door component is arranged on the boundary of the space, the space can be inferred to be a closed stair, corresponding text labels are marked, the machine can recognize the concept without manually adding corresponding labels, and therefore the content in the CAD building drawing is reserved to the greatest extent.
The method mainly comprises the steps of constructing a concept tree for the technical terms in the CAD building drawing, wherein the concept tree is similar to a tree structure, the branch structure in the concept tree describes the organization relation among components and the attribute relation of the components, such as a door and window component in a room, a wall is connected with the door and window, branches on the door and window component describe the attribute of the components, a stair and other concepts are contained in a stair, and the concept tree can be used for reasoning the component types of unknown branch nodes and the corresponding attribute of the components.
In general, in CAD building drawings, many components have no corresponding text labels, the shape of a component is colloquially determined by a plotter, and the human eye can easily determine the type of the component, but a computer cannot understand the type of the component, and a concept tree is required to supplement incomplete component label information.
On the basis of matching leads with text labels and text labels in the front, supplementing related technical terms in a building, respectively adding the matched components and text labels to corresponding positions of the components in a concept tree, adding attribute information of the matched components to corresponding positions, then using data on branches near the components in the concept tree, removing CAD building drawings, matching the components according to geometric attributes, adding concepts on the branches if the components are matched, and adding corresponding data, so that attribute information of the components is more sufficient.
The technical scheme of the application is explained in detail above with reference to the accompanying drawings, and the application provides a method and a device for matching labels and components of CAD drawings, wherein the matching method comprises the following steps: step 1, extracting attribute information of a first component in a building database according to expert domain knowledge to generate an attribute value rule; step 2, identifying a text label and a lead in the CAD building drawing to be processed, matching the text label with the lead, determining an indication position of the text label, and generating a position set; and 3, selecting text labels corresponding to the indication positions, of which the distances between the second components are smaller than a threshold value, in the position set according to the second components in the CAD building drawing to be processed, and matching the text labels with the components according to attribute value rules. Through the technical scheme in the application, the recognition and reasoning problem of the Chinese character label information in the building drawing is solved, and the functions of recognition of the lead wire and the label, matching of the label and the component, term reasoning and the like in the CAD building drawing are realized.
The steps in the present application may be sequentially adjusted, combined, and pruned according to actual requirements.
The units in the device can be combined, divided and pruned according to actual requirements.
Although the present application is disclosed in detail with reference to the accompanying drawings, it is to be understood that such descriptions are merely illustrative and are not intended to limit the application of the present application. The scope of the present application is defined by the appended claims and may include various modifications, alterations, and equivalents to the invention without departing from the scope and spirit of the application.

Claims (10)

  1. The utility model provides a label and component matching device of CAD drawing, its characterized in that, matching device is applicable to the matching of label and component in the CAD building drawing, matching device includes: the system comprises a knowledge base processing module, a lead and tag identification module and a tag and component matching module;
    the knowledge base processing module is used for extracting attribute information of a first component in the building type database according to expert domain knowledge to generate attribute value rules;
    the lead and label recognition module is used for recognizing a text label and a lead in a CAD building drawing to be processed, matching the text label with the lead, determining an indication position of the text label and generating a position set;
    the label and component matching module is used for selecting a text label corresponding to an indication position, of which the distance between the second components is smaller than a threshold value, in the position set according to the second component in the CAD building drawing to be processed, and matching the text label with the component according to the attribute value rule.
  2. 2. The label and component matching apparatus of CAD drawing of claim 1, wherein said text label and said lead are matched, comprising in particular:
    determining four vertex coordinates of a two-dimensional rectangular frame corresponding to the text label in the CAD building drawing to be processed according to the layer information of the CAD building drawing to be processed, and marking the vertex coordinates as index key values;
    and marking coordinates of end points of the leads as index values, adopting an R-tree space index structure, and matching text labels corresponding to the index key values with the leads corresponding to the index values when judging that the index values are contained in the range of the index key values.
  3. 3. The label and feature matching apparatus of CAD drawings of claim 1, wherein the attribute information includes: component type, component attribute, and attribute type.
  4. 4. The label and feature matching apparatus of CAD drawings of claim 3, wherein said label and feature matching module matches said text label with said feature, comprising:
    in the position set, traversing and reading the indication position of the text label, and calculating the linear distance between the indication position and a second component in the CAD building drawing to be processed;
    when the straight line distance is judged to be smaller than the threshold value, the second component corresponding to the indication position is marked as a potential component, and a potential component set is generated;
    and sequentially judging whether the component types of the potential components in the potential component set are of space types, if so, determining the space position to which the corresponding text label belongs, and matching the space position to be the text label of the space position, otherwise, selecting the text label corresponding to the indication position of the minimum linear distance, and matching the text label with the second component in the CAD building drawing to be processed.
  5. 5. The label and feature matching apparatus for CAD drawings of claim 1, wherein said matching apparatus further comprises: a term reasoning module;
    the term reasoning module is used for extracting information in the text labels matched with the components and displaying the information in a classified mode.
  6. The method for matching the label and the component of the CAD drawing is characterized by being suitable for matching the label and the component in the CAD building drawing, and comprises the following steps:
    step 1, extracting attribute information of a first component in a building database according to expert domain knowledge to generate an attribute value rule;
    step 2, identifying a text label and a lead in a CAD building drawing to be processed, matching the text label with the lead, determining an indication position of the text label, and generating a position set;
    and 3, selecting a text label corresponding to an indication position with a distance smaller than a threshold value between the second components in the position set according to the second components in the CAD building drawing to be processed, and matching the text label with the components according to the attribute value rule.
  7. 7. The method for matching a label to a member of a CAD drawing of claim 6, wherein in step 2, the matching the text label to the lead wire specifically includes:
    determining four vertex coordinates of a two-dimensional rectangular frame corresponding to the text label in the CAD building drawing to be processed according to the layer information of the CAD building drawing to be processed, and marking the vertex coordinates as index key values;
    and marking coordinates of end points of the leads as index values, adopting an R-tree space index structure, and matching text labels corresponding to the index key values with the leads corresponding to the index values when judging that the index values are contained in the range of the index key values.
  8. 8. The label and feature matching method of CAD drawing of claim 6, wherein the attribute information includes: component type, component attribute, and attribute type.
  9. 9. The method for matching a label to a component of a CAD drawing of claim 8, wherein in step 3, the matching the text label to the component specifically comprises:
    in the position set, traversing and reading the indication position of the text label, and calculating the linear distance between the indication position and a second component in the CAD building drawing to be processed;
    when the straight line distance is judged to be smaller than the threshold value, the second component corresponding to the indication position is marked as a potential component, and a potential component set is generated;
    and sequentially judging whether the component types of the potential components in the potential component set are of space types, if so, determining the space position to which the corresponding text label belongs, and matching the space position to be the text label of the space position, otherwise, selecting the text label corresponding to the indication position of the minimum linear distance, and matching the text label with the second component in the CAD building drawing to be processed.
  10. 10. The method for label and member matching of CAD drawings of claim 6, wherein said method for matching further comprises: and 4, extracting information in the text labels matched with the components, and displaying the information in a classified mode.
CN201911345596.8A 2019-12-24 2019-12-24 Label and component matching method and device for CAD drawing Active CN111159453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911345596.8A CN111159453B (en) 2019-12-24 2019-12-24 Label and component matching method and device for CAD drawing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911345596.8A CN111159453B (en) 2019-12-24 2019-12-24 Label and component matching method and device for CAD drawing

Publications (2)

Publication Number Publication Date
CN111159453A CN111159453A (en) 2020-05-15
CN111159453B true CN111159453B (en) 2023-06-20

Family

ID=70557878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911345596.8A Active CN111159453B (en) 2019-12-24 2019-12-24 Label and component matching method and device for CAD drawing

Country Status (1)

Country Link
CN (1) CN111159453B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111798649B (en) * 2020-06-23 2021-05-18 深圳市富思源智慧消防股份有限公司 Fire-fighting component numbering method and system for automatic fire alarm plan, intelligent terminal and storage medium
CN111753344B (en) * 2020-06-30 2024-04-12 广东天元建筑设计有限公司 Method for generating assembly type component data set, CAD platform and storage medium
CN112651373B (en) * 2021-01-04 2024-02-09 广联达科技股份有限公司 Method and device for identifying text information of building drawing
CN112989452B (en) * 2021-01-20 2023-12-29 上海品览智造科技有限公司 Identification method for labeling text on component lead in CAD water supply and drainage professional drawing
CN112883801B (en) * 2021-01-20 2024-05-24 上海品览智造科技有限公司 Accurate identification method for resident distribution box system diagram sub-graph in CAD distribution system diagram
CN112800099A (en) * 2021-02-04 2021-05-14 中建科工集团有限公司 House model selection matching method and device
CN112966322A (en) * 2021-02-04 2021-06-15 中建科工集团有限公司 Building structure determination method and device
CN113158292B (en) * 2021-03-02 2024-02-13 广联达科技股份有限公司 Component matching method, engineering amount calculating device and electronic equipment
CN113128457A (en) * 2021-04-30 2021-07-16 杭州品茗安控信息技术股份有限公司 Building model identification method, system and related device
CN113407080A (en) * 2021-06-17 2021-09-17 广联达科技股份有限公司 Method and device for generating component label, computer equipment and storage medium
CN113780505A (en) * 2021-08-26 2021-12-10 万翼科技有限公司 Drawing management method based on class structuring and related products thereof
CN114637730B (en) * 2022-03-23 2023-01-10 清华大学 Method, device and system for compressing model file and storage medium
CN115983245B (en) * 2023-03-20 2023-06-06 江西中至科技有限公司 Method and device for analyzing middle-length text information of building drawing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007115238A (en) * 2005-09-20 2007-05-10 Fukui Computer Kk Device, method, program for processing two-dimensional cad data and closed area identification method
EP3425571A1 (en) * 2017-07-04 2019-01-09 Kaulquappe GmbH Digital building information system
CN109685019A (en) * 2018-12-27 2019-04-26 福建省晨曦信息科技股份有限公司 A kind of component identification method, electronic equipment and storage medium
CN109740241A (en) * 2018-12-29 2019-05-10 浙江精工钢结构集团有限公司 A kind of method and application based on BIM model and component extension information MAP

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007115238A (en) * 2005-09-20 2007-05-10 Fukui Computer Kk Device, method, program for processing two-dimensional cad data and closed area identification method
EP3425571A1 (en) * 2017-07-04 2019-01-09 Kaulquappe GmbH Digital building information system
CN109685019A (en) * 2018-12-27 2019-04-26 福建省晨曦信息科技股份有限公司 A kind of component identification method, electronic equipment and storage medium
CN109740241A (en) * 2018-12-29 2019-05-10 浙江精工钢结构集团有限公司 A kind of method and application based on BIM model and component extension information MAP

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Automatic Integrity Checking of IFC Models relative to building Regulations;Jianqiao Gu 等;In Proceedings of ICIMCS 2016;全文 *
建筑平面图理解中对墙体符号的识别方法;贾哲明;计算机工程与应用;全文 *

Also Published As

Publication number Publication date
CN111159453A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
CN111159453B (en) Label and component matching method and device for CAD drawing
CN107463658B (en) Text classification method and device
CN110443239A (en) The recognition methods of character image and its device
CN106599940B (en) Picture character recognition method and device
CN110348368B (en) Method, computer readable medium and system for artificial intelligence analysis of house type graph
CN113052023A (en) CAD drawing analysis method, device, equipment and storage medium
Nurminen Algorithmic extraction of data in tables in PDF documents
CN111507083B (en) Text parsing method, text parsing device, text parsing equipment and storage medium
CN114972659B (en) Method and system for converting two-dimensional drawing into three-dimensional model for drawing examination
CN111782584A (en) Building drawing preprocessing system, method, electronic equipment and storage medium
CN114550195A (en) Machine learning technique for extracting floor plan elements from construction drawings
Shilman et al. Learning nongenerative grammatical models for document analysis
CN115238670B (en) Information text extraction method, device, equipment and storage medium
CN110427488A (en) The processing method and processing device of document
CN112100422A (en) Engineering drawing processing method, device, equipment and storage medium
CN111428503A (en) Method and device for identifying and processing same-name person
CN113268615A (en) Resource label generation method and device, electronic equipment and storage medium
Oskouie et al. Automated recognition of building façades for creation of As-Is Mock-Up 3D models
KR100319756B1 (en) Method for analyzing structure of treatise typed of document image
CN114255096A (en) Data requirement matching method and device, electronic equipment and storage medium
CN108205524A (en) Text data processing method and device
CN110795942B (en) Keyword determination method and device based on semantic recognition and storage medium
CN110347841B (en) Document content classification method and device, storage medium and electronic equipment
Yin et al. An automated layer classification method for converting CAD drawings to 3D BIM models
CN116704542A (en) Layer classification method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant